forgeplus/public/react/build/static/js/24.df9a463e.chunk.js

1 line
6.5 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[24],{dtw8:function(e,t,n){"use strict";n.r(t);var r=n("8Wa3");n.d(t,"MemoryRouter",(function(){return r.a}));var o=n("LWYa");n.d(t,"Prompt",(function(){return o.a}));var a=n("mLw1");n.d(t,"Redirect",(function(){return a.a}));var i=n("4p7I");n.d(t,"Route",(function(){return i.a}));var u=n("nr6O");n.d(t,"Router",(function(){return u.a}));var c=n("yczp");n.d(t,"StaticRouter",(function(){return c.a}));var l=n("yoKv");n.d(t,"Switch",(function(){return l.a}));var f=n("l1PF");n.d(t,"generatePath",(function(){return f.a}));var s=n("SsKX");n.d(t,"matchPath",(function(){return s.a}));var p=n("9C/b");n.d(t,"withRouter",(function(){return p.a}))},qmW9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.ImageLayerOfCommentHOC=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n){function a(e){f(this,a);var t=s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e));return t.onDelegateClick=function(e){var n=e.target.src||e.target.getAttribute("src")||e.target.getAttribute("href"),r=e.target.innerHTML.trim();if((0,c.isImageExtension)(n.trim())||(0,c.isImageExtension)(r)||"IMG"==e.target.tagName)return-1===n.indexOf("/images/avatars/User")&&-1===n.indexOf("kindeditor/plugins/emoticons")&&t.setState({showImage:!0,imageSrc:n}),e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.originalEvent.preventDefault(),!1},t.onImageLayerClose=function(){t.setState({showImage:!1,imageSrc:""})},t.MdifHasAnchorJustScorll=function(){var e=decodeURI(t.props.location.hash).replace("#","");if(e){var n=document.getElementsByName(e);n&&0!=n.length&&n[n.length-1].scrollIntoView()}},t.state={showImage:!1,imageSrc:""},t}return p(a,n),o(a,[{key:"componentDidMount",value:function(){var t=this;this.props.wrappedComponentRef&&this.props.wrappedComponentRef(this.refs.wrappedComponentRef),setTimeout((function(){m(e.parentSelector||".commentsDelegateParent").delegate(e.imgSelector||".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img","click",t.onDelegateClick)}),1200)}},{key:"componentWillUnmount",value:function(){m(e.parentSelector||".commentsDelegateParent","click",this.onDelegateClick)}},{key:"render",value:function(){return this.MdifHasAnchorJustScorll(),i.default.createElement(i.default.Fragment,null,i.default.createElement(u.default,r({},this.state,{onImageLayerClose:this.onImageLayerClose})),i.default.createElement(t,r({},this.props,{ref:"wrappedComponentRef"})))}}]),a}(a.Component)}};var a=n("q1tI"),i=l(a),u=l(n("Ozcj")),c=n("sYIF");function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=window.$},vabz:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n("q1tI"),i=h(a),u=n("eO8H"),c=n("dtw8"),l=n("sYIF"),f=n("1thW"),s=n("5A3O");n("7dqz");var p=h(n("CnBM")),m=h(n("HUFq")),d=n("qmW9");function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=(0,p.default)({loader:function(){return Promise.all([n.e(0),n.e(2),n.e(68),n.e(102)]).then(n.t.bind(null,"MByq",7))},loading:m.default}),b=(0,p.default)({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(48),n.e(58)]).then(n.t.bind(null,"9hAI",7))},loading:m.default}),w=function(e){function t(){var e,n,r;g(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.componentDidUpdate=function(){r.props.history.listen((function(){(document.body.scrollTop||document.documentElement.scrollTop>0)&&window.scrollTo(0,0)}))},y(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"render",value:function(){var e=this;return i.default.createElement("div",{className:"newMain clearfix"},i.default.createElement(u.Switch,this.props,i.default.createElement(u.Route,{path:"/projects/:projectsType/new/:OIdentifier",render:function(t){return i.default.createElement(v,r({},e.props,t))}}),i.default.createElement(u.Route,{path:"/projects/:projectsType/new",render:function(t){return i.default.createElement(v,r({},e.props,t))}}),i.default.createElement(u.Route,{path:"/projects/mirror/new",render:function(t){return i.default.createElement(v,r({},e.props,t))}}),i.default.createElement(u.Route,{path:"/explore",render:function(t){return i.default.createElement(b,r({},e.props,t))}}),i.default.createElement(u.Route,{path:"/",render:function(t){return i.default.createElement(b,r({},e.props,t))}})))}}]),t}(a.Component);t.default=(0,c.withRouter)((0,d.ImageLayerOfCommentHOC)({imgSelector:".imageLayerParent img, .imageLayerParent .imageTarget",parentSelector:".newMain"})((0,f.CNotificationHOC)()((0,l.SnackbarHOC)()((0,s.TPMIndexHOC)(w)))))}}]);