@variousjs/various 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.js +1 -2
- package/dist/core.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
- package/types/index.d.ts +14 -25
package/dist/core.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/*! For license information please see core.js.LICENSE.txt */
|
|
2
|
-
define(["react","react-dom"],(function(t,e){return function(){var n={63:function(t){"use strict";t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(o=r;0!=o--;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!t(e[a],n[a]))return!1}return!0}return e!=e&&n!=n}},679:function(t,e,n){"use strict";var r=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(t){return r.isMemo(t)?a:c[t.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,y=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(y){var o=h(n);o&&o!==y&&t(e,o,r)}var a=f(n);l&&(a=a.concat(l(n)));for(var c=u(e),d=u(n),v=0;v<a.length;++v){var m=a[v];if(!(i[m]||r&&r[m]||d&&d[m]||c&&c[m])){var b=p(n,m);try{s(e,m,b)}catch(t){}}}}return e}},703:function(t,e,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:function(t,e,n){t.exports=n(703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},921:function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,f=n?Symbol.for("react.async_mode"):60111,l=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.suspense_list"):60120,d=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,O=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case f:case l:case i:case c:case a:case h:return t;default:switch(t=t&&t.$$typeof){case s:case p:case v:case d:case u:return t;default:return e}}case o:return e}}}function E(t){return w(t)===l}e.AsyncMode=f,e.ConcurrentMode=l,e.ContextConsumer=s,e.ContextProvider=u,e.Element=r,e.ForwardRef=p,e.Fragment=i,e.Lazy=v,e.Memo=d,e.Portal=o,e.Profiler=c,e.StrictMode=a,e.Suspense=h,e.isAsyncMode=function(t){return E(t)||w(t)===f},e.isConcurrentMode=E,e.isContextConsumer=function(t){return w(t)===s},e.isContextProvider=function(t){return w(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===i},e.isLazy=function(t){return w(t)===v},e.isMemo=function(t){return w(t)===d},e.isPortal=function(t){return w(t)===o},e.isProfiler=function(t){return w(t)===c},e.isStrictMode=function(t){return w(t)===a},e.isSuspense=function(t){return w(t)===h},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===c||t===a||t===h||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===d||t.$$typeof===u||t.$$typeof===s||t.$$typeof===p||t.$$typeof===b||t.$$typeof===g||t.$$typeof===O||t.$$typeof===m)},e.typeOf=w},864:function(t,e,n){"use strict";t.exports=n(921)},585:function(t){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},658:function(t,e,n){var r=n(585);t.exports=function t(e,n,o){return r(n)||(o=n||o,n=[]),o=o||{},e instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}(e,n):r(e)?function(e,n,r){for(var o=[],i=0;i<e.length;i++)o.push(t(e[i],n,r).source);return f(new RegExp("(?:"+o.join("|")+")",l(r)),n)}(e,n,o):function(t,e,n){return p(i(t,n),e,n)}(e,n,o)},t.exports.parse=i,t.exports.compile=function(t,e){return c(i(t,e),e)},t.exports.tokensToFunction=c,t.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,a=0,c="",f=e&&e.delimiter||"/";null!=(n=o.exec(t));){var l=n[0],p=n[1],h=n.index;if(c+=t.slice(a,h),a=h+l.length,p)c+=p[1];else{var y=t[a],d=n[2],v=n[3],m=n[4],b=n[5],g=n[6],O=n[7];c&&(r.push(c),c="");var w=null!=d&&null!=y&&y!==d,E="+"===g||"*"===g,S="?"===g||"*"===g,P=n[2]||f,j=m||b;r.push({name:v||i++,prefix:d||"",delimiter:P,optional:S,repeat:E,partial:w,asterisk:!!O,pattern:j?s(j):O?".*":"[^"+u(P)+"]+?"})}}return a<t.length&&(c+=t.substr(a)),c&&r.push(c),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function c(t,e){for(var n=new Array(t.length),o=0;o<t.length;o++)"object"==typeof t[o]&&(n[o]=new RegExp("^(?:"+t[o].pattern+")$",l(e)));return function(e,o){for(var i="",c=e||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<t.length;s++){var f=t[s];if("string"!=typeof f){var l,p=c[f.name];if(null==p){if(f.optional){f.partial&&(i+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(r(p)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var h=0;h<p.length;h++){if(l=u(p[h]),!n[s].test(l))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(l)+"`");i+=(0===h?f.prefix:f.delimiter)+l}}else{if(l=f.asterisk?encodeURI(p).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(p),!n[s].test(l))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+l+'"');i+=f.prefix+l}}else i+=f}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t&&t.sensitive?"":"i"}function p(t,e,n){r(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<t.length;c++){var s=t[c];if("string"==typeof s)a+=u(s);else{var p=u(s.prefix),h="(?:"+s.pattern+")";e.push(s),s.repeat&&(h+="(?:"+p+h+")*"),a+=h=s.optional?s.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var y=u(n.delimiter||"/"),d=a.slice(-y.length)===y;return o||(a=(d?a.slice(0,-y.length):a)+"(?:"+y+"(?=$))?"),a+=i?"$":o&&d?"":"(?="+y+"|$)",f(new RegExp("^"+a,l(n)),e)}},161:function(e){"use strict";e.exports=t},305:function(t){"use strict";t.exports=e}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";o.r(i),o.d(i,{Link:function(){return ht},NavLink:function(){return vt},Prompt:function(){return z},Redirect:function(){return Z},Route:function(){return rt},Router:function(){return ke},Store:function(){return Ct},Switch:function(){return ot},default:function(){return De},generatePath:function(){return X},matchPath:function(){return nt}});var t=o(161),e=o.n(t),n=o(305);function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}var c=o(697),u=o.n(c);function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s.apply(this,arguments)}function f(t){return"/"===t.charAt(0)}function l(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}function p(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var h=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"==typeof e||"object"==typeof n){var r=p(e),o=p(n);return r!==e||o!==n?t(r,o):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1};function y(t,e){if(!t)throw new Error("Invariant failed")}function d(t){return"/"===t.charAt(0)?t:"/"+t}function v(t){return"/"===t.charAt(0)?t.substr(1):t}function m(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function b(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function g(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function O(t,e,n,r){var o;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t),o.state=e):(void 0===(o=s({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],o=e&&e.split("/")||[],i=t&&f(t),a=e&&f(e),c=i||a;if(t&&f(t)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var s=0,p=o.length;p>=0;p--){var h=o[p];"."===h?l(o,p):".."===h?(l(o,p),s++):s&&(l(o,p),s--)}if(!c)for(;s--;s)o.unshift("..");!c||""===o[0]||o[0]&&f(o[0])||o.unshift("");var y=o.join("/");return n&&"/"!==y.substr(-1)&&(y+="/"),y}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function w(){var t=null,e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var E=!("undefined"==typeof window||!window.document||!window.document.createElement);function S(t,e){e(window.confirm(t))}var P="popstate",j="hashchange";function R(){try{return window.history.state||{}}catch(t){return{}}}function x(t){void 0===t&&(t={}),E||y(!1);var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=t,a=i.forceRefresh,c=void 0!==a&&a,u=i.getUserConfirmation,f=void 0===u?S:u,l=i.keyLength,p=void 0===l?6:l,h=t.basename?b(d(t.basename)):"";function v(t){var e=t||{},n=e.key,r=e.state,o=window.location,i=o.pathname+o.search+o.hash;return h&&(i=m(i,h)),O(i,r,n)}function x(){return Math.random().toString(36).substr(2,p)}var C=w();function T(t){s(q,t),q.length=n.length,C.notifyListeners(q.location,q.action)}function _(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||M(v(t.state))}function A(){M(v(R()))}var N=!1;function M(t){N?(N=!1,T()):C.confirmTransitionTo(t,"POP",f,(function(e){e?T({action:"POP",location:t}):function(t){var e=q.location,n=D.indexOf(e.key);-1===n&&(n=0);var r=D.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(N=!0,I(o))}(t)}))}var k=v(R()),D=[k.key];function $(t){return h+g(t)}function I(t){n.go(t)}var L=0;function U(t){1===(L+=t)&&1===t?(window.addEventListener(P,_),o&&window.addEventListener(j,A)):0===L&&(window.removeEventListener(P,_),o&&window.removeEventListener(j,A))}var F=!1,q={length:n.length,action:"POP",location:k,createHref:$,push:function(t,e){var o="PUSH",i=O(t,e,x(),q.location);C.confirmTransitionTo(i,o,f,(function(t){if(t){var e=$(i),a=i.key,u=i.state;if(r)if(n.pushState({key:a,state:u},null,e),c)window.location.href=e;else{var s=D.indexOf(q.location.key),f=D.slice(0,s+1);f.push(i.key),D=f,T({action:o,location:i})}else window.location.href=e}}))},replace:function(t,e){var o="REPLACE",i=O(t,e,x(),q.location);C.confirmTransitionTo(i,o,f,(function(t){if(t){var e=$(i),a=i.key,u=i.state;if(r)if(n.replaceState({key:a,state:u},null,e),c)window.location.replace(e);else{var s=D.indexOf(q.location.key);-1!==s&&(D[s]=i.key),T({action:o,location:i})}else window.location.replace(e)}}))},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(t){void 0===t&&(t=!1);var e=C.setPrompt(t);return F||(U(1),F=!0),function(){return F&&(F=!1,U(-1)),e()}},listen:function(t){var e=C.appendListener(t);return U(1),function(){U(-1),e()}}};return q}var C="hashchange",T={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+v(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:v,decodePath:d},slash:{encodePath:d,decodePath:d}};function _(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function A(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function N(t){window.location.replace(_(window.location.href)+"#"+t)}function M(t){void 0===t&&(t={}),E||y(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),r=n.getUserConfirmation,o=void 0===r?S:r,i=n.hashType,a=void 0===i?"slash":i,c=t.basename?b(d(t.basename)):"",u=T[a],f=u.encodePath,l=u.decodePath;function p(){var t=l(A());return c&&(t=m(t,c)),O(t)}var h=w();function v(t){s(F,t),F.length=e.length,h.notifyListeners(F.location,F.action)}var P=!1,j=null;function R(){var t,e,n=A(),r=f(n);if(n!==r)N(r);else{var i=p(),a=F.location;if(!P&&(e=i,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(j===g(i))return;j=null,function(t){if(P)P=!1,v();else{h.confirmTransitionTo(t,"POP",o,(function(e){e?v({action:"POP",location:t}):function(t){var e=F.location,n=D.lastIndexOf(g(e));-1===n&&(n=0);var r=D.lastIndexOf(g(t));-1===r&&(r=0);var o=n-r;o&&(P=!0,$(o))}(t)}))}}(i)}}var x=A(),M=f(x);x!==M&&N(M);var k=p(),D=[g(k)];function $(t){e.go(t)}var I=0;function L(t){1===(I+=t)&&1===t?window.addEventListener(C,R):0===I&&window.removeEventListener(C,R)}var U=!1,F={length:e.length,action:"POP",location:k,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=_(window.location.href)),n+"#"+f(c+g(t))},push:function(t,e){var n="PUSH",r=O(t,void 0,void 0,F.location);h.confirmTransitionTo(r,n,o,(function(t){if(t){var e=g(r),o=f(c+e);if(A()!==o){j=e,function(t){window.location.hash=t}(o);var i=D.lastIndexOf(g(F.location)),a=D.slice(0,i+1);a.push(e),D=a,v({action:n,location:r})}else v()}}))},replace:function(t,e){var n="REPLACE",r=O(t,void 0,void 0,F.location);h.confirmTransitionTo(r,n,o,(function(t){if(t){var e=g(r),o=f(c+e);A()!==o&&(j=e,N(o));var i=D.indexOf(g(F.location));-1!==i&&(D[i]=e),v({action:n,location:r})}}))},go:$,goBack:function(){$(-1)},goForward:function(){$(1)},block:function(t){void 0===t&&(t=!1);var e=h.setPrompt(t);return U||(L(1),U=!0),function(){return U&&(U=!1,L(-1)),e()}},listen:function(t){var e=h.appendListener(t);return L(1),function(){L(-1),e()}}};return F}var k=1073741823,D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==o.g?o.g:{};function $(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var I=e().createContext||function(e,n){var r,o,i,c="__create-react-context-"+((D[i="__global_unique_id__"]=(D[i]||0)+1)+"__"),s=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).emitter=$(e.props.value),e}a(e,t);var r=e.prototype;return r.getChildContext=function(){var t;return(t={})[c]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e,r=this.props.value,o=t.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?e=0:(e="function"==typeof n?n(r,o):k,0!=(e|=0)&&this.emitter.set(t.value,e))}var i,a},r.render=function(){return this.props.children},e}(t.Component);s.childContextTypes=((r={})[c]=u().object.isRequired,r);var f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}a(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?k:e},r.componentDidMount=function(){this.context[c]&&this.context[c].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?k:t},r.componentWillUnmount=function(){this.context[c]&&this.context[c].off(this.onUpdate)},r.getValue=function(){return this.context[c]?this.context[c].get():e},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(t.Component);return f.contextTypes=((o={})[c]=u().object,o),{Provider:s,Consumer:f}},L=I,U=o(658),F=o.n(U);function q(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}o(864);var B=o(679),W=o.n(B),V=function(t){var e=L();return e.displayName=t,e},H=V("Router-History"),G=V("Router"),J=function(t){function n(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}a(n,t),n.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var r=n.prototype;return r.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return e().createElement(G.Provider,{value:{history:this.props.history,location:this.state.location,match:n.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},e().createElement(H.Provider,{children:this.props.children||null,value:this.props.history}))},n}(e().Component);e().Component;var K=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},e}(e().Component);function z(t){var n=t.message,r=t.when,o=void 0===r||r;return e().createElement(G.Consumer,null,(function(t){if(t||y(!1),!o||t.staticContext)return null;var r=t.history.block;return e().createElement(K,{onMount:function(t){t.release=r(n)},onUpdate:function(t,e){e.message!==n&&(t.release(),t.release=r(n))},onUnmount:function(t){t.release()},message:n})}))}var Y={},Q=0;function X(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(Y[t])return Y[t];var e=F().compile(t);return Q<1e4&&(Y[t]=e,Q++),e}(t)(e,{pretty:!0})}function Z(t){var n=t.computedMatch,r=t.to,o=t.push,i=void 0!==o&&o;return e().createElement(G.Consumer,null,(function(t){t||y(!1);var o=t.history,a=t.staticContext,c=i?o.push:o.replace,u=O(n?"string"==typeof r?X(r,n.params):s({},r,{pathname:X(r.pathname,n.params)}):r);return a?(c(u),null):e().createElement(K,{onMount:function(){c(u)},onUpdate:function(t,e){var n,r,o=O(e.to);n=o,r=s({},u,{key:o.key}),n.pathname===r.pathname&&n.search===r.search&&n.hash===r.hash&&n.key===r.key&&h(n.state,r.state)||c(u)},to:r})}))}var tt={},et=0;function nt(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=tt[n]||(tt[n]={});if(r[t])return r[t];var o=[],i={regexp:F()(t,o,e),keys:o};return et<1e4&&(r[t]=i,et++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var f=u[0],l=u.slice(1),p=t===f;return i&&!p?null:{path:n,url:"/"===n&&""===f?"/":f,isExact:p,params:a.reduce((function(t,e,n){return t[e.name]=l[n],t}),{})}}),null)}var rt=function(t){function n(){return t.apply(this,arguments)||this}return a(n,t),n.prototype.render=function(){var t=this;return e().createElement(G.Consumer,null,(function(n){n||y(!1);var r=t.props.location||n.location,o=s({},n,{location:r,match:t.props.computedMatch?t.props.computedMatch:t.props.path?nt(r.pathname,t.props):n.match}),i=t.props,a=i.children,c=i.component,u=i.render;return Array.isArray(a)&&function(t){return 0===e().Children.count(t)}(a)&&(a=null),e().createElement(G.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:c?e().createElement(c,o):u?u(o):null:"function"==typeof a?a(o):null)}))},n}(e().Component);e().Component;var ot=function(t){function n(){return t.apply(this,arguments)||this}return a(n,t),n.prototype.render=function(){var t=this;return e().createElement(G.Consumer,null,(function(n){n||y(!1);var r,o,i=t.props.location||n.location;return e().Children.forEach(t.props.children,(function(t){if(null==o&&e().isValidElement(t)){r=t;var a=t.props.path||t.props.from;o=a?nt(i.pathname,s({},t.props,{path:a})):n.match}})),o?e().cloneElement(r,{location:i,computedMatch:o}):null}))},n}(e().Component);function it(t){var n="withRouter("+(t.displayName||t.name)+")",r=function(n){var r=n.wrappedComponentRef,o=q(n,["wrappedComponentRef"]);return e().createElement(G.Consumer,null,(function(n){return n||y(!1),e().createElement(t,s({},o,n,{ref:r}))}))};return r.displayName=n,r.WrappedComponent=t,W()(r,t)}e().useContext;var at=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).history=x(e.props),e}return a(n,t),n.prototype.render=function(){return e().createElement(J,{history:this.history,children:this.props.children})},n}(e().Component),ct=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).history=M(e.props),e}return a(n,t),n.prototype.render=function(){return e().createElement(J,{history:this.history,children:this.props.children})},n}(e().Component),ut=function(t,e){return"function"==typeof t?t(e):t},st=function(t,e){return"string"==typeof t?O(t,null,null,e):t},ft=function(t){return t},lt=e().forwardRef;void 0===lt&&(lt=ft);var pt=lt((function(t,n){var r=t.innerRef,o=t.navigate,i=t.onClick,a=q(t,["innerRef","navigate","onClick"]),c=a.target,u=s({},a,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||c&&"_self"!==c||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),o())}});return u.ref=ft!==lt&&n||r,e().createElement("a",u)})),ht=lt((function(t,n){var r=t.component,o=void 0===r?pt:r,i=t.replace,a=t.to,c=t.innerRef,u=q(t,["component","replace","to","innerRef"]);return e().createElement(G.Consumer,null,(function(t){t||y(!1);var r=t.history,f=st(ut(a,t.location),t.location),l=f?r.createHref(f):"",p=s({},u,{href:l,navigate:function(){var e=ut(a,t.location),n=g(t.location)===g(st(e));(i||n?r.replace:r.push)(e)}});return ft!==lt?p.ref=n||c:p.innerRef=c,e().createElement(o,p)}))})),yt=function(t){return t},dt=e().forwardRef;void 0===dt&&(dt=yt);var vt=dt((function(t,n){var r=t["aria-current"],o=void 0===r?"page":r,i=t.activeClassName,a=void 0===i?"active":i,c=t.activeStyle,u=t.className,f=t.exact,l=t.isActive,p=t.location,h=t.sensitive,d=t.strict,v=t.style,m=t.to,b=t.innerRef,g=q(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return e().createElement(G.Consumer,null,(function(t){t||y(!1);var r=p||t.location,i=st(ut(m,r),r),O=i.pathname,w=O&&O.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),E=w?nt(r.pathname,{path:w,exact:f,sensitive:h,strict:d}):null,S=!!(l?l(E,r):E),P="function"==typeof u?u(S):u,j="function"==typeof v?v(S):v;S&&(P=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(P,a),j=s({},j,c));var R=s({"aria-current":S&&o||null,className:P,style:j,to:i},g);return yt!==dt?R.ref=n||b:R.innerRef=b,e().createElement(ht,R)}))})),mt=function(t,e){return mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},mt(t,e)};function bt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}mt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var gt=function(){return gt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},gt.apply(this,arguments)};function Ot(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}Object.create,Object.create;var wt,Et=o(63),St=o.n(Et),Pt=["name","prototype","length","propTypes","defaultProps","getDerivedStateFromProps","contextTypes","displayName"],jt=function(n){var r=n.getStore,o=n.subscribe,i=n.dispatch;return function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return function(a){var c=function(t){function c(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={props:r()},e}return bt(c,t),c.prototype.componentDidMount=function(){var t=this;this.unsubscribe=o((function(e){n.filter((function(t){return e.includes(t)})).length&&t.setState({props:r()})}))},c.prototype.componentWillUnmount=function(){this.unsubscribe()},c.prototype.render=function(){var t=this.state.props,n=Object.assign({dispatch:i},t,this.props);return e().createElement(a,gt({},n))},c}(t.Component);return Object.getOwnPropertyNames(a).forEach((function(t){var e=t;Pt.includes(t)||(c[e]=a[e])})),c}}},Rt=function(e){var n=e.getStore,r=e.subscribe;return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=(0,t.useState)(n()),a=i[0],c=i[1];return(0,t.useLayoutEffect)((function(){return r((function(t){e.filter((function(e){return t.includes(e)})).length&&c(n())}))})),a}},xt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.connect=jt(e),e.useStore=Rt(e),e}return bt(e,t),e}((function(){var t=this;this.createStore=function(e){t.state=e},this.getStore=function(){return JSON.parse(JSON.stringify(t.state))},this.subscribe=function(e){return t.listeners.push(e),function(){var n=t.listeners.slice(),r=n.indexOf(e);r>-1&&n.splice(r,1),t.listeners=n}},this.dispatch=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=typeof e;if("function"===o)return e.apply(void 0,Ot([{dispatch:function(e){return t.dispatch(e,!0)},getStore:t.getStore}],n));t.emits=gt(gt({},t.emits),e),n[0]?t.emit():(clearTimeout(t.timer),t.timer=setTimeout(t.emit))},this.emit=function(){for(var e=t.emits,n=[],r=Object.keys(e),o=0;o<r.length;o+=1){var i=r[o];i in t.state&&(St()(t.state[i],e[i])||(t.state[i]=e[i],n.push(i)))}n.length&&t.listeners.forEach((function(t){return t(n)})),t.emits={},t.timer=void 0},this.state={},this.listeners=[],this.emits={},this.timer=void 0})),Ct=xt,Tt=new Ct,_t=Tt.createStore,At=Tt.getStore,Nt=Tt.connect,Mt=Tt.dispatch,kt=function(){return e().createElement("div",null,"Loading")},Dt=function(t){var n=t.type,r=t.message,o=t.reload;return e().createElement(e().Fragment,null,e().createElement("div",null,"[".concat(n,"]").concat(r)),o?e().createElement("button",{type:"button",onClick:o},"Reload"):null)},$t=function(){return e().createElement("div",null,"Container not defined")},It="MOUNTED_COMPONENTS",Lt=["name","prototype","length","propTypes","defaultProps","getDerivedStateFromProps","contextTypes","displayName"];function Ut(t){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(t)}function Ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bt(t,e){return Bt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Bt(t,e)}function Wt(t,e){return!e||"object"!==Ut(e)&&"function"!=typeof e?Vt(t):e}function Vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ht(t){return Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ht(t)}function Gt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(t){t.LOADING_ERROR="LOADING_ERROR",t.DEPENDENCIES_LOADING_ERROR="DEPENDENCIES_LOADING_ERROR",t.NOT_DEFINED="NOT_DEFINED",t.INVALID_COMPONENT="INVALID_COMPONENT",t.SCRIPT_ERROR="SCRIPT_ERROR",t.ROUTER_ERROR="ROUTER_ERROR",t.CONTAINER_ERROR="CONTAINER_ERROR"}(wt||(wt={}));var Jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bt(t,e)}(c,t);var n,r,o,i,a=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ht(o);if(i){var n=Ht(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return Wt(this,t)});function c(){var t;Ft(this,c);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Gt(Vt(t=a.call.apply(a,[this].concat(n))),"state",{errorType:void 0,errorMessage:""}),t}return n=c,(r=[{key:"shouldComponentUpdate",value:function(t,e){var n=e.errorType;return t.location.pathname!==this.props.location.pathname&&n?(window.location.reload(),!1):!!n}},{key:"componentDidCatch",value:function(t){this.setState({errorType:wt.ROUTER_ERROR,errorMessage:t.message})}},{key:"render",value:function(){var t=this.state,n=t.errorType,r=t.errorMessage,o=this.props.children;return n?e().createElement(Dt,{type:wt[n],message:r}):o}}])&&qt(n.prototype,r),c}(e().Component),Kt=it(Jt);function zt(t,e,n){return function(r,o,i,a){var c=this.props.dispatch||t;if("store"===o){if(!e[i])throw new Error("action `".concat(i,"` is not present"));return c(e[i],a,r)}var u=n[o];if(!u)throw new Error("component `".concat(o,"` is not ready"));if(!u[i])throw new Error("action `".concat(i,"` of component `").concat(o,"` is not present"));return u[i](a,r)}}var Yt=function(t){return new Promise((function(e){window.requirejs(t,e)}))};function Qt(t){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(t)}var Xt=["components"],Zt=["history","location","match","staticContext","dispatch","MOUNTED_COMPONENTS","silent"];function te(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function ee(){return ee=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ee.apply(this,arguments)}function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(n),!0).forEach((function(e){fe(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function oe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ae(t,e){return ae=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ae(t,e)}function ce(t,e){return!e||"object"!==Qt(e)&&"function"!=typeof e?ue(t):e}function ue(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function se(t){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},se(t)}function fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function le(t,e){return de(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,e)||he(t,e)||pe()}function pe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function he(t,e){if(t){if("string"==typeof t)return ye(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(t,e):void 0}}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function de(t){if(Array.isArray(t))return t}function ve(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var me=function t(r){var o,i=r.config,a=r.name,c=r.storeDispatcher,u=r.componentDispatcher,s=r.Loader,f=r.Error,l=r.routerProps,p=r.onMounted,h=void 0===p?function(){}:p,y=Object.keys(At()),d=zt(Mt,c,u),v=i.components,m=ve(i,Xt),b=le(a.split("."),2),g=b[0],O=b[1],w=void 0===O?Symbol("module"):O,E=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ae(t,e)}(E,r);var o,i,p,b,O=(p=E,b=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=se(p);if(b){var n=se(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return ce(this,t)});function E(){var r;oe(this,E);for(var o=arguments.length,i=new Array(o),p=0;p<o;p++)i[p]=arguments[p];return fe(ue(r=O.call.apply(O,[this].concat(i))),"state",{componentExist:void 0,componentReady:!1,errorType:void 0,errorMessage:""}),fe(ue(r),"ComponentNode",void 0),fe(ue(r),"isUnMounted",void 0),fe(ue(r),"retryCount",0),fe(ue(r),"dispatch",d.bind(ue(r),g)),fe(ue(r),"unMountComponent",(function(){var t=At().MOUNTED_COMPONENTS;t=t.filter((function(t){return t!==g})),Mt(fe({},It,t),!0),delete u[a]})),fe(ue(r),"mountComponent",(function(){try{var t=window.requirejs.s.contexts._,e=t.registry,n=t.urlFetched;Object.keys(e).forEach((function(t){e[t].error&&(delete n[e[t].map.url],delete e[t])}))}catch(t){}window.requirejs([g],(function(t){if(!r.isUnMounted)if(t){var e=t[w]||t.default||t;if("function"==typeof e){var n=At().MOUNTED_COMPONENTS,o={};n.includes(g)||n.push(g),Object.getOwnPropertyNames(e).forEach((function(t){Lt.includes(t)||"function"!=typeof e[t]||(o[t]=e[t])})),u[a]=o,r.ComponentNode=e,r.setState({componentReady:!0},(function(){l?h():Mt(fe({},It,n),!0)}))}else r.setState({errorType:"INVALID_COMPONENT"})}else r.setState({errorType:"INVALID_COMPONENT"})}),(function(t){if(window.requirejs.undef(g),window.requirejs.config({paths:fe({},g,"".concat(v[g],"#"))}),!r.isUnMounted){if(r.retryCount<1)return r.retryCount+=1,void setTimeout(r.mountComponent,1e3);var e=le(t.requireModules,1)[0];r.setState({errorType:e===g?"LOADING_ERROR":"DEPENDENCIES_LOADING_ERROR",errorMessage:t.message})}}))})),fe(ue(r),"onReload",(function(){r.setState({componentReady:!1,errorType:void 0,errorMessage:""},(function(){r.mountComponent()}))})),fe(ue(r),"$render",(function(o){var i=o.name,a=o.url,l=o.target,p=o.props,h=o.module,y=o.onMounted,d=r.props,b={history:d.history,location:d.location,match:d.match,staticContext:d.staticContext};a&&(window.requirejs.undef(i),window.requirejs.config({paths:fe({},i,"".concat(a,"#"))}));var g=t({name:h?"".concat(i,".").concat(h):i,storeDispatcher:c,componentDispatcher:u,Loader:s,Error:f,config:re(re({},m),{},{components:v}),routerProps:b,onMounted:y}),O=function(t){return e().createElement(g,t)};return(0,n.render)(e().createElement(O,p),l),function(){return(0,n.unmountComponentAtNode)(l)}})),r}return o=E,(i=[{key:"componentDidMount",value:function(){this.setState({componentExist:window.requirejs.specified(g)}),this.mountComponent()}},{key:"componentDidCatch",value:function(t){this.setState({errorType:"SCRIPT_ERROR",errorMessage:t.message}),window.requirejs.undef(g),window.requirejs.config({paths:fe({},g,"".concat(v[g],"#"))}),this.unMountComponent()}},{key:"componentWillUnmount",value:function(){this.ComponentNode=null,this.unMountComponent(),this.isUnMounted=!0}},{key:"render",value:function(){var t=this,n=this.props,r=n.history,o=n.location,i=n.match,a=n.staticContext,c=(n.dispatch,n.MOUNTED_COMPONENTS),u=n.silent,p=ve(n,Zt),h=this.state,d=h.componentReady,v=h.errorMessage,b=h.errorType,g=h.componentExist,O={},w={},E=this.ComponentNode;if(b)return u?null:e().createElement(f,{type:wt[b],message:v,reload:"INVALID_COMPONENT"===b?void 0:this.onReload});if(!d)return u||!1!==g?null:e().createElement(s,null);y.forEach((function(e){e!==It&&(O[e]=t.props[e])})),Object.keys(p).forEach((function(t){O[t]!==p[t]&&(w[t]=p[t])}));var S=l||{history:r,location:o,match:i,staticContext:a},P=Object.keys(S).length?S:void 0;return e().createElement(E,ee({},w,{$config:m,$dispatch:this.dispatch,$store:O,$mounted:c,$router:P,$render:l?void 0:this.$render,$preload:l?void 0:Yt}))}}])&&ie(o.prototype,i),E}(e().Component),S=l?E:it(E),P=de(o=y)||te(o)||he(o)||pe(),j=P[0],R=P.slice(1);return Nt.apply(void 0,[j].concat(function(t){return function(t){if(Array.isArray(t))return ye(t)}(t)||te(t)||he(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(R)))(S)};function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}var ge=["dependencies","entry","routerMode","root","components","store","actions","Loader","Error","Container"];function Oe(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function we(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ee(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Se(t,e){return Se=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Se(t,e)}function Pe(t,e){return!e||"object"!==be(e)&&"function"!=typeof e?je(t):e}function je(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Re(t){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Re(t)}function xe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ce(t,e){if(t){if("string"==typeof t)return Te(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(t,e):void 0}}function Te(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _e(t){if(Array.isArray(t))return t}function Ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ne(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ae(Object(n),!0).forEach((function(e){Me(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Me(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ke=Kt,De=function(t){t.dependencies,t.entry;var r=t.routerMode,o=t.root,i=t.components,a=void 0===i?{}:i,c=t.store,u=void 0===c?{}:c,s=t.actions,f=void 0===s?{}:s,l=t.Loader,p=void 0===l?kt:l,h=t.Error,y=void 0===h?Dt:h,d=t.Container,v=void 0===d?$t:d,m=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,ge),b="browser"===r?at:ct,g=Object.keys(u).concat([It]),O={},w=Ne({},f),E={},S=zt(Mt,w,O);_t(Ne(Ne({},u),{},Me({},It,[])));var P,j=function(t,n,r){var o=me({name:t,storeDispatcher:w,componentDispatcher:O,Loader:p,Error:y,config:Ne(Ne({},m),{},{components:a}),routerProps:n,onMounted:r});return function(t){return e().createElement(o,t)}},R=function(t){var n=function(t,e){return _e(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,e)||Ce(t,e)||xe()}(t.split("."),1)[0];if(!a[n])return function(){return e().createElement(y,{type:wt.NOT_DEFINED})};if(E[n])return E[n];var r=j(t);return E[n]=r,r},x=function(t){var r=t.name,o=t.url,i=t.target,a=t.props,c=t.module,u=t.onMounted;o&&(window.requirejs.undef(r),window.requirejs.config({paths:Me({},r,"".concat(o,"#"))}));var s=j(c?"".concat(r,".").concat(c):r,{},u);return(0,n.render)(e().createElement(s,a),i),function(){return(0,n.unmountComponentAtNode)(i)}},C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Se(t,e)}(c,t);var n,r,o,i,a=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Re(o);if(i){var n=Re(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return Pe(this,t)});function c(){var t;we(this,c);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Me(je(t=a.call.apply(a,[this].concat(n))),"state",{errorType:void 0,errorMessage:""}),Me(je(t),"dispatch",S.bind(je(t),"store")),t}return n=c,(r=[{key:"componentDidCatch",value:function(t){this.setState({errorType:"CONTAINER_ERROR",errorMessage:t.message})}},{key:"render",value:function(){var t=this,n=this.state,r=n.errorType,o=n.errorMessage,i=this.props,a=i.history,c=i.location,u=i.match,s=i.staticContext;if(r)return e().createElement(y,{type:wt[r],message:o});var f={};g.forEach((function(e){e!==It&&(f[e]=t.props[e])}));var l=this.props.MOUNTED_COMPONENTS;return e().createElement(v,{$component:R,$render:x,$mounted:l,$config:m,$dispatch:this.dispatch,$store:f,$preload:Yt,$router:{history:a,location:c,match:u,staticContext:s}})}}])&&Ee(n.prototype,r),c}(e().Component),T=_e(P=g)||Oe(P)||Ce(P)||xe(),_=T[0],A=T.slice(1),N=it(C),M=Nt.apply(void 0,[_].concat(function(t){return function(t){if(Array.isArray(t))return Te(t)}(t)||Oe(t)||Ce(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(A)))(N);(0,n.render)(e().createElement(b,null,e().createElement(M,null)),document.querySelector(o||"#root"))}}(),i}()}));
|
|
1
|
+
define(["react","react-dom"],(function(t,e){return function(){"use strict";var r={63:function(t){t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var u=i[o];if(!t(e[u],r[u]))return!1}return!0}return e!=e&&r!=r}},161:function(e){e.exports=t},305:function(t){t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){o.r(i),o.d(i,{Store:function(){return m},default:function(){return pt}});var t=o(161),e=o.n(t),r=o(305),n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var c=function(){return c=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},c.apply(this,arguments)};function a(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}Object.create,Object.create;var s=o(63),f=o.n(s),l=["name","prototype","length","propTypes","defaultProps","getDerivedStateFromProps","contextTypes","displayName"],p=function(r){var n=r.getStore,o=r.subscribe,i=r.dispatch;return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return function(a){var s=function(t){function s(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={props:n()},e}return u(s,t),s.prototype.componentDidMount=function(){var t=this;this.unsubscribe=o((function(e){r.filter((function(t){return e.includes(t)})).length&&t.setState({props:n()})}))},s.prototype.componentWillUnmount=function(){this.unsubscribe()},s.prototype.render=function(){var t=this.state.props,r=Object.assign({dispatch:i},t,this.props);return e().createElement(a,c({},r))},s}(t.Component);return Object.getOwnPropertyNames(a).forEach((function(t){var e=t;l.includes(t)||(s[e]=a[e])})),s}}},y=function(e){var r=e.getStore,n=e.subscribe;return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=(0,t.useState)(r()),u=i[0],c=i[1];return(0,t.useLayoutEffect)((function(){return n((function(t){e.filter((function(e){return t.includes(e)})).length&&c(r())}))})),u}},d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.connect=p(e),e.useStore=y(e),e}return u(e,t),e}((function(){var t=this;this.createStore=function(e){t.state=e},this.getStore=function(){var e=Reflect.ownKeys(t.state),r={};return e.forEach((function(e){r[e]=JSON.parse(JSON.stringify(t.state[e]))})),r},this.subscribe=function(e){return t.listeners.push(e),function(){var r=t.listeners.slice(),n=r.indexOf(e);n>-1&&r.splice(n,1),t.listeners=r}},this.dispatch=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=typeof e;if("function"===o)return e.apply(void 0,a([{dispatch:function(e){return t.dispatch(e,!0)},getStore:t.getStore}],r));t.emits=c(c({},t.emits),e),r[0]?t.emit():(clearTimeout(t.timer),t.timer=setTimeout(t.emit))},this.emit=function(){for(var e=t.emits,r=[],n=Reflect.ownKeys(e),o=0;o<n.length;o+=1){var i=n[o];i in t.state&&(f()(t.state[i],e[i])||(t.state[i]=e[i],r.push(i)))}r.length&&t.listeners.forEach((function(t){return t(r)})),t.emits={},t.timer=void 0},this.state={},this.listeners=[],this.emits={},this.timer=void 0})),m=d,b=new m,h=b.createStore,v=b.getStore,O=b.connect,g=b.dispatch,E=b.subscribe,j=function(){return e().createElement("div",null,"Loading")},w=function(t){var r=t.type,n=t.message,o=t.reload;return e().createElement(e().Fragment,null,e().createElement("div",null,"[".concat(r,"]").concat(n)),o?e().createElement("button",{type:"button",onClick:o},"Reload"):null)},S=function(){return e().createElement("div",null,"Container not defined")};function R(t,e,r){return function(n,o,i,u){var c=this.props.dispatch||t;if("store"===o){if(!e[i])throw new Error("action `".concat(i,"` is not present"));return c(e[i],u,n)}var a=r[o];if(!a)throw new Error("component `".concat(o,"` is not ready"));if(!a[i])throw new Error("action `".concat(i,"` of component `").concat(o,"` is not present"));return a[i](u,n)}}var P,_=function(t){return new Promise((function(e){window.requirejs(t,e)}))},N=Symbol("MOUNTED_COMPONENTS"),C=Symbol("MESSAGE_KEY"),T=["name","prototype","length","propTypes","defaultProps","getDerivedStateFromProps","contextTypes","displayName"];!function(t){t.LOADING_ERROR="LOADING_ERROR",t.DEPENDENCIES_LOADING_ERROR="DEPENDENCIES_LOADING_ERROR",t.NOT_DEFINED="NOT_DEFINED",t.INVALID_COMPONENT="INVALID_COMPONENT",t.SCRIPT_ERROR="SCRIPT_ERROR",t.ROUTER_ERROR="ROUTER_ERROR",t.CONTAINER_ERROR="CONTAINER_ERROR"}(P||(P={}));var D=function(t){return function(e,r){return g(function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},C,{timestamp:+new Date,type:t,name:e,value:r}))}},M=function(t,e){return function(r){if(r[0]===C){var n=v()[C],o=n.name,i=n.value,u=n.type;u!==t&&e({name:o,value:i,type:u})}}};function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}var A=["components"],x=["dispatch","$silent"];function L(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function k(){return k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},k.apply(this,arguments)}function $(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$(Object(r),!0).forEach((function(e){J(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function G(t,e){return G=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},G(t,e)}function V(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?B(t):e}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}function J(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W(t,e){return Q(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],u=!0,c=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(c)throw o}}return i}}(t,e)||z(t,e)||Y()}function Y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(t,e){if(t){if("string"==typeof t)return H(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(t,e):void 0}}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Q(t){if(Array.isArray(t))return t}function X(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Z=function n(o){var i,u=o.config,c=o.name,a=o.storeDispatcher,s=o.componentDispatcher,f=o.Loader,l=o.Error,p=o.onMounted,y=Object.keys(v()),d=R(g,a,s),m=u.components,b=X(u,A),h=W(c.split("."),2),j=h[0],w=h[1],S=void 0===w?Symbol("module"):w,C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&G(t,e)}(w,t);var o,i,u,h,O=(u=w,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=K(u);if(h){var r=K(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return V(this,t)});function w(){var t;U(this,w);for(var o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];return J(B(t=O.call.apply(O,[this].concat(i))),"state",{componentExist:void 0,componentReady:!1,errorType:void 0,errorMessage:""}),J(B(t),"unsubscribe",void 0),J(B(t),"ComponentNode",void 0),J(B(t),"isUnMounted",void 0),J(B(t),"retryCount",0),J(B(t),"dispatch",d.bind(B(t),j)),J(B(t),"postMessage",D(j)),J(B(t),"unMountComponent",(function(){var t=v()[N];t=t.filter((function(t){return t!==j})),g(J({},N,t),!0),delete s[c]})),J(B(t),"mountComponent",(function(){if("store"!==j){try{var e=window.requirejs.s.contexts._,r=e.registry,n=e.urlFetched;Object.keys(r).forEach((function(t){r[t].error&&(delete n[r[t].map.url],delete r[t])}))}catch(t){}window.requirejs([j],(function(e){if(!t.isUnMounted)if(e){var r=e[S]||e.default||e;if("function"==typeof r){var n=v()[N],o={};n.includes(j)||n.push(j),Object.getOwnPropertyNames(r).forEach((function(e){"function"==typeof r[e]&&("$onMessage"!==e?T.includes(e)||(o[e]=r[e]):t.unsubscribe=E(M(j,r[e])))})),s[c]=o,t.ComponentNode=r,t.setState({componentReady:!0},(function(){p?p():g(J({},N,n),!0)}))}else t.setState({errorType:"INVALID_COMPONENT"})}else t.setState({errorType:"INVALID_COMPONENT"})}),(function(e){if(window.requirejs.undef(j),window.requirejs.config({paths:J({},j,"".concat(m[j],"#"))}),!t.isUnMounted){if(t.retryCount<1)return t.retryCount+=1,void setTimeout(t.mountComponent,1e3);var r=W(e.requireModules,1)[0];t.setState({errorType:r===j?"LOADING_ERROR":"DEPENDENCIES_LOADING_ERROR",errorMessage:e.message})}}))}else t.setState({errorType:"INVALID_COMPONENT",errorMessage:"Cannot load component named `store`"})})),J(B(t),"onReload",(function(){t.setState({componentReady:!1,errorType:void 0,errorMessage:""},(function(){t.mountComponent()}))})),J(B(t),"$getMountedComponents",(function(){return v()[N]})),J(B(t),"$render",(function(t){var o=t.name,i=t.url,u=t.target,c=t.props,p=t.module,y=t.onMounted;i&&(window.requirejs.undef(o),window.requirejs.config({paths:J({},o,"".concat(i,"#"))}));var d=n({name:p?"".concat(o,".").concat(p):o,storeDispatcher:a,componentDispatcher:s,Loader:f,Error:l,config:q(q({},b),{},{components:m}),onMounted:y}),h=function(t){return e().createElement(d,t)};return(0,r.render)(e().createElement(h,c),u),function(){return(0,r.unmountComponentAtNode)(u)}})),t}return o=w,(i=[{key:"componentDidMount",value:function(){this.setState({componentExist:window.requirejs.specified(j)}),this.mountComponent()}},{key:"componentDidCatch",value:function(t){this.setState({errorType:"SCRIPT_ERROR",errorMessage:t.message}),window.requirejs.undef(j),window.requirejs.config({paths:J({},j,"".concat(m[j],"#"))}),this.unMountComponent()}},{key:"componentWillUnmount",value:function(){this.ComponentNode=null,this.unMountComponent(),this.isUnMounted=!0,this.unsubscribe&&this.unsubscribe()}},{key:"render",value:function(){var t=this,r=this.props,n=(r.dispatch,r.$silent),o=X(r,x),i=this.state,u=i.componentReady,c=i.errorMessage,a=i.errorType,s=i.componentExist,d={},m={},h=this.ComponentNode;return a?n?null:e().createElement(l,{type:P[a],message:c,reload:"INVALID_COMPONENT"===a?void 0:this.onReload}):u?(y.forEach((function(e){d[e]=t.props[e]})),Object.keys(o).forEach((function(t){d[t]!==o[t]&&(m[t]=o[t])})),e().createElement(h,k({},m,{$config:b,$dispatch:this.dispatch,$store:d,$render:p?void 0:this.$render,$preload:_,$postMessage:this.postMessage,$getMountedComponents:this.$getMountedComponents}))):n||!1!==s?null:e().createElement(f,null)}}])&&F(o.prototype,i),w}(t.Component),I=Q(i=y)||L(i)||z(i)||Y(),$=I[0],Z=I.slice(1);return O.apply(void 0,[$].concat(function(t){return function(t){if(Array.isArray(t))return H(t)}(t)||L(t)||z(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Z)))(C)};function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}var et=["dependencies","entry","root","components","store","actions","Loader","Error","Container"];function rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ot(t,e){return ot=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ot(t,e)}function it(t,e){return!e||"object"!==tt(e)&&"function"!=typeof e?ut(t):e}function ut(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ct(t){return ct=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ct(t)}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function st(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ft(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach((function(e){lt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function lt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=function(n){n.dependencies,n.entry;var o,i=n.root,u=n.components,c=void 0===u?{}:u,a=n.store,s=void 0===a?{}:a,f=n.actions,l=void 0===f?{}:f,p=n.Loader,y=void 0===p?j:p,d=n.Error,m=void 0===d?w:d,b=n.Container,v=void 0===b?S:b,O=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(n,et),g={},E=ft({},l),R={};h(ft(ft({},s),{},(lt(o={},N,[]),lt(o,C,{}),o)));var _=function(t){var r,n,o=(r=t.split("."),n=1,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],u=!0,c=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(c)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return at(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?at(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];if(!c[o])return function(){return e().createElement(m,{type:P.NOT_DEFINED})};if(R[t])return R[t];var i=function(t,r){var n=Z({name:t,storeDispatcher:E,componentDispatcher:g,Loader:y,Error:m,config:ft(ft({},O),{},{components:c}),onMounted:void 0});return function(t){return e().createElement(n,t)}}(t);return R[t]=i,i},T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ot(t,e)}(c,t);var r,n,o,i,u=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ct(o);if(i){var r=ct(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return it(this,t)});function c(){var t;rt(this,c);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return lt(ut(t=u.call.apply(u,[this].concat(r))),"state",{errorType:void 0,errorMessage:""}),t}return r=c,(n=[{key:"componentDidCatch",value:function(t){this.setState({errorType:"CONTAINER_ERROR",errorMessage:t.message})}},{key:"render",value:function(){var t=this.state,r=t.errorType,n=t.errorMessage;return r?e().createElement(m,{type:P[r],message:n}):e().createElement(v,{$component:_,$config:O})}}])&&nt(r.prototype,n),c}(t.Component);(0,r.render)(e().createElement(T,null),document.querySelector(i||"#root"))}}(),i}()}));
|
|
3
2
|
//# sourceMappingURL=core.js.map
|