/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/loadable-components@2.2.3/dist/loadable-components.cjs.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react")),hoistNonReactStatics=_interopDefault(require("hoist-non-react-statics")),classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},inherits=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)},possibleConstructorReturn=function(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},components={},track=function e(t,o){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=o.join("-");return n&&(r+="-"+n),components[r]?e(t,o,n+1):(components[r]=t,r)},get$1=function(e){return components[e]},getAll=function(){return _extends({},components)},reset=function(){components={}},tracker=Object.freeze({track:track,get:get$1,getAll:getAll,reset:reset}),LOADABLE_STATE="__LOADABLE_STATE__",LOADABLE="@@loadable-components/loadable";function loadState(e){return e.children?Promise.all(e.children.map((function(e){var t=get$1(e.id);if(!t)return console.warn("loadable-component client modules:",getAll()),console.warn("loadable-component server modules:",window[LOADABLE_STATE]),Promise.reject(new Error('loadable-components: module "'+e.id+'" is not found, client and server modules are not sync. You are probably not using the same resolver on server and client.'));var o=t[LOADABLE];return"function"!=typeof o?Promise.reject(new Error('loadable-components: module "'+e.id+'" is not a loadable component, please verify your SSR setup')):o().load().then((function(){return loadState(e)}))}))):Promise.resolve(null)}function loadComponents(){if("undefined"==typeof window)return Promise.reject(new Error("loadable-components: `loadComponents` must be called client-side: `window` is undefined"));var e=window[LOADABLE_STATE];return e?loadState(e):Promise.reject(new Error("loadable-components state not found. You have a problem server-side. Please verify that you have called `loadableState.getScriptTag()` server-side."))}function getState(){var e,t=getAll(),o=Object.keys(t).reduce((function(e,o){var n=t[o];return n.loadingPromise?[].concat(e,[{id:n.componentId}]):e}),[]);return(e={})[LOADABLE_STATE]={children:o},e}var resolveModuleDefault=function(e){return e.default||e},EmptyComponent=function(){return null};function loadable(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.ErrorComponent,n=void 0===o?EmptyComponent:o,r=t.LoadingComponent,a=void 0===r?EmptyComponent:r,i=t.render,l=t.modules,s=t.asyncMode,c=function(t){function o(e){classCallCheck(this,o);var n=possibleConstructorReturn(this,t.call(this,e));return n.state={Component:o.Component,error:null,loading:!o.Component},n.mounted=!1,n.loadingPromise=null,"undefined"!=typeof window&&null===n.state.Component&&null===n.loadingPromise&&(n.loadingPromise=o.load().then((function(e){n.safeSetState({Component:e,loading:!1})})).catch((function(e){n.safeSetState({error:e,loading:!1})}))),n}return inherits(o,t),o.load=function(){return o.loadingPromise||(o.loadingPromise=e().then((function(e){var t,n=resolveModuleDefault(e);return o.Component=n,hoistNonReactStatics(o,n,((t={Component:!0,loadingPromise:!0,load:!0})[LOADABLE]=!0,t.componentId=!0,t)),n})).catch((function(e){throw o.loadingPromise=null,e}))),o.loadingPromise},o.prototype.componentDidMount=function(){this.mounted=!0},o.prototype.componentWillUnmount=function(){this.mounted=!1},o.prototype.safeSetState=function(e){this.mounted&&this.setState(e)},o.prototype.render=function(){var e=this.state,t=e.Component,o=e.error;if("function"==typeof i)return i(_extends({},this.state,{ownProps:this.props}));if(null!==t)return React.createElement(t,this.props);if(null!==o)return React.createElement(n,{error:o,ownProps:this.props});if(s)throw this.loadingPromise;return React.createElement(a,this.props)},o}(React.Component);if(c.Component=null,c.loadingPromise=null,c[LOADABLE]=function(){return c},l){var u=track(c,l);c.componentId=u}return c}var componentTracker=tracker;exports.componentTracker=componentTracker,exports.loadComponents=loadComponents,exports.getState=getState,exports.LOADABLE=LOADABLE,exports.default=loadable;
//# sourceMappingURL=/sm/2244dbc97cd92c44ec3fceecc178f44a6242f9a6a0d6e9aea7f877b2231a1d39.map