Current Path : C:/xampp/htdocs/moodle/mod/hvp/editor/scripts/ |
Current File : C:/xampp/htdocs/moodle/mod/hvp/editor/scripts/h5p-hub-client.js |
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=30)}([function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){e.exports=n(38)()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(18);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(11).default,a=n(3);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(){return e.exports=n=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},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return te}));var r=n(16),a=n.n(r),i=n(28),o=n.n(i),l=n(14),s=n.n(l),u=n(12),c=n.n(u),f=n(6),d=n.n(f),p=n(3),h=n.n(p),m=n(7),y=n.n(m),g=n(8),b=n.n(g),v=n(4),w=n.n(v),M=n(2),L=n.n(M),E=n(9),C=n.n(E),x=n(5),S=n.n(x),T=n(11),N=n.n(T),j=n(0),D=n.n(j);function k(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A="object"===("undefined"==typeof self?"undefined":N()(self))&&self.self===self?self:"object"===(void 0===e?"undefined":N()(e))&&e.global===e||"object"===(void 0===e?"undefined":N()(e))&&e.GLOBAL===e?e:{};A.__REACT_ASYNC__=A.__REACT_ASYNC__||{};var P,R=function(){},z=function e(){S()(this,e),this.abort=R,this.signal={}};try{P=n(1)}catch(e){}var _,F=P&&P.oneOfType([P.node,P.func]),U=P&&P.shape({initialValue:P.any,data:P.any,error:P.instanceOf(Error),value:P.any,startedAt:P.instanceOf(Date),finishedAt:P.instanceOf(Date),status:P.oneOf(["initial","pending","fulfilled","rejected"]),isInitial:P.bool,isPending:P.bool,isLoading:P.bool,isFulfilled:P.bool,isResolved:P.bool,isRejected:P.bool,isSettled:P.bool,counter:P.number,promise:P.instanceOf(Promise),run:P.func,reload:P.func,cancel:P.func,setData:P.func,setError:P.func}),B=P&&{Async:{children:F,promise:P.instanceOf(Promise),promiseFn:P.func,deferFn:P.func,watch:P.any,watchFn:P.func,initialValue:P.any,onResolve:P.func,onReject:P.func,reducer:P.func,dispatcher:P.func,debugLabel:P.string,suspense:P.bool},Initial:{children:F,state:U.isRequired,persist:P.bool},Pending:{children:F,state:U.isRequired,initial:P.bool},Fulfilled:{children:F,state:U.isRequired,persist:P.bool},Rejected:{children:F,state:U.isRequired,persist:P.bool},Settled:{children:F,state:U.isRequired,persist:P.bool}},Q=function(e){if("function"==typeof e){for(var t=e,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t.apply(void 0,r)}return e},Y=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return D.a.createElement(D.a.Fragment,null,a.isInitial||n&&!a.data?Q(t,a):null)},W=function(e){var t=e.children,n=e.initial,r=e.state,a=void 0===r?{}:r;return D.a.createElement(D.a.Fragment,null,!a.isPending||n&&a.value?null:Q(t,a))},V=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return D.a.createElement(D.a.Fragment,null,a.isFulfilled||n&&a.data?Q(t,a.data,a):null)},q=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return D.a.createElement(D.a.Fragment,null,a.isRejected||n&&a.error?Q(t,a.error,a):null)},H=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return D.a.createElement(D.a.Fragment,null,a.isSettled||n&&a.value?Q(t,a):null)};B&&(Y.propTypes=B.Initial,W.propTypes=B.Pending,V.propTypes=B.Fulfilled,q.propTypes=B.Rejected,H.propTypes=B.Settled),function(e){e.initial="initial",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected"}(_||(_={}));var G=function(e){return{status:e,isInitial:e===_.initial,isPending:e===_.pending,isLoading:e===_.pending,isFulfilled:e===_.fulfilled,isResolved:e===_.fulfilled,isRejected:e===_.rejected,isSettled:e===_.fulfilled||e===_.rejected}},Z=function(){};Object.setPrototypeOf?Object.setPrototypeOf(Z,Promise):Z.__proto__=Promise,Z.prototype=C()(Object.create(Promise.prototype),{finally:function(){return this},catch:function(){return this},then:function(){return this}});var K,X=new Z;!function(e){e.start="start",e.cancel="cancel",e.fulfill="fulfill",e.reject="reject"}(K||(K={}));var J=function(e){var t=e.initialValue,n=e.promise,r=e.promiseFn;return O(O({initialValue:t,data:t instanceof Error?void 0:t,error:t instanceof Error?t:void 0,value:t,startedAt:n||r?new Date:void 0,finishedAt:t?new Date:void 0},G(function(e,t){return e instanceof Error?_.rejected:void 0!==e?_.fulfilled:t?_.pending:_.initial}(t,n||r))),{},{counter:0,promise:X})},$=function(e,t){switch(t.type){case K.start:return O(O(O({},e),{},{startedAt:new Date,finishedAt:void 0},G(_.pending)),{},{counter:t.meta.counter,promise:t.meta.promise});case K.cancel:return O(O(O({},e),{},{startedAt:void 0,finishedAt:void 0},G((n=e.error||e.data)instanceof Error?_.rejected:void 0!==n?_.fulfilled:_.initial)),{},{counter:t.meta.counter,promise:t.meta.promise});case K.fulfill:return O(O(O({},e),{},{data:t.payload,value:t.payload,error:void 0,finishedAt:new Date},G(_.fulfilled)),{},{promise:t.meta.promise});case K.reject:return O(O(O({},e),{},{error:t.payload,value:t.payload,finishedAt:new Date},G(_.rejected)),{},{promise:t.meta.promise});default:return e}var n},ee=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];e.apply(void 0,[t].concat(r)),t.type===K.start&&"function"==typeof t.payload&&t.payload()}};D.a.Component;var te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Async",n=D.a.createContext(void 0),r=n.Consumer,a=n.Provider;function i(e){var t=e.children;return D.a.createElement(r,null,(function(e){if(!e)throw new Error("this component should only be used within an associated <Async> component!");return t(e)}))}var o=function(t){y()(r,t);var n=k(r);function r(t){var a;S()(this,r),(a=n.call(this,t)).mounted=!1,a.counter=0,a.args=[],a.promise=X,a.abortController=new z,a.start=a.start.bind(h()(a)),a.load=a.load.bind(h()(a)),a.run=a.run.bind(h()(a)),a.cancel=a.cancel.bind(h()(a)),a.onResolve=a.onResolve.bind(h()(a)),a.onReject=a.onReject.bind(h()(a)),a.setData=a.setData.bind(h()(a)),a.setError=a.setError.bind(h()(a));var i=t.promise,o=t.promiseFn||e.promiseFn,l=t.initialValue||e.initialValue;a.state=O(O({},J({initialValue:l,promise:i,promiseFn:o})),{},{cancel:a.cancel,run:a.run,reload:function(){var e;a.load(),(e=a).run.apply(e,c()(a.args))},setData:a.setData,setError:a.setError}),a.debugLabel=t.debugLabel||e.debugLabel;var s=A.__REACT_ASYNC__.devToolsDispatcher,u=t.reducer||e.reducer,f=t.dispatcher||e.dispatcher||s,d=u?function(e,t){return u(e,t,$)}:$,p=ee((function(e,t){a.setState((function(t){return d(t,e)}),t)}));return a.dispatch=f?function(e){return f(e,p,t)}:p,a}return d()(r,[{key:"componentDidMount",value:function(){this.mounted=!0,!this.props.promise&&this.state.initialValue||this.load()}},{key:"componentDidUpdate",value:function(t){var n=this.props,r=n.watch,a=n.watchFn,i=void 0===a?e.watchFn:a,o=n.promise,l=n.promiseFn;return r!==t.watch||i&&i(O(O({},e),this.props),O(O({},e),t))?(this.counter&&this.cancel(),this.load()):o!==t.promise&&(this.counter&&this.cancel(),o)||l!==t.promiseFn&&(this.counter&&this.cancel(),l)?this.load():void 0}},{key:"componentWillUnmount",value:function(){this.cancel(),this.mounted=!1}},{key:"getMeta",value:function(e){return O({counter:this.counter,promise:this.promise,debugLabel:this.debugLabel},e)}},{key:"start",value:function(e){var t=this;return"AbortController"in A&&(this.abortController.abort(),this.abortController=new A.AbortController),this.counter++,this.promise=new Promise((function(n,r){if(t.mounted){t.dispatch({type:K.start,payload:function(){return e().then(n,r)},meta:t.getMeta()})}}))}},{key:"load",value:function(){var t=this,n=this.props.promise,r=this.props.promiseFn||e.promiseFn;if(n)this.start((function(){return n})).then(this.onResolve(this.counter)).catch(this.onReject(this.counter));else if(r){var a=O(O({},e),this.props);this.start((function(){return r(a,t.abortController)})).then(this.onResolve(this.counter)).catch(this.onReject(this.counter))}}},{key:"run",value:function(){for(var t=this,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];var i=this.props.deferFn||e.deferFn;if(i){this.args=r;var o=O(O({},e),this.props);return this.start((function(){return i(r,o,t.abortController)})).then(this.onResolve(this.counter),this.onReject(this.counter))}}},{key:"cancel",value:function(){var t=this.props.onCancel||e.onCancel;t&&t(),this.counter++,this.abortController.abort(),this.mounted&&this.dispatch({type:K.cancel,meta:this.getMeta()})}},{key:"onResolve",value:function(t){var n=this;return function(r){if(n.counter===t){var a=n.props.onResolve||e.onResolve;n.setData(r,(function(){return a&&a(r)}))}return r}}},{key:"onReject",value:function(t){var n=this;return function(r){if(n.counter===t){var a=n.props.onReject||e.onReject;n.setError(r,(function(){return a&&a(r)}))}return r}}},{key:"setData",value:function(e,t){return this.mounted&&this.dispatch({type:K.fulfill,payload:e,meta:this.getMeta()},t),e}},{key:"setError",value:function(e,t){return this.mounted&&this.dispatch({type:K.reject,payload:e,error:!0,meta:this.getMeta()},t),e}},{key:"render",value:function(){var e=this.props,t=e.children;if(e.suspense&&this.state.isPending&&this.promise!==X)throw this.promise;if("function"==typeof t){var n=t;return D.a.createElement(a,{value:this.state},n(this.state))}return null!=t?D.a.createElement(a,{value:this.state},t):null}}]),r}(D.a.Component);B&&(o.propTypes=B.Async);var l=function(e){return D.a.createElement(i,null,(function(t){return D.a.createElement(Y,C()({},e,{state:t}))}))},s=function(e){return D.a.createElement(i,null,(function(t){return D.a.createElement(W,C()({},e,{state:t}))}))},u=function(e){return D.a.createElement(i,null,(function(t){return D.a.createElement(V,C()({},e,{state:t}))}))},f=function(e){return D.a.createElement(i,null,(function(t){return D.a.createElement(q,C()({},e,{state:t}))}))},p=function(e){return D.a.createElement(i,null,(function(t){return D.a.createElement(H,C()({},e,{state:t}))}))};return l.displayName="".concat(t,".Initial"),s.displayName="".concat(t,".Pending"),u.displayName="".concat(t,".Fulfilled"),f.displayName="".concat(t,".Rejected"),p.displayName="".concat(t,".Settled"),C()(o,{displayName:t,Initial:l,Pending:s,Loading:s,Fulfilled:u,Resolved:u,Rejected:f,Settled:p})}();function ne(e,t){var n="function"==typeof e?O(O({},t),{},{promiseFn:e}):e,r=Object(j.useRef)(0),a=Object(j.useRef)(!0),i=Object(j.useRef)(void 0),o=Object(j.useRef)(n),l=Object(j.useRef)(X),u=Object(j.useRef)(new z),f=A.__REACT_ASYNC__.devToolsDispatcher,d=n.reducer,p=n.dispatcher,h=void 0===p?f:p,m=Object(j.useReducer)(d?function(e,t){return d(e,t,$)}:$,n,J),y=s()(m,2),g=y[0],b=y[1],v=Object(j.useCallback)(h?function(e){return h(e,ee(b),o.current)}:ee(b),[h]),w=n.debugLabel,M=Object(j.useCallback)((function(e){return O({counter:r.current,promise:l.current,debugLabel:w},e)}),[w]),L=Object(j.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;return a.current&&(v({type:K.fulfill,payload:e,meta:M()}),t()),e}),[v,M]),E=Object(j.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;return a.current&&(v({type:K.reject,payload:e,error:!0,meta:M()}),t()),e}),[v,M]),C=n.onResolve,x=n.onReject,S=Object(j.useCallback)((function(e){return function(t){return e===r.current&&L(t,(function(){return C&&C(t)}))}}),[L,C]),T=Object(j.useCallback)((function(e){return function(t){return e===r.current&&E(t,(function(){return x&&x(t)}))}}),[E,x]),N=Object(j.useCallback)((function(e){return"AbortController"in A&&(u.current.abort(),u.current=new A.AbortController),r.current++,l.current=new Promise((function(t,n){if(a.current){v({type:K.start,payload:function(){return e().then(t,n)},meta:M()})}}))}),[v,M]),D=n.promise,k=n.promiseFn,I=n.initialValue,P=Object(j.useCallback)((function(){var e=I&&0===r.current;D?N((function(){return D})).then(S(r.current)).catch(T(r.current)):k&&!e&&N((function(){return k(o.current,u.current)})).then(S(r.current)).catch(T(r.current))}),[N,D,k,I,S,T]),_=n.deferFn,F=Object(j.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_&&(i.current=t,N((function(){return _(t,o.current,u.current)})).then(S(r.current)).catch(T(r.current)))}),[N,_,S,T]),U=Object(j.useCallback)((function(){i.current?F.apply(void 0,c()(i.current)):P()}),[F,P]),B=n.onCancel,Q=Object(j.useCallback)((function(){B&&B(),r.current++,u.current.abort(),a.current&&v({type:K.cancel,meta:M()})}),[B,v,M]),Y=n.watch,W=n.watchFn;if(Object(j.useEffect)((function(){W&&o.current&&W(n,o.current)&&(o.current=n,P())})),Object(j.useEffect)((function(){o.current=n}),[n]),Object(j.useEffect)((function(){r.current&&Q(),(D||k)&&P()}),[D,k,Y]),Object(j.useEffect)((function(){return function(){a.current=!1}}),[]),Object(j.useEffect)((function(){return function(){return Q()}}),[]),Object(j.useDebugValue)(g,(function(e){var t=e.status;return"[".concat(r.current,"] ").concat(t)})),n.suspense&&g.isPending&&l.current!==X)throw l.current;return Object(j.useMemo)((function(){return O(O({},g),{},{run:F,reload:U,cancel:Q,setData:L,setError:E})}),[g,F,U,Q,L,E])}var re=function(e){y()(n,e);var t=k(n);function n(e){var r;return S()(this,n),(r=t.call(this,"".concat(e.status," ").concat(e.statusText))).response=e,Object.setPrototypeOf&&Object.setPrototypeOf(h()(r),n.prototype),r}return n}(o()(Error)),ae=function(e,t){return function(n){return n.ok?"boolean"==typeof t?t?n.json():n:"application/json"===e?n.json():n:Promise.reject(new re(n))}};function ie(e){return"object"===N()(e)&&"preventDefault"in e}var oe=function(){throw new Error("useAsync requires React v16.8 or up. Upgrade your React version or use the <Async> component instead.")};j.useEffect,j.useEffect;t.b=te}).call(this,n(17))},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(56),a=n(57),i=n(23),o=n(58);e.exports=function(e){return r(e)||a(e)||i(e)||o()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(63),i=(r=a)&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},function(e,t,n){var r=n(46),a=n(47),i=n(23),o=n(48);e.exports=function(e,t){return r(e)||a(e,t)||i(e,t)||o()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){var r=n(52);e.exports=function(e,t){if(null==e)return{};var n,a,i=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,i="ArrayBuffer"in e;if(i)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=function(e){return e&&DataView.prototype.isPrototypeOf(e)},s=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};h.prototype.append=function(e,t){e=f(e),t=d(t);var n=this.map[e];this.map[e]=n?n+","+t:t},h.prototype.delete=function(e){delete this.map[f(e)]},h.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},h.prototype.set=function(e,t){this.map[f(e)]=d(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},L.error=function(){var e=new L(null,{status:0,statusText:""});return e.type="error",e};var c=[301,302,303,307,308];L.redirect=function(e,t){if(-1===c.indexOf(t))throw new RangeError("Invalid status code");return new L(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=w,e.Response=L,e.fetch=function(e,t){return new Promise((function(n,a){var i=new w(e,t),o=new XMLHttpRequest;o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;n(new L(a,r))},o.onerror=function(){a(new TypeError("Network request failed"))},o.ontimeout=function(){a(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&r&&(o.responseType="blob"),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),o.send(void 0===i._bodyInit?null:i._bodyInit)}))},e.fetch.polyfill=!0}function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(a&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(i&&r&&l(e))this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(e)&&!s(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=b(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=m(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=y(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}function w(e,t){var n,r,a=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),u.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function M(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function L(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var r,a=n(68);var i=((r=a)&&r.__esModule?r:{default:r}).default,o=i.canUseDOM?window.HTMLElement:{};t.canUseDOM=i.canUseDOM;t.default=o},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(35)},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,s=o(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))a.call(n,c)&&(s[c]=n[c]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(s[l[f]]=n[l[f]])}}return s}},function(e,t,n){var r=n(24);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(o)}; /*! * Adapted from jQuery UI core * * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */ var r=/input|select|textarea|button|object/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function i(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(a(t))return!1;t=t.parentNode}return!0}(e)}function o(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&i(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&o.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t="length"in n?n[0]:n}return l=t||l},t.validateElement=u,t.hide=function(e){u(e)&&(e||l).setAttribute("aria-hidden","true")},t.show=function(e){u(e)&&(e||l).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){l=null},t.resetForTesting=function(){l=null};var r,a=n(67),i=(r=a)&&r.__esModule?r:{default:r},o=n(20);var l=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){return!(!e&&!l)||((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};t.default=r,e.exports=t.default},function(e,t,n){var r=n(4),a=n(18),i=n(53),o=n(54);function l(t){var n="function"==typeof Map?new Map:void 0;return e.exports=l=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return o(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,l(t)}e.exports=l,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(t){!function(t){var n=/^(b|B)$/,r={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},a={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};function i(e){var t,i,o,l,s,u,c,f,d,p,h,m,y,g,b,v=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},w=[],M=0,L=void 0,E=void 0;if(isNaN(e))throw new TypeError("Invalid number");return i=!0===v.bits,h=!0===v.unix,t=v.base||2,p=void 0!==v.round?v.round:h?1:2,u=void 0!==v.locale?v.locale:"",c=v.localeOptions||{},m=void 0!==v.separator?v.separator:"",y=void 0!==v.spacer?v.spacer:h?"":" ",b=v.symbols||{},g=2===t&&v.standard||"jedec",d=v.output||"string",l=!0===v.fullform,s=v.fullforms instanceof Array?v.fullforms:[],L=void 0!==v.exponent?v.exponent:-1,o=2<t?1e3:1024,(f=(E=Number(e))<0)&&(E=-E),(-1===L||isNaN(L))&&(L=Math.floor(Math.log(E)/Math.log(o)))<0&&(L=0),8<L&&(L=8),"exponent"===d?L:(0===E?(w[0]=0,w[1]=h?"":r[g][i?"bits":"bytes"][L]):(M=E/(2===t?Math.pow(2,10*L):Math.pow(1e3,L)),i&&o<=(M*=8)&&L<8&&(M/=o,L++),w[0]=Number(M.toFixed(0<L?p:0)),w[0]===o&&L<8&&void 0===v.exponent&&(w[0]=1,L++),w[1]=10===t&&1===L?i?"kb":"kB":r[g][i?"bits":"bytes"][L],h&&(w[1]="jedec"===g?w[1].charAt(0):0<L?w[1].replace(/B$/,""):w[1],n.test(w[1])&&(w[0]=Math.floor(w[0]),w[1]=""))),f&&(w[0]=-w[0]),w[1]=b[w[1]]||w[1],!0===u?w[0]=w[0].toLocaleString():0<u.length?w[0]=w[0].toLocaleString(u,c):0<m.length&&(w[0]=w[0].toString().replace(".",m)),"array"===d?w:(l&&(w[1]=s[L]?s[L]:a[g][L]+(i?"bit":"byte")+(1===w[0]?"":"s")),"object"===d?{value:w[0],symbol:w[1],exponent:L}:w.join(y)))}i.partial=function(e){return function(t){return i(t,e)}},e.exports=i}("undefined"!=typeof window&&window)}).call(this,n(17))},function(e,t,n){n(31),n(32).polyfill(),H5P=H5P||{},H5P.HubClient=n(99).default},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){(function(t,n){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.8+1e68dce6 */var r;r=function(){"use strict";function e(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=0,i=void 0,o=void 0,l=function(e,t){h[a]=e,h[a+1]=t,2===(a+=2)&&(o?o(m):w())},s="undefined"!=typeof window?window:void 0,u=s||{},c=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(m,1)}}var h=new Array(1e3);function m(){for(var e=0;e<a;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;a=0}var y,g,b,v,w=void 0;function M(e,t){var n=this,r=new this.constructor(C);void 0===r[E]&&A(r);var a=n._state;if(a){var i=arguments[a-1];l((function(){return I(a,r,i,n._result)}))}else D(n,r,e,t);return r}function L(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(C);return S(t,e),t}f?w=function(){return t.nextTick(m)}:c?(g=0,b=new c(m),v=document.createTextNode(""),b.observe(v,{characterData:!0}),w=function(){v.data=g=++g%2}):d?((y=new MessageChannel).port1.onmessage=m,w=function(){return y.port2.postMessage(0)}):w=void 0===s?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(m)}:p()}catch(e){return p()}}():p();var E=Math.random().toString(36).substring(2);function C(){}function x(t,n,r){n.constructor===t.constructor&&r===M&&n.constructor.resolve===L?function(e,t){1===t._state?N(e,t._result):2===t._state?j(e,t._result):D(t,void 0,(function(t){return S(e,t)}),(function(t){return j(e,t)}))}(t,n):void 0===r?N(t,n):e(r)?function(e,t,n){l((function(e){var r=!1,a=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?S(e,n):N(e,n))}),(function(t){r||(r=!0,j(e,t))}),e._label);!r&&a&&(r=!0,j(e,a))}),e)}(t,n,r):N(t,n)}function S(e,t){if(e===t)j(e,new TypeError("You cannot resolve a promise with itself"));else if(a=typeof(r=t),null===r||"object"!==a&&"function"!==a)N(e,t);else{var n=void 0;try{n=t.then}catch(t){return void j(e,t)}x(e,t,n)}var r,a}function T(e){e._onerror&&e._onerror(e._result),k(e)}function N(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&l(k,e))}function j(e,t){void 0===e._state&&(e._state=2,e._result=t,l(T,e))}function D(e,t,n,r){var a=e._subscribers,i=a.length;e._onerror=null,a[i]=t,a[i+1]=n,a[i+2]=r,0===i&&e._state&&l(k,e)}function k(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,a=void 0,i=e._result,o=0;o<t.length;o+=3)r=t[o],a=t[o+n],r?I(n,r,a,i):a(i);e._subscribers.length=0}}function I(t,n,r,a){var i=e(r),o=void 0,l=void 0,s=!0;if(i){try{o=r(a)}catch(e){s=!1,l=e}if(n===o)return void j(n,new TypeError("A promises callback cannot return that same promise."))}else o=a;void 0!==n._state||(i&&s?S(n,o):!1===s?j(n,l):1===t?N(n,o):2===t&&j(n,o))}var O=0;function A(e){e[E]=O++,e._state=void 0,e._result=void 0,e._subscribers=[]}var P=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(C),this.promise[E]||A(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?N(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&N(this.promise,this._result))):j(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===L){var a=void 0,i=void 0,o=!1;try{a=e.then}catch(e){o=!0,i=e}if(a===M&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof a)this._remaining--,this._result[t]=e;else if(n===R){var l=new n(C);o?j(l,i):x(l,e,a),this._willSettleAt(l,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?j(r,n):this._result[t]=n),0===this._remaining&&N(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;D(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),R=function(){function t(e){this[E]=O++,this._result=this._state=void 0,this._subscribers=[],C!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){S(e,t)}),(function(t){j(e,t)}))}catch(t){j(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this.constructor;return e(t)?this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return R.prototype.then=M,R.all=function(e){return new P(this,e).promise},R.race=function(e){var t=this;return r(e)?new t((function(n,r){for(var a=e.length,i=0;i<a;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=L,R.reject=function(e){var t=new this(C);return j(t,e),t},R._setScheduler=function(e){o=e},R._setAsap=function(e){l=e},R._asap=l,R.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=R},R.Promise=R,R},e.exports=r()}).call(this,n(33),n(17))},function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,f=-1;function d(){c&&s&&(c=!1,s.length?u=s.concat(u):f=-1,u.length&&p())}function p(){if(!c){var e=l(d);c=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||l(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){"use strict"; /** @license React v16.14.0 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(22),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,l=a?Symbol.for("react.fragment"):60107,s=a?Symbol.for("react.strict_mode"):60108,u=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,f=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,h=a?Symbol.for("react.memo"):60115,m=a?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function w(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||b}function M(){}function L(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},M.prototype=w.prototype;var E=L.prototype=new M;E.constructor=L,r(E,w.prototype),E.isPureReactComponent=!0;var C={current:null},x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,a={},o=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,r)&&!S.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:i,type:e,key:o,ref:l,props:a,_owner:C.current}}function N(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var j=/\/+/g,D=[];function k(e,t,n,r){if(D.length){var a=D.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>D.length&&D.push(e)}function O(e,t,n){return null==e?0:function e(t,n,r,a){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var s=!1;if(null===t)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case i:case o:s=!0}}if(s)return r(a,t,""===n?"."+A(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u<t.length;u++){var c=n+A(l=t[u],u);s+=e(l,c,r,a)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=y&&t[y]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),u=0;!(l=t.next()).done;)s+=e(l=l.value,c=n+A(l,u++),r,a);else if("object"===l)throw r=""+t,Error(g(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return s}(e,"",t,n)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function P(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?z(e,r,n,(function(e){return e})):null!=e&&(N(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(j,"$&/")+"/")+n)),r.push(e))}function z(e,t,n,r,a){var i="";null!=n&&(i=(""+n).replace(j,"$&/")+"/"),O(e,R,t=k(t,i,r,a)),I(t)}var _={current:null};function F(){var e=_.current;if(null===e)throw Error(g(321));return e}var U={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return z(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;O(e,P,t=k(null,null,t,n)),I(t)},count:function(e){return O(e,(function(){return null}),null)},toArray:function(e){var t=[];return z(e,t,null,(function(e){return e})),t},only:function(e){if(!N(e))throw Error(g(143));return e}},t.Component=w,t.Fragment=l,t.Profiler=u,t.PureComponent=L,t.StrictMode=s,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.cloneElement=function(e,t,n){if(null==e)throw Error(g(267,e));var a=r({},e.props),o=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=C.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)x.call(t,c)&&!S.hasOwnProperty(c)&&(a[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){u=Array(c);for(var f=0;f<c;f++)u[f]=arguments[f+2];a.children=u}return{$$typeof:i,type:e.type,key:o,ref:l,props:a,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=N,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict"; /** @license React v16.14.0 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(0),a=n(22),i=n(36);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));function l(e,t,n,r,a,i,o,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var s=!1,u=null,c=!1,f=null,d={onError:function(e){s=!0,u=e}};function p(e,t,n,r,a,i,o,c,f){s=!1,u=null,l.apply(d,arguments)}var h=null,m=null,y=null;function g(e,t,n){var r=e.type||"unknown-event";e.currentTarget=y(n),function(e,t,n,r,a,i,l,d,h){if(p.apply(this,arguments),s){if(!s)throw Error(o(198));var m=u;s=!1,u=null,c||(c=!0,f=m)}}(r,t,void 0,e),e.currentTarget=null}var b=null,v={};function w(){if(b)for(var e in v){var t=v[e],n=b.indexOf(e);if(!(-1<n))throw Error(o(96,e));if(!L[n]){if(!t.extractEvents)throw Error(o(97,e));for(var r in L[n]=t,n=t.eventTypes){var a=void 0,i=n[r],l=t,s=r;if(E.hasOwnProperty(s))throw Error(o(99,s));E[s]=i;var u=i.phasedRegistrationNames;if(u){for(a in u)u.hasOwnProperty(a)&&M(u[a],l,s);a=!0}else i.registrationName?(M(i.registrationName,l,s),a=!0):a=!1;if(!a)throw Error(o(98,r,e))}}}}function M(e,t,n){if(C[e])throw Error(o(100,e));C[e]=t,x[e]=t.eventTypes[n].dependencies}var L=[],E={},C={},x={};function S(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!v.hasOwnProperty(t)||v[t]!==r){if(v[t])throw Error(o(102,t));v[t]=r,n=!0}}n&&w()}var T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),N=null,j=null,D=null;function k(e){if(e=m(e)){if("function"!=typeof N)throw Error(o(280));var t=e.stateNode;t&&(t=h(t),N(e.stateNode,e.type,t))}}function I(e){j?D?D.push(e):D=[e]:j=e}function O(){if(j){var e=j,t=D;if(D=j=null,k(e),t)for(e=0;e<t.length;e++)k(t[e])}}function A(e,t){return e(t)}function P(e,t,n,r,a){return e(t,n,r,a)}function R(){}var z=A,_=!1,F=!1;function U(){null===j&&null===D||(R(),O())}function B(e,t,n){if(F)return e(t,n);F=!0;try{return z(e,t,n)}finally{F=!1,U()}}var Q=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Y=Object.prototype.hasOwnProperty,W={},V={};function q(e,t,n,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var H={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){H[e]=new q(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];H[t]=new q(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){H[e]=new q(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){H[e]=new q(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){H[e]=new q(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){H[e]=new q(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){H[e]=new q(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){H[e]=new q(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){H[e]=new q(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,Z);H[t]=new q(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,Z);H[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,Z);H[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){H[e]=new q(e,1,!1,e.toLowerCase(),null,!1)})),H.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){H[e]=new q(e,1,!1,e.toLowerCase(),null,!0)}));var K=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t,n,r){var a=H.hasOwnProperty(t)?H[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!Y.call(V,e)||!Y.call(W,e)&&(Q.test(e)?V[e]=!0:(W[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}K.hasOwnProperty("ReactCurrentDispatcher")||(K.ReactCurrentDispatcher={current:null}),K.hasOwnProperty("ReactCurrentBatchConfig")||(K.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,$="function"==typeof Symbol&&Symbol.for,ee=$?Symbol.for("react.element"):60103,te=$?Symbol.for("react.portal"):60106,ne=$?Symbol.for("react.fragment"):60107,re=$?Symbol.for("react.strict_mode"):60108,ae=$?Symbol.for("react.profiler"):60114,ie=$?Symbol.for("react.provider"):60109,oe=$?Symbol.for("react.context"):60110,le=$?Symbol.for("react.concurrent_mode"):60111,se=$?Symbol.for("react.forward_ref"):60112,ue=$?Symbol.for("react.suspense"):60113,ce=$?Symbol.for("react.suspense_list"):60120,fe=$?Symbol.for("react.memo"):60115,de=$?Symbol.for("react.lazy"):60116,pe=$?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ye(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ae:return"Profiler";case re:return"StrictMode";case ue:return"Suspense";case ce:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case oe:return"Context.Consumer";case ie:return"Context.Provider";case se:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ye(e.type);case pe:return ye(e.render);case de:if(e=1===e._status?e._result:null)return ye(e)}return null}function ge(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,a=e._debugSource,i=ye(e.type);n=null,r&&(n=ye(r.type)),r=i,i="",a?i=" (at "+a.fileName.replace(J,"")+":"+a.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function be(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function ve(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=ve(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Me(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ve(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Le(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=be(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ce(e,t){null!=(t=t.checked)&&X(e,"checked",t,!1)}function xe(e,t){Ce(e,t);var n=be(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Te(e,t.type,n):t.hasOwnProperty("defaultValue")&&Te(e,t.type,be(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Te(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ne(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function je(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+be(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function De(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ke(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:be(n)}}function Ie(e,t){var n=be(t.value),r=be(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ae="http://www.w3.org/1999/xhtml",Pe="http://www.w3.org/2000/svg";function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ze(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var _e,Fe=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Pe||"innerHTML"in e)e.innerHTML=t;else{for((_e=_e||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_e.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Be(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qe={animationend:Be("Animation","AnimationEnd"),animationiteration:Be("Animation","AnimationIteration"),animationstart:Be("Animation","AnimationStart"),transitionend:Be("Transition","TransitionEnd")},Ye={},We={};function Ve(e){if(Ye[e])return Ye[e];if(!Qe[e])return e;var t,n=Qe[e];for(t in n)if(n.hasOwnProperty(t)&&t in We)return Ye[e]=n[t];return e}T&&(We=document.createElement("div").style,"AnimationEvent"in window||(delete Qe.animationend.animation,delete Qe.animationiteration.animation,delete Qe.animationstart.animation),"TransitionEvent"in window||delete Qe.transitionend.transition);var qe=Ve("animationend"),He=Ve("animationiteration"),Ge=Ve("animationstart"),Ze=Ve("transitionend"),Ke="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xe=new("function"==typeof WeakMap?WeakMap:Map);function Je(e){var t=Xe.get(e);return void 0===t&&(t=new Map,Xe.set(e,t)),t}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if($e(e)!==e)throw Error(o(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var i=a.alternate;if(null===i){if(null!==(r=a.return)){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return tt(a),e;if(i===r)return tt(a),t;i=i.sibling}throw Error(o(188))}if(n.return!==r.return)n=a,r=i;else{for(var l=!1,s=a.child;s;){if(s===n){l=!0,n=a,r=i;break}if(s===r){l=!0,r=a,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=a;break}if(s===r){l=!0,r=i,n=a;break}s=s.sibling}if(!l)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(o(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function at(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function ot(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)g(e,t[r],n[r]);else t&&g(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function lt(e){if(null!==e&&(it=rt(it,e)),e=it,it=null,e){if(at(e,ot),it)throw Error(o(95));if(c)throw e=f,c=!1,f=null,e}}function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ut(e){if(!T)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function ft(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function dt(e,t,n,r){if(ct.length){var a=ct.pop();return a.topLevelType=e,a.eventSystemFlags=r,a.nativeEvent=t,a.targetInst=n,a}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Tn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var a=st(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,o=e.eventSystemFlags;0===n&&(o|=64);for(var l=null,s=0;s<L.length;s++){var u=L[s];u&&(u=u.extractEvents(r,t,i,a,o))&&(l=rt(l,u))}lt(l)}}function ht(e,t,n){if(!n.has(e)){switch(e){case"scroll":Gt(t,"scroll",!0);break;case"focus":case"blur":Gt(t,"focus",!0),Gt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ut(e)&&Gt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ke.indexOf(e)&&Ht(e,t)}n.set(e,null)}}var mt,yt,gt,bt=!1,vt=[],wt=null,Mt=null,Lt=null,Et=new Map,Ct=new Map,xt=[],St="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Tt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Nt(e,t,n,r,a){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:a,container:r}}function jt(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ct.delete(t.pointerId)}}function Dt(e,t,n,r,a,i){return null===e||e.nativeEvent!==i?(e=Nt(t,n,r,a,i),null!==t&&(null!==(t=Nn(t))&&yt(t)),e):(e.eventSystemFlags|=r,e)}function kt(e){var t=Tn(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){gt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function It(e){if(null!==e.blockedOn)return!1;var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Nn(t);return null!==n&&yt(n),e.blockedOn=t,!1}return!0}function Ot(e,t,n){It(e)&&n.delete(t)}function At(){for(bt=!1;0<vt.length;){var e=vt[0];if(null!==e.blockedOn){null!==(e=Nn(e.blockedOn))&&mt(e);break}var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:vt.shift()}null!==wt&&It(wt)&&(wt=null),null!==Mt&&It(Mt)&&(Mt=null),null!==Lt&&It(Lt)&&(Lt=null),Et.forEach(Ot),Ct.forEach(Ot)}function Pt(e,t){e.blockedOn===t&&(e.blockedOn=null,bt||(bt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,At)))}function Rt(e){function t(t){return Pt(t,e)}if(0<vt.length){Pt(vt[0],e);for(var n=1;n<vt.length;n++){var r=vt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==wt&&Pt(wt,e),null!==Mt&&Pt(Mt,e),null!==Lt&&Pt(Lt,e),Et.forEach(t),Ct.forEach(t),n=0;n<xt.length;n++)(r=xt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<xt.length&&null===(n=xt[0]).blockedOn;)kt(n),null===n.blockedOn&&xt.shift()}var zt={},_t=new Map,Ft=new Map,Ut=["abort","abort",qe,"animationEnd",He,"animationIteration",Ge,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ze,"transitionEnd","waiting","waiting"];function Bt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1],i="on"+(a[0].toUpperCase()+a.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Ft.set(r,t),_t.set(r,i),zt[a]=i}}Bt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Bt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Bt(Ut,2);for(var Qt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Yt=0;Yt<Qt.length;Yt++)Ft.set(Qt[Yt],0);var Wt=i.unstable_UserBlockingPriority,Vt=i.unstable_runWithPriority,qt=!0;function Ht(e,t){Gt(t,e,!1)}function Gt(e,t,n){var r=Ft.get(t);switch(void 0===r?2:r){case 0:r=Zt.bind(null,t,1,e);break;case 1:r=Kt.bind(null,t,1,e);break;default:r=Xt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Zt(e,t,n,r){_||R();var a=Xt,i=_;_=!0;try{P(a,e,t,n,r)}finally{(_=i)||U()}}function Kt(e,t,n,r){Vt(Wt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){if(qt)if(0<vt.length&&-1<St.indexOf(e))e=Nt(null,e,t,n,r),vt.push(e);else{var a=Jt(e,t,n,r);if(null===a)jt(e,r);else if(-1<St.indexOf(e))e=Nt(a,e,t,n,r),vt.push(e);else if(!function(e,t,n,r,a){switch(t){case"focus":return wt=Dt(wt,e,t,n,r,a),!0;case"dragenter":return Mt=Dt(Mt,e,t,n,r,a),!0;case"mouseover":return Lt=Dt(Lt,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Et.set(i,Dt(Et.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Ct.set(i,Dt(Ct.get(i)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r)){jt(e,r),e=dt(e,r,null,t);try{B(pt,e)}finally{ft(e)}}}}function Jt(e,t,n,r){if(null!==(n=Tn(n=st(r)))){var a=$e(n);if(null===a)n=null;else{var i=a.tag;if(13===i){if(null!==(n=et(a)))return n;n=null}else if(3===i){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}e=dt(e,r,n,t);try{B(pt,e)}finally{ft(e)}return null}var $t={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||$t.hasOwnProperty(e)&&$t[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys($t).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$t[t]=$t[e]}))}));var rn=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ln=Ae;function sn(e,t){var n=Je(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=x[t];for(var r=0;r<t.length;r++)ht(t[r],e,n)}function un(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,r=fn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function pn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mn=null,yn=null;function gn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function bn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var vn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function Mn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Ln(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var En=Math.random().toString(36).slice(2),Cn="__reactInternalInstance$"+En,xn="__reactEventHandlers$"+En,Sn="__reactContainere$"+En;function Tn(e){var t=e[Cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Sn]||n[Cn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Ln(e);null!==e;){if(n=e[Cn])return n;e=Ln(e)}return t}n=(e=n).parentNode}return null}function Nn(e){return!(e=e[Cn]||e[Sn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function jn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function Dn(e){return e[xn]||null}function kn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function In(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}function On(e,t,n){(t=In(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function An(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=kn(t);for(t=n.length;0<t--;)On(n[t],"captured",e);for(t=0;t<n.length;t++)On(n[t],"bubbled",e)}}function Pn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=In(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Rn(e){e&&e.dispatchConfig.registrationName&&Pn(e._targetInst,null,e)}function zn(e){at(e,An)}var _n=null,Fn=null,Un=null;function Bn(){if(Un)return Un;var e,t,n=Fn,r=n.length,a="value"in _n?_n.value:_n.textContent,i=a.length;for(e=0;e<r&&n[e]===a[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===a[i-t];t++);return Un=a.slice(e,1<t?1-t:void 0)}function Qn(){return!0}function Yn(){return!1}function Wn(e,t,n,r){for(var a in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(a)&&((t=e[a])?this[a]=t(n):"target"===a?this.target=r:this[a]=n[a]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Qn:Yn,this.isPropagationStopped=Yn,this}function Vn(e,t,n,r){if(this.eventPool.length){var a=this.eventPool.pop();return this.call(a,e,t,n,r),a}return new this(e,t,n,r)}function qn(e){if(!(e instanceof this))throw Error(o(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Hn(e){e.eventPool=[],e.getPooled=Vn,e.release=qn}a(Wn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Qn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Qn)},persist:function(){this.isPersistent=Qn},isPersistent:Yn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Yn,this._dispatchInstances=this._dispatchListeners=null}}),Wn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Wn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return a(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=a({},r.Interface,e),n.extend=r.extend,Hn(n),n},Hn(Wn);var Gn=Wn.extend({data:null}),Zn=Wn.extend({data:null}),Kn=[9,13,27,32],Xn=T&&"CompositionEvent"in window,Jn=null;T&&"documentMode"in document&&(Jn=document.documentMode);var $n=T&&"TextEvent"in window&&!Jn,er=T&&(!Xn||Jn&&8<Jn&&11>=Jn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ar(e,t){switch(e){case"keyup":return-1!==Kn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var or=!1;var lr={eventTypes:nr,extractEvents:function(e,t,n,r){var a;if(Xn)e:{switch(e){case"compositionstart":var i=nr.compositionStart;break e;case"compositionend":i=nr.compositionEnd;break e;case"compositionupdate":i=nr.compositionUpdate;break e}i=void 0}else or?ar(e,n)&&(i=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=nr.compositionStart);return i?(er&&"ko"!==n.locale&&(or||i!==nr.compositionStart?i===nr.compositionEnd&&or&&(a=Bn()):(Fn="value"in(_n=r)?_n.value:_n.textContent,or=!0)),i=Gn.getPooled(i,t,n,r),a?i.data=a:null!==(a=ir(n))&&(i.data=a),zn(i),a=i):a=null,(e=$n?function(e,t){switch(e){case"compositionend":return ir(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(or)return"compositionend"===e||!Xn&&ar(e,t)?(e=Bn(),Un=Fn=_n=null,or=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Zn.getPooled(nr.beforeInput,t,n,r)).data=e,zn(t)):t=null,null===a?t:null===t?a:[a,t]}},sr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!sr[e.type]:"textarea"===t}var cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=Wn.getPooled(cr.change,e,t,n)).type="change",I(n),zn(e),e}var dr=null,pr=null;function hr(e){lt(e)}function mr(e){if(Me(jn(e)))return e}function yr(e,t){if("change"===e)return t}var gr=!1;function br(){dr&&(dr.detachEvent("onpropertychange",vr),pr=dr=null)}function vr(e){if("value"===e.propertyName&&mr(pr))if(e=fr(pr,e,st(e)),_)lt(e);else{_=!0;try{A(hr,e)}finally{_=!1,U()}}}function wr(e,t,n){"focus"===e?(br(),pr=n,(dr=t).attachEvent("onpropertychange",vr)):"blur"===e&&br()}function Mr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return mr(pr)}function Lr(e,t){if("click"===e)return mr(t)}function Er(e,t){if("input"===e||"change"===e)return mr(t)}T&&(gr=ut("input")&&(!document.documentMode||9<document.documentMode));var Cr={eventTypes:cr,_isInputEventSupported:gr,extractEvents:function(e,t,n,r){var a=t?jn(t):window,i=a.nodeName&&a.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===a.type)var o=yr;else if(ur(a))if(gr)o=Er;else{o=Mr;var l=wr}else(i=a.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(o=Lr);if(o&&(o=o(e,t)))return fr(o,n,r);l&&l(e,a,t),"blur"===e&&(e=a._wrapperState)&&e.controlled&&"number"===a.type&&Te(a,"number",a.value)}},xr=Wn.extend({view:null,detail:null}),Sr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sr[e])&&!!t[e]}function Nr(){return Tr}var jr=0,Dr=0,kr=!1,Ir=!1,Or=xr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Nr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=jr;return jr=e.screenX,kr?"mousemove"===e.type?e.screenX-t:0:(kr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Dr;return Dr=e.screenY,Ir?"mousemove"===e.type?e.screenY-t:0:(Ir=!0,0)}}),Ar=Or.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Pr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Rr={eventTypes:Pr,extractEvents:function(e,t,n,r,a){var i="mouseover"===e||"pointerover"===e,o="mouseout"===e||"pointerout"===e;if(i&&0==(32&a)&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o)?(o=t,null!==(t=(t=n.relatedTarget||n.toElement)?Tn(t):null)&&(t!==$e(t)||5!==t.tag&&6!==t.tag)&&(t=null)):o=null;if(o===t)return null;if("mouseout"===e||"mouseover"===e)var l=Or,s=Pr.mouseLeave,u=Pr.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(l=Ar,s=Pr.pointerLeave,u=Pr.pointerEnter,c="pointer");if(e=null==o?i:jn(o),i=null==t?i:jn(t),(s=l.getPooled(s,o,n,r)).type=c+"leave",s.target=e,s.relatedTarget=i,(n=l.getPooled(u,t,n,r)).type=c+"enter",n.target=i,n.relatedTarget=e,c=t,(r=o)&&c)e:{for(u=c,o=0,e=l=r;e;e=kn(e))o++;for(e=0,t=u;t;t=kn(t))e++;for(;0<o-e;)l=kn(l),o--;for(;0<e-o;)u=kn(u),e--;for(;o--;){if(l===u||l===u.alternate)break e;l=kn(l),u=kn(u)}l=null}else l=null;for(u=l,l=[];r&&r!==u&&(null===(o=r.alternate)||o!==u);)l.push(r),r=kn(r);for(r=[];c&&c!==u&&(null===(o=c.alternate)||o!==u);)r.push(c),c=kn(c);for(c=0;c<l.length;c++)Pn(l[c],"bubbled",s);for(c=r.length;0<c--;)Pn(r[c],"captured",n);return 0==(64&a)?[s]:[s,n]}};var zr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},_r=Object.prototype.hasOwnProperty;function Fr(e,t){if(zr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!_r.call(t,n[r])||!zr(e[n[r]],t[n[r]]))return!1;return!0}var Ur=T&&"documentMode"in document&&11>=document.documentMode,Br={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Qr=null,Yr=null,Wr=null,Vr=!1;function qr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Vr||null==Qr||Qr!==cn(n)?null:("selectionStart"in(n=Qr)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Wr&&Fr(Wr,n)?null:(Wr=n,(e=Wn.getPooled(Br.select,Yr,e,t)).type="select",e.target=Qr,zn(e),e))}var Hr={eventTypes:Br,extractEvents:function(e,t,n,r,a,i){if(!(i=!(a=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{a=Je(a),i=x.onSelect;for(var o=0;o<i.length;o++)if(!a.has(i[o])){a=!1;break e}a=!0}i=!a}if(i)return null;switch(a=t?jn(t):window,e){case"focus":(ur(a)||"true"===a.contentEditable)&&(Qr=a,Yr=t,Wr=null);break;case"blur":Wr=Yr=Qr=null;break;case"mousedown":Vr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Vr=!1,qr(n,r);case"selectionchange":if(Ur)break;case"keydown":case"keyup":return qr(n,r)}return null}},Gr=Wn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zr=Wn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kr=xr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ea=xr.extend({key:function(e){if(e.key){var t=Jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?$r[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Nr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ta=Or.extend({dataTransfer:null}),na=xr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Nr}),ra=Wn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),aa=Or.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ia={eventTypes:zt,extractEvents:function(e,t,n,r){var a=_t.get(e);if(!a)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=ea;break;case"blur":case"focus":e=Kr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ta;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=na;break;case qe:case He:case Ge:e=Gr;break;case Ze:e=ra;break;case"scroll":e=xr;break;case"wheel":e=aa;break;case"copy":case"cut":case"paste":e=Zr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Ar;break;default:e=Wn}return zn(t=e.getPooled(a,t,n,r)),t}};if(b)throw Error(o(101));b=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=Dn,m=Nn,y=jn,S({SimpleEventPlugin:ia,EnterLeaveEventPlugin:Rr,ChangeEventPlugin:Cr,SelectEventPlugin:Hr,BeforeInputEventPlugin:lr});var oa=[],la=-1;function sa(e){0>la||(e.current=oa[la],oa[la]=null,la--)}function ua(e,t){la++,oa[la]=e.current,e.current=t}var ca={},fa={current:ca},da={current:!1},pa=ca;function ha(e,t){var n=e.type.contextTypes;if(!n)return ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in n)i[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ma(e){return null!=(e=e.childContextTypes)}function ya(){sa(da),sa(fa)}function ga(e,t,n){if(fa.current!==ca)throw Error(o(168));ua(fa,t),ua(da,n)}function ba(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(o(108,ye(t)||"Unknown",i));return a({},n,{},r)}function va(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ca,pa=fa.current,ua(fa,e),ua(da,da.current),!0}function wa(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ba(e,t,pa),r.__reactInternalMemoizedMergedChildContext=e,sa(da),sa(fa),ua(fa,e)):sa(da),ua(da,n)}var Ma=i.unstable_runWithPriority,La=i.unstable_scheduleCallback,Ea=i.unstable_cancelCallback,Ca=i.unstable_requestPaint,xa=i.unstable_now,Sa=i.unstable_getCurrentPriorityLevel,Ta=i.unstable_ImmediatePriority,Na=i.unstable_UserBlockingPriority,ja=i.unstable_NormalPriority,Da=i.unstable_LowPriority,ka=i.unstable_IdlePriority,Ia={},Oa=i.unstable_shouldYield,Aa=void 0!==Ca?Ca:function(){},Pa=null,Ra=null,za=!1,_a=xa(),Fa=1e4>_a?xa:function(){return xa()-_a};function Ua(){switch(Sa()){case Ta:return 99;case Na:return 98;case ja:return 97;case Da:return 96;case ka:return 95;default:throw Error(o(332))}}function Ba(e){switch(e){case 99:return Ta;case 98:return Na;case 97:return ja;case 96:return Da;case 95:return ka;default:throw Error(o(332))}}function Qa(e,t){return e=Ba(e),Ma(e,t)}function Ya(e,t,n){return e=Ba(e),La(e,t,n)}function Wa(e){return null===Pa?(Pa=[e],Ra=La(Ta,qa)):Pa.push(e),Ia}function Va(){if(null!==Ra){var e=Ra;Ra=null,Ea(e)}qa()}function qa(){if(!za&&null!==Pa){za=!0;var e=0;try{var t=Pa;Qa(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Pa=null}catch(t){throw null!==Pa&&(Pa=Pa.slice(e+1)),La(Ta,Va),t}finally{za=!1}}}function Ha(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Ga(e,t){if(e&&e.defaultProps)for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Za={current:null},Ka=null,Xa=null,Ja=null;function $a(){Ja=Xa=Ka=null}function ei(e){var t=Za.current;sa(Za),e.type._context._currentValue=t}function ti(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ni(e,t){Ka=e,Ja=Xa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Do=!0),e.firstContext=null)}function ri(e,t){if(Ja!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Ja=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Xa){if(null===Ka)throw Error(o(308));Xa=t,Ka.dependencies={expirationTime:0,firstContext:t,responders:null}}else Xa=Xa.next=t;return e._currentValue}var ai=!1;function ii(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function oi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function si(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ui(e,t){var n=e.alternate;null!==n&&oi(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function ci(e,t,n,r){var i=e.updateQueue;ai=!1;var o=i.baseQueue,l=i.shared.pending;if(null!==l){if(null!==o){var s=o.next;o.next=l.next,l.next=s}o=l,i.shared.pending=null,null!==(s=e.alternate)&&(null!==(s=s.updateQueue)&&(s.baseQueue=l))}if(null!==o){s=o.next;var u=i.baseState,c=0,f=null,d=null,p=null;if(null!==s)for(var h=s;;){if((l=h.expirationTime)<r){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===p?(d=p=m,f=u):p=p.next=m,l>c&&(c=l)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),is(l,h.suspenseConfig);e:{var y=e,g=h;switch(l=t,m=n,g.tag){case 1:if("function"==typeof(y=g.payload)){u=y.call(m,u,l);break e}u=y;break e;case 3:y.effectTag=-4097&y.effectTag|64;case 0:if(null==(l="function"==typeof(y=g.payload)?y.call(m,u,l):y))break e;u=a({},u,l);break e;case 2:ai=!0}}null!==h.callback&&(e.effectTag|=32,null===(l=i.effects)?i.effects=[h]:l.push(h))}if(null===(h=h.next)||h===s){if(null===(l=i.shared.pending))break;h=o.next=l.next,l.next=s,i.baseQueue=o=l,i.shared.pending=null}}null===p?f=u:p.next=d,i.baseState=f,i.baseQueue=p,os(c),e.expirationTime=c,e.memoizedState=u}}function fi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=a,a=n,"function"!=typeof r)throw Error(o(191,r));r.call(a)}}}var di=K.ReactCurrentBatchConfig,pi=(new r.Component).refs;function hi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=ql(),a=di.suspense;(a=li(r=Hl(r,e,a),a)).payload=t,null!=n&&(a.callback=n),si(e,a),Gl(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=ql(),a=di.suspense;(a=li(r=Hl(r,e,a),a)).tag=1,a.payload=t,null!=n&&(a.callback=n),si(e,a),Gl(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=ql(),r=di.suspense;(r=li(n=Hl(n,e,r),r)).tag=2,null!=t&&(r.callback=t),si(e,r),Gl(e,n)}};function yi(e,t,n,r,a,i,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,o):!t.prototype||!t.prototype.isPureReactComponent||(!Fr(n,r)||!Fr(a,i))}function gi(e,t,n){var r=!1,a=ca,i=t.contextType;return"object"==typeof i&&null!==i?i=ri(i):(a=ma(t)?pa:fa.current,i=(r=null!=(r=t.contextTypes))?ha(e,a):ca),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function bi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function vi(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=pi,ii(e);var i=t.contextType;"object"==typeof i&&null!==i?a.context=ri(i):(i=ma(t)?pa:fa.current,a.context=ha(e,i)),ci(e,n,a,r),a.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(hi(e,t,i,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&mi.enqueueReplaceState(a,a.state,null),ci(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.effectTag|=4)}var wi=Array.isArray;function Mi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs;t===pi&&(t=r.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Li(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Ei(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Ss(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function l(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=js(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=Mi(e,t,n),r.return=e,r):((r=Ts(n.type,n.key,n.props,null,e.mode,r)).ref=Mi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ds(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Ns(n,e.mode,r,i)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=js(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Ts(t.type,t.key,t.props,null,e.mode,n)).ref=Mi(e,null,t),n.return=e,n;case te:return(t=Ds(t,e.mode,n)).return=e,t}if(wi(t)||me(t))return(t=Ns(t,e.mode,n,null)).return=e,t;Li(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===a?n.type===ne?f(e,t,n.props.children,r,a):u(e,t,n,r):null;case te:return n.key===a?c(e,t,n,r):null}if(wi(n)||me(n))return null!==a?null:f(e,t,n,r,null);Li(e,n)}return null}function h(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,a,r.key):u(t,e,r,a);case te:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(wi(r)||me(r))return f(t,e=e.get(n)||null,r,a,null);Li(t,r)}return null}function m(a,o,l,s){for(var u=null,c=null,f=o,m=o=0,y=null;null!==f&&m<l.length;m++){f.index>m?(y=f,f=null):y=f.sibling;var g=p(a,f,l[m],s);if(null===g){null===f&&(f=y);break}e&&f&&null===g.alternate&&t(a,f),o=i(g,o,m),null===c?u=g:c.sibling=g,c=g,f=y}if(m===l.length)return n(a,f),u;if(null===f){for(;m<l.length;m++)null!==(f=d(a,l[m],s))&&(o=i(f,o,m),null===c?u=f:c.sibling=f,c=f);return u}for(f=r(a,f);m<l.length;m++)null!==(y=h(f,a,m,l[m],s))&&(e&&null!==y.alternate&&f.delete(null===y.key?m:y.key),o=i(y,o,m),null===c?u=y:c.sibling=y,c=y);return e&&f.forEach((function(e){return t(a,e)})),u}function y(a,l,s,u){var c=me(s);if("function"!=typeof c)throw Error(o(150));if(null==(s=c.call(s)))throw Error(o(151));for(var f=c=null,m=l,y=l=0,g=null,b=s.next();null!==m&&!b.done;y++,b=s.next()){m.index>y?(g=m,m=null):g=m.sibling;var v=p(a,m,b.value,u);if(null===v){null===m&&(m=g);break}e&&m&&null===v.alternate&&t(a,m),l=i(v,l,y),null===f?c=v:f.sibling=v,f=v,m=g}if(b.done)return n(a,m),c;if(null===m){for(;!b.done;y++,b=s.next())null!==(b=d(a,b.value,u))&&(l=i(b,l,y),null===f?c=b:f.sibling=b,f=b);return c}for(m=r(a,m);!b.done;y++,b=s.next())null!==(b=h(m,a,y,b.value,u))&&(e&&null!==b.alternate&&m.delete(null===b.key?y:b.key),l=i(b,l,y),null===f?c=b:f.sibling=b,f=b);return e&&m.forEach((function(e){return t(a,e)})),c}return function(e,r,i,s){var u="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;u&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case ee:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){switch(u.tag){case 7:if(i.type===ne){n(e,u.sibling),(r=a(u,i.props.children)).return=e,e=r;break e}break;default:if(u.elementType===i.type){n(e,u.sibling),(r=a(u,i.props)).ref=Mi(e,u,i),r.return=e,e=r;break e}}n(e,u);break}t(e,u),u=u.sibling}i.type===ne?((r=Ns(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=Ts(i.type,i.key,i.props,null,e.mode,s)).ref=Mi(e,r,i),s.return=e,e=s)}return l(e);case te:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=a(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ds(i,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,i)).return=e,e=r):(n(e,r),(r=js(i,e.mode,s)).return=e,e=r),l(e);if(wi(i))return m(e,r,i,s);if(me(i))return y(e,r,i,s);if(c&&Li(e,i),void 0===i&&!u)switch(e.tag){case 1:case 0:throw e=e.type,Error(o(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ci=Ei(!0),xi=Ei(!1),Si={},Ti={current:Si},Ni={current:Si},ji={current:Si};function Di(e){if(e===Si)throw Error(o(174));return e}function ki(e,t){switch(ua(ji,t),ua(Ni,e),ua(Ti,Si),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ze(null,"");break;default:t=ze(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}sa(Ti),ua(Ti,t)}function Ii(){sa(Ti),sa(Ni),sa(ji)}function Oi(e){Di(ji.current);var t=Di(Ti.current),n=ze(t,e.type);t!==n&&(ua(Ni,e),ua(Ti,n))}function Ai(e){Ni.current===e&&(sa(Ti),sa(Ni))}var Pi={current:0};function Ri(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function zi(e,t){return{responder:e,props:t}}var _i=K.ReactCurrentDispatcher,Fi=K.ReactCurrentBatchConfig,Ui=0,Bi=null,Qi=null,Yi=null,Wi=!1;function Vi(){throw Error(o(321))}function qi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Hi(e,t,n,r,a,i){if(Ui=i,Bi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,_i.current=null===e||null===e.memoizedState?go:bo,e=n(r,a),t.expirationTime===Ui){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(o(301));i+=1,Yi=Qi=null,t.updateQueue=null,_i.current=vo,e=n(r,a)}while(t.expirationTime===Ui)}if(_i.current=yo,t=null!==Qi&&null!==Qi.next,Ui=0,Yi=Qi=Bi=null,Wi=!1,t)throw Error(o(300));return e}function Gi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Yi?Bi.memoizedState=Yi=e:Yi=Yi.next=e,Yi}function Zi(){if(null===Qi){var e=Bi.alternate;e=null!==e?e.memoizedState:null}else e=Qi.next;var t=null===Yi?Bi.memoizedState:Yi.next;if(null!==t)Yi=t,Qi=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Qi=e).memoizedState,baseState:Qi.baseState,baseQueue:Qi.baseQueue,queue:Qi.queue,next:null},null===Yi?Bi.memoizedState=Yi=e:Yi=Yi.next=e}return Yi}function Ki(e,t){return"function"==typeof t?t(e):t}function Xi(e){var t=Zi(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Qi,a=r.baseQueue,i=n.pending;if(null!==i){if(null!==a){var l=a.next;a.next=i.next,i.next=l}r.baseQueue=a=i,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var s=l=i=null,u=a;do{var c=u.expirationTime;if(c<Ui){var f={expirationTime:u.expirationTime,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=f,i=r):s=s.next=f,c>Bi.expirationTime&&(Bi.expirationTime=c,os(c))}else null!==s&&(s=s.next={expirationTime:1073741823,suspenseConfig:u.suspenseConfig,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),is(c,u.suspenseConfig),r=u.eagerReducer===e?u.eagerState:e(r,u.action);u=u.next}while(null!==u&&u!==a);null===s?i=r:s.next=l,zr(r,t.memoizedState)||(Do=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ji(e){var t=Zi(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(null!==a){n.pending=null;var l=a=a.next;do{i=e(i,l.action),l=l.next}while(l!==a);zr(i,t.memoizedState)||(Do=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function $i(e){var t=Gi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:e}).dispatch=mo.bind(null,Bi,e),[t.memoizedState,e]}function eo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Bi.updateQueue)?(t={lastEffect:null},Bi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function to(){return Zi().memoizedState}function no(e,t,n,r){var a=Gi();Bi.effectTag|=e,a.memoizedState=eo(1|t,n,void 0,void 0===r?null:r)}function ro(e,t,n,r){var a=Zi();r=void 0===r?null:r;var i=void 0;if(null!==Qi){var o=Qi.memoizedState;if(i=o.destroy,null!==r&&qi(r,o.deps))return void eo(t,n,i,r)}Bi.effectTag|=e,a.memoizedState=eo(1|t,n,i,r)}function ao(e,t){return no(516,4,e,t)}function io(e,t){return ro(516,4,e,t)}function oo(e,t){return ro(4,2,e,t)}function lo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function so(e,t,n){return n=null!=n?n.concat([e]):null,ro(4,2,lo.bind(null,t,e),n)}function uo(){}function co(e,t){return Gi().memoizedState=[e,void 0===t?null:t],e}function fo(e,t){var n=Zi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&qi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function po(e,t){var n=Zi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&qi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ho(e,t,n){var r=Ua();Qa(98>r?98:r,(function(){e(!0)})),Qa(97<r?97:r,(function(){var r=Fi.suspense;Fi.suspense=void 0===t?null:t;try{e(!1),n()}finally{Fi.suspense=r}}))}function mo(e,t,n){var r=ql(),a=di.suspense;a={expirationTime:r=Hl(r,e,a),suspenseConfig:a,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?a.next=a:(a.next=i.next,i.next=a),t.pending=a,i=e.alternate,e===Bi||null!==i&&i===Bi)Wi=!0,a.expirationTime=Ui,Bi.expirationTime=Ui;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var o=t.lastRenderedState,l=i(o,n);if(a.eagerReducer=i,a.eagerState=l,zr(l,o))return}catch(e){}Gl(e,r)}}var yo={readContext:ri,useCallback:Vi,useContext:Vi,useEffect:Vi,useImperativeHandle:Vi,useLayoutEffect:Vi,useMemo:Vi,useReducer:Vi,useRef:Vi,useState:Vi,useDebugValue:Vi,useResponder:Vi,useDeferredValue:Vi,useTransition:Vi},go={readContext:ri,useCallback:co,useContext:ri,useEffect:ao,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,no(4,2,lo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return no(4,2,e,t)},useMemo:function(e,t){var n=Gi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=mo.bind(null,Bi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Gi().memoizedState=e},useState:$i,useDebugValue:uo,useResponder:zi,useDeferredValue:function(e,t){var n=$i(e),r=n[0],a=n[1];return ao((function(){var n=Fi.suspense;Fi.suspense=void 0===t?null:t;try{a(e)}finally{Fi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=$i(!1),n=t[0];return t=t[1],[co(ho.bind(null,t,e),[t,e]),n]}},bo={readContext:ri,useCallback:fo,useContext:ri,useEffect:io,useImperativeHandle:so,useLayoutEffect:oo,useMemo:po,useReducer:Xi,useRef:to,useState:function(){return Xi(Ki)},useDebugValue:uo,useResponder:zi,useDeferredValue:function(e,t){var n=Xi(Ki),r=n[0],a=n[1];return io((function(){var n=Fi.suspense;Fi.suspense=void 0===t?null:t;try{a(e)}finally{Fi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Xi(Ki),n=t[0];return t=t[1],[fo(ho.bind(null,t,e),[t,e]),n]}},vo={readContext:ri,useCallback:fo,useContext:ri,useEffect:io,useImperativeHandle:so,useLayoutEffect:oo,useMemo:po,useReducer:Ji,useRef:to,useState:function(){return Ji(Ki)},useDebugValue:uo,useResponder:zi,useDeferredValue:function(e,t){var n=Ji(Ki),r=n[0],a=n[1];return io((function(){var n=Fi.suspense;Fi.suspense=void 0===t?null:t;try{a(e)}finally{Fi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Ji(Ki),n=t[0];return t=t[1],[fo(ho.bind(null,t,e),[t,e]),n]}},wo=null,Mo=null,Lo=!1;function Eo(e,t){var n=Cs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Co(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function xo(e){if(Lo){var t=Mo;if(t){var n=t;if(!Co(e,t)){if(!(t=Mn(n.nextSibling))||!Co(e,t))return e.effectTag=-1025&e.effectTag|2,Lo=!1,void(wo=e);Eo(wo,n)}wo=e,Mo=Mn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Lo=!1,wo=e}}function So(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wo=e}function To(e){if(e!==wo)return!1;if(!Lo)return So(e),Lo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!bn(t,e.memoizedProps))for(t=Mo;t;)Eo(e,t),t=Mn(t.nextSibling);if(So(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Mo=Mn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Mo=null}}else Mo=wo?Mn(e.stateNode.nextSibling):null;return!0}function No(){Mo=wo=null,Lo=!1}var jo=K.ReactCurrentOwner,Do=!1;function ko(e,t,n,r){t.child=null===e?xi(t,null,n,r):Ci(t,e.child,n,r)}function Io(e,t,n,r,a){n=n.render;var i=t.ref;return ni(t,a),r=Hi(e,t,n,r,i,a),null===e||Do?(t.effectTag|=1,ko(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=a&&(e.expirationTime=0),Go(e,t,a))}function Oo(e,t,n,r,a,i){if(null===e){var o=n.type;return"function"!=typeof o||xs(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ts(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ao(e,t,o,r,a,i))}return o=e.child,a<i&&(a=o.memoizedProps,(n=null!==(n=n.compare)?n:Fr)(a,r)&&e.ref===t.ref)?Go(e,t,i):(t.effectTag|=1,(e=Ss(o,r)).ref=t.ref,e.return=t,t.child=e)}function Ao(e,t,n,r,a,i){return null!==e&&Fr(e.memoizedProps,r)&&e.ref===t.ref&&(Do=!1,a<i)?(t.expirationTime=e.expirationTime,Go(e,t,i)):Ro(e,t,n,r,i)}function Po(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ro(e,t,n,r,a){var i=ma(n)?pa:fa.current;return i=ha(t,i),ni(t,a),n=Hi(e,t,n,r,i,a),null===e||Do?(t.effectTag|=1,ko(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=a&&(e.expirationTime=0),Go(e,t,a))}function zo(e,t,n,r,a){if(ma(n)){var i=!0;va(t)}else i=!1;if(ni(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),gi(t,n,r),vi(t,n,r,a),r=!0;else if(null===e){var o=t.stateNode,l=t.memoizedProps;o.props=l;var s=o.context,u=n.contextType;"object"==typeof u&&null!==u?u=ri(u):u=ha(t,u=ma(n)?pa:fa.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(l!==r||s!==u)&&bi(t,o,r,u),ai=!1;var d=t.memoizedState;o.state=d,ci(t,r,o,a),s=t.memoizedState,l!==r||d!==s||da.current||ai?("function"==typeof c&&(hi(t,n,c,r),s=t.memoizedState),(l=ai||yi(t,n,l,r,d,s,u))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=u,r=l):("function"==typeof o.componentDidMount&&(t.effectTag|=4),r=!1)}else o=t.stateNode,oi(e,t),l=t.memoizedProps,o.props=t.type===t.elementType?l:Ga(t.type,l),s=o.context,"object"==typeof(u=n.contextType)&&null!==u?u=ri(u):u=ha(t,u=ma(n)?pa:fa.current),(f="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(l!==r||s!==u)&&bi(t,o,r,u),ai=!1,s=t.memoizedState,o.state=s,ci(t,r,o,a),d=t.memoizedState,l!==r||s!==d||da.current||ai?("function"==typeof c&&(hi(t,n,c,r),d=t.memoizedState),(c=ai||yi(t,n,l,r,s,d,u))?(f||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,d,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,d,u)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||l===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||l===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),o.props=r,o.state=d,o.context=u,r=c):("function"!=typeof o.componentDidUpdate||l===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||l===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),r=!1);return _o(e,t,n,r,i,a)}function _o(e,t,n,r,a,i){Po(e,t);var o=0!=(64&t.effectTag);if(!r&&!o)return a&&wa(t,n,!1),Go(e,t,i);r=t.stateNode,jo.current=t;var l=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&o?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,l,i)):ko(e,t,l,i),t.memoizedState=r.state,a&&wa(t,n,!0),t.child}function Fo(e){var t=e.stateNode;t.pendingContext?ga(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ga(0,t.context,!1),ki(e,t.containerInfo)}var Uo,Bo,Qo,Yo={dehydrated:null,retryTime:0};function Wo(e,t,n){var r,a=t.mode,i=t.pendingProps,o=Pi.current,l=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&o)&&(null===e||null!==e.memoizedState)),r?(l=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ua(Pi,1&o),null===e){if(void 0!==i.fallback&&xo(t),l){if(l=i.fallback,(i=Ns(null,a,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ns(l,a,n,null)).return=t,i.sibling=n,t.memoizedState=Yo,t.child=i,n}return a=i.children,t.memoizedState=null,t.child=xi(t,null,a,n)}if(null!==e.memoizedState){if(a=(e=e.child).sibling,l){if(i=i.fallback,(n=Ss(e,e.pendingProps)).return=t,0==(2&t.mode)&&(l=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=l;null!==l;)l.return=n,l=l.sibling;return(a=Ss(a,i)).return=t,n.sibling=a,n.childExpirationTime=0,t.memoizedState=Yo,t.child=n,a}return n=Ci(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,l){if(l=i.fallback,(i=Ns(null,a,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ns(l,a,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Yo,t.child=i,n}return t.memoizedState=null,t.child=Ci(t,e,i.children,n)}function Vo(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ti(e.return,t)}function qo(e,t,n,r,a,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:a,lastEffect:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailExpiration=0,o.tailMode=a,o.lastEffect=i)}function Ho(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(ko(e,t,r.children,n),0!=(2&(r=Pi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Vo(e,n);else if(19===e.tag)Vo(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ua(Pi,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Ri(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),qo(t,!1,a,n,i,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Ri(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}qo(t,!0,n,null,i,t.lastEffect);break;case"together":qo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Go(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&os(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Ss(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ss(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Zo(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ko(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ma(t.type)&&ya(),null;case 3:return Ii(),sa(da),sa(fa),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!To(t)||(t.effectTag|=4),null;case 5:Ai(t),n=Di(ji.current);var i=t.type;if(null!==e&&null!=t.stateNode)Bo(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Di(Ti.current),To(t)){r=t.stateNode,i=t.type;var l=t.memoizedProps;switch(r[Cn]=t,r[xn]=l,i){case"iframe":case"object":case"embed":Ht("load",r);break;case"video":case"audio":for(e=0;e<Ke.length;e++)Ht(Ke[e],r);break;case"source":Ht("error",r);break;case"img":case"image":case"link":Ht("error",r),Ht("load",r);break;case"form":Ht("reset",r),Ht("submit",r);break;case"details":Ht("toggle",r);break;case"input":Ee(r,l),Ht("invalid",r),sn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Ht("invalid",r),sn(n,"onChange");break;case"textarea":ke(r,l),Ht("invalid",r),sn(n,"onChange")}for(var s in an(i,l),e=null,l)if(l.hasOwnProperty(s)){var u=l[s];"children"===s?"string"==typeof u?r.textContent!==u&&(e=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(e=["children",""+u]):C.hasOwnProperty(s)&&null!=u&&sn(n,s)}switch(i){case"input":we(r),Se(r,l,!0);break;case"textarea":we(r),Oe(r);break;case"select":case"option":break;default:"function"==typeof l.onClick&&(r.onclick=un)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(s=9===n.nodeType?n:n.ownerDocument,e===ln&&(e=Re(i)),e===ln?"script"===i?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(i,{is:r.is}):(e=s.createElement(i),"select"===i&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,i),e[Cn]=t,e[xn]=r,Uo(e,t),t.stateNode=e,s=on(i,r),i){case"iframe":case"object":case"embed":Ht("load",e),u=r;break;case"video":case"audio":for(u=0;u<Ke.length;u++)Ht(Ke[u],e);u=r;break;case"source":Ht("error",e),u=r;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),u=r;break;case"form":Ht("reset",e),Ht("submit",e),u=r;break;case"details":Ht("toggle",e),u=r;break;case"input":Ee(e,r),u=Le(e,r),Ht("invalid",e),sn(n,"onChange");break;case"option":u=Ne(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},u=a({},r,{value:void 0}),Ht("invalid",e),sn(n,"onChange");break;case"textarea":ke(e,r),u=De(e,r),Ht("invalid",e),sn(n,"onChange");break;default:u=r}an(i,u);var c=u;for(l in c)if(c.hasOwnProperty(l)){var f=c[l];"style"===l?nn(e,f):"dangerouslySetInnerHTML"===l?null!=(f=f?f.__html:void 0)&&Fe(e,f):"children"===l?"string"==typeof f?("textarea"!==i||""!==f)&&Ue(e,f):"number"==typeof f&&Ue(e,""+f):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(C.hasOwnProperty(l)?null!=f&&sn(n,l):null!=f&&X(e,l,f,s))}switch(i){case"input":we(e),Se(e,r,!1);break;case"textarea":we(e),Oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+be(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?je(e,!!r.multiple,n,!1):null!=r.defaultValue&&je(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof u.onClick&&(e.onclick=un)}gn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Qo(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));n=Di(ji.current),Di(Ti.current),To(t)?(n=t.stateNode,r=t.memoizedProps,n[Cn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Cn]=t,t.stateNode=n)}return null;case 13:return sa(Pi),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&To(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(l=t.firstEffect)?(t.firstEffect=i,i.nextEffect=l):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Pi.current)?Tl===wl&&(Tl=Ml):(Tl!==wl&&Tl!==Ml||(Tl=Ll),0!==Il&&null!==Cl&&(Os(Cl,Sl),As(Cl,Il)))),(n||r)&&(t.effectTag|=4),null);case 4:return Ii(),null;case 10:return ei(t),null;case 17:return ma(t.type)&&ya(),null;case 19:if(sa(Pi),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(l=r.rendering)){if(i)Zo(r,!1);else if(Tl!==wl||null!==e&&0!=(64&e.effectTag))for(l=t.child;null!==l;){if(null!==(e=Ri(l))){for(t.effectTag|=64,Zo(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)l=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=l,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,l=e.dependencies,i.dependencies=null===l?null:{expirationTime:l.expirationTime,firstContext:l.firstContext,responders:l.responders}),r=r.sibling;return ua(Pi,1&Pi.current|2),t.child}l=l.sibling}}else{if(!i)if(null!==(e=Ri(l))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Zo(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Fa()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Zo(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Fa()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Fa(),n.sibling=null,t=Pi.current,ua(Pi,i?1&t|2:1&t),n):null}throw Error(o(156,t.tag))}function Xo(e){switch(e.tag){case 1:ma(e.type)&&ya();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ii(),sa(da),sa(fa),0!=(64&(t=e.effectTag)))throw Error(o(285));return e.effectTag=-4097&t|64,e;case 5:return Ai(e),null;case 13:return sa(Pi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return sa(Pi),null;case 4:return Ii(),null;case 10:return ei(e),null;default:return null}}function Jo(e,t){return{value:e,source:t,stack:ge(t)}}Uo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Bo=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var l,s,u=t.stateNode;switch(Di(Ti.current),e=null,n){case"input":o=Le(u,o),r=Le(u,r),e=[];break;case"option":o=Ne(u,o),r=Ne(u,r),e=[];break;case"select":o=a({},o,{value:void 0}),r=a({},r,{value:void 0}),e=[];break;case"textarea":o=De(u,o),r=De(u,r),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(u.onclick=un)}for(l in an(n,r),n=null,o)if(!r.hasOwnProperty(l)&&o.hasOwnProperty(l)&&null!=o[l])if("style"===l)for(s in u=o[l])u.hasOwnProperty(s)&&(n||(n={}),n[s]="");else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(C.hasOwnProperty(l)?e||(e=[]):(e=e||[]).push(l,null));for(l in r){var c=r[l];if(u=null!=o?o[l]:void 0,r.hasOwnProperty(l)&&c!==u&&(null!=c||null!=u))if("style"===l)if(u){for(s in u)!u.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&u[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(e||(e=[]),e.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(e=e||[]).push(l,c)):"children"===l?u===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(C.hasOwnProperty(l)?(null!=c&&sn(i,l),e||u===c||(e=[])):(e=e||[]).push(l,c))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Qo=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var $o="function"==typeof WeakSet?WeakSet:Set;function el(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ge(n)),null!==n&&ye(n.type),t=t.value,null!==e&&1===e.tag&&ye(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function tl(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){bs(e,t)}else t.current=null}function nl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ga(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(o(163))}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function al(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void al(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Ga(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&fi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&gn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Rt(n)))));case 19:case 17:case 20:case 21:return}throw Error(o(163))}function ol(e,t,n){switch("function"==typeof Ls&&Ls(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Qa(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var a=t;try{n()}catch(e){bs(a,e)}}e=e.next}while(e!==r)}))}break;case 1:tl(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){bs(e,t)}}(t,n);break;case 5:tl(t);break;case 4:cl(e,t,n)}}function ll(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ll(t)}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ul(e){e:{for(var t=e.return;null!==t;){if(sl(t)){var n=t;break e}t=t.return}throw Error(o(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.effectTag&&(Ue(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||sl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var a=t.tag,i=5===a||6===a;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=un));else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var a=t.tag,i=5===a||6===a;if(i)t=i?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function cl(e,t,n){for(var r,a,i=t,l=!1;;){if(!l){l=i.return;e:for(;;){if(null===l)throw Error(o(160));switch(r=l.stateNode,l.tag){case 5:a=!1;break e;case 3:case 4:r=r.containerInfo,a=!0;break e}l=l.return}l=!0}if(5===i.tag||6===i.tag){e:for(var s=e,u=i,c=n,f=u;;)if(ol(s,f,c),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===u)break e;for(;null===f.sibling;){if(null===f.return||f.return===u)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}a?(s=r,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,a=!0,i.child.return=i,i=i.child;continue}}else if(ol(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(l=!1)}i.sibling.return=i.return,i=i.sibling}}function fl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void rl(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,a=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[xn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Ce(n,r),on(e,a),t=on(e,r),a=0;a<i.length;a+=2){var l=i[a],s=i[a+1];"style"===l?nn(n,s):"dangerouslySetInnerHTML"===l?Fe(n,s):"children"===l?Ue(n,s):X(n,l,s,t)}switch(e){case"input":xe(n,r);break;case"textarea":Ie(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?je(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?je(n,!!r.multiple,r.defaultValue,!0):je(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Rt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Al=Fa()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,a=null!=(a=e.memoizedProps.style)&&a.hasOwnProperty("display")?a.display:null,i.style.display=tn("display",a));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void dl(t);case 19:return void dl(t);case 17:return}throw Error(o(163))}function dl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new $o),t.forEach((function(t){var r=ws.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var pl="function"==typeof WeakMap?WeakMap:Map;function hl(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rl||(Rl=!0,zl=r),el(e,t)},n}function ml(e,t,n){(n=li(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return el(e,t),r(a)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===_l?_l=new Set([this]):_l.add(this),el(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var yl,gl=Math.ceil,bl=K.ReactCurrentDispatcher,vl=K.ReactCurrentOwner,wl=0,Ml=3,Ll=4,El=0,Cl=null,xl=null,Sl=0,Tl=wl,Nl=null,jl=1073741823,Dl=1073741823,kl=null,Il=0,Ol=!1,Al=0,Pl=null,Rl=!1,zl=null,_l=null,Fl=!1,Ul=null,Bl=90,Ql=null,Yl=0,Wl=null,Vl=0;function ql(){return 0!=(48&El)?1073741821-(Fa()/10|0):0!==Vl?Vl:Vl=1073741821-(Fa()/10|0)}function Hl(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Ua();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&El))return Sl;if(null!==n)e=Ha(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Ha(e,150,100);break;case 97:case 96:e=Ha(e,5e3,250);break;case 95:e=2;break;default:throw Error(o(326))}return null!==Cl&&e===Sl&&--e,e}function Gl(e,t){if(50<Yl)throw Yl=0,Wl=null,Error(o(185));if(null!==(e=Zl(e,t))){var n=Ua();1073741823===t?0!=(8&El)&&0==(48&El)?$l(e):(Xl(e),0===El&&Va()):Xl(e),0==(4&El)||98!==n&&99!==n||(null===Ql?Ql=new Map([[e,t]]):(void 0===(n=Ql.get(e))||n>t)&&Ql.set(e,t))}}function Zl(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,a=null;if(null===r&&3===e.tag)a=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){a=r.stateNode;break}r=r.return}return null!==a&&(Cl===a&&(os(t),Tl===Ll&&Os(a,Sl)),As(a,t)),a}function Kl(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Is(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Xl(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Wa($l.bind(null,e));else{var t=Kl(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=ql();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var a=e.callbackPriority;if(e.callbackExpirationTime===t&&a>=r)return;n!==Ia&&Ea(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Wa($l.bind(null,e)):Ya(r,Jl.bind(null,e),{timeout:10*(1073741821-t)-Fa()}),e.callbackNode=t}}}function Jl(e,t){if(Vl=0,t)return Ps(e,t=ql()),Xl(e),null;var n=Kl(e);if(0!==n){if(t=e.callbackNode,0!=(48&El))throw Error(o(327));if(ms(),e===Cl&&n===Sl||ns(e,n),null!==xl){var r=El;El|=16;for(var a=as();;)try{ss();break}catch(t){rs(e,t)}if($a(),El=r,bl.current=a,1===Tl)throw t=Nl,ns(e,n),Os(e,n),Xl(e),t;if(null===xl)switch(a=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Tl,Cl=null,r){case wl:case 1:throw Error(o(345));case 2:Ps(e,2<n?2:n);break;case Ml:if(Os(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fs(a)),1073741823===jl&&10<(a=Al+500-Fa())){if(Ol){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,ns(e,n);break}}if(0!==(i=Kl(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=vn(ds.bind(null,e),a);break}ds(e);break;case Ll:if(Os(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fs(a)),Ol&&(0===(a=e.lastPingedTime)||a>=n)){e.lastPingedTime=n,ns(e,n);break}if(0!==(a=Kl(e))&&a!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Dl?r=10*(1073741821-Dl)-Fa():1073741823===jl?r=0:(r=10*(1073741821-jl)-5e3,0>(r=(a=Fa())-r)&&(r=0),(n=10*(1073741821-n)-a)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gl(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=vn(ds.bind(null,e),r);break}ds(e);break;case 5:if(1073741823!==jl&&null!==kl){i=jl;var l=kl;if(0>=(r=0|l.busyMinDurationMs)?r=0:(a=0|l.busyDelayMs,r=(i=Fa()-(10*(1073741821-i)-(0|l.timeoutMs||5e3)))<=a?0:a+r-i),10<r){Os(e,n),e.timeoutHandle=vn(ds.bind(null,e),r);break}}ds(e);break;default:throw Error(o(329))}if(Xl(e),e.callbackNode===t)return Jl.bind(null,e)}}return null}function $l(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&El))throw Error(o(327));if(ms(),e===Cl&&t===Sl||ns(e,t),null!==xl){var n=El;El|=16;for(var r=as();;)try{ls();break}catch(t){rs(e,t)}if($a(),El=n,bl.current=r,1===Tl)throw n=Nl,ns(e,t),Os(e,t),Xl(e),n;if(null!==xl)throw Error(o(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Cl=null,ds(e),Xl(e)}return null}function es(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&Va()}}function ts(e,t){var n=El;El&=-2,El|=8;try{return e(t)}finally{0===(El=n)&&Va()}}function ns(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==xl)for(n=xl.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&ya();break;case 3:Ii(),sa(da),sa(fa);break;case 5:Ai(r);break;case 4:Ii();break;case 13:case 19:sa(Pi);break;case 10:ei(r)}n=n.return}Cl=e,xl=Ss(e.current,null),Sl=t,Tl=wl,Nl=null,Dl=jl=1073741823,kl=null,Il=0,Ol=!1}function rs(e,t){for(;;){try{if($a(),_i.current=yo,Wi)for(var n=Bi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ui=0,Yi=Qi=Bi=null,Wi=!1,null===xl||null===xl.return)return Tl=1,Nl=t,xl=null;e:{var a=e,i=xl.return,o=xl,l=t;if(t=Sl,o.effectTag|=2048,o.firstEffect=o.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var s=l;if(0==(2&o.mode)){var u=o.alternate;u?(o.updateQueue=u.updateQueue,o.memoizedState=u.memoizedState,o.expirationTime=u.expirationTime):(o.updateQueue=null,o.memoizedState=null)}var c=0!=(1&Pi.current),f=i;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var h=f.memoizedProps;d=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!c)}}if(d){var m=f.updateQueue;if(null===m){var y=new Set;y.add(s),f.updateQueue=y}else m.add(s);if(0==(2&f.mode)){if(f.effectTag|=64,o.effectTag&=-2981,1===o.tag)if(null===o.alternate)o.tag=17;else{var g=li(1073741823,null);g.tag=2,si(o,g)}o.expirationTime=1073741823;break e}l=void 0,o=t;var b=a.pingCache;if(null===b?(b=a.pingCache=new pl,l=new Set,b.set(s,l)):void 0===(l=b.get(s))&&(l=new Set,b.set(s,l)),!l.has(o)){l.add(o);var v=vs.bind(null,a,s,o);s.then(v,v)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);l=Error((ye(o.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ge(o))}5!==Tl&&(Tl=2),l=Jo(l,o),f=i;do{switch(f.tag){case 3:s=l,f.effectTag|=4096,f.expirationTime=t,ui(f,hl(f,s,t));break e;case 1:s=l;var w=f.type,M=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==M&&"function"==typeof M.componentDidCatch&&(null===_l||!_l.has(M)))){f.effectTag|=4096,f.expirationTime=t,ui(f,ml(f,s,t));break e}}f=f.return}while(null!==f)}xl=cs(xl)}catch(e){t=e;continue}break}}function as(){var e=bl.current;return bl.current=yo,null===e?yo:e}function is(e,t){e<jl&&2<e&&(jl=e),null!==t&&e<Dl&&2<e&&(Dl=e,kl=t)}function os(e){e>Il&&(Il=e)}function ls(){for(;null!==xl;)xl=us(xl)}function ss(){for(;null!==xl&&!Oa();)xl=us(xl)}function us(e){var t=yl(e.alternate,e,Sl);return e.memoizedProps=e.pendingProps,null===t&&(t=cs(e)),vl.current=null,t}function cs(e){xl=e;do{var t=xl.alternate;if(e=xl.return,0==(2048&xl.effectTag)){if(t=Ko(t,xl,Sl),1===Sl||1!==xl.childExpirationTime){for(var n=0,r=xl.child;null!==r;){var a=r.expirationTime,i=r.childExpirationTime;a>n&&(n=a),i>n&&(n=i),r=r.sibling}xl.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=xl.firstEffect),null!==xl.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=xl.firstEffect),e.lastEffect=xl.lastEffect),1<xl.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=xl:e.firstEffect=xl,e.lastEffect=xl))}else{if(null!==(t=Xo(xl)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=xl.sibling))return t;xl=e}while(null!==xl);return Tl===wl&&(Tl=5),null}function fs(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function ds(e){var t=Ua();return Qa(99,ps.bind(null,e,t)),null}function ps(e,t){do{ms()}while(null!==Ul);if(0!=(48&El))throw Error(o(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var a=fs(n);if(e.firstPendingTime=a,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Cl&&(xl=Cl=null,Sl=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,a=n.firstEffect):a=n:a=n.firstEffect,null!==a){var i=El;El|=32,vl.current=null,mn=qt;var l=pn();if(hn(l)){if("selectionStart"in l)var s={start:l.selectionStart,end:l.selectionEnd};else e:{var u=(s=(s=l.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(u&&0!==u.rangeCount){s=u.anchorNode;var c=u.anchorOffset,f=u.focusNode;u=u.focusOffset;try{s.nodeType,f.nodeType}catch(e){s=null;break e}var d=0,p=-1,h=-1,m=0,y=0,g=l,b=null;t:for(;;){for(var v;g!==s||0!==c&&3!==g.nodeType||(p=d+c),g!==f||0!==u&&3!==g.nodeType||(h=d+u),3===g.nodeType&&(d+=g.nodeValue.length),null!==(v=g.firstChild);)b=g,g=v;for(;;){if(g===l)break t;if(b===s&&++m===c&&(p=d),b===f&&++y===u&&(h=d),null!==(v=g.nextSibling))break;b=(g=b).parentNode}g=v}s=-1===p||-1===h?null:{start:p,end:h}}else s=null}s=s||{start:0,end:0}}else s=null;yn={activeElementDetached:null,focusedElem:l,selectionRange:s},qt=!1,Pl=a;do{try{hs()}catch(e){if(null===Pl)throw Error(o(330));bs(Pl,e),Pl=Pl.nextEffect}}while(null!==Pl);Pl=a;do{try{for(l=e,s=t;null!==Pl;){var w=Pl.effectTag;if(16&w&&Ue(Pl.stateNode,""),128&w){var M=Pl.alternate;if(null!==M){var L=M.ref;null!==L&&("function"==typeof L?L(null):L.current=null)}}switch(1038&w){case 2:ul(Pl),Pl.effectTag&=-3;break;case 6:ul(Pl),Pl.effectTag&=-3,fl(Pl.alternate,Pl);break;case 1024:Pl.effectTag&=-1025;break;case 1028:Pl.effectTag&=-1025,fl(Pl.alternate,Pl);break;case 4:fl(Pl.alternate,Pl);break;case 8:cl(l,c=Pl,s),ll(c)}Pl=Pl.nextEffect}}catch(e){if(null===Pl)throw Error(o(330));bs(Pl,e),Pl=Pl.nextEffect}}while(null!==Pl);if(L=yn,M=pn(),w=L.focusedElem,s=L.selectionRange,M!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==s&&hn(w)&&(M=s.start,void 0===(L=s.end)&&(L=M),"selectionStart"in w?(w.selectionStart=M,w.selectionEnd=Math.min(L,w.value.length)):(L=(M=w.ownerDocument||document)&&M.defaultView||window).getSelection&&(L=L.getSelection(),c=w.textContent.length,l=Math.min(s.start,c),s=void 0===s.end?l:Math.min(s.end,c),!L.extend&&l>s&&(c=s,s=l,l=c),c=dn(w,l),f=dn(w,s),c&&f&&(1!==L.rangeCount||L.anchorNode!==c.node||L.anchorOffset!==c.offset||L.focusNode!==f.node||L.focusOffset!==f.offset)&&((M=M.createRange()).setStart(c.node,c.offset),L.removeAllRanges(),l>s?(L.addRange(M),L.extend(f.node,f.offset)):(M.setEnd(f.node,f.offset),L.addRange(M))))),M=[];for(L=w;L=L.parentNode;)1===L.nodeType&&M.push({element:L,left:L.scrollLeft,top:L.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<M.length;w++)(L=M[w]).element.scrollLeft=L.left,L.element.scrollTop=L.top}qt=!!mn,yn=mn=null,e.current=n,Pl=a;do{try{for(w=e;null!==Pl;){var E=Pl.effectTag;if(36&E&&il(w,Pl.alternate,Pl),128&E){M=void 0;var C=Pl.ref;if(null!==C){var x=Pl.stateNode;switch(Pl.tag){case 5:M=x;break;default:M=x}"function"==typeof C?C(M):C.current=M}}Pl=Pl.nextEffect}}catch(e){if(null===Pl)throw Error(o(330));bs(Pl,e),Pl=Pl.nextEffect}}while(null!==Pl);Pl=null,Aa(),El=i}else e.current=n;if(Fl)Fl=!1,Ul=e,Bl=t;else for(Pl=a;null!==Pl;)t=Pl.nextEffect,Pl.nextEffect=null,Pl=t;if(0===(t=e.firstPendingTime)&&(_l=null),1073741823===t?e===Wl?Yl++:(Yl=0,Wl=e):Yl=0,"function"==typeof Ms&&Ms(n.stateNode,r),Xl(e),Rl)throw Rl=!1,e=zl,zl=null,e;return 0!=(8&El)||Va(),null}function hs(){for(;null!==Pl;){var e=Pl.effectTag;0!=(256&e)&&nl(Pl.alternate,Pl),0==(512&e)||Fl||(Fl=!0,Ya(97,(function(){return ms(),null}))),Pl=Pl.nextEffect}}function ms(){if(90!==Bl){var e=97<Bl?97:Bl;return Bl=90,Qa(e,ys)}}function ys(){if(null===Ul)return!1;var e=Ul;if(Ul=null,0!=(48&El))throw Error(o(331));var t=El;for(El|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rl(5,n),al(5,n)}}catch(t){if(null===e)throw Error(o(330));bs(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return El=t,Va(),!0}function gs(e,t,n){si(e,t=hl(e,t=Jo(n,t),1073741823)),null!==(e=Zl(e,1073741823))&&Xl(e)}function bs(e,t){if(3===e.tag)gs(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){gs(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===_l||!_l.has(r))){si(n,e=ml(n,e=Jo(t,e),1073741823)),null!==(n=Zl(n,1073741823))&&Xl(n);break}}n=n.return}}function vs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Cl===e&&Sl===n?Tl===Ll||Tl===Ml&&1073741823===jl&&Fa()-Al<500?ns(e,Sl):Ol=!0:Is(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Xl(e)))}function ws(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Hl(t=ql(),e,null)),null!==(e=Zl(e,t))&&Xl(e)}yl=function(e,t,n){var r=t.expirationTime;if(null!==e){var a=t.pendingProps;if(e.memoizedProps!==a||da.current)Do=!0;else{if(r<n){switch(Do=!1,t.tag){case 3:Fo(t),No();break;case 5:if(Oi(t),4&t.mode&&1!==n&&a.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:ma(t.type)&&va(t);break;case 4:ki(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,a=t.type._context,ua(Za,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Wo(e,t,n):(ua(Pi,1&Pi.current),null!==(t=Go(e,t,n))?t.sibling:null);ua(Pi,1&Pi.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Ho(e,t,n);t.effectTag|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null),ua(Pi,Pi.current),!r)return null}return Go(e,t,n)}Do=!1}}else Do=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,a=ha(t,fa.current),ni(t,n),a=Hi(null,t,r,e,a,n),t.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ma(r)){var i=!0;va(t)}else i=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,ii(t);var l=r.getDerivedStateFromProps;"function"==typeof l&&hi(t,r,l,e),a.updater=mi,t.stateNode=a,a._reactInternalFiber=t,vi(t,r,e,n),t=_o(null,t,r,!0,i,n)}else t.tag=0,ko(null,t,a,n),t=t.child;return t;case 16:e:{if(a=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(a),1!==a._status)throw a._result;switch(a=a._result,t.type=a,i=t.tag=function(e){if("function"==typeof e)return xs(e)?1:0;if(null!=e){if((e=e.$$typeof)===se)return 11;if(e===fe)return 14}return 2}(a),e=Ga(a,e),i){case 0:t=Ro(null,t,a,e,n);break e;case 1:t=zo(null,t,a,e,n);break e;case 11:t=Io(null,t,a,e,n);break e;case 14:t=Oo(null,t,a,Ga(a.type,e),r,n);break e}throw Error(o(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,Ro(e,t,r,a=t.elementType===r?a:Ga(r,a),n);case 1:return r=t.type,a=t.pendingProps,zo(e,t,r,a=t.elementType===r?a:Ga(r,a),n);case 3:if(Fo(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,oi(e,t),ci(t,r,null,n),(r=t.memoizedState.element)===a)No(),t=Go(e,t,n);else{if((a=t.stateNode.hydrate)&&(Mo=Mn(t.stateNode.containerInfo.firstChild),wo=t,a=Lo=!0),a)for(n=xi(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else ko(e,t,r,n),No();t=t.child}return t;case 5:return Oi(t),null===e&&xo(t),r=t.type,a=t.pendingProps,i=null!==e?e.memoizedProps:null,l=a.children,bn(r,a)?l=null:null!==i&&bn(r,i)&&(t.effectTag|=16),Po(e,t),4&t.mode&&1!==n&&a.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(ko(e,t,l,n),t=t.child),t;case 6:return null===e&&xo(t),null;case 13:return Wo(e,t,n);case 4:return ki(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ci(t,null,r,n):ko(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Io(e,t,r,a=t.elementType===r?a:Ga(r,a),n);case 7:return ko(e,t,t.pendingProps,n),t.child;case 8:case 12:return ko(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,l=t.memoizedProps,i=a.value;var s=t.type._context;if(ua(Za,s._currentValue),s._currentValue=i,null!==l)if(s=l.value,0===(i=zr(s,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,i):1073741823))){if(l.children===a.children&&!da.current){t=Go(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var u=s.dependencies;if(null!==u){l=s.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&i)){1===s.tag&&((c=li(n,null)).tag=2,si(s,c)),s.expirationTime<n&&(s.expirationTime=n),null!==(c=s.alternate)&&c.expirationTime<n&&(c.expirationTime=n),ti(s.return,n),u.expirationTime<n&&(u.expirationTime=n);break}c=c.next}}else l=10===s.tag&&s.type===t.type?null:s.child;if(null!==l)l.return=s;else for(l=s;null!==l;){if(l===t){l=null;break}if(null!==(s=l.sibling)){s.return=l.return,l=s;break}l=l.return}s=l}ko(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(i=t.pendingProps).children,ni(t,n),r=r(a=ri(a,i.unstable_observedBits)),t.effectTag|=1,ko(e,t,r,n),t.child;case 14:return i=Ga(a=t.type,t.pendingProps),Oo(e,t,a,i=Ga(a.type,i),r,n);case 15:return Ao(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ga(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,ma(r)?(e=!0,va(t)):e=!1,ni(t,n),gi(t,r,a),vi(t,r,a,n),_o(null,t,r,!0,e,n);case 19:return Ho(e,t,n)}throw Error(o(156,t.tag))};var Ms=null,Ls=null;function Es(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Cs(e,t,n,r){return new Es(e,t,n,r)}function xs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ss(e,t){var n=e.alternate;return null===n?((n=Cs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ts(e,t,n,r,a,i){var l=2;if(r=e,"function"==typeof e)xs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case ne:return Ns(n.children,a,i,t);case le:l=8,a|=7;break;case re:l=8,a|=1;break;case ae:return(e=Cs(12,n,t,8|a)).elementType=ae,e.type=ae,e.expirationTime=i,e;case ue:return(e=Cs(13,n,t,a)).type=ue,e.elementType=ue,e.expirationTime=i,e;case ce:return(e=Cs(19,n,t,a)).elementType=ce,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:l=10;break e;case oe:l=9;break e;case se:l=11;break e;case fe:l=14;break e;case de:l=16,r=null;break e;case pe:l=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Cs(l,n,t,a)).elementType=e,t.type=r,t.expirationTime=i,t}function Ns(e,t,n,r){return(e=Cs(7,e,r,t)).expirationTime=n,e}function js(e,t,n){return(e=Cs(6,e,null,t)).expirationTime=n,e}function Ds(e,t,n){return(t=Cs(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ks(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Is(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Os(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function As(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Ps(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Rs(e,t,n,r){var a=t.current,i=ql(),l=di.suspense;i=Hl(i,a,l);e:if(n){t:{if($e(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(o(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ma(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(o(171))}if(1===n.tag){var u=n.type;if(ma(u)){n=ba(n,u,s);break e}}n=s}else n=ca;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),si(a,t),Gl(a,i),i}function zs(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function _s(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Fs(e,t){_s(e,t),(e=e.alternate)&&_s(e,t)}function Us(e,t,n){var r=new ks(e,t,n=null!=n&&!0===n.hydrate),a=Cs(3,null,null,2===t?7:1===t?3:0);r.current=a,a.stateNode=r,ii(a),e[Sn]=r.current,n&&0!==t&&function(e,t){var n=Je(t);St.forEach((function(e){ht(e,t,n)})),Tt.forEach((function(e){ht(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Bs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qs(e,t,n,r,a){var i=n._reactRootContainer;if(i){var o=i._internalRoot;if("function"==typeof a){var l=a;a=function(){var e=zs(o);l.call(e)}}Rs(t,o,e,a)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Us(e,0,t?{hydrate:!0}:void 0)}(n,r),o=i._internalRoot,"function"==typeof a){var s=a;a=function(){var e=zs(o);s.call(e)}}ts((function(){Rs(t,o,e,a)}))}return zs(o)}function Ys(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Ws(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Bs(t))throw Error(o(200));return Ys(e,t,null,n)}Us.prototype.render=function(e){Rs(e,this._internalRoot,null,null)},Us.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Rs(null,e,null,(function(){t[Sn]=null}))},mt=function(e){if(13===e.tag){var t=Ha(ql(),150,100);Gl(e,t),Fs(e,t)}},yt=function(e){13===e.tag&&(Gl(e,3),Fs(e,3))},gt=function(e){if(13===e.tag){var t=ql();Gl(e,t=Hl(t,e,null)),Fs(e,t)}},N=function(e,t,n){switch(t){case"input":if(xe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=Dn(r);if(!a)throw Error(o(90));Me(r),xe(r,a)}}}break;case"textarea":Ie(e,n);break;case"select":null!=(t=n.value)&&je(e,!!n.multiple,t,!1)}},A=es,P=function(e,t,n,r,a){var i=El;El|=4;try{return Qa(98,e.bind(null,t,n,r,a))}finally{0===(El=i)&&Va()}},R=function(){0==(49&El)&&(function(){if(null!==Ql){var e=Ql;Ql=null,e.forEach((function(e,t){Ps(t,e),Xl(t)})),Va()}}(),ms())},z=function(e,t){var n=El;El|=2;try{return e(t)}finally{0===(El=n)&&Va()}};var Vs,qs,Hs={Events:[Nn,jn,Dn,S,E,zn,function(e){at(e,Rn)},I,O,Xt,lt,ms,{current:!1}]};qs=(Vs={findFiberByHostInstance:Tn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ms=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Ls=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(a({},Vs,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return qs?qs(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hs,t.createPortal=Ws,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&El))throw Error(o(187));var n=El;El|=1;try{return Qa(99,e.bind(null,t))}finally{El=n,Va()}},t.hydrate=function(e,t,n){if(!Bs(t))throw Error(o(200));return Qs(null,e,t,!0,n)},t.render=function(e,t,n){if(!Bs(t))throw Error(o(200));return Qs(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Bs(e))throw Error(o(40));return!!e._reactRootContainer&&(ts((function(){Qs(null,null,e,!1,(function(){e._reactRootContainer=null,e[Sn]=null}))})),!0)},t.unstable_batchedUpdates=es,t.unstable_createPortal=function(e,t){return Ws(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bs(n))throw Error(o(200));if(null==e||void 0===e._reactInternalFiber)throw Error(o(38));return Qs(e,t,n,!1,r)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(37)},function(e,t,n){"use strict"; /** @license React v0.19.1 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r,a,i,o,l;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(c,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==s?setTimeout(r,0,e):(s=e,setTimeout(c,0))},a=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},o=function(){return!1},l=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var y=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var b=!1,v=null,w=-1,M=5,L=0;o=function(){return t.unstable_now()>=L},l=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):M=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,C=E.port2;E.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();L=e+M;try{v(!0,e)?C.postMessage(null):(b=!1,v=null)}catch(e){throw C.postMessage(null),e}}else b=!1},r=function(e){v=e,b||(b=!0,C.postMessage(null))},a=function(e,n){w=h((function(){e(t.unstable_now())}),n)},i=function(){m(w),w=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<N(a,t)))break e;e[r]=t,e[n]=a,n=r}}function S(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var i=2*(r+1)-1,o=e[i],l=i+1,s=e[l];if(void 0!==o&&0>N(o,n))void 0!==s&&0>N(s,o)?(e[r]=s,e[l]=n,r=l):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==s&&0>N(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function N(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var j=[],D=[],k=1,I=null,O=3,A=!1,P=!1,R=!1;function z(e){for(var t=S(D);null!==t;){if(null===t.callback)T(D);else{if(!(t.startTime<=e))break;T(D),t.sortIndex=t.expirationTime,x(j,t)}t=S(D)}}function _(e){if(R=!1,z(e),!P)if(null!==S(j))P=!0,r(F);else{var t=S(D);null!==t&&a(_,t.startTime-e)}}function F(e,n){P=!1,R&&(R=!1,i()),A=!0;var r=O;try{for(z(n),I=S(j);null!==I&&(!(I.expirationTime>n)||e&&!o());){var l=I.callback;if(null!==l){I.callback=null,O=I.priorityLevel;var s=l(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?I.callback=s:I===S(j)&&T(j),z(n)}else T(j);I=S(j)}if(null!==I)var u=!0;else{var c=S(D);null!==c&&a(_,c.startTime-n),u=!1}return u}finally{I=null,O=r,A=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=l;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){P||A||(P=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return S(j)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var l=t.unstable_now();if("object"==typeof o&&null!==o){var s=o.delay;s="number"==typeof s&&0<s?l+s:l,o="number"==typeof o.timeout?o.timeout:U(e)}else o=U(e),s=l;return e={id:k++,callback:n,priorityLevel:e,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>l?(e.sortIndex=s,x(D,e),null===S(j)&&e===S(D)&&(R?i():R=!0,a(_,s-l))):(e.sortIndex=o,x(j,e),P||A||(P=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();z(e);var n=S(j);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<I.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=O;return function(){var n=O;O=t;try{return e.apply(this,arguments)}finally{O=n}}}},function(e,t,n){"use strict";var r=n(39);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(18),a=n(55);function i(t,n,o){return a()?(e.exports=i=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e,t,n){var a=[null];a.push.apply(a,t);var i=new(Function.bind.apply(e,a));return n&&r(i,n.prototype),i},e.exports.default=e.exports,e.exports.__esModule=!0),i.apply(null,arguments)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(24);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 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},a=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}}(),i=n(0),o=h(i),l=h(n(21)),s=h(n(1)),u=h(n(64)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(26)),f=n(20),d=h(f),p=n(71);function h(e){return e&&e.__esModule?e:{default:e}}function m(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 g=t.portalClassName="ReactModalPortal",b=t.bodyOpenClassName="ReactModal__Body--open",v=f.canUseDOM&&void 0!==l.default.createPortal,w=function(){return v?l.default.createPortal:l.default.unstable_renderSubtreeIntoContainer};function M(e){return e()}var L=function(e){function t(){var e,n,a;m(this,t);for(var i=arguments.length,s=Array(i),c=0;c<i;c++)s[c]=arguments[c];return n=a=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),a.removePortal=function(){!v&&l.default.unmountComponentAtNode(a.node);var e=M(a.props.parentSelector);e&&e.contains(a.node)?e.removeChild(a.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},a.portalRef=function(e){a.portal=e},a.renderPortal=function(e){var n=w()(a,o.default.createElement(u.default,r({defaultStyles:t.defaultStyles},e)),a.node);a.portalRef(n)},y(a,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),a(t,[{key:"componentDidMount",value:function(){f.canUseDOM&&(v||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName,M(this.props.parentSelector).appendChild(this.node),!v&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:M(e.parentSelector),nextParent:M(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(f.canUseDOM){var r=this.props,a=r.isOpen,i=r.portalClassName;e.portalClassName!==i&&(this.node.className=i);var o=n.prevParent,l=n.nextParent;l!==o&&(o.removeChild(this.node),l.appendChild(this.node)),(e.isOpen||a)&&!v&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(f.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return f.canUseDOM&&v?(!this.node&&v&&(this.node=document.createElement("div")),w()(o.default.createElement(u.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(i.Component);L.propTypes={isOpen:s.default.bool.isRequired,style:s.default.shape({content:s.default.object,overlay:s.default.object}),portalClassName:s.default.string,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,className:s.default.oneOfType([s.default.string,s.default.shape({base:s.default.string.isRequired,afterOpen:s.default.string.isRequired,beforeClose:s.default.string.isRequired})]),overlayClassName:s.default.oneOfType([s.default.string,s.default.shape({base:s.default.string.isRequired,afterOpen:s.default.string.isRequired,beforeClose:s.default.string.isRequired})]),appElement:s.default.instanceOf(d.default),onAfterOpen:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,ariaHideApp:s.default.bool,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,parentSelector:s.default.func,aria:s.default.object,data:s.default.object,role:s.default.string,contentLabel:s.default.string,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func},L.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:b,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return o.default.createElement("div",e,t)},contentElement:function(e,t){return o.default.createElement("div",e,t)}},L.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(L),t.default=L},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},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=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}}(),o=n(0),l=m(n(1)),s=h(n(65)),u=m(n(66)),c=h(n(26)),f=h(n(69)),d=m(n(20)),p=m(n(27));function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}n(70);var y={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},g=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,a=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&f.remove(document.body,i),a&&f.remove(document.getElementsByTagName("html")[0],a),r&&g>0&&0===(g-=1)&&c.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),p.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,u.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":a(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,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),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,a=e.bodyOpenClassName;a&&f.add(document.body,a),r&&f.add(document.getElementsByTagName("html")[0],r),n&&(g+=1,c.hide(t)),p.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,a=e.overlayClassName,i=e.defaultStyles,o=e.children,l=n?{}:i.content,s=a?{}:i.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",a),style:r({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=r({id:t,ref:this.setContentRef,style:r({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),f=this.props.contentElement(c,o);return this.props.overlayElement(u,f)}}]),t}(o.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.instanceOf(d.default),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){o.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==o.length&&(t=o.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){o.length>0&&o.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var r,a=n(25),i=(r=a)&&r.__esModule?r:{default:r};var o=[],l=null,s=!1;function u(){s=!0}function c(){if(s){if(s=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,i.default)(l)[0]||l).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,a=t.shiftKey,o=n[0],l=n[n.length-1];if(e===document.activeElement){if(!a)return;r=l}l!==document.activeElement||a||(r=o);o===document.activeElement&&a&&(r=l);if(r)return t.preventDefault(),void r.focus();var s=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==s||"Chrome"==s[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(document.activeElement);u>-1&&(u+=a?-1:1);if(void 0===(r=n[u]))return t.preventDefault(),void(r=a?l:o).focus();t.preventDefault(),r.focus()};var r,a=n(25),i=(r=a)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r; /*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. */!function(){"use strict";var a=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:a,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:a&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:a&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},a={};t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:a,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)}));var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:a,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)}));var n,i}},function(e,t,n){"use strict";var r,a=n(27),i=(r=a)&&r.__esModule?r:{default:r};var o=void 0,l=void 0,s=[];function u(){0!==s.length&&s[s.length-1].focusContent()}i.default.subscribe((function(e,t){o&&l||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",u),(l=o.cloneNode()).addEventListener("focus",u)),(s=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(o.parentElement&&o.parentElement.removeChild(o),l.parentElement&&l.parentElement.removeChild(l))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function a(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==l){var s=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=a),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return o})),r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){e.exports={screenSmall:"576px"}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Rn}));var r=n(9),a=n.n(r),i=n(5),o=n.n(i),l=n(6),s=n.n(l),u=n(0),c=n.n(u),f=n(21),d=n.n(f),p=n(3),h=n.n(p),m=n(7),y=n.n(m),g=n(8),b=n.n(g),v=n(4),w=n.n(v),M=n(2),L=n.n(M),E=n(1),C=n.n(E),x={loading:"Loading, please wait...",close:"Close",hubPanelLabel:"Select content type",createContentTabLabel:"Create Content",uploadTabLabel:"Upload",uploadPlaceholder:"No file chosen",uploadInstructionsTitle:"Upload an H5P file.",uploadInstructionsContent:'You may start with examples from <a href="https://h5p.org/content-types-and-applications" target="blank">H5P.org</a>.',uploadFileButtonLabel:"Upload a file",uploadFileButtonChangeLabel:"Change file",uploadingThrobber:"Now uploading...",uploadSuccess:":title was successfully uploaded!",unableToInterpretError:"Unable to interpret response.",unableToInterpretSolution:"Please check your error log.",h5pFileWrongExtensionTitle:"The selected file could not be uploaded",h5pFileWrongExtensionContent:"Only files with the .h5p extension are allowed.",contentTypeSectionAll:"All Content Types",searchResults:"Search Results",contentTypeSearchFieldPlaceholder:"Search for Content Types",contentTypeInstallButtonLabel:"Install",contentTypeInstallingButtonLabel:"Installing",contentTypeUseButtonLabel:"Use",contentTypeDetailButtonLabel:"Details",contentTypeUpdateButtonLabel:"Update",contentTypeUpdatingButtonLabel:"Updating",contentTypeGetButtonLabel:"Get",contentTypeBackButtonLabel:"Back",contentTypeIconAltText:"Icon",contentTypeInstallSuccess:":contentType successfully installed!",contentTypeUpdateSuccess:":contentType successfully updated!",contentTypeInstallError:":contentType could not be installed. Contact your administrator.",contentTypeLicensePanelTitle:"License",contentTypeDemoButtonLabel:"Content Demo",numResults:":num results",show:"Show",recentlyUsedFirst:"Recently Used First",popularFirst:"Popular First",newestFirst:"Newest First",aToZ:"A to Z",noResultsFound:"No results found",noResultsFoundDesc:"There is no content type that matches your search criteria.",readMore:"Read more",readLess:"Read less",contentTypeUpdateAvailable:"Update available",licenseDescription:"Some of the features of this license are indicated below. Click the info icon above to read the original license text.",licenseModalTitle:"License Details",licenseModalSubtitle:"Select a license to view information about proper usage",licenseUnspecified:"Unspecified",licenseCanUseCommercially:"Can use commercially",licenseCanModify:"Can modify",licenseCanDistribute:"Can distribute",licenseCanSublicense:"Can sublicense",licenseCanHoldLiable:"Can hold liable",licenseCannotHoldLiable:"Cannot hold liable",licenseMustIncludeCopyright:"Must include copyright",licenseMustIncludeLicense:"Must include license",licenseFetchDetailsFailed:"Failed fetching license details",imageLightboxTitle:"Images",imageLightBoxProgress:":num of :total",nextImage:"Next image",previousImage:"Previous image",screenshots:"Screenshots",noContentTypesAvailable:"No content types are available",noContentTypesAvailableDesc:"Your site is having difficulties connecting to H5P.org and listing the available content types.",contentTypeCacheOutdated:"Content type list outdated",contentTypeCacheOutdatedDesc:"Your site is having difficulties connecting to H5P.org to check for content type updates. You may not be able to update or install new content types.",tryAgain:"Try again",getHelp:"Get help",pasteButton:"Paste",ok:"OK",language:"Language",noContentHeader:"No Fitting Content?",noContentSuggestion:"Create one yourself!",tutorials:"Tutorials",contentSectionAll:"All shared content",popularContent:"Popular Content",allPopular:"All Popular",newOnTheHub:"New on the Hub",allNew:"All New",filterBy:"Filter by",filter:"Filter",filters:{level:{dropdownLabel:"Level",dialogHeader:"Select level of education",dialogButtonLabel:"Filter level of education"},language:{dropdownLabel:"Language",dialogHeader:"Select language(s)",dialogButtonLabel:"Filter languages",searchPlaceholder:"Type to search for languages"},reviewed:{dropdownLabel:"Reviewed",dialogHeader:"Reviewed Content",dialogButtonLabel:"Filter",optionLabel:"Show only reviewed content"},contentTypes:{dropdownLabel:"Content types",dialogHeader:"Select Content type(s)",dialogButtonLabel:"Filter Content Types",searchPlaceholder:"Type to search for content types"},disciplines:{dropdownLabel:"Discipline",dialogHeader:"Select Your Discipline",dialogButtonLabel:"Filter Disciplines",searchPlaceholder:"Type to search for disciplines"},licenses:{dropdownLabel:"License",dialogHeader:"Select preferred rights of use",dialogButtonLabel:"Filter licenses",options:{modified:"Can be modified",commercial:"Allows commercial use"}}},clearFilters:"Clear all filters",contentSearchFieldPlaceholder:"Search for Content",loadingContentTitle:"We are loading content for you...",loadingContentSubtitle:"Please wait",by:"By",dropdownButton:"Open dropdown",paginationNavigation:"Pagination navigation",page:"Page",currentPage:"Current page",nextPage:"Go to next page",previousPage:"Go to previous page",contentPreviewButtonLabel:"Preview",contentDownloadButtonLabel:"Get Content",contentDownloadButtonDownloadingLabel:"Downloading...",reuseContentTabLabel:"Get Shared Content",contentPublisherPanelHeader:"Publisher Info",noContentFoundDesc:"There is no content that matches your search criteria.",h5pType:"H5P Type",level:"Level",age:"Typical age",size:"Size",failedFetchingData:"Failed fetching data",filterErrorMessage:"Something went wrong. Please reload the page.",in:"in",navigateToParent:"Navigate to parent",downloadFailed:"Download failed",downloadFailedMissingLibrariesTitle:"Download failed",downloadFailedMissingLibrariesMessage:"You are not authorized to install or update the libraries required by this content.",contentHubConnectionFailed:"Could not connect to the content hub.",somethingWentWrongTryAgain:"Something went wrong. Please try again."},S=n(11),T=n.n(S);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(e,t,n){if(void 0===e[t]||0===e[t].length)return new Error("Non empty string for prop ".concat(t," in ").concat(n))},O=function(e){return e.stopPropagation()},A=function(e,t){-1!==[32,13].indexOf(e.which)&&(e.preventDefault(),t())},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:90;return e.length>t?e.substr(0,t-3)+"...":e},R=function(e){return e.map((function(e){return{url:e.path,alt:e.altText}}))},z=function(e,t){var n,r={},a=D(e);try{for(a.s();!(n=a.n()).done;){var i=n.value;r[i+T()(i)]=1}}catch(e){a.e(e)}finally{a.f()}var o,l=D(t);try{for(l.s();!(o=l.n()).done;){var s=o.value,u=s+T()(s);if(!r[u])return!1;r[u]=2}}catch(e){l.e(e)}finally{l.f()}for(var c in r)if(1===r[c])return!1;return!0},_=C.a.shape({id:C.a.string.isRequired,title:C.a.string.isRequired,owner:C.a.string.isRequired,reviewed:C.a.bool.isRequired,content_type:C.a.string.isRequired,description:C.a.string,screenshots:C.a.arrayOf(C.a.shape({path:C.a.string,altText:C.a.string})),icon:C.a.string,level:C.a.string,language:C.a.string.isRequired,disciplines:C.a.array}),F=function(e,t){for(var n=["contentTypes","disciplines","language","level","license","reviewed"],r=0;r<n.length;r++){var a=e[n[r]],i=t[n[r]],o=Array.isArray(a),l=Array.isArray(i);if(o!==l||o&&l&&!z(a,i))return!1}return!0},U=function(e,t){var n=function(e){return e.versions.length?e.versions.reduce((function(t,n){return j(j({},t),{},L()({},"".concat(e.id,"-").concat(n.id),{id:"".concat(e.id,"-").concat(n.id),parentLicenseId:e.id,version:n.id,name:"".concat(e.name," ").concat(n.name),url:n.url}))}),{}):L()({},e.id,j({},e))};if(t.licenses){var r=t.licenses.reduce((function(e,t){var r=n(t);return j(j({},e),r)}),{});return j(j({},e),r)}var a=n(t);return j(j({},e),a)},B=function(){function e(){o()(this,e)}return s()(e,null,[{key:"init",value:function(t){e.dictionary=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var a=1;a<n.length;a++)for(var i in n[a])n[a].hasOwnProperty(i)&&("object"===T()(n[0][i])&&"object"===T()(n[a][i])?e(n[0][i],n[a][i]):n[0][i]=n[a][i]);return n[0]}(x,t)}},{key:"get",value:function(t,n){var r=e.dictionary[t];return void 0===r?"Key not found in dictionary: ".concat(t):(n&&(r=e.replace(r,n)),r)}},{key:"replace",value:function(e,t){for(var n in t)t[n]&&(e=e.replace(n,t[n]));return e}}]),e}(),Q=(n(19),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"include",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"cors";return fetch(e,{method:void 0===t?"GET":"POST",credentials:n,mode:r,body:t}).then((function(e){return e.json().catch((function(){throw{title:e.statusText+" ("+e.status+")",message:[B.get("unableToInterpretError"),B.get("unableToInterpretSolution")]}}))})).then((function(e){if(!1===e.success)throw{title:e.message,message:e.details};return e}))}),Y=(n(40),function(e){var t=e.togglePanel,n=e.isExpanded,r=e.sectionId,a=e.title;return c.a.createElement("div",{className:"h5p-hub-client-drop-down","aria-level":"1",role:"heading"},c.a.createElement("div",{className:"h5p-hub-icon-hub-icon",role:"button",onClick:t,onKeyUp:function(e){13!==e.which&&32!==e.which||t()},"aria-expanded":n.toString(),"aria-controls":"h5p-hub-panel-body-".concat(r),tabIndex:"0"},c.a.createElement("span",{className:"h5p-hub-description"},"H5P Hub."),c.a.createElement("span",{className:"h5p-hub-selected"},a)))});Y.propTypes={togglePanel:C.a.func.isRequired,isExpanded:C.a.bool.isRequired,sectionId:C.a.string.isRequired,title:C.a.string.isRequired};var W=Y;n(41);function V(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var q=function(e){y()(n,e);var t=V(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"cloneChild",(function(e){return e?c.a.cloneElement(e,e.props.id?{className:(e.props.className?e.props.className+" ":"")+(r.state.selected?e.props.id===r.state.selected?"h5p-hub-highlight":"":r.count?"":"h5p-hub-highlight"),tabIndex:r.state.focused?e.props.id===r.state.focused?0:-1:r.count++?-1:0,role:-1!==["a","button"].indexOf(e.type)?void 0:e.props.role||"button",onClick:function(t){return r.handleClick(t,e.props.id)},onKeyDown:function(t){return r.handleKeyDown(t,e.props.id)},ref:function(t){return t&&!e.props.disabled?r.items.push(t):void 0}}:void 0,!e.props.id&&e.props.children?c.a.Children.map(e.props.children,r.cloneChild):e.props.children):null})),r.state={selected:e.selected,focused:e.selected},r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){this.setState({selected:e.selected,focused:e.selected}),e.setFocus!==this.props.setFocus&&this.setState({focusOnRender:!0})}},{key:"select",value:function(e){for(var t=null,n=0;n<this.items.length;n++)if(e===this.items[n].id){t=this.items[n];break}this.props.onChange(e,t&&t.attributes),this.setState({selected:e})}},{key:"focus",value:function(e,t){e&&(this.setState({focused:e,focusOnRender:!t}),this.props.onFocus&&this.props.onFocus(e))}},{key:"getSiblingIdFor",value:function(e,t){for(var n=0;n<this.items.length;n++)if(e===this.items[n].id){var r=this.items[n+t];if(r)return r.id}}},{key:"handleClick",value:function(e,t){e.defaultPrevented||(this.select(t),"A"===e.target.tagName&&e.preventDefault())}},{key:"handleKeyDown",value:function(e,t){if(!e.defaultPrevented)switch(e.which){case 37:case 38:this.focus(this.getSiblingIdFor(t,-1)),e.preventDefault();break;case 39:case 40:this.focus(this.getSiblingIdFor(t,1)),e.preventDefault();break;case 32:case 13:this.select(t),e.preventDefault()}}},{key:"componentDidUpdate",value:function(){if(this.state.focusOnRender)if(delete this.state.focusOnRender,this.state.focused){for(var e=0;e<this.items.length;e++)if(this.state.focused===this.items[e].id){this.items[e].focus();break}}else this.items[0]&&this.items[0].focus()}},{key:"render",value:function(){return this.items=[],this.count=0,c.a.Children.map(this.props.children,this.cloneChild)}}]),n}(c.a.Component);q.propTypes={selected:C.a.string,setFocus:C.a.bool,onChange:C.a.func.isRequired,onFocus:C.a.func,onScrollIntoView:C.a.func};var H=q;function G(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var Z=function(e){y()(n,e);var t=G(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"handleSelect",(function(e){r.setState({selected:e}),r.props.onSelect(e)})),r.state={selected:e.selected},r}return s()(n,[{key:"render",value:function(){var e=this,t=c.a.Children.map(this.props.children,(function(t){return null!==t&&c.a.createElement("li",{className:"h5p-hub-tab-button","aria-selected":e.state.selected===t.props.id,"aria-controls":"h5p-hub-tab-panel-".concat(t.props.id),role:"tab",key:t.props.id},c.a.createElement("a",{id:t.props.id,href:"#"},t.props.title))})),n=c.a.Children.map(this.props.children,(function(t){return null!==t&&c.a.createElement("div",{className:"h5p-hub-tabpanel".concat(e.state.selected===t.props.id?"":" h5p-hub-hidden"),id:"h5p-hub-tab-panel-".concat(t.props.id),"aria-labelledby":t.props.id,role:"tabpanel"},t)}));return c.a.createElement("div",{className:"h5p-hub-tab-panel"},c.a.createElement("nav",null,!!window.localStorage&&c.a.createElement("div",{className:"h5peditor-copypaste-wrap"},c.a.createElement("button",{id:"h5peditor-hub-paste-button",className:"h5peditor-paste-button ".concat(this.props.canPaste?"":"disabled"),disabled:!this.props.canPaste,title:this.props.canPaste?B.get("pasteFromClipboard"):this.props.canPasteTitle,onClick:this.props.onPaste},B.get("pasteButton"))),c.a.createElement("ul",{role:"tablist"},c.a.createElement(H,{selected:this.props.children[0].props.id,onChange:this.handleSelect},t))),n)}}]),n}(c.a.Component);Z.propTypes={selected:C.a.string.isRequired,onSelect:C.a.func.isRequired};var K=Z,X=n(10),J=(n(42),function(e){var t=e.headerText,n=e.suggestionText,r=e.tutorialUrl;return c.a.createElement("div",{className:"h5p-hub-no-content"},c.a.createElement("img",{className:"h5p-hub-no-results-img",src:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjQyLjkxIDk1LjA2Ij4NCiAgPGRlZnM+DQogICAgPHN0eWxlPg0KICAgICAgLmNscy0xIHsNCiAgICAgICAgZmlsbDogbm9uZTsNCiAgICAgIH0NCg0KICAgICAgLmNscy0yIHsNCiAgICAgICAgY2xpcC1wYXRoOiB1cmwoI2NsaXAtcGF0aCk7DQogICAgICB9DQoNCiAgICAgIC5jbHMtMyB7DQogICAgICAgIGZpbGw6ICNjY2NjZDU7DQogICAgICB9DQogICAgPC9zdHlsZT4NCiAgICA8Y2xpcFBhdGggaWQ9ImNsaXAtcGF0aCI+DQogICAgICA8cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjAuMTciIHk9Ii0wLjAyIiB3aWR0aD0iMjQ0LjQiIGhlaWdodD0iOTUuNzgiLz4NCiAgICA8L2NsaXBQYXRoPg0KICA8L2RlZnM+DQogIDx0aXRsZT5uby1yZXN1bHRzPC90aXRsZT4NCiAgPGcgY2xhc3M9ImNscy0yIj4NCiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0xMDguOTIsNzguNDVWOTMuNzhhMS4yOCwxLjI4LDAsMCwxLTEuMjgsMS4yOEg4OS43NWExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjcyLjQ4YTEuMjgsMS4yOCwwLDAsMSwxLjI4LTEuMjhoMTEuOTJhMy41NywzLjU3LDAsMCwxLDIuMTguOTFMMTA4LDc2LjI2QTMuNTcsMy41NywwLDAsMSwxMDguOTIsNzguNDVabS0xLjcsMS4yOGgtNS41NGExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjcyLjkxSDkwLjE4VjkzLjM1aDE3Wk05NCw4MS40M2g5LjM3YS40Mi40MiwwLDAsMSwuNDIuNDN2Ljg1YS40Mi40MiwwLDAsMS0uNDIuNDNIOTRhLjQyLjQyLDAsMCwxLS40My0uNDN2LS44NUEuNDIuNDIsMCwwLDEsOTQsODEuNDNabTkuNzksMy44M3YuODVhLjQyLjQyLDAsMCwxLS40Mi40M0g5NGEuNDIuNDIsMCwwLDEtLjQzLS40M3YtLjg1YS40Mi40MiwwLDAsMSwuNDMtLjQzaDkuMzdBLjQyLjQyLDAsMCwxLDEwMy44MSw4NS4yNlptMCwzLjQxdi44NWEuNDIuNDIsMCwwLDEtLjQyLjQzSDk0YS40Mi40MiwwLDAsMS0uNDMtLjQzdi0uODVhLjQyLjQyLDAsMCwxLC40My0uNDNoOS4zN0EuNDIuNDIsMCwwLDEsMTAzLjgxLDg4LjY3Wk0xMDIuMSw3OGg1YTEuNzEsMS43MSwwLDAsMC0uMjktLjU1bC00LjE3LTQuMTdhMS42OSwxLjY5LDAsMCwwLS41NS0uMjlaIi8+DQogICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMjE4Ljg3LDg1LjE5LDIxNC45NSw5MGE0LjgsNC44LDAsMCwxLTMuNDEsMS42MkgxOTcuMDZhMywzLDAsMCwxLTMtM1Y3NS44OWEzLDMsMCwwLDEsMy0zaDQuMjZhMywzLDAsMCwxLDMsM3YuNDNoNy4yNGEzLDMsMCwwLDEsMywzdjIuMTNoMi41NmEyLjM3LDIuMzcsMCwwLDEsMi4yMSwxLjI2LDIuMDksMi4wOSwwLDAsMSwuMi45QTIuNjIsMi42MiwwLDAsMSwyMTguODcsODUuMTlabS02LjA2LTMuNzdWNzkuM0ExLjI4LDEuMjgsMCwwLDAsMjExLjU0LDc4aC03LjY3YTEuMjgsMS4yOCwwLDAsMS0xLjI4LTEuMjh2LS44NWExLjI4LDEuMjgsMCwwLDAtMS4yOC0xLjI4aC00LjI2YTEuMjgsMS4yOCwwLDAsMC0xLjI4LDEuMjhWODcuMjRMMTk5LjE5LDgzYTQuNzUsNC43NSwwLDAsMSwzLjQxLTEuNjJabTQuMjYsMS43SDIwMi42YTMuMDcsMy4wNywwLDAsMC0yLjA5LDFsLTMuOTEsNC44M2EuOTIuOTIsMCwwLDAtLjI0LjUzYzAsLjM3LjQxLjQ3LjcxLjQ3aDE0LjQ4YTMsMywwLDAsMCwyLjA5LTFsMy45MS00LjgzYS44NS44NSwwLDAsMCwuMjQtLjUyQzIxNy43OCw4My4yMiwyMTcuMzcsODMuMTMsMjE3LjA4LDgzLjEzWiIvPg0KICAgIDxnPg0KICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxMTcuNzQiIHk9IjgxLjA2IiB3aWR0aD0iOSIgaGVpZ2h0PSI5IiByeD0iMS43IiByeT0iMS43Ii8+DQogICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0xMzEuNDksODEuNDNhLjM1LjM1LDAsMCwwLS4yNi4xMmwtMy40OCwzLjU0djEuMmwzLjQ4LDMuNTRhLjM5LjM5LDAsMCwwLC4yOC4xMmMuMDUsMCwwLDAsLjA2LDBzLjE3LS4yMy4xNy0uNFY4MS44NWMwLS4xNywwLS4zMy0uMTgtLjRTMTMxLjU0LDgxLjQzLDEzMS40OSw4MS40M1oiLz4NCiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTEzMy43NCw3OS44NFY5My4wNmgtMTdWNzkuMjFjLTEtLjE3LTItLjM2LTItLjU2VjkzLjc4YTEuNCwxLjQsMCwwLDAsMS40MSwxLjI4SDEzNWMuNzEsMCwuNzEtLjU4LjcxLTEuMjhWNzkuNEMxMzUuNzQsNzkuNTUsMTMzLjc0LDc5LjcxLDEzMy43NCw3OS44NFoiLz4NCiAgICA8L2c+DQogICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMjAuNDQsNy4yNFYyMi41N2ExLjI4LDEuMjgsMCwwLDEtMS4yOCwxLjI4SDEuMjhBMS4yOCwxLjI4LDAsMCwxLDAsMjIuNTdWMS4yOEExLjI4LDEuMjgsMCwwLDEsMS4yOCwwSDEzLjJhMy41NywzLjU3LDAsMCwxLDIuMTguOTFsNC4xNSw0LjE1QTMuNTcsMy41NywwLDAsMSwyMC40NCw3LjI0Wm0tMS43LDEuMjhIMTMuMmExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjEuN0gxLjdWMjIuMTVoMTdabS0xMy4yLDEuN2g5LjM3YS40Mi40MiwwLDAsMSwuNDMuNDN2Ljg1YS40Mi40MiwwLDAsMS0uNDMuNDNINS41NGEuNDIuNDIsMCwwLDEtLjQzLS40M3YtLjg1QS40Mi40MiwwLDAsMSw1LjU0LDEwLjIyWm05LjgsMy44M3YuODVhLjQyLjQyLDAsMCwxLS40My40M0g1LjU0YS40Mi40MiwwLDAsMS0uNDMtLjQzdi0uODVhLjQyLjQyLDAsMCwxLC40My0uNDNoOS4zN0EuNDIuNDIsMCwwLDEsMTUuMzMsMTQuMDVabTAsMy40MXYuODVhLjQyLjQyLDAsMCwxLS40My40M0g1LjU0YS40Mi40MiwwLDAsMS0uNDMtLjQzdi0uODVBLjQyLjQyLDAsMCwxLDUuNTQsMTdoOS4zN0EuNDIuNDIsMCwwLDEsMTUuMzMsMTcuNDZaTTEzLjYzLDYuODFoNWExLjcsMS43LDAsMCwwLS4yOS0uNTVMMTQuMTcsMi4xYTEuNywxLjcsMCwwLDAtLjU1LS4yOVoiLz4NCiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik00Ni44NCw3LjI0VjIyLjU3YTEuMjgsMS4yOCwwLDAsMS0xLjI4LDEuMjhIMjcuNjhhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYxLjI4QTEuMjgsMS4yOCwwLDAsMSwyNy42OCwwSDM5LjZhMy41NywzLjU3LDAsMCwxLDIuMTguOTFsNC4xNSw0LjE1QTMuNTcsMy41NywwLDAsMSw0Ni44NCw3LjI0Wm0tMS43LDEuMjhIMzkuNmExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjEuN0gyOC4xVjIyLjE1aDE3Wm0tNi44MSwzLjQxVjE3YTEuNzIsMS43MiwwLDAsMS0xLjcsMS43SDMxLjUxYTEuNzIsMS43MiwwLDAsMS0xLjctMS43VjExLjkyYTEuNzIsMS43MiwwLDAsMSwxLjctMS43aDUuMTFBMS43MiwxLjcyLDAsMCwxLDM4LjMzLDExLjkyWm01LjExLTEuMjh2Ny42N2EuNDQuNDQsMCwwLDEtLjI3LjRsLS4xNiwwYS40NS40NSwwLDAsMS0uMzEtLjEybC0zLjUzLTMuNTR2LTEuMmwzLjUzLTMuNTRhLjQ1LjQ1LDAsMCwxLC4zMS0uMTJsLjE2LDBBLjQ0LjQ0LDAsMCwxLDQzLjQ0LDEwLjY1Wk00MCw2LjgxaDVhMS42OSwxLjY5LDAsMCwwLS4yOS0uNTVMNDAuNTcsMi4xQTEuNywxLjcsMCwwLDAsNDAsMS44MVoiLz4NCiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik03My4yNCw3LjI0VjIyLjU3QTEuMjgsMS4yOCwwLDAsMSw3MiwyMy44NUg1NC4wOGExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjEuMjhBMS4yOCwxLjI4LDAsMCwxLDU0LjA4LDBINjZhMy41NywzLjU3LDAsMCwxLDIuMTguOTFsNC4xNSw0LjE1QTMuNTcsMy41NywwLDAsMSw3My4yNCw3LjI0Wm0tMS43LDEuMjhINjZhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYxLjdINTQuNVYyMi4xNWgxN1pNNjEuMzIsMTEuNzFWMTlhLjQ0LjQ0LDAsMCwxLS4yNy40bC0uMTYsMGEuNDcuNDcsMCwwLDEtLjMxLS4xMkw1OC4zOCwxN0g1Ni42M2EuNDIuNDIsMCwwLDEtLjQzLS40M1YxNC4wNWEuNDIuNDIsMCwwLDEsLjQzLS40M2gxLjc0bDIuMjEtMi4yMmEuNDMuNDMsMCwwLDEsLjczLjMxWm0zLjEsNi41M2E0LjI1LDQuMjUsMCwwLDAsMC01LjgzLjg1Ljg1LDAsMSwwLTEuMjQsMS4xNywyLjU0LDIuNTQsMCwwLDEsMCwzLjQ5Ljg2Ljg2LDAsMCwwLDAsMS4yMS45Mi45MiwwLDAsMCwuNTkuMjNBLjg5Ljg5LDAsMCwwLDY0LjQyLDE4LjI1Wm0yLjg1LDEuOTJhNy42NSw3LjY1LDAsMCwwLDAtOS42Ni44NS44NSwwLDEsMC0xLjMyLDEuMDgsNiw2LDAsMCwxLDAsNy41MS44NC44NCwwLDAsMCwuMTIsMS4yLjgzLjgzLDAsMCwwLC41My4yQS44NC44NCwwLDAsMCw2Ny4yNywyMC4xNlpNNjYuNDMsNi44MWg1YTEuNjksMS42OSwwLDAsMC0uMjktLjU1TDY3LDIuMWExLjcsMS43LDAsMCwwLS41NS0uMjlaIi8+DQogICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNOTkuNjQsNy4yNFYyMi41N2ExLjI4LDEuMjgsMCwwLDEtMS4yOCwxLjI4SDgwLjQ4YTEuMjgsMS4yOCwwLDAsMS0xLjI4LTEuMjhWMS4yOEExLjI4LDEuMjgsMCwwLDEsODAuNDgsMEg5Mi40YTMuNTcsMy41NywwLDAsMSwyLjE4LjkxbDQuMTUsNC4xNUEzLjU3LDMuNTcsMCwwLDEsOTkuNjQsNy4yNFptLTEuNywxLjI4SDkyLjRhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYxLjdIODAuOVYyMi4xNWgxN1pNODIuNjEsMTEuMDdhMi41NiwyLjU2LDAsMSwxLDIuNTYsMi41NkEyLjU2LDIuNTYsMCwwLDEsODIuNjEsMTEuMDdabTEzLjYzLDkuMzdIODIuNjFWMTcuODlsMi41Ni0yLjU2LDEuNywxLjdMOTIsMTEuOTJsNC4yNiw0LjI2Wk05Mi44Myw2LjgxaDVhMS42OSwxLjY5LDAsMCwwLS4yOS0uNTVMOTMuMzcsMi4xYTEuNywxLjcsMCwwLDAtLjU1LS4yOVoiLz4NCiAgICA8Zz4NCiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTYwLjgxLDQxLjIxVjU2LjU0YTEuMjgsMS4yOCwwLDAsMS0xLjI4LDEuMjhINDEuNjVhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYzNS4yNEExLjI4LDEuMjgsMCwwLDEsNDEuNjUsMzRINTMuNTdhMy41NywzLjU3LDAsMCwxLDIuMTguOTFMNTkuOTEsMzlBMy41NywzLjU3LDAsMCwxLDYwLjgxLDQxLjIxWm0tMS43LDEuMjhINTMuNTdhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYzNS42N0g0Mi4wOFY1Ni4xMWgxN1ptLTEzLjIsMS43aDkuMzdhLjQyLjQyLDAsMCwxLC40My40M3YuODVhLjQyLjQyLDAsMCwxLS40My40M0g0NS45MWEuNDIuNDIsMCwwLDEtLjQzLS40M3YtLjg1QS40Mi40MiwwLDAsMSw0NS45MSw0NC4xOVpNNTUuNyw0OHYuODVhLjQyLjQyLDAsMCwxLS40My40M0g0NS45MWEuNDIuNDIsMCwwLDEtLjQzLS40M1Y0OGEuNDIuNDIsMCwwLDEsLjQzLS40M2g5LjM3QS40Mi40MiwwLDAsMSw1NS43LDQ4Wm0wLDMuNDF2Ljg1YS40Mi40MiwwLDAsMS0uNDMuNDNINDUuOTFhLjQyLjQyLDAsMCwxLS40My0uNDN2LS44NWEuNDIuNDIsMCwwLDEsLjQzLS40M2g5LjM3QS40Mi40MiwwLDAsMSw1NS43LDUxLjQzWk01NCw0MC43OGg1YTEuNywxLjcsMCwwLDAtLjI5LS41NWwtNC4xNy00LjE3YTEuNjksMS42OSwwLDAsMC0uNTUtLjI5WiIvPg0KICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNODcuMjIsNDEuMjFWNTYuNTRhMS4yOCwxLjI4LDAsMCwxLTEuMjgsMS4yOEg2OC4wNWExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjM1LjI0QTEuMjgsMS4yOCwwLDAsMSw2OC4wNSwzNEg4MGEzLjU3LDMuNTcsMCwwLDEsMi4xOC45MUw4Ni4zMSwzOUEzLjU3LDMuNTcsMCwwLDEsODcuMjIsNDEuMjFabS0xLjcsMS4yOEg4MGExLjI4LDEuMjgsMCwwLDEtMS4yOC0xLjI4VjM1LjY3SDY4LjQ4VjU2LjExaDE3Wk03OC43LDQ1Ljg5VjUxQTEuNzIsMS43MiwwLDAsMSw3Nyw1Mi43SDcxLjg4YTEuNzIsMS43MiwwLDAsMS0xLjctMS43VjQ1Ljg5YTEuNzIsMS43MiwwLDAsMSwxLjctMS43SDc3QTEuNzIsMS43MiwwLDAsMSw3OC43LDQ1Ljg5Wm01LjExLTEuMjh2Ny42N2EuNDQuNDQsMCwwLDEtLjI3LjRsLS4xNiwwYS40NC40NCwwLDAsMS0uMzEtLjEyTDc5LjU1LDQ5di0xLjJsMy41My0zLjU0YS40NC40NCwwLDAsMSwuMzEtLjEybC4xNiwwQS40NC40NCwwLDAsMSw4My44MSw0NC42MVpNODAuNCw0MC43OGg1YTEuNjksMS42OSwwLDAsMC0uMjktLjU1bC00LjE3LTQuMTdhMS42OSwxLjY5LDAsMCwwLS41NS0uMjlaIi8+DQogICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0xODUuMTUsNDEuMjFWNTYuNTRhMS4yOCwxLjI4LDAsMCwxLTEuMjgsMS4yOEgxNjZhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYzNS4yNEExLjI4LDEuMjgsMCwwLDEsMTY2LDM0aDExLjkyYTMuNTcsMy41NywwLDAsMSwyLjE4LjkxTDE4NC4yNCwzOUEzLjU3LDMuNTcsMCwwLDEsMTg1LjE1LDQxLjIxWm0tMS43LDEuMjhoLTUuNTRhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYzNS42N0gxNjYuNDFWNTYuMTFoMTdabS0xMC4yMiwzLjE5djcuMjRhLjQ0LjQ0LDAsMCwxLS4yNy40bC0uMTYsMGEuNDcuNDcsMCwwLDEtLjMxLS4xMkwxNzAuMjgsNTFoLTEuNzRhLjQyLjQyLDAsMCwxLS40My0uNDNWNDhhLjQyLjQyLDAsMCwxLC40My0uNDNoMS43NGwyLjIxLTIuMjJhLjQzLjQzLDAsMCwxLC43My4zMVptMy4xLDYuNTNhNC4yNSw0LjI1LDAsMCwwLDAtNS44My44NS44NSwwLDEsMC0xLjI0LDEuMTcsMi41NCwyLjU0LDAsMCwxLDAsMy40OS44Ni44NiwwLDAsMCwwLDEuMjEuOTIuOTIsMCwwLDAsLjU5LjIzQS44OS44OSwwLDAsMCwxNzYuMzMsNTIuMjFabTIuODUsMS45MmE3LjY1LDcuNjUsMCwwLDAsMC05LjY2Ljg1Ljg1LDAsMSwwLTEuMzIsMS4wOCw2LDYsMCwwLDEsMCw3LjUxLjg0Ljg0LDAsMCwwLC4xMiwxLjIuODMuODMsMCwwLDAsLjUzLjJBLjg0Ljg0LDAsMCwwLDE3OS4xNyw1NC4xM1ptLS44NC0xMy4zNWg1YTEuNjksMS42OSwwLDAsMC0uMjktLjU1bC00LjE3LTQuMTdhMS42OSwxLjY5LDAsMCwwLS41NS0uMjlaIi8+DQogICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yMTEuNTUsNDEuMjFWNTYuNTRhMS4yOCwxLjI4LDAsMCwxLTEuMjgsMS4yOEgxOTIuMzlhMS4yOCwxLjI4LDAsMCwxLTEuMjgtMS4yOFYzNS4yNEExLjI4LDEuMjgsMCwwLDEsMTkyLjM5LDM0aDExLjkyYTMuNTcsMy41NywwLDAsMSwyLjE4LjkxTDIxMC42NSwzOUEzLjU3LDMuNTcsMCwwLDEsMjExLjU1LDQxLjIxWm0tMS43LDEuMjhoLTUuNTRBMS4yOCwxLjI4LDAsMCwxLDIwMyw0MS4yMVYzNS42N0gxOTIuODFWNTYuMTFoMTdaTTE5NC41Miw0NWEyLjU2LDIuNTYsMCwxLDEsMi41NiwyLjU2QTIuNTYsMi41NiwwLDAsMSwxOTQuNTIsNDVabTEzLjYzLDkuMzdIMTk0LjUyVjUxLjg1bDIuNTYtMi41NiwxLjcsMS43LDUuMTEtNS4xMSw0LjI2LDQuMjZabS0zLjQxLTEzLjYzaDVhMS42OSwxLjY5LDAsMCwwLS4yOS0uNTVsLTQuMTctNC4xN2ExLjY5LDEuNjksMCwwLDAtLjU1LS4yOVoiLz4NCiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTI0Mi4zLDQ4bC0zLjkzLDQuODNBNC44LDQuOCwwLDAsMSwyMzUsNTQuNDFIMjIwLjQ5YTMsMywwLDAsMS0zLTNWMzguNjVhMywzLDAsMCwxLDMtM2g0LjI2YTMsMywwLDAsMSwzLDN2LjQzSDIzNWEzLDMsMCwwLDEsMywzdjIuMTNoMi41NmEyLjM3LDIuMzcsMCwwLDEsMi4yMSwxLjI2LDIuMDgsMi4wOCwwLDAsMSwuMi45QTIuNjIsMi42MiwwLDAsMSwyNDIuMyw0OFptLTYuMDYtMy43N1Y0Mi4wNkExLjI4LDEuMjgsMCwwLDAsMjM1LDQwLjc4SDIyNy4zQTEuMjgsMS4yOCwwLDAsMSwyMjYsMzkuNXYtLjg1YTEuMjgsMS4yOCwwLDAsMC0xLjI4LTEuMjhoLTQuMjZhMS4yOCwxLjI4LDAsMCwwLTEuMjgsMS4yOFY1MGwzLjQxLTQuMTlBNC43NSw0Ljc1LDAsMCwxLDIyNiw0NC4xOVptNC4yNiwxLjdIMjI2YTMuMDcsMy4wNywwLDAsMC0yLjA5LDFMMjIwLDUxLjcxYS45Mi45MiwwLDAsMC0uMjQuNTNjMCwuMzcuNDEuNDcuNzEuNDdIMjM1YTMsMywwLDAsMCwyLjA5LTFMMjQxLDQ2Ljg4YS44NS44NSwwLDAsMCwuMjQtLjUyQzI0MS4yMSw0NiwyNDAuOCw0NS44OSwyNDAuNTEsNDUuODlaIi8+DQogICAgPC9nPg0KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTEwOCwxOC40OGEuNjYuNjYsMCwwLDEsLjE0LS43NEwxMTIsMTNhMywzLDAsMCwxLDIuMDktLjkySDEyOC42Yy42NCwwLC45LjM5LjQ3LjkybC0uMi4yMWMuNjQsMCwxLjI4LjEsMS45MS4xOGEyLjQxLDIuNDEsMCwwLDAsMC0yLDIuNDQsMi40NCwwLDAsMC0yLjIxLTEuMzVoLTIuODZ2LTJhMi43OSwyLjc5LDAsMCwwLTIuNjgtM2gtNy4zMlY0LjY4YTIuNjQsMi42NCwwLDAsMC0yLjktMi42MmgtNC4yNmEyLjU5LDIuNTksMCwwLDAtMi44NCwyLjYyVjE3LjQ2YTIuOTEsMi45MSwwLDAsMCwuNzgsMi4wN0MxMDcsMTkuMTcsMTA3LjQ2LDE4LjgyLDEwOCwxOC40OFptLS4yMy0xNC4zM2MwLS4xOC4xNC0uMDkuODQtLjA5aDQuMjZjLjcxLDAsLjktLjA4LjkuNjJ2Ljg1YTEuODgsMS44OCwwLDAsMCwxLjY1LDEuNTJoNy42N2MuNzEsMCwuNjguMzMuNjgsMXYyaC05LjYyYTYuNDcsNi40NywwLDAsMC00LjA5LDEuN2wtMi4yOSwzLjczWiIvPg0KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTEzMC44Nyw0Ny43NGEzLjcyLDMuNzIsMCwwLDAtMS43OCwyLjQ1Ljg3Ljg3LDAsMCwxLS43NC44OUgxMjMuOWMtLjQxLDAtLjY3LS42My0uNjctMXYtLjgzYzAtMi4yNCwyLjIyLTQuMTcsMy44NS00LjkxLDEuNDMtLjY1LDItMS4yNiwyLTIuNDRzLTEuMzUtMi0yLjg1LTJhMy43OSwzLjc5LDAsMCwwLTIsLjU0LDEwLjQ4LDEwLjQ4LDAsMCwwLTIsMi4xMy43Ny43NywwLDAsMS0uNTcuMy44Ni44NiwwLDAsMS0uNDYtLjE1bC0zLTIuMzJhLjczLjczLDAsMCwxLS4xOS0xLDkuNCw5LjQsMCwwLDEsOC41OS00LjkzYzQsMCw4LjQxLDMuMTcsOC40MSw3LjQxQzEzNSw0NS40MSwxMzIuNjMsNDYuNzYsMTMwLjg3LDQ3Ljc0Wm0tMS43LDkuNzFhLjc0Ljc0LDAsMCwxLS43NC43NEgxMjRhLjc0Ljc0LDAsMCwxLS43NC0uNzRWNTNhLjc0Ljc0LDAsMCwxLC43NC0uNzRoNC40NGEuNzQuNzQsMCwwLDEsLjc0Ljc0WiIvPg0KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTE2Ni40OCw4OWExLjkxLDEuOTEsMCwwLDEtMS4zNC0uNTVsLTE5LjA3LTE5LTIuODQsMmEyOS44NCwyOS44NCwwLDEsMSw3LjY4LTcuNjlsLTIsMi44NSwxOSwxOUEyLDIsMCwwLDEsMTY2LjQ4LDg5Wm0tNDAuMTYtNjhhMjUuNzcsMjUuNzcsMCwxLDAsMjUuNzcsMjUuNzdBMjUuOCwyNS44LDAsMCwwLDEyNi4zMiwyMS4wOFoiLz4NCiAgICA8Zz4NCiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTE1MS42OCw4OS40OWEuOTIuOTIsMCwwLDAsLjU5LjIzLjg5Ljg5LDAsMCwwLC42Mi0uMjcsNC4yNSw0LjI1LDAsMCwwLDAtNS44My44NS44NSwwLDEsMC0xLjI0LDEuMTcsMi41NCwyLjU0LDAsMCwxLDAsMy40OUEuODYuODYsMCwwLDAsMTUxLjY4LDg5LjQ5WiIvPg0KICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1Ljc2LDg2LjU0YTUuOSw1LjksMCwwLDEtMS4zMywzLjc1Ljg0Ljg0LDAsMCwwLC4xMiwxLjIuODMuODMsMCwwLDAsLjUzLjIuODQuODQsMCwwLDAsLjY3LS4zMiw3LjY4LDcuNjgsMCwwLDAsMS43Mi00LjgzczAtLjA3LDAtLjFsLTIuMTYtMi4xNUE1LjkxLDUuOTEsMCwwLDEsMTU1Ljc2LDg2LjU0WiIvPg0KICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU5Ljc0LDg5djQuMDhoLTE3Vjc2LjI1YzAsLjMyLTEsLjYyLTIsLjkxVjkzLjc4YzAsLjcxLDEuMTEsMS4yOCwxLjgxLDEuMjhoMTcuODlhMS4zLDEuMywwLDAsMCwxLjMtMS4yOFY5MC42OFoiLz4NCiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTE0NS4xMSw4OC4wNmgxLjc0bDIuMjEsMi4zMWEuNTQuNTQsMCwwLDAsLjMxLjE2LjQ1LjQ1LDAsMCwwLC4xMywwLC4zOC4zOCwwLDAsMCwuMjQtLjM4VjgyLjkyYS40MS40MSwwLDAsMC0uMjQtLjRjLS4xNi0uMDctLjMyLS40MS0uNDUtLjI5bC0yLjIsMS44NGgtMS43NGMtLjI0LDAtLjM3LDEtLjM3LDEuMnYyLjU2QzE0NC43NCw4OC4wNSwxNDQuODcsODguMDYsMTQ1LjExLDg4LjA2WiIvPg0KICAgIDwvZz4NCiAgICA8Zz4NCiAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTE4Ny41Myw3Ni4yNmwtNC4zMS0zLjcyYy0uNDktLjQ5LTEuNjMtLjQ4LTIuMzQtLjQ4SDE2OWMtLjcxLDAtMS4yMS0uMjgtMS4yMS40MnY3LjIzbDIsMS43VjczLjA2aDEwdjUuMzhjMCwuNzEuNDMuNjIsMS4xNC42Mmg1Ljg2djE0aC0xN3YtLjgxYTkuMTgsOS4xOCwwLDAsMS0yLC42M3YuODlBMS4yMywxLjIzLDAsMCwwLDE2OSw5NS4wNmgxNy44OWMuNzEsMCwxLjktLjU4LDEuOS0xLjI4Vjc4LjQ1QTQsNCwwLDAsMCwxODcuNTMsNzYuMjZabS01Ljc4LjhWNzNjMCwuMDguMjMuMi4zMy4yOUwxODYuMTMsNzdjLjA5LjA5LjEuMDcuMTguMDdaIi8+DQogICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0xODQuNzQsODcuMzlsLTQuMjctNC4yNi01LjEyLDUuMTEtMS43MS0xLjctMS4zOCwxLjIxYTQuNTYsNC41NiwwLDAsMS0xLjUyLDMuMXYuMjJoMTRaIi8+DQogICAgICA8Y2lyY2xlIGNsYXNzPSJjbHMtMyIgY3g9IjE3My42NCIgY3k9IjgyLjI4IiByPSIyLjU2Ii8+DQogICAgPC9nPg0KICA8L2c+DQo8L3N2Zz4NCg=="}),c.a.createElement("section",{className:"h5p-hub-right-text"},c.a.createElement("div",{className:"h5p-hub-header"},t),c.a.createElement("div",{className:"h5p-hub-suggestion-text"},n),r&&c.a.createElement("div",null,c.a.createElement("a",{className:"h5p-hub-url",target:"_blank",href:r},B.get("tutorials")))))});J.propTypes={headerText:C.a.string.isRequired,suggestionText:C.a.string.isRequired,tutorialUrl:C.a.string};var $=J;n(43);function ee(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var te=function(e){y()(n,e);var t=ee(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"focusedExits",(function(){for(var e=0;e<r.props.children.length;e++)if(r.props.children[e].props.id===r.props.focused)return!0;return!1})),r.state={setFocus:!1,focused:""},r}return s()(n,[{key:"componentDidMount",value:function(){"tabular"===this.props.type&&this.props.setFocus&&this.setState((function(e){return{setFocus:!e.setFocus}}))}},{key:"componentDidUpdate",value:function(e){var t=this;e.setFocus!==this.props.setFocus&&this.focusedExits()&&this.setState((function(e){return{setFocus:!e.setFocus,focused:t.props.focused}}))}},{key:"render",value:function(){var e=this;return c.a.createElement("div",{className:"h5p-hub-list ".concat(this.props.type," ").concat(this.props.classNames)},c.a.createElement("ol",{ref:function(t){return e.listElement=t},"aria-label":this.props.title},c.a.createElement(H,{onChange:this.props.onSelect,selected:this.state.focused,setFocus:this.state.setFocus},this.props.children)))}}]),n}(c.a.Component);te.propTypes={type:C.a.oneOf(["tabular","grid"]).isRequired,classNames:C.a.string,children:C.a.arrayOf(C.a.node).isRequired,onSelect:C.a.func.isRequired,focused:C.a.string,setFocus:C.a.bool,title:C.a.string.isRequired},te.defaultProps={classNames:""};var ne=te,re=(n(44),n(15)),ae=n.n(re),ie=function(e){return"h5p-hub-paginator-page-".concat(e)};function oe(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var le=function(e){y()(n,e);var t=oe(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"resize",(function(){r.setState({screenWidth:document.documentElement.clientWidth})})),L()(h()(r),"handlePageSelected",(function(e,t){var n=t.getNamedItem("data-page").value,a=r.props.setFocus;"-1"==n?n=r.props.selectedPage-1:"+1"==n&&(n=r.props.selectedPage+1),1!=n&&n!=r.props.pages||(a=!r.props.setFocus),r.props.onChange(a,parseInt(n))})),r.state={screenWidth:document.documentElement.clientWidth},r}return s()(n,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.resize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"render",value:function(){return c.a.createElement("nav",{role:"navigation"},c.a.createElement("ul",{className:"h5p-hub-list-of-numbers","aria-label":B.get("paginationNavigation")},c.a.createElement(H,{selected:ie(this.props.selectedPage),onChange:this.handlePageSelected,setFocus:this.props.setFocus},function(e,t,n){var r=[],a=parseInt(ae.a.screenSmall),i=function(e){return c.a.createElement("li",{id:"h5p-hub-paginator-dots",disabled:!0,key:"dots: "+e,className:"h5p-hub-dots"},c.a.createElement("div",{className:"h5p-hub-dots-text"},"..."))},o=function(t){return c.a.createElement("li",{key:t.toString(),className:"h5p-hub-list-element"},c.a.createElement("a",{href:"#",id:ie(t),"data-page":t,"aria-label":B.get("page")+" "+t+(t==e&&", "+B.get("currentPage")),"aria-current":t==e},t))},l=function(e,t){var n;return c.a.createElement("li",{key:e,className:"h5p-hub-list-element ".concat(t?"":"disabled")},c.a.createElement("a",(n={href:"#",id:e,"data-page":e},L()(n,"id","h5p-hub-paginator-".concat("-1"==e?"previous":"next")),L()(n,"disabled",!t),L()(n,"aria-label",B.get("".concat("-1"==e?"previous":"next","Page"))),L()(n,"className","-1"==e?"h5p-hub-previous-arrow":"h5p-hub-next-arrow"),n)))};if(r.push(l("-1",e>1)),t<=7&&n>a)for(var s=1;s<=t;s++)r.push(o(s));else if(n<a)for(var u=e-1;u<e+2;u++)u>0&&u<=t&&r.push(o(u));else if(e<5){for(var f=1;f<6;f++)r.push(o(f));r.push(i("end")),r.push(o(t))}else if(e>t-3){r.push(o(1)),r.push(i("beginning"));for(var d=t-3-1;d<=t;d++)r.push(o(d))}else{r.push(o(1)),r.push(i("beginning"));for(var p=e-1;p<e+2;p++)r.push(o(p));r.push(i("end")),r.push(o(t))}return r.push(l("+1",e<t)),r}(this.props.selectedPage,this.props.pages,this.state.screenWidth))))}}]),n}(c.a.Component);le.propTypes={onChange:C.a.func.isRequired,selectedPage:C.a.number.isRequired,pages:C.a.number.isRequired,setFocus:C.a.bool};var se=le,ue=(n(45),n(14)),ce=n.n(ue);function fe(e){var t=e.src,n=e.className,r=void 0===n?"":n,a=Object(u.useState)(!t),i=ce()(a,2),o=i[0],l=i[1];return c.a.createElement("img",{className:"h5p-hub-content-icon ".concat(r),src:o?"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNC4zLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA2NDAgNDgwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA2NDAgNDgwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojRDBEMEQxO30NCgkuc3Qxe2ZpbGw6I0ZGRkZGRjt9DQoJLnN0MntmaWxsOiNEQkRCREM7fQ0KPC9zdHlsZT4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02MjgsNDgwSDEyYy02LjYsMC0xMi01LjQtMTItMTJWMTJDMCw1LjQsNS40LDAsMTIsMGg2MTZjNi42LDAsMTIsNS40LDEyLDEydjQ1NkM2NDAsNDc0LjYsNjM0LjYsNDgwLDYyOCw0ODB6DQoJIi8+DQo8Zz4NCgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNNTE4LjcsMTgwLjRjLTEwLjUtMTAuMS0yNi4zLTE1LjEtNDcuNC0xNS4xaC01Ni4xaC0xNC44djQwaC04NS4ybC03LDI4LjZjNS44LTIuNywxNC4xLTUuNCwxOS43LTYuOA0KCQljNS43LTEuNCwxMS40LTEuMiwxNi45LTEuMmMxOC44LDAsMzQuMiw1LjgsNDUuOSwxNy4yYzExLjcsMTEuNCwxNy41LDI1LjgsMTcuNSw0My4xYzAsMTIuMS0zLDIzLjktOSwzNS4xDQoJCWMtNi4xLDExLjItMTQuNiwxOS45LTI1LjcsMjUuOGMtNCwyLjEtOC40LDQtMTMuMiw1LjNoNTQuN2gxNy40di02OC40aDMyLjNjMjMuNSwwLDQwLjktNS40LDUyLjQtMTYuMQ0KCQljMTEuNS0xMC43LDE3LjItMjUuNywxNy4yLTQ0LjZDNTM0LjQsMjA0LjgsNTI5LjEsMTkwLjUsNTE4LjcsMTgwLjR6IE00NzAuOSwyMzkuN2MtNC41LDMuOS0xMi40LDUuNy0yMy42LDUuN2gtMTQuN3YtNDEuM2gxNw0KCQljMTAuOCwwLDE4LjMsMS45LDIyLjIsNi4xYzQsNC4xLDUuOSw4LjksNS45LDE0LjhDNDc3LjgsMjMxLDQ3NS40LDIzNS44LDQ3MC45LDIzOS43eiIvPg0KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0zMjYuMSwyNTkuOWMtMTAuMiwwLTE5LDUuOS0yMy4yLDE0LjVsLTUxLTcuMmwyMy0xMDEuOGgtMzAuNWgtMTUuN3Y4MGgtNjQuNXYtODBoLTU2Ljh2MTg3LjFoNTYuOHYtNjguNA0KCQloNjQuNXY2OC40aDE1LjdoNTQuMmMtOC42LTIuNi0xNi4xLTUuOS0yMi4yLTEwLjVjLTYuMi00LjYtMTEuMi05LjktMTUuMS0xNS45Yy0zLjktNS45LTYuOC0xMi41LTkuNC0yMS4zbDUxLjEtNy40DQoJCWM0LjMsOC41LDEzLDE0LjMsMjMuMSwxNC4zYzE0LjMsMCwyNS45LTExLjYsMjUuOS0yNS45UzM0MC4zLDI1OS45LDMyNi4xLDI1OS45eiIvPg0KPC9nPg0KPGNpcmNsZSBjbGFzcz0ic3QyIiBjeD0iNTMuNCIgY3k9IjU0IiByPSIxOC4xIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDIiIGN4PSIxMDUuOCIgY3k9IjU0IiByPSIxOC4xIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDIiIGN4PSIxNTUuMiIgY3k9IjU0IiByPSIxOC4xIi8+DQo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNTg3LjIsNzEuOWgtMjg3Yy0xMCwwLTE4LjEtOC4yLTE4LjEtMTguMXYwYzAtMTAsOC4yLTE4LjEsMTguMS0xOC4xaDI4N2MxMCwwLDE4LjEsOC4yLDE4LjEsMTguMXYwDQoJQzYwNS40LDYzLjgsNTk3LjIsNzEuOSw1ODcuMiw3MS45eiIvPg0KPC9zdmc+DQo=":t,onError:function(){o||l(!0)}})}fe.propTypes={src:C.a.string,className:C.a.string};var de=function(e){var t=e.content;return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"h5p-hub-left"},c.a.createElement(fe,{src:t.icon})),c.a.createElement("div",{className:"h5p-hub-middle"},c.a.createElement("div",{className:"h5p-hub-headline"},c.a.createElement("span",{className:"h5p-hub-title ".concat(t.reviewed?"h5p-hub-reviewed":"")},P(t.title)),c.a.createElement("span",{className:"h5p-hub-by"},B.get("by")),c.a.createElement("span",{className:"h5p-hub-owner"},P(t.owner,50))),c.a.createElement("div",{className:"h5p-hub-content-type"},t.contentType),c.a.createElement("div",{className:"h5p-hub-summary"},t.summary)),c.a.createElement("div",{className:"h5p-hub-right"}))};de.propTypes={content:C.a.object.isRequired};var pe=de,he=(n(49),function(e){var t=e.content;return c.a.createElement("div",{className:"h5p-hub-grid-item"},c.a.createElement(fe,{src:t.icon}),c.a.createElement("div",{className:"h5p-hub-grid-item-title"},t.title),c.a.createElement("button",{type:"button",className:"h5p-hub-button h5p-hub-button-orange h5p-hub-button-inverse-primary",tabIndex:"-1"},B.get("contentTypeDetailButtonLabel")))});he.propTypes={content:C.a.object.isRequired};var me=he,ye=(n(50),function(e){var t=e.type;return c.a.createElement(ne,{type:"".concat(t),classNames:"h5p-hub-loading",title:B.get("loading"),onSelect:function(){}},function(e,t){for(var n=[],r=0;r<t;r++)n.push("tabular"===e?c.a.createElement("li",{className:"h5p-hub-content-item h5p-hub-".concat(e),key:r},c.a.createElement("div",{className:"h5p-hub-left"},c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-image"})),c.a.createElement("div",{className:"h5p-hub-middle"},c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-text-medium"}),c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-text-short"}),c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-text-long"}))):c.a.createElement("li",{className:"h5p-hub-content-item h5p-hub-".concat(e),key:r},c.a.createElement("div",{className:"h5p-hub-grid-item"},c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-image"}),c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-text-medium"}),c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-text-short"}),c.a.createElement("div",{className:"h5p-hub-loading-block h5p-hub-button"}))));return n}(t,6))});ye.propTypes={type:C.a.string.isRequired};var ge=ye,be=(n(51),function e(t){var n=t.itemsPromise,r=t.type,a=t.onSelect,i=t.visible,o=t.handlePageChange,l=t.showPagination,s=t.focused,f=t.setFocus,d=t.title,p=Object(u.useMemo)((function(){return e.listId++}),[]),h={},m="tabular"===r?pe:me;return c.a.createElement("div",{className:"h5p-hub-content-list","aria-hidden":!i},c.a.createElement(X.b,{promiseFn:n},c.a.createElement(X.b.Pending,null,c.a.createElement(ge,{type:r})),c.a.createElement(X.b.Rejected,null,(function(){return c.a.createElement("span",{className:"h5p-hub-fetching-failed"},B.get("failedFetchingData"))})),c.a.createElement(X.b.Fulfilled,null,(function(e){return e.numResults?c.a.createElement(c.a.Fragment,null,c.a.createElement(ne,{type:r,onSelect:function(e){return a(h[e],e,r)},focused:s,setFocus:f,title:d},e.content.map((function(e,t){return h["h5p-hub-".concat(p,"-").concat(e.id)]=e,c.a.createElement("li",{className:"h5p-hub-content-item h5p-hub-".concat(r),id:"h5p-hub-".concat(p,"-").concat(e.id),key:t,tabIndex:1==t},c.a.createElement(m,{content:e,key:e.id,id:e.id}))}))),l&&c.a.createElement(se,{selectedPage:e.page,pages:e.pages,onChange:o,setFocus:!1})):null}))))});be.propTypes={itemsPromise:C.a.func.isRequired,type:C.a.string,onSelect:C.a.func.isRequired,visible:C.a.bool.isRequired,handlePageChange:C.a.func,showPagination:C.a.bool,focused:C.a.string,setFocus:C.a.bool,title:C.a.string.isRequired},be.defaultProps={type:"tabular",showPagination:!0},be.listId=0;var ve=be,we=(n(59),function(e){var t=e.searchPromise,n=e.selected,r=e.onChange,a=e.orderVisible,i=void 0===a||a,o=e.visible,l=e.orderVariables,s=e.headerLabel,u=l.map((function(e){return c.a.createElement("li",{key:e.id},c.a.createElement("a",{href:"#",id:e.id},e.text))}));return c.a.createElement("div",{className:"h5p-hub-navbar"+(o?"":" h5p-hub-hidden")},c.a.createElement("div",{className:"h5p-hub-result-header"},s,t&&c.a.createElement("span",{className:"h5p-hub-result-hits"},c.a.createElement(X.b,{promiseFn:t},c.a.createElement(X.b.Fulfilled,null,(function(e){return"(".concat(B.get("numResults").replace(":num",e.numResults),")")}))))),i&&c.a.createElement("div",{id:"h5p-hub-sort-by",className:"h5p-hub-sort-by-header"},B.get("show"),":"),i&&c.a.createElement("ul",{className:"h5p-hub-sort-by-list","aria-labelledby":"h5p-hub-sort-by"},c.a.createElement(H,{selected:n,onChange:r},u)))});we.propTypes={searchPromise:C.a.func,selected:C.a.string.isRequired,onChange:C.a.func.isRequired,visible:C.a.bool.isRequired,orderVariables:C.a.array.isRequired,orderVisible:C.a.bool,headerLabel:C.a.string.isRequired};var Me=we,Le={search:"search",disciplines:"disciplines",contentTypes:"content-types",licenses:"licenses",languages:"languages",levels:"levels",reviewed:"reviewed",license:"license"};function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ce=function(){return(new Date).getTime()},xe=function(){function e(t){var n=t.language,r=void 0===n?"en":n;o()(this,e),this.language=r,this.licenses={},this.searchCache={}}return s()(e,null,[{key:"init",value:function(t,n,r){e.instance||function(){e.instance=new e(t),e.contentTypes=new Promise((function(t){var n=e.massageContentTypes(r);t(e.makeHierarchicalContentTypes(n))})),e.flatContentTypes=new Promise((function(t){t(e.massageContentTypes(r))}));for(var a=[],i=[{name:"levels",promise:"levels",hierarchical:!1},{name:"languages",promise:"languages",hierarchical:!1},{name:"licenses",promise:"licenses",hierarchical:!1},{name:"disciplines",promise:"disciplines",hierarchical:!0},{name:"flatDisciplines",promise:"disciplines",hierarchical:!1}],o=function(t){e[i[t].name]=new Promise((function(e,n){a.push({type:i[t].promise,hierarchical:i[t].hierarchical,resolve:e,reject:n})}))},l=0;l<i.length;l++)o(l);new Q(n).then((function(t){for(var n=0;n<a.length;n++){var r=a[n];!0===t.success&&void 0!==t.data[r.type]?r.hierarchical?r.resolve(e.makeHierarchicalList(e.massageMetadata(t.data[r.type]))):"licenses"===r.type?r.resolve(e.massageLicenses(t.data[r.type])):r.resolve(e.massageMetadata(t.data[r.type])):r.reject(new Error("Unable to load "+r.type+" metadata."))}})).catch((function(e){for(var t=0;t<a.length;t++)a[t].reject(e)}))}()}},{key:"massageMetadata",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];n.label=n.translation?n.translation:n.name,n.id=n.name}return e}},{key:"massageLicenses",value:function(t){return t.map((function(t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t);return void 0!==n.licenses?n.licenses=e.massageLicenses(n.licenses):(n.id=n.name,n.name=n.translation||n.name,n.versions=e.massageMetadata(n.versions)),n}))}},{key:"massageContentTypes",value:function(e){for(var t=[],n=0;n<e.libraries.length;n++){var r=e.libraries[n];t.push({id:r.machineName,label:r.title,categories:r.categories})}return t}},{key:"makeHierarchicalList",value:function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id]=e[n];for(var r=0;r<e.length;r++)if(null!==e[r].parent){var a=t[e[r].parent];a.children=a.children?a.children.concat([e[r]]):[e[r]]}for(var i=[],o=0,l=Object.values(t);o<l.length;o++){var s=l[o];null===s.parent&&i.push(s)}return i}},{key:"makeHierarchicalContentTypes",value:function(e){for(var t={},n=0;n<e.length;n++)e[n].categories&&e[n].categories.length>0&&e[n].categories.forEach((function(e){void 0===t[e]&&(t[e]={id:e,label:e,children:[]})}));for(var r=function(n){var r=e[n].categories;void 0!==r&&r.length>0&&r.forEach((function(r){var a=t[r];a.children=a.children.concat([e[n]])}))},a=0;a<e.length;a++)r(a);return Object.values(t)}},{key:"getLicense",value:function(t){return e.instance.licenses[t]||(e.instance.licenses[t]=e.instance.get(Le.license,{id:t})),e.instance.licenses[t]}},{key:"getCachedQueryResults",value:function(t){var n=e.instance.searchCache[t];if(n&&Ce()<n.expiresAt)return n.promise}},{key:"search",value:function(t){var n=new FormData;if(void 0!==t.filters){void 0!==t.filters.license&&(-1!==t.filters.license.indexOf("modified")&&n.append("can_be_modified",1),-1!==t.filters.license.indexOf("commercial")&&n.append("allows_commercial_use",1)),void 0!==t.filters.reviewed&&-1!==t.filters.reviewed.indexOf("reviewed")&&n.append("reviewed",1);var r={contentTypes:"content_types",disciplines:"disciplines",language:"languages",level:"levels"};for(var a in r)if(r.hasOwnProperty(a)&&void 0!==t.filters[a])for(var i=t.filters[a],o=0;o<i.length;o++)n.append(r[a]+"[]",i[o])}"newest"===t.orderBy&&n.append("sort_by","created_at"),void 0!==t.page&&t.page>1&&n.append("from",(6*(t.page-1)).toString()),void 0!==t.query&&t.query.trim()&&n.append("text",t.query);var l=new URLSearchParams(n).toString(),s=this.getCachedQueryResults(l);if(s)return function(){return s};var u=new Promise((function(r,a){if(void 0===window.H5PIntegration.Hub)return a(new Error("Did you forget to add the Hub integration?"));var i=window.H5PIntegration.Hub.contentSearchUrl;return new Q(i,n,"omit").then((function(e){r({numResults:e.total,content:e.items,pages:Math.ceil(parseInt(e.total)/6),page:t.page||1})})).catch((function(t){delete e.instance.searchCache[l],a(t)}))}));return e.instance.searchCache[l]={promise:u,expiresAt:Ce()+6e4},function(){return u}}}]),e}(),Se=(n(60),function(e){var t,n=e.title,r=e.itemsPromise,a=e.actionLabel,i=e.onAction,o=e.onSelect,l=e.focused,s=e.setFocus;return c.a.createElement("div",{className:"h5p-hub-content-selection-list"},c.a.createElement("div",{className:"h5p-hub-header"},c.a.createElement("div",{className:"h5p-hub-title"},n),c.a.createElement("a",{className:"h5p-hub-action",href:"#",onClick:i},a)),c.a.createElement(ve,(t={itemsPromise:r,type:"grid",visible:!0,showPagination:!1,onSelect:o,setFocus:null,focused:l},L()(t,"setFocus",s),L()(t,"title",n),t)))});Se.propTypes={title:C.a.string.isRequired,itemsPromise:C.a.func.isRequired,actionLabel:C.a.string.isRequired,onAction:C.a.func.isRequired,onSelect:C.a.func.isRequired,setFocus:C.a.bool,focused:C.a.string};var Te=Se,Ne=n(12),je=n.n(Ne),De=(n(61),n(62),n(13)),ke=n.n(De);n(72);function Ie(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var Oe=function(e){y()(n,e);var t=Ie(n);function n(){return o()(this,n),t.apply(this,arguments)}return s()(n,[{key:"createTroubleshootingURL",value:function(e){return e?"https://h5p.org/documentation/troubleshooting#".concat(e):void 0}},{key:"render",value:function(){var e=this,t="h5p-hub-message h5p-hub-".concat(this.props.severity)+(this.props.onClose?" h5p-hub-dismissible":""),n=this.props.message;n&&!Array.isArray(n)&&(n=[n]);var r=n?n.map((function(t,n){var r=t.message||t,a=e.createTroubleshootingURL(t.code);return c.a.createElement("p",{key:n,className:"h5p-hub-message-body"},c.a.createElement("span",{dangerouslySetInnerHTML:{__html:r}}),a&&c.a.createElement("a",{className:"h5p-hub-get-help",target:"_blank",href:a},B.get("getHelp")))})):null;return c.a.createElement("div",{className:t,role:"alert"},this.props.onClose&&c.a.createElement("button",{className:"h5p-hub-message-close",tabIndex:"0","aria-label":B.get("Close"),onClick:this.props.onClose}),c.a.createElement("div",{className:"h5p-hub-message-content"},c.a.createElement("h2",null,this.props.title),r),this.props.children)}}]),n}(c.a.Component);Oe.propTypes={severity:C.a.oneOf(["info","warning","error"]).isRequired,title:C.a.string.isRequired,message:C.a.oneOfType([C.a.string,C.a.array]),onClose:C.a.func,children:C.a.oneOfType([C.a.object,C.a.array])};var Ae=Oe;function Pe(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var Re=function(e){y()(n,e);var t=Pe(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"closeModal",(function(){r.appElement.removeAttribute("aria-hidden"),r.props.onFilterClosed(r.props.id)})),L()(h()(r),"calculateLeftPosition",(function(){var e=r.props.filterBarRef.current.offsetWidth,t=Math.max(r.props.toggleButtonRef.current.offsetLeft-50,0);return t+586.88>e&&(t=Math.max(e-586.88,0)),t})),L()(h()(r),"calculateTopPosition",(function(){var e=r.props.filterBarRef.current;return e.offsetTop+e.offsetHeight})),L()(h()(r),"handleResize",(function(){r.setState({left:r.calculateLeftPosition(),top:r.calculateTopPosition()})})),r.appElement=document.getElementById("h5p-hub-reuse-content-container"),r.state={left:r.calculateLeftPosition(),top:r.calculateTopPosition()},r}return s()(n,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.closeModal),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.closeModal),window.removeEventListener("resize",this.handleResize)}},{key:"swallowClicks",value:function(e){e.stopPropagation()}},{key:"render",value:function(){var e={overlay:{top:this.state.top+"px"},content:{left:this.state.left+"px"}};return c.a.createElement(ke.a,{isOpen:!0,onRequestClose:this.closeModal,contentLabel:this.props.id,parentSelector:function(){return document.getElementById("h5p-hub-reuse-view")},appElement:this.appElement,className:"h5p-hub-filter-dialog",overlayClassName:"h5p-hub-filter-modal",aria:{labelledby:"h5p-hub-header-text"},style:e,shouldCloseOnOverlayClick:!1},c.a.createElement("div",{className:"h5p-hub-filter-dialog-content",onClick:this.swallowClicks},c.a.createElement("div",{className:"h5p-hub-header-text",id:"h5p-hub-filter-modal-header-text"},this.props.dictionary.dialogHeader),this.props.failedDataFetch?c.a.createElement(Ae,{severity:"error",title:B.get("failedFetchingData"),message:B.get("filterErrorMessage")}):this.props.data?this.props.children:c.a.createElement("div",{className:"h5p-hub-loading"}),c.a.createElement("button",{className:"h5p-hub-apply-filters-button",onClick:this.closeModal},this.props.dictionary.dialogButtonLabel)))}}]),n}(c.a.Component);Re.propTypes={id:C.a.string.isRequired,data:C.a.array,onFilterClosed:C.a.func.isRequired,checked:C.a.array.isRequired,handleChecked:C.a.func.isRequired,dictionary:C.a.object.isRequired,toggleButtonRef:C.a.shape({current:C.a.instanceOf(Element)}),filterBarRef:C.a.shape({current:C.a.instanceOf(Element)}),failedDataFetch:C.a.bool};var ze=Re,_e=(n(73),c.a.forwardRef((function(e,t){var n=e.checked,r=e.id,a=e.onClick,i=e.open,o=e.data,l=e.dropdownLabel,s=1==n.length&&1==o.length,u=n.length>0&&!s;return c.a.createElement("div",{className:"h5p-hub-filter-button"},c.a.createElement("button",{tabIndex:"-1",className:i?"h5p-hub-open":s?"h5p-hub-one-checked":u?"h5p-hub-filter-checked":"",onClick:function(e){e.stopPropagation(),a(r)},ref:t},l,c.a.createElement("div",{className:s?"h5p-hub-icon h5p-hub-check":"h5p-hub-icon"},u&&"(".concat(n.length,")"))))})));_e.propTypes={checked:C.a.array,id:C.a.string.isRequired,onClick:C.a.func.isRequired,open:C.a.bool.isRequired,data:C.a.array,dropdownLabel:C.a.string.isRequired};var Fe=_e,Ue=(n(74),n(75),c.a.forwardRef((function(e,t){var n=e.id,r=e.label,a=e.checked,i=e.filter,o=e.onChecked,l=e.focused,s=e.checkboxChildren,u=e.navigateToChildren,f=e.parent,d=e.checkedNumber,p=e.tabIndex,h=e.children;return c.a.createElement("li",{ref:t,id:"h5p-hub-"+n,key:i+n,className:"h5p-hub-checkbox ".concat(a?"h5p-hub-checked ":""," ").concat(l?"h5p-hub-highlighted":""," ").concat(s?"h5p-hub-parent":""),role:"checkbox","aria-checked":a,"aria-label":r,onClick:function(){return s?u(n,s):o(i,n,!a)},tabIndex:p||"0",onKeyDown:function(e){"Enter"!==e.key&&" "!=e.key||(o(i,n,!a),e.preventDefault())}},c.a.createElement("div",{className:"h5p-hub-content",key:"label"+n},c.a.createElement("div",{className:"h5p-hub-icon",onClick:function(e){return s?function(e,t,n,r){r.stopPropagation(),o(e,t,n,f)}(i,n,!a,e):{}}}),c.a.createElement("div",{className:"h5p-hub-label-text"},h||r,d>0&&" (".concat(d,")"))))})));Ue.propTypes={id:C.a.string.isRequired,label:C.a.string.isRequired,onChecked:C.a.func.isRequired,checked:C.a.bool.isRequired,filter:C.a.string.isRequired,focused:C.a.bool,children:C.a.any,checkboxChildren:C.a.array,navigateToChildren:C.a.func,parent:C.a.string,tabIndex:C.a.string,checkedNumber:C.a.any};var Be=Ue,Qe=function(e,t){return-1!=t.indexOf(e)},Ye=function(e,t,n){return(e?e.filter((function(e){return Qe(e.id,n)})).length:0)+(-1===n.indexOf(t.id)?0:1)},We=c.a.forwardRef((function(e,t){var n=e.items,r=e.onChecked,a=e.checked,i=e.filter,o=e.focused,l=e.navigateToChildren,s=e.parent,f=e.listRefId,d=e.getDescendants,p=e.tabIndex,h=e.appliedSearch,m=e.navigateDirection,y=e.setNavigateDirection;return Object(u.useEffect)((function(){y&&setTimeout((function(){y("")}),350)}),[n]),c.a.createElement("ul",{className:"h5p-hub-checkbox-list ".concat(m?"h5p-hub-animate-in-".concat(m):""),role:"group","aria-labelledby":i.label,ref:t&&t[f]},n.map((function(e){return c.a.createElement(Be,{key:s+e.id,id:e.id,label:e.label,checked:Qe(e.id,a),filter:i,onChecked:r,focused:o==e.id,checkboxChildren:e.children,navigateToChildren:l,parent:s,checkedNumber:e.children&&Ye(d(e),e,h),ref:t&&t[e.id],tabIndex:p})})))}));We.propTypes={items:C.a.array,onChecked:C.a.func.isRequired,checked:C.a.array,filter:C.a.string.isRequired,focused:C.a.string,navigateToChildren:C.a.func,parent:C.a.string,listRefId:C.a.string,tabIndex:C.a.string,getDescendants:C.a.func,appliedSearch:C.a.array,navigateDirection:C.a.string,setNavigateDirection:C.a.func};var Ve=We,qe=(n(76),c.a.forwardRef((function(e,t){var n=e.onChecked,r=e.checked,a=e.filter,i=e.focused,o=e.parent,l=e.listRefId,s=e.getDescendants,u=e.tabIndex,f=e.categoryList,d=e.searchValue,p=e.categoryRefId,h=e.appliedSearch,m=function(e){return e.map((function(e){return c.a.createElement("div",{key:o+e.id},c.a.createElement(Be,{key:o+e.id,id:e.id,label:e.label,checked:Qe(e.id,r),filter:a,onChecked:n,focused:i===e.id,parent:o,checkedNumber:Ye(s(e),e,h),ref:t&&t[e.id],tabIndex:u},d.length>1&&function(e,t){for(var n=[],r=t.length,a=0;a<e.length;a++)-1!==e.slice(a,a+r).toLowerCase().indexOf(t.toLowerCase())&&(n.push(a),a+=r);var i=[c.a.createElement("span",{key:"checkbox-span-bold-start"},e.slice(0,n[0]))];return n.forEach((function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i.push(c.a.createElement("span",{key:"checkbox-span-"+a,className:"h5p-hub-non-bold"},e.slice(t,t+r))),n[a+1]?i.push(c.a.createElement("span",{key:"checkbox-span-bold-"+a},e.slice(t+r,n[a+1]))):i.push(c.a.createElement("span",{key:"checkbox-span-bold-"+a},e.slice(t+r))),a+=1})),i.map((function(e){return e}))}(e.label,d)))}))};return c.a.createElement("ul",{className:"h5p-hub-checkbox-list",role:"group","aria-labelledby":a.label,ref:t&&t[l]},f.map((function(e){return c.a.createElement("div",{key:"headers-"+e.id,className:e.noLine?"":"h5p-hub-bottom-line"},c.a.createElement("div",null,null!==e.catNoParent?m([e.catNoParent]):null),e.children&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{key:e,ref:t[p+e.id],className:"h5p-hub-category-header"},"".concat(B.get("in")," ").concat(e.label)),m(e.children)))})))})));qe.propTypes={onChecked:C.a.func.isRequired,checked:C.a.array,filter:C.a.string.isRequired,focused:C.a.string,parent:C.a.string,listRefId:C.a.string.isRequired,tabIndex:C.a.string,categoryRefId:C.a.string.isRequired,checkedParents:C.a.array,getDescendants:C.a.func.isRequired,categoryList:C.a.array.isRequired,searchValue:C.a.string.isRequired,appliedSearch:C.a.array};var He=qe,Ge=(n(77),c.a.forwardRef((function(e,t){var n=e.value,r=e.onSearch,a=e.onNavigateVertical,i=e.onSelect,o=e.placeholder,l=e.onClick,s=e.onNavigateSideway,u=e.onFocus,f=e.inSearch;return c.a.createElement("div",{onMouseDown:l,className:"h5p-hub-search-button"},c.a.createElement("div",{className:"h5p-hub-search-field",role:"search"},c.a.createElement("input",{className:"h5p-hub-filter-search-bar",type:"text",value:n,"aria-label":o,placeholder:o,ref:t,onKeyDown:function(e){return function(e){switch(e.key){case"ArrowUp":a(-1),e.preventDefault();break;case"ArrowDown":a(1),e.preventDefault();break;case"ArrowRight":f||(s(1),e.preventDefault());break;case"ArrowLeft":f||(s(-1),e.preventDefault());break;case"Enter":i(),e.preventDefault()}}(e)},onChange:function(e){var t=e.target;r(t.value)},onFocus:u}),c.a.createElement("div",{className:"h5p-hub-icon-arrow"})))})));Ge.propTypes={value:C.a.string,onSearch:C.a.func.isRequired,onNavigateVertical:C.a.func.isRequired,onNavigateSideway:C.a.func.isRequired,onSelect:C.a.func.isRequired,placeholder:C.a.string.isRequired,onClick:C.a.func.isRequired,onFocus:C.a.func,inSearch:C.a.bool},Ge.defaultProps={onNavigateVertical:function(){},onNavigateSideway:function(){},onSelect:function(){}};var Ze=Ge;n(78);function Ke(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw i}}}}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var tt=function(e){y()(n,e);var t=et(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"handleClearSearch",(function(){r.setState({checkboxElements:r.props.items.sort(r.compare),searchValue:"",inSearch:!1,categoryList:[],dropdownOpen:!0}),r.searchRef.current.focus()})),L()(h()(r),"handleOnSearch",(function(e){if(""===e)r.handleClearSearch();else if(1===e.length)r.setState({searchValue:e,checkboxElements:r.props.items,dropdownOpen:!0,parent:[],inSearch:!0,focused:null,categoryList:[]});else{var t=[],n=[];r.props.category?(n=r.makeCategorySearchList(e)).forEach((function(e){e.catNoParent&&t.push(e.catNoParent),t.push.apply(t,e.children)})):t=r.leafs&&r.leafs.filter((function(t){return RegExp(e.toUpperCase()).test(t.label.toUpperCase())})).sort(r.compare),r.setState({checkboxElements:t,searchValue:e,dropdownOpen:!0,parent:[],inSearch:!0,focused:null,categoryList:n})}})),L()(h()(r),"makeCategorySearchList",(function(e){for(var t=[],n=0;n<r.props.items.length;n++){var a=r.props.items[n],i=RegExp(e.toUpperCase()).test(a.label.toUpperCase())&&r.getCheckboxFromId(a.id,r.props.items),o=[];a.children&&(o=a.children.filter((function(t){return RegExp(e.toUpperCase()).test(t.label.toUpperCase())}))),o.length>0?t.push({id:a.id,label:a.label,children:o,catNoParent:i?a:null}):i&&t.push({id:a.id,label:a.label,catNoParent:a})}for(var l=0;l<t.length;l++){var s=t[l];t[l+1]&&s.children&&-1!==s.children.map((function(e){return e.id})).indexOf(t[l+1].id)&&(t[l]=$e($e({},s),{},{noLine:!0}))}return t[t.length-1]=$e($e({},t[t.length-1]),{},{noLine:!0}),t})),L()(h()(r),"handleSearchFocus",(function(){r.click||r.state.dropdownOpen||(r.click=setTimeout((function(){r.setState({dropdownOpen:!0}),r.click=null}),100))})),L()(h()(r),"handleSearchClick",(function(){r.click||(r.click=setTimeout((function(){r.setState((function(e){return{dropdownOpen:r.props.dropdownAlwaysOpen||!e.dropdownOpen}})),r.click=null}),100))})),L()(h()(r),"handleChecked",(function(e,t,n){if(r.state.dropdownOpen&&t&&r.state.checkboxElements[r.indexOfId(t)]){if(r.setState({setFocus:!0,focused:t}),r.state.checkboxElements[r.indexOfId(t)].children){var a=r.getCheckboxFromId(t,r.parents),i=r.getDescendants(a).map((function(e){return e.id}));r.props.handleChecked(e,[t].concat(je()(i)),n)}else r.props.handleChecked(e,t,n);r.searchRef.current.focus()}})),L()(h()(r),"setParentsChecked",(function(){var e=[];r.parents.forEach((function(t){return r.checkedOf(r.getDescendants(t),r.props.checked)?e.push(t.id):{}})),r.setState({checkedParents:e})})),L()(h()(r),"handleNavigateVertical",(function(e){var t=r.indexOfId(r.state.focused)+e,n=r.state.checkboxElements[t];if(r.state.dropdownOpen&&t!==r.state.checkboxElements.length&&void 0===n)r.setState({focused:r.state.checkboxElements.map((function(e){return e.id}))[0]}),r.checkboxRefs[r.listRefId].current.scrollTop=0;else if(r.state.dropdownOpen&&t!==r.state.checkboxElements.length){r.setState({focused:n.id});var a=r.checkboxRefs[r.state.checkboxElements[0].id].current.offsetHeight,i=r.checkboxRefs[r.listRefId].current.offsetHeight,o=r.state.parent?a:0,l=0,s=0;if(r.state.categoryList.length>0){l=r.checkboxRefs[r.categoryRefId+r.state.categoryList[0].id].current.offsetHeight;var u,c=0,f=Ke(r.state.categoryList);try{for(f.s();!(u=f.n()).done;){var d=u.value;if(d.catNoParent&&(c+=1),c>t)break;c+=d.children.length,s+=1}}catch(e){f.e(e)}finally{f.f()}}var p=o+(t+1)*a+s*l-i;r.checkboxRefs[r.listRefId].current.scrollTop=p}})),L()(h()(r),"handleNavigateSideway",(function(e){r.state.dropdownOpen&&-1==e&&r.state.parent?r.navigateToParent():r.state.dropdownOpen&&1==e&&r.state.focused&&r.getCheckboxFromId(r.state.focused,r.parents)&&r.navigateToChildren(r.state.focused,r.getCheckboxFromId(r.state.focused,r.parents).children)})),L()(h()(r),"navigateToChildren",(function(e,t){r.setState({checkboxElements:t,parent:[].concat(je()(r.state.parent),[e]),navigateDirection:"right"}),r.searchRef.current.focus()})),L()(h()(r),"navigateToParent",(function(){var e=r.state.parent[r.state.parent.length-2],t=r.getCheckboxFromId(e,r.parents)&&r.getCheckboxFromId(e,r.parents).children,n=r.state.parent,a=n.pop();r.setState({parent:n,checkboxElements:t||r.props.items.sort(r.compare),focused:a,navigateDirection:"left"}),r.searchRef.current.focus()})),L()(h()(r),"compare",(function(e,t){var n=e.label.toUpperCase(),r=t.label.toUpperCase();return n<r?-1:n>r?1:void 0})),L()(h()(r),"getDescendants",(function(e){if(null===e)return[];for(var t=[],n=[e];n.length>0;){var r=n.pop();r&&r.children&&(t.concat(r.children),r.children.forEach((function(e){t.push(e),n.push(e)})))}return t})),L()(h()(r),"setParentsAndLeafs",(function(e){for(var t=0;t<e.length;t++){var n=e[t];n.children?(r.parents.push(n),r.setParentsAndLeafs(n.children)):null===r.getCheckboxFromId(n.id,r.leafs)&&r.leafs.push(n)}})),L()(h()(r),"getCheckboxFromId",(function(e,t){for(var n=0;n<t.length;n++)if(t[n].id===e)return t[n];return null})),L()(h()(r),"indexOfId",(function(e){return r.state.checkboxElements.map((function(e){return e.id})).indexOf(e)})),r.state={checkboxElements:r.props.items.sort(r.compare),searchValue:"",dropdownOpen:!1,setFocus:!1,focused:null,checkedParents:[],parent:[],inSearch:!1,categoryList:[],navigateDirection:""},r.searchRef=c.a.createRef(),r.leafs=[],r.allParents=[],r.parents=[],r.checkboxRefs={},r.listRefId="list",r.categoryRefId="category",r.checkboxRefs[r.listRefId]=c.a.createRef(),r.setParentsAndLeafs(r.props.items),r.parents.forEach((function(e){r.checkboxRefs[e.id]=c.a.createRef(),r.checkboxRefs[r.categoryRefId+e.id]=c.a.createRef()})),r.leafs.forEach((function(e){return r.checkboxRefs[e.id]=c.a.createRef()})),r}return s()(n,[{key:"componentDidMount",value:function(){this.setParentsChecked(),this.props.dropdownAlwaysOpen&&this.setState({dropdownOpen:!0})}},{key:"componentWillUnmount",value:function(){this.setState({parent:[],focused:null,inSearch:!1,dropdownOpen:this.props.dropdownAlwaysOpen})}},{key:"componentDidUpdate",value:function(e){e.checked!==this.props.checked&&this.setParentsChecked([],!1)}},{key:"checkedOf",value:function(e,t){return Array.isArray(e)&&t?!!t&&e.filter((function(e){return-1!==t.indexOf(e.id)})).length>0:-1!=this.props.checked.indexOf(e)||-1!==this.state.checkedParents.indexOf(e)}},{key:"render",value:function(){var e=this;return c.a.createElement("div",{className:"h5p-hub-search-filter"},c.a.createElement(Ze,{ref:this.searchRef,value:this.state.searchValue,onSearch:this.handleOnSearch,placeholder:this.props.dictionary.searchPlaceholder,onClick:this.handleSearchClick,onNavigateVertical:this.handleNavigateVertical,onSelect:function(){return e.handleChecked(e.props.filter,e.state.focused,!e.checkedOf(e.state.focused),e.state.parent[e.state.parent.length-1])},onNavigateSideway:this.handleNavigateSideway,onFocus:this.handleSearchFocus,inSearch:this.state.inSearch}),this.state.parent.length>0&&this.state.dropdownOpen&&c.a.createElement("div",{className:"h5p-hub-navigate-parent"},c.a.createElement("button",{onClick:this.navigateToParent,"aria-label":B.get("navigateToParent")}),this.getCheckboxFromId(this.state.parent[this.state.parent.length-1],this.parents).label),this.state.searchValue.length>0&&c.a.createElement("button",{onClick:this.handleClearSearch,className:"h5p-hub-clear-button"}),this.state.dropdownOpen&&this.props.items&&(!this.props.category||this.state.searchValue.length<2)&&c.a.createElement(Ve,{onChecked:this.handleChecked,items:this.state.checkboxElements,checked:this.props.checked.concat(this.state.checkedParents),checkedParents:this.state.checkedParents,filter:this.props.filter,focused:this.state.focused,navigateToChildren:this.navigateToChildren,parent:this.state.parent[this.state.parent.length-1],ref:this.checkboxRefs,listRefId:this.listRefId,getDescendants:this.getDescendants,tabIndex:"-1",appliedSearch:this.props.checked,navigateDirection:this.state.navigateDirection,setNavigateDirection:function(t){return e.setState({navigateDirection:t})}}),this.state.dropdownOpen&&this.props.items&&this.props.category&&(this.state.categoryList.length>0||this.state.categoryList.topCategories)&&this.state.inSearch&&c.a.createElement(He,{onChecked:this.handleChecked,checked:this.props.checked.concat(this.state.checkedParents),checkedParents:this.state.checkedParents,filter:this.props.filter,focused:this.state.focused,ref:this.checkboxRefs,listRefId:this.listRefId,getDescendants:this.getDescendants,tabIndex:"-1",categoryList:this.state.categoryList,searchValue:this.state.searchValue,categoryRefId:this.categoryRefId,appliedSearch:this.props.checked}))}}]),n}(c.a.Component);tt.propTypes={items:C.a.array,handleChecked:C.a.func.isRequired,checked:C.a.array,filter:C.a.string.isRequired,dictionary:C.a.object.isRequired,category:C.a.bool,dropdownAlwaysOpen:C.a.bool};var nt=tt;function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function it(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var ot=function(e){y()(n,e);var t=it(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"showClearFilters",(function(){var e=!1;return Object.keys(r.props.checked).forEach((function(t){r.props.checked[t].length>0&&r.props.clearFilterExceptions&&-1===r.props.clearFilterExceptions.indexOf(t)&&(e=!0)})),e})),L()(h()(r),"clearFilters",(function(){for(var e={},t=0;t<r.props.clearFilterExceptions.length;t++){var n=r.props.clearFilterExceptions[t];e[n]=r.props.checked[n]}r.props.setChecked(e),r.props.applyFilters(e)})),L()(h()(r),"handleFilterButtonClicked",(function(e){var t=r.state.openFilter===e;r.setState({openFilter:t?"":e}),t&&r.props.applyFilters(r.props.checked)})),L()(h()(r),"handleFilterClosed",(function(e){var t=e.split("-").pop();r.state.openFilter.split("-").pop()===t&&r.setState({openFilter:""}),r.props.applyFilters(r.props.checked)})),L()(h()(r),"handleChecked",(function(e,t,n){if(Array.isArray(t)){if(null==r.props.checked[e]&&null!=t)r.props.setChecked(at(at({},r.props.checked),{},L()({},e,t)));else if(null!=t){var a=n?r.props.checked[e].filter((function(e){return-1==t.indexOf(e)})).concat(t):r.props.checked[e].filter((function(e){return-1==t.indexOf(e)}));r.props.setChecked(at(at({},r.props.checked),{},L()({},e,a)))}}else if(null==r.props.checked[e]&&null!=t)r.props.setChecked(at(at({},r.props.checked),{},L()({},e,[t])));else if(null!=t){var i=n?[].concat(je()(r.props.checked[e]),[t]):r.props.checked[e].filter((function(e){return e!=t}));r.props.setChecked(at(at({},r.props.checked),{},L()({},e,i)))}})),L()(h()(r),"findFilterById",(function(e){for(var t=e.replace("h5p-hub-filter-button-",""),n=0;n<r.props.filters.length;n++)if(r.props.filters[n].id===t)return r.props.filters[n]})),r.state={openFilter:""},r.filterBarRef=c.a.createRef(),r.filterButtons={},r.props.filters.forEach((function(e){r.filterButtons[e.id]=c.a.createRef()})),r}return s()(n,[{key:"render",value:function(){var e=this,t=this.props.filters.map((function(t){return c.a.createElement("li",{key:t.id,id:"h5p-hub-filter-button-"+t.id},c.a.createElement(Fe,{id:"h5p-hub-filter-button-"+t.id,dropdownLabel:t.dictionary.dropdownLabel,onClick:e.handleFilterButtonClicked,checked:e.props.checked[t.id]?e.props.checked[t.id]:[],open:e.state.openFilter==t.id,data:e.props.metaData[t.id],ref:e.filterButtons[t.id]}))})),n=this.findFilterById(this.state.openFilter);return c.a.createElement("div",{className:"h5p-hub-filter-bar",ref:this.filterBarRef},c.a.createElement("div",{className:"h5p-hub-filter-label",id:"h5p-hub-content-hub-filter-label"},this.props.label),c.a.createElement("ul",{className:"h5p-hub-filter-buttons","aria-labelledby":"h5p-hub-content-hub-filter-label"},c.a.createElement(H,{selected:this.open,onChange:this.handleFilterButtonClicked},t)),n&&c.a.createElement(ze,{id:"h5p-hub-"+n.id,key:n.id,dictionary:n.dictionary,data:this.props.metaData[n.id],onFilterClosed:this.handleFilterClosed,checked:this.props.checked[n.id]?this.props.checked[n.id]:[],handleChecked:this.handleChecked,toggleButtonRef:this.filterButtons[n.id],filterBarRef:this.filterBarRef,failedDataFetch:this.props.failedDataFetch[n.id]},"checkboxList"===n.type&&this.props.metaData[n.id]&&c.a.createElement(Ve,{onChecked:this.handleChecked,items:this.props.metaData[n.id],checked:this.props.checked[n.id]?this.props.checked[n.id]:[],filter:n.id}),"search"===n.type&&this.props.metaData[n.id]&&c.a.createElement(nt,{handleChecked:this.handleChecked,items:this.props.metaData[n.id],checked:this.props.checked[n.id]?this.props.checked[n.id]:[],filter:n.id,dictionary:n.dictionary,dropdownAlwaysOpen:!0}),"categorySearch"===n.type&&this.props.metaData[n.id]&&c.a.createElement(nt,{handleChecked:this.handleChecked,items:this.props.metaData[n.id],checked:this.props.checked[n.id]?this.props.checked[n.id]:[],filter:n.id,dictionary:n.dictionary,category:!0,dropdownAlwaysOpen:!0})),this.showClearFilters()&&c.a.createElement("div",{className:"h5p-hub-clear-filters"},c.a.createElement("button",{onClick:this.clearFilters,"aria-label":B.get("clearFilters")},B.get("clearFilters"))))}}]),n}(c.a.Component);ot.propTypes={label:C.a.string.isRequired,filters:C.a.array.isRequired,applyFilters:C.a.func.isRequired,metaData:C.a.object.isRequired,failedDataFetch:C.a.object.isRequired,checked:C.a.object.isRequired,setChecked:C.a.func.isRequired,clearFilterExceptions:C.a.array};var lt=ot,st=(n(79),function(e){var t=e.label,n=Object(u.useRef)(null);return c.a.createElement(ke.a,{isOpen:!0,contentLabel:t,className:"h5p-hub-downloading-modal",overlayClassName:"h5p-hub-downloading-modal-overlay",aria:{label:t},appElement:document.getElementById("h5p-hub-panel"),parentSelector:function(){return document.getElementById("h5p-hub")},onAfterOpen:function(){n.current.focus()}},c.a.createElement("img",{className:"h5p-hub-spinner",src:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJ2aXNpYmxlIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PGc+PHBhdGggeG1sbnM6ZGVmYXVsdD0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJjaXJjbGUtby1ub3RjaCIgZD0iTTIxLjAxLDEyYzAuMDItMS40Ni0wLjMyLTIuOS0xLTQuMmMtMS4zMy0yLjU2LTMuOC00LjMyLTYuNjUtNC43NXYyLjM4YzEuNSwwLjI5LDIuODYsMS4xMSwzLjgyLDIuMyAgYzEuNTgsMS45LDEuOTcsNC41MywxLDYuODFjLTAuNjcsMS42MS0xLjk0LDIuODgtMy41NSwzLjU1Yy0xLjY1LDAuNzEtMy41MiwwLjcxLTUuMTcsMGMtMS42MS0wLjY3LTIuODgtMS45NC0zLjU1LTMuNTUgIGMtMC45Ny0yLjI4LTAuNTgtNC45MSwxLTYuODFjMC45Ni0xLjE5LDIuMzItMi4wMSwzLjgyLTIuM1YzLjA1QzcuODUsMy40NSw1LjM1LDUuMjIsNC4wMSw3LjhjLTEuMjMsMi4zOC0xLjM0LDUuMTgtMC4zLDcuNjUgIGMwLjksMi4xNywyLjYzLDMuOSw0LjgsNC43OWMyLjI0LDAuOTUsNC43NiwwLjk1LDcsMGMyLjE2LTAuOSwzLjg4LTIuNjIsNC43OC00Ljc4QzIwLjc2LDE0LjM3LDIxLDEzLjE5LDIxLjAxLDEyTDIxLjAxLDEyeiIgc3R5bGU9ImZpbGw6IHJnYigxOCwgMTgsIDE4KTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIvPjwvZz48L3N2Zz4=","aria-hidden":"true"}),c.a.createElement("span",{className:"h5p-hub-downloading-message",tabIndex:"-1",ref:n},t))});st.propTypes={label:C.a.string.isRequired};var ut=st;n(80);function ct(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var ft=function(e){y()(n,e);var t=ct(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"handleInput",(function(e){var t=e.target;t.value!==r.state.value&&(r.setState({value:t.value}),r.props.auto&&!r.searchTimer&&(r.searchTimer=setTimeout((function(){r.props.onSearch(t.value),r.searchTimer=null}),40)))})),L()(h()(r),"handleKeyDown",(function(e){switch(e.which){case 38:r.props.onNavigate(-1),e.preventDefault();break;case 40:r.props.onNavigate(1),e.preventDefault();break;case 13:r.props.auto?r.props.onSelect():r.props.onSearch(e.target.value),e.preventDefault()}})),L()(h()(r),"handleClick",(function(){r.props.onSearch(r.input.value)})),r.state={value:""},r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){e.value!==this.state.value&&this.setState({value:e.value}),e.setFocus!==this.props.setFocus&&this.setState({focusOnRender:e.setFocus})}},{key:"componentDidUpdate",value:function(){this.state.focusOnRender&&(delete this.state.focusOnRender,this.input.focus())}},{key:"render",value:function(){var e=this;return c.a.createElement("div",{className:"h5p-hub-search-wrapper",role:"search"},c.a.createElement("div",{className:"h5p-hub-border-wrap"},c.a.createElement("input",{className:"h5p-hub-search-bar",type:"text",defaultValue:this.state.value,"aria-label":this.props.placeholder,placeholder:this.props.placeholder,onInput:this.props.instantSearch?this.handleInput:function(){},onKeyDown:function(t){return e.handleKeyDown(t)},ref:function(t){return e.input=t}}),c.a.createElement("div",{className:"h5p-hub-icon-search",onClick:this.handleClick})))}}]),n}(c.a.Component);ft.propTypes={value:C.a.string,auto:C.a.bool.isRequired,setFocus:C.a.bool,onSearch:C.a.func.isRequired,onNavigate:C.a.func.isRequired,onSelect:C.a.func.isRequired,instantSearch:C.a.bool,placeholder:C.a.string.isRequired},ft.defaultProps={instantSearch:!1,onNavigate:function(){},onSelect:function(){},auto:!1,setFocus:!1};var dt=ft;n(81);function pt(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var ht=function(e){y()(n,e);var t=pt(n);function n(){return o()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this,t=this.props.type||"div";return c.a.createElement(t,a()({},this.props.buttonProps,{role:"button",tabIndex:"0",onClick:function(){return e.props.onButtonClick()},onKeyPress:function(t){return A(t,e.props.onButtonClick)}}),this.props.children)}}]),n}(c.a.Component);ht.propTypes={onButtonClick:C.a.func,buttonProps:C.a.object,type:C.a.string};var mt=ht;n(82);function yt(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var gt=function(e){y()(n,e);var t=yt(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"closeModal",(function(){document.getElementById(r.props.appElementId).removeAttribute("aria-hidden"),r.props.onClose()})),r}return s()(n,[{key:"render",value:function(){var e=this,t={className:"h5p-hub-lightbox-close","aria-label":B.get("close")};return c.a.createElement(ke.a,{isOpen:!0,onRequestClose:this.closeModal,contentLabel:this.props.label,className:"h5p-hub-lightbox-inner ".concat(this.props.className),overlayClassName:"h5p-hub-lightbox",aria:this.props.aria,appElement:document.getElementById(this.props.appElementId),parentSelector:function(){return document.getElementById(e.props.parentId)}},c.a.createElement(mt,{buttonProps:t,onButtonClick:this.closeModal}),this.props.children)}}]),n}(c.a.Component);gt.propTypes={onClose:C.a.func.isRequired,aria:C.a.shape({label:C.a.string,labelledby:C.a.string,describedby:C.a.string}),className:C.a.string.isRequired,parentId:C.a.string.isRequired,appElementId:C.a.string.isRequired};var bt=gt;n(83);function vt(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var wt=function(e){y()(n,e);var t=vt(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"onWindowResized",(function(){if(r.carousel){for(var e=r.carousel.offsetWidth,t=5,n=0;n<Mt.length;n++)if(e<Mt[n].breakpoint){t=Mt[n].imagesToShow;break}r.state.imagesToShow!=t&&r.setState({imagesToShow:t,offset:0,selected:0})}})),L()(h()(r),"handleImageSelected",(function(e){r.props.onImageSelect&&r.props.onImageSelect(e)})),L()(h()(r),"previousSlide",(function(){r.setState((function(e){var t=e.offset-1;if(t>=0)return{offset:t,selected:t}}))})),L()(h()(r),"nextSlide",(function(){r.setState((function(e,t){var n=e.offset+1;if(n<t.images.length)return{offset:n,selected:n}}))})),L()(h()(r),"handleGlobalKeyDown",(function(e){39===e.which?r.nextSlide():37===e.which&&r.previousSlide()})),r.state={imagesToShow:r.props.imagesToShow||5,offset:r.props.selected||0,selected:r.props.selected||0,modalIsOpen:!1,focusOnRender:!1},r}return s()(n,[{key:"componentDidMount",value:function(){this.props.imagesToShow||window.addEventListener("resize",this.onWindowResized)}},{key:"componentWillUnmount",value:function(){this.props.imagesToShow||window.removeEventListener("resize",this.onWindowResized)}},{key:"shouldComponentUpdate",value:function(e,t){return!(this.state.focusOnRender&&!t.focusOnRender)}},{key:"moveFocus",value:function(e){var t=this;this.setState((function(n){var r=n.selected+e;if(r>=0&&r<t.props.images.length){var a=n.offset;return r<n.offset?a=n.offset-1:r>=n.offset+n.imagesToShow&&(a=n.offset+1),{selected:r,focusOnRender:!0,offset:a}}}))}},{key:"componentWillReceiveProps",value:function(e){this.setState({selected:e.selected||0,offset:0})}},{key:"componentDidUpdate",value:function(){this.state.focusOnRender&&(this.items[this.state.selected].focus(),this.scroller.scrollLeft=0,this.setState({focusOnRender:!1}))}},{key:"handleKeyDown",value:function(e,t){if(!e.defaultPrevented){var n=!1;switch(e.which){case 37:case 38:this.moveFocus(-1),n=!0;break;case 39:case 40:this.moveFocus(1),n=!0;break;case 32:case 13:this.handleImageSelected(t),n=!0}n&&(e.stopPropagation(),e.preventDefault())}}},{key:"render",value:function(){var e=this,t=this.props.images;if(!t||!t.length)return null;var n=this.state.imagesToShow,r=t.length,a={width:100/r+"%"},i=100*r/n,o={width:"".concat(i,"%"),marginLeft:"-".concat(this.state.offset*(i/r),"%")};this.items=[];var l=t.map((function(t,n){return c.a.createElement("li",{key:n,style:a,tabIndex:n===e.state.selected?0:-1,onKeyDown:function(t){return e.handleKeyDown(t,n)},onClick:function(){return e.handleImageSelected(n)},ref:function(t){return t?e.items.push(t):void 0}},c.a.createElement("img",{src:t.url,alt:t.alt,className:e.props.onImageSelect?"h5p-hub-selectable":""}))})),s=0===this.state.offset,u=this.state.imagesToShow+this.state.offset>=r,f=r>this.state.imagesToShow;return c.a.createElement("div",{className:"h5p-hub-carousel",role:"region","aria-label":B.get("screenshots"),ref:function(t){return e.carousel=t},onKeyDown:this.handleGlobalKeyDown},f&&c.a.createElement(Lt,{type:"prev",label:B.get("previousImage"),onClick:this.previousSlide,disabled:s}),c.a.createElement("nav",{className:"h5p-hub-scroller",ref:function(t){return e.scroller=t}},c.a.createElement("ul",{style:o,onTransitionEnd:O},l)),f&&c.a.createElement(Lt,{type:"next",label:B.get("nextImage"),onClick:this.nextSlide,disabled:u}),this.props.showProgress&&c.a.createElement("div",{className:"h5p-hub-progress",role:"alert"},B.get("imageLightBoxProgress").replace(":num",this.state.offset+1).replace(":total",r)))}}]),n}(c.a.Component),Mt=[{breakpoint:576,imagesToShow:2},{breakpoint:768,imagesToShow:3},{breakpoint:992,imagesToShow:4}],Lt=function(e){var t=e.onClick,n=e.type,r=e.disabled,a=e.label;return c.a.createElement("button",{className:"h5p-hub-navigation h5p-hub-"+n,"aria-disabled":r,"aria-label":a,disabled:r,onClick:t})};wt.propTypes={onImageSelect:C.a.func,imagesToShow:C.a.number,showProgress:C.a.bool.isRequired,selected:C.a.number,images:C.a.arrayOf(C.a.shape({url:I,alt:I})).isRequired};var Et=wt;n(84);function Ct(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var xt=function(e){y()(n,e);var t=Ct(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"handleToggle",(function(e){e.preventDefault(),r.setState({expanded:!r.state.expanded})})),L()(h()(r),"handleKeyPress",(function(e){32===e.which&&r.handleToggle(e)})),r.state={expanded:!1},r}return s()(n,[{key:"render",value:function(){var e=this.props.text;if(!e)return null;var t=e.length>this.props.maxLength,n=t?e.substr(0,this.props.maxLength):e,r=t?e.substr(this.props.maxLength):"";return t&&!this.state.expanded&&(n+="…"),c.a.createElement("p",{className:"small h5p-read-more"},c.a.createElement("span",{tabIndex:"-1"},n),t&&[c.a.createElement("span",{key:"part-two",tabIndex:"-1",className:this.state.expanded?"":"h5p-hub-hidden"},r),c.a.createElement("a",{href:"#",key:"button",className:"h5p-hub-link "+(this.state.expanded?"h5p-hub-read-less":"h5p-hub-read-more"),onClick:this.handleToggle,onKeyPress:this.handleKeyPress},B.get(this.state.expanded?"readLess":"readMore"))])}}]),n}(c.a.Component);n(85);function St(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var Tt=function(e){y()(n,e);var t=St(n);function n(e){var r;return o()(this,n),(r=t.call(this,e)).state={expanded:e.expanded},r}return s()(n,[{key:"handleToggle",value:function(e){this.setState({expanded:this.state.expanded===e.props.id?void 0:e.props.id})}},{key:"render",value:function(){var e=this,t=c.a.Children.map(this.props.children,(function(t){var n={className:"h5p-hub-accordion-toggler","aria-expanded":e.state.expanded===t.props.id};return c.a.createElement("div",null,c.a.createElement("dt",{"aria-level":"2",role:"heading",className:"h5p-hub-accordion-heading"},c.a.createElement(mt,{buttonProps:n,onButtonClick:function(){return e.handleToggle(t)}},c.a.createElement("span",{className:"h5p-hub-icon-accordion-arrow"}),c.a.createElement("span",null,t.props.header))),c.a.createElement("dl",{role:"region",className:"h5p-hub-accordion-region"+(e.state.expanded==t.props.id?"":" hidden")},c.a.createElement("div",{className:"h5p-hub-panel-body"},t)))}));return c.a.createElement("dl",{className:"h5p-hub-accordion"},t)}}]),n}(c.a.Component),Nt=(n(86),function(e){var t=e.content,n=e.licenseInfo;return c.a.createElement(Tt,null,n,c.a.createElement("div",{header:B.get("contentPublisherPanelHeader"),className:"h5p-hub-publisher-info"},c.a.createElement("h3",{className:"h5p-hub-publisher-name"},t.publisher.name),c.a.createElement("img",{className:"h5p-hub-publisher-image",src:t.publisher.logo}),c.a.createElement("div",{className:"h5p-hub-publisher-description"},t.publisher.description)))});Nt.propTypes={content:_,licenseInfo:C.a.element};var jt=Nt,Dt=(n(87),function(e){var t=e.id,n=xe.getLicense(t);return c.a.createElement("div",null,c.a.createElement("div",{className:"h5p-hub-modal-header"},B.get("licenseModalTitle")),c.a.createElement("div",{className:"h5p-hub-modal-content"},c.a.createElement("h5",{id:"h5p-hub-license-details-id",className:"h5p-hub-modal-title"},t),c.a.createElement(X.b,{promise:n()},c.a.createElement(X.b.Pending,null,c.a.createElement("div",{id:"h5p-hub-license-details-description",className:"h5p-hub-loading"})),c.a.createElement(X.b.Fulfilled,null,(function(e){return c.a.createElement("div",{id:"h5p-hub-license-details-description",dangerouslySetInnerHTML:{__html:e}})})))))});Dt.propTypes={id:C.a.string.isRequired};var kt=Dt,It=(n(88),function(e){var t=e.content;return c.a.createElement("ul",null,c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-owner",className:"h5p-hub-label"},B.get("by"),": "),c.a.createElement("span",{"aria-labelledby":"h5p-hub-info-list-owner",className:"h5p-hub-content"},t.owner)),c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-h5p-type",className:"h5p-hub-label"},B.get("h5pType")+": "),c.a.createElement("span",{"aria-labelledby":"h5p-hub-info-list-h5p-type",className:"h5p-hub-content"},t.h5pTitle)),c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-language",className:"h5p-hub-label"},B.get("language"),": "),c.a.createElement("span",{"aria-labelledby":"h5p-hub-info-list-language",className:"h5p-hub-content"},t.language)),t.disciplines&&t.disciplines.length?c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-discipline",className:"h5p-hub-label h5p-hub-capitalize"},B.get("in"),":"),c.a.createElement("span",{"aria-labelledby":"h5p-hub-info-list-discipline",className:"h5p-hub-content"},t.disciplines)):null,t.level&&c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-level",className:"h5p-hub-label"},B.get("level"),": "),c.a.createElement("span",{className:"h5p-hub-content h5p-hub-capitalize","aria-labelledby":"h5p-hub-info-list-level"},t.level)),c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-size",className:"h5p-hub-label"},B.get("size"),": "),c.a.createElement("span",{"aria-labelledby":"h5p-hub-info-list-size",className:"h5p-hub-content"},t.filesize)),t.age&&c.a.createElement("li",null,c.a.createElement("span",{id:"h5p-hub-info-list-age",className:"h5p-hub-label"},B.get("age"),": "),c.a.createElement("span",{className:"h5p-hub-content","aria-labelledby":"h5p-hub-info-list-age"},t.age)))});It.propTypes={content:_};var Ot=It,At=(n(89),function(e){var t=e.id,n=e.version,r=e.onShowLicenseDetails,a=e.attributes,i=e.licenseDetailsUrl;return c.a.createElement("div",{className:"h5p-hub-short-license-info"}," ","Unspecified"!==t?c.a.createElement(c.a.Fragment,null,c.a.createElement("h3",null,"".concat(t," ").concat(n||"")),r?c.a.createElement("button",{type:"button",className:"h5p-hub-short-license-read-more","aria-label":B.get("readMore"),onClick:r}):i?c.a.createElement("a",{className:"h5p-hub-short-license-read-more","aria-label":B.get("readMore"),href:i,target:"_blank"}):null,c.a.createElement("p",null,B.get("licenseDescription")),c.a.createElement("ul",{className:"h5p-hub-ul h5p-hub-small"},void 0!==a.canHoldLiable&&c.a.createElement("li",null,B.get(a.canHoldLiable?"licenseCanHoldLiable":"licenseCannotHoldLiable")),a.useCommercially&&c.a.createElement("li",null,B.get("licenseCanUseCommercially")),a.modifiable&&c.a.createElement("li",null,B.get("licenseCanModify")),a.distributable&&c.a.createElement("li",null,B.get("licenseCanDistribute")),a.sublicensable&&c.a.createElement("li",null,B.get("licenseCanSublicense")),a.mustIncludeCopyright&&c.a.createElement("li",null,B.get("licenseMustIncludeCopyright")),a.mustIncludeLicense&&c.a.createElement("li",null,B.get("licenseMustIncludeLicense")))):c.a.createElement("p",null,B.get("licenseUnspecified")))});At.propTypes={id:C.a.string.isRequired,version:C.a.string,onShowLicenseDetails:C.a.func,attributes:C.a.shape({canHoldLiable:C.a.bool,useCommercially:C.a.bool,modifiable:C.a.bool,distributable:C.a.bool,sublicensable:C.a.bool,mustIncludeCopyright:C.a.bool,mustIncludeLicense:C.a.bool}),licenseDetailsUrl:C.a.string};var Pt=At;function Rt(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var zt=function(e){y()(n,e);var t=Rt(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"onTransitionEnd",(function(){r.state.visible?r.focusSet||(r.focusSet=!0,r.title.focus()):r.props.onClose()})),L()(h()(r),"onImageSelect",(function(e){r.setState({modalType:"screenshots",selectedScreenshot:e})})),L()(h()(r),"onModalClose",(function(){r.setState({modalType:void 0,licenseDetails:void 0})})),L()(h()(r),"handleClose",(function(e){e.preventDefault(),r.props.onDismissMessage(),r.props.aboutToClose(),r.setState({visible:!1})})),L()(h()(r),"handleBackKeyPress",(function(e){32===e.which&&r.handleClose(e)})),L()(h()(r),"componentDidMount",(function(){setTimeout((function(){r.setState({visible:!0})}),1),window.addEventListener("resize",r.resize),xe.licenses.then((function(e){var t=e.reduce(U,{}),n=r.props.content.license.version?t["".concat(r.props.content.license.id,"-").concat(r.props.content.license.version)]:t[r.props.content.license.id];r.setState({licenseDetailsUrl:n.url})}))})),L()(h()(r),"resize",(function(){r.setState({screenWidth:document.documentElement.clientWidth})})),r.state={visible:!1,selectedScreenshot:0,modalType:void 0,showImageSlider:!0,message:void 0,screenWidth:document.documentElement.clientWidth},r.focusSet=!1,r.screenSmall=parseInt(ae.a.screenSmall),r}return s()(n,[{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"render",value:function(){var e=this,t="h5p-hub-content-detail"+(this.state.visible?" h5p-hub-show":""),n="h5p-hub-content-detail-view-title",r=this.props.content,a={},i=function(){return a.label=B.get("imageLightboxTitle"),"screenshots"===e.state.modalType?c.a.createElement(Et,{images:R(r.screenshots),imagesToShow:1,showProgress:!0,selected:e.state.selectedScreenshot}):"license"===e.state.modalType?(a.labelledby="h5p-hub-license-details-id",a.describedby="h5p-hub-license-details-description",c.a.createElement(kt,{id:r.license.id})):void 0};return c.a.createElement("div",{className:t,role:"region",tabIndex:"-1","aria-labelledby":n,onTransitionEnd:this.onTransitionEnd},c.a.createElement("a",{href:"#",className:"h5p-hub-back-button h5p-hub-icon-arrow-thin","aria-label":B.get("contentTypeBackButtonLabel"),onClick:this.handleClose,onKeyPress:this.handleBackKeyPress}),c.a.createElement("div",{className:"h5p-hub-container"},c.a.createElement("div",{className:"h5p-hub-image-wrapper"},c.a.createElement(fe,{src:r.icon,className:"h5p-hub-img-responsive"})),c.a.createElement("div",{className:"h5p-hub-text-details"},c.a.createElement("h2",{id:n,className:"h5p-hub-title ".concat(r.reviewed?"h5p-hub-reviewed":""),tabIndex:"-1",ref:function(t){return e.title=t}},r.title),c.a.createElement("div",{className:"h5p-hub-info-list"},c.a.createElement(Ot,{content:this.props.content})),c.a.createElement(xt,{text:r.description,maxLength:285}),r.preview_url&&c.a.createElement("a",{className:"h5p-hub-button h5p-hub-demo-button",target:"_blank",href:r.preview_url},B.get("contentPreviewButtonLabel"))),c.a.createElement("div",{className:"h5p-hub-info-list"},c.a.createElement(Ot,{content:this.props.content}))),this.state.showImageSlider&&r.screenshots&&c.a.createElement(Et,{images:R(r.screenshots),onImageSelect:this.onImageSelect,showProgress:!1,selected:this.state.selectedScreenshot}),c.a.createElement("hr",null),this.props.message,c.a.createElement("div",{className:"h5p-hub-button-bar"},c.a.createElement("button",{type:"button",className:"h5p-hub-button h5p-hub-button-orange h5p-hub-button-inverse-primary h5p-hub-button-download-content",onClick:function(){return e.props.onDownload(r)}},B.get("contentDownloadButtonLabel"))),c.a.createElement(jt,{content:r,licenseInfo:c.a.createElement(Pt,{header:B.get("contentTypeLicensePanelTitle"),id:r.license.id,version:r.license.version,licenseDetailsUrl:this.state.licenseDetailsUrl,attributes:{useCommercially:r.license.allows_commercial_use,modifiable:r.license.can_be_modified}})}),void 0!==this.state.modalType&&c.a.createElement(bt,{onClose:this.onModalClose,className:this.state.modalType?"h5p-hub-"+this.state.modalType:"",aria:a,parentId:"h5p-hub",appElementId:"h5p-hub-panel"},c.a.createElement(i,null)))}}]),n}(c.a.Component);zt.propTypes={onDownload:C.a.func.isRequired,onClose:C.a.func.isRequired,aboutToClose:C.a.func.isRequired,content:_,message:C.a.node,onDismissMessage:C.a.func.isRequired};var _t=zt,Ft=n(29),Ut=n.n(Ft);n(90);function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Wt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw i}}}}function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vt(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var qt=function(e){y()(n,e);var t=Vt(n);function n(e){var r;o()(this,n),r=t.call(this,e),L()(h()(r),"handlePageChange",(function(e,t){t!==r.state.page&&r.setState({page:t,focusOnRender:e})})),L()(h()(r),"scrollToSearchResults",(function(){r.reuseContentResultRef.current.scrollTo?r.reuseContentResultRef.current.scrollTo({left:0,top:0,behavior:"smooth"}):r.reuseContentResultRef.current.focus()})),L()(h()(r),"handleOrderBy",(function(e){e!==r.state.orderBy&&r.setState({orderBy:e})})),L()(h()(r),"handleSearch",(function(e){e!==r.state.query&&r.setState({query:e})})),L()(h()(r),"applyFilters",(function(e){F(r.state.appliedFilters,e)||r.setState({appliedFilters:e})})),L()(h()(r),"showContentDetails",(function(e,t){r.setState({detailViewVisible:!0,contentListVisible:!1,content:e,focused:t})})),L()(h()(r),"closeContentDetails",(function(){r.setState((function(e){return{contentListVisible:!0,setFocus:!e.setFocus}}))})),L()(h()(r),"showAllOrderedBy",(function(e){var t={};r.clearFilterExceptions.forEach((function(e){t[e]=r.state.appliedFilters[e]})),r.setState({orderBy:e,appliedFilters:t,selectedFilters:t,query:"",page:1})})),L()(h()(r),"showMessage",(function(e,t,n){var a={title:e,message:t,severity:n,onClose:function(){return r.clearMessage()}};r.setState({message:c.a.createElement(Ae,a)})})),L()(h()(r),"clearMessage",(function(){r.setState({message:null})})),L()(h()(r),"getFriendlyMessage",(function(e){var t=B.get("downloadFailed"),n=B.get("somethingWentWrongTryAgain");if(e instanceof TypeError)n=B.get("contentHubConnectionFailed");else if(Array.isArray(e.message)){var r,a=!1,i=Yt(e.message);try{for(i.s();!(r=i.n()).done;){if("missing-required-library"===r.value.code){a=!0;break}}}catch(e){i.e(e)}finally{i.f()}a&&(t=B.get("downloadFailedMissingLibrariesTitle"),n="\n <p>".concat(B.get("downloadFailedMissingLibrariesMessage"),'</p>\n <ul class="h5p-hub-message-item-list">\n ').concat(e.message.map((function(e){return"<li>".concat(e.message,"</li>")})).join("\n"),"\n </ul>\n "))}return{title:t,message:n,severity:"error"}})),L()(h()(r),"handleDownload",(function(e){r.setState({downloading:!0},(function(){Q(r.props.getAjaxUrl("get-content",{hubId:e.id}),"").then((function(e){r.props.onDownload(e.data,"reuse")})).catch((function(e){var t=r.getFriendlyMessage(e),n=t.title,a=t.message,i=t.severity;r.showMessage(n,a,i)})).finally((function(){return r.setState({downloading:!1})}))}))})),L()(h()(r),"getH5PTitle",(function(e){if(r.state.metaData.flatContentTypes){var t=r.state.metaData.flatContentTypes.filter((function(t){return t.id.split(" ")[0]===e.split(" ")[0]}));if(t.length>0)return t[0].label}return e})),L()(h()(r),"getLabel",(function(e,t){if(r.state.metaData[t]){var n=r.state.metaData[t].filter((function(t){return t.id===e}));if(n.length>0&&null!==n[0].translation)return n[0].translation}return e})),L()(h()(r),"setChecked",(function(e){r.setState({selectedFilters:e})})),r.state={page:1,orderBy:"popular",appliedFilters:{reviewed:["reviewed"]},hasSearchResults:!1,contentListVisible:!0,detailViewVisible:!1,focusOnRender:!1,focused:"",setFocus:!1,failedDataFetch:{},metaData:{},initialized:!1,downloading:!1,selectedFilters:{reviewed:["reviewed"]}},r.orderBySettings=[{id:"popular",text:B.get("popularFirst")},{id:"newest",text:B.get("newestFirst")}];var a=B.get("filters");return r.reviewedFilter=[{id:"reviewed",label:a.reviewed.optionLabel}],r.licenseFilter=[{id:"modified",label:a.licenses.options.modified},{id:"commercial",label:a.licenses.options.commercial}],r.metaData=[{id:"disciplines",promise:xe.disciplines},{id:"contentTypes",promise:xe.contentTypes},{id:"language",promise:xe.languages},{id:"level",promise:xe.levels},{id:"flatDisciplines",promise:xe.flatDisciplines},{id:"flatContentTypes",promise:xe.flatContentTypes}],r.metaData.forEach((function(e){e.promise.then((function(t){r.setState({metaData:Qt(Qt({},r.state.metaData),{},L()({},e.id,t))})}),(function(){r.setState({failedDataFetch:Qt(Qt({},r.state.failedDataFetch),{},L()({},e.id,!0))})}))})),r.filters=[{id:"disciplines",dictionary:a.disciplines,type:"categorySearch"},{id:"contentTypes",dictionary:a.contentTypes,type:"search"},{id:"license",dictionary:a.licenses,type:"checkboxList"},{id:"language",dictionary:a.language,type:"search"},{id:"level",dictionary:a.level,type:"checkboxList"},{id:"reviewed",dictionary:a.reviewed,type:"checkboxList"}],r.reuseContentResultRef=c.a.createRef(),r.clearFilterExceptions=["reviewed"],r}return s()(n,[{key:"componentDidUpdate",value:function(e,t){!this.state.initialized&&this.props.isVisible&&this.setState({newContent:xe.search({orderBy:"newest",limit:6,filters:this.state.appliedFilters}),popularContent:xe.search({orderBy:"popularity",limit:6,filters:this.state.appliedFilters}),search:xe.search({filters:this.state.appliedFilters}),initialized:!0});var n=t.orderBy!==this.state.orderBy||t.query!==this.state.query||!F(t.appliedFilters,this.state.appliedFilters);(n||t.page!==this.state.page)&&(this.setState({detailViewVisible:!1,contentListVisible:!0,focused:"",setFocus:!0,search:xe.search({query:this.state.query,filters:this.state.appliedFilters,orderBy:this.state.orderBy,page:n?1:this.state.page})}),this.scrollToSearchResults())}},{key:"render",value:function(){var e=this,t=this.state.initialized&&(this.state.query||"popular"!==this.state.orderBy),n=this.state.initialized&&(this.state.query||"newest"!==this.state.orderBy),r=B.get("contentDownloadButtonDownloadingLabel");return c.a.createElement("div",{id:"h5p-hub-reuse-view"},this.state.downloading&&c.a.createElement(ut,{label:r}),c.a.createElement(dt,{placeholder:B.get("contentSearchFieldPlaceholder"),onSearch:this.handleSearch,value:this.state.query,setFocus:this.props.isVisible}),c.a.createElement(lt,{label:B.get("filterBy"),filters:this.filters,applyFilters:this.applyFilters,checked:this.state.selectedFilters,setChecked:this.setChecked,metaData:Qt(Qt({},this.state.metaData),{},{license:this.licenseFilter,reviewed:this.reviewedFilter}),failedDataFetch:this.state.failedDataFetch,clearFilterExceptions:this.clearFilterExceptions}),c.a.createElement("div",{className:"h5p-hub-reuse-content-container",id:"h5p-hub-reuse-content-container"},c.a.createElement("div",{className:this.state.contentListVisible?"":"h5p-hub-content-list-hidden"},c.a.createElement(Me,{searchPromise:this.state.search,selected:this.state.orderBy,onChange:this.handleOrderBy,headerLabel:B.get("contentSectionAll"),visible:this.state.contentListVisible,orderVariables:this.orderBySettings}),c.a.createElement("div",{className:"h5p-hub-reuse-content-result",ref:this.reuseContentResultRef},this.state.initialized&&c.a.createElement(ve,{itemsPromise:this.state.search,onSelect:this.showContentDetails,visible:this.state.contentListVisible,handlePageChange:this.handlePageChange,focused:this.state.focused,setFocus:this.state.setFocus,title:B.get("contentSectionAll")}),c.a.createElement(X.a,{promiseFn:this.state.search},c.a.createElement(X.a.Fulfilled,null,(function(e){return c.a.createElement($,{tutorialUrl:e.numResults?"https://h5p.org/documentation/for-authors/tutorials":null,suggestionText:B.get(e.numResults?"noContentSuggestion":"noContentFoundDesc"),headerText:B.get(e.numResults?"noContentHeader":"noResultsFound")})}))),t&&c.a.createElement(Te,{itemsPromise:this.state.popularContent,title:B.get("popularContent"),actionLabel:B.get("allPopular"),onAction:function(){return e.showAllOrderedBy("popular")},onSelect:this.showContentDetails,focused:this.state.focused,setFocus:this.state.setFocus}),n&&c.a.createElement(Te,{itemsPromise:this.state.newContent,title:B.get("newOnTheHub"),actionLabel:B.get("allNew"),onAction:function(){return e.showAllOrderedBy("newest")},onSelect:this.showContentDetails,focused:this.state.focused,setFocus:this.state.setFocus}))),this.state.detailViewVisible&&c.a.createElement(_t,{content:Qt(Qt({},this.state.content),{},{h5pTitle:this.getH5PTitle(this.state.content.content_type),language:this.getLabel(this.state.content.language,"language"),disciplines:this.state.content.disciplines.map((function(t,n,r){return e.getLabel(t,"flatDisciplines")+(r.length-1!==n?", ":"")})),level:this.getLabel(this.state.content.level,"level"),filesize:Ut()(this.state.content.size)}),downloading:this.state.downloading,message:this.state.message,onDismissMessage:this.clearMessage,onDownload:this.handleDownload,aboutToClose:function(){return e.closeContentDetails()},onClose:function(){return e.setState({detailViewVisible:!1})}})))}}]),n}(c.a.Component);qt.propTypes={title:C.a.string.isRequired,isVisible:C.a.bool};var Ht=qt,Gt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgMjI1Ij4NCiAgPGRlZnM+DQogICAgPHN0eWxlPg0KICAgICAgLmNscy0xIHsNCiAgICAgIGZpbGw6IG5vbmU7DQogICAgICB9DQoNCiAgICAgIC5jbHMtMiB7DQogICAgICBmaWxsOiAjYzZjNmM3Ow0KICAgICAgfQ0KDQogICAgICAuY2xzLTMsIC5jbHMtNCB7DQogICAgICBmaWxsOiAjZmZmOw0KICAgICAgfQ0KDQogICAgICAuY2xzLTMgew0KICAgICAgb3BhY2l0eTogMC43Ow0KICAgICAgfQ0KICAgIDwvc3R5bGU+DQogIDwvZGVmcz4NCiAgPHRpdGxlPmNvbnRlbnQgdHlwZSBwbGFjZWhvbGRlcl8yPC90aXRsZT4NCiAgPGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+DQogICAgPGcgaWQ9ImNvbnRlbnRfdHlwZV9wbGFjZWhvbGRlci0xX2NvcHkiIGRhdGEtbmFtZT0iY29udGVudCB0eXBlIHBsYWNlaG9sZGVyLTEgY29weSI+DQogICAgICA8cmVjdCBjbGFzcz0iY2xzLTEiIHdpZHRoPSI0MDAiIGhlaWdodD0iMjI1Ii8+DQogICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjExMi41MSIgeT0iNDMuNDEiIHdpZHRoPSIxNzYuOTYiIGhlaWdodD0iMTM1LjQ1IiByeD0iMTAiIHJ5PSIxMCIvPg0KICAgICAgPGNpcmNsZSBjbGFzcz0iY2xzLTMiIGN4PSIxMzYuNjYiIGN5PSI2MS45OCIgcj0iNC44MSIvPg0KICAgICAgPGNpcmNsZSBjbGFzcz0iY2xzLTMiIGN4PSIxNTEuNDkiIGN5PSI2MS45OCIgcj0iNC44MSIvPg0KICAgICAgPGNpcmNsZSBjbGFzcz0iY2xzLTMiIGN4PSIxNjYuMSIgY3k9IjYxLjk4IiByPSI0LjgxIi8+DQogICAgICA8ZyBpZD0iX0dyb3VwXyIgZGF0YS1uYW1lPSImbHQ7R3JvdXAmZ3Q7Ij4NCiAgICAgICAgPGcgaWQ9Il9Hcm91cF8yIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPg0KICAgICAgICAgIDxwYXRoIGlkPSJfQ29tcG91bmRfUGF0aF8iIGRhdGEtbmFtZT0iJmx0O0NvbXBvdW5kIFBhdGgmZ3Q7IiBjbGFzcz0iY2xzLTQiIGQ9Ik0yNjMuMjgsOTUuMjFDMjYwLDkyLjA3LDI1NSw5MS41LDI0OC40Myw5MS41SDIyN3Y4SDE5OS41bC0yLjE3LDEwLjI0YTI1Ljg0LDI1Ljg0LDAsMCwxLDExLjQ4LTEuNjMsMTkuOTMsMTkuOTMsMCwwLDEsMTQuMzksNS41NywxOC4yNiwxOC4yNiwwLDAsMSw1LjUyLDEzLjYsMjMuMTEsMjMuMTEsMCwwLDEtMi44NCwxMS4wNSwxOC42NSwxOC42NSwwLDAsMS04LjA2LDcuNzksOSw5LDAsMCwxLTQuMTIsMS4zN0gyMzZ2LTIxaDEwLjQyYzcuMzYsMCwxMi44My0xLjYxLDE2LjQyLTVzNS4zOC03LjQ4LDUuMzgtMTMuNDRDMjY4LjIyLDEwMi4yOSwyNjYuNTcsOTguMzUsMjYzLjI4LDk1LjIxWm0tMTUsMTdjLTEuNDIsMS4yMi0zLjksMS4yNS03LjQxLDEuMjVIMjM2di0xNGg1LjYyYTkuNTcsOS41NywwLDAsMSw3LDIuOTMsNy4wNSw3LjA1LDAsMCwxLDEuODUsNC45MkE2LjMzLDYuMzMsMCwwLDEsMjQ4LjMxLDExMi4yNVoiLz4NCiAgICAgICAgICA8cGF0aCBpZD0iX1BhdGhfIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy00IiBkPSJNMjAyLjksMTE5LjExYTguMTIsOC4xMiwwLDAsMC03LjI4LDQuNTJsLTE2LTEuMjIsNy4yMi0zMC45MkgxNzR2MjJIMTUzdi0yMkgxMzZ2NTZoMTd2LTIxaDIxdjIxaDIwLjMxYy0yLjcyLDAtNS0xLjUzLTctM2ExOS4xOSwxOS4xOSwwLDAsMS00LjczLTQuODMsMjMuNTgsMjMuNTgsMCwwLDEtMy02LjZsMTYtMi4yNmE4LjExLDguMTEsMCwxLDAsNy4yNi0xMS43MloiLz4NCiAgICAgICAgPC9nPg0KICAgICAgPC9nPg0KICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxNzcuNjYiIHk9IjU3LjY2IiB3aWR0aD0iOTIuMjgiIGhlaWdodD0iOS4zOCIgcng9IjMuNSIgcnk9IjMuNSIvPg0KICAgIDwvZz4NCiAgPC9nPg0KPC9zdmc+DQo=";function Zt(e,t){var n=t.major>e.h5pMajorVersion||t.major===e.h5pMajorVersion&&t.minor>=e.h5pMinorVersion;return!e.isUpToDate&&e.installed&&e.canInstall&&n}n(91);var Kt=function(e){var t=e.contentType,n=e.apiVersion,r=e.tabindex,a=e.onSelect,i=t.title||t.machineName,o=Zt(t,n),l=function(e){a(t),e.preventDefault()},s=t.icons?t.icons.map((function(e,t){return c.a.createElement("img",{key:t,className:"h5p-hub-media-text-icon",src:e.src,alt:e.alt,title:e.alt})})):null;return c.a.createElement("div",null,c.a.createElement("div",{className:"h5p-hub-media-left"},c.a.createElement("img",{className:"h5p-hub-media-object",src:t.icon||Gt,alt:i+" "+B.get("contentTypeIconAltText")})),c.a.createElement("div",{className:"h5p-hub-media-body"},c.a.createElement("div",{className:"h4 h5p-hub-media-heading"},i),s,t.installed?c.a.createElement("button",{type:"button",className:"h5p-hub-button h5p-hub-button-primary",tabIndex:r,onClick:l,onKeyDown:function(e){13!==e.which&&32!==e.which||l(e)}},B.get("contentTypeDetailButtonLabel")):c.a.createElement("button",{type:"button",className:"h5p-hub-button h5p-hub-button-inverse-primary h5p-hub-button-install",tabIndex:r},B.get("contentTypeGetButtonLabel")),c.a.createElement("div",{className:"h5p-hub-content-type-update-info"+(o?"":" hidden")},B.get("contentTypeUpdateAvailable")),c.a.createElement("div",{className:"h5p-hub-description"},t.summary||"")))};Kt.propTypes={contentType:C.a.object.isRequired,apiVersion:C.a.object.isRequired,tabindex:C.a.number.isRequired,onSelect:C.a.func.isRequired};var Xt=Kt;n(92);function Jt(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var $t=function(e){y()(n,e);var t=Jt(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"getLibrary",(function(e){for(var t=0;t<r.props.contentTypes.length;t++){var n=r.props.contentTypes[t];if(n.machineName.toLocaleLowerCase().replace(".","-")===e.replace("h5p-hub-",""))return n}})),L()(h()(r),"handleFocus",(function(e){r.props.onFocus(r.getLibrary(e))})),L()(h()(r),"handleSelect",(function(e){var t=r.getLibrary(e);t.installed?r.props.onUse(t):(r.props.onSelect(t),r.props.onFocus(t))})),L()(h()(r),"scrollIntoView",(function(e){var t=r.choose.items[0].offsetTop;if(e.offsetTop-t<r.list.scrollTop)r.list.scrollTop=e.offsetTop-t;else{var n=e.offsetTop-t+e.clientHeight;if(n>r.list.scrollTop+r.list.clientHeight){var a=window.getComputedStyle(r.listElement);r.list.scrollTop=n-r.list.clientHeight+parseFloat(a.marginTop)+parseFloat(a.marginBottom)}}})),r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){e.contentTypes!==this.props.contentTypes&&this.setState({resetScroll:!0})}},{key:"componentDidUpdate",value:function(){if(this.state&&this.state.resetScroll)delete this.state.resetScroll,this.list.scrollTop=0;else if(this.props.focused&&this.choose&&this.choose.items)for(var e=this.props.focused.machineName.toLocaleLowerCase().replace(".","-"),t=0;t<this.choose.items.length;t++)if(e===this.choose.items[t].id){this.scrollIntoView(this.choose.items[t]);break}}},{key:"render",value:function(){var e=this,t=this.props.contentTypes.map((function(t,n){return c.a.createElement("li",{key:n,id:t.machineName.toLocaleLowerCase().replace(".","-"),className:"h5p-hub-media"},c.a.createElement(Xt,{contentType:t,apiVersion:e.props.apiVersion,tabindex:e.props.focused?e.props.focused===t?0:-1:0===n?0:-1,onSelect:e.props.onSelect}))}));return H5P.externalDispatcher.trigger("h5p-hub-content-types-render",{numContentTypes:this.props.contentTypes.length,contentTypeListClassName:"h5p-hub-content-type-list"}),c.a.createElement("div",{className:"h5p-hub-content-type-list","aria-hidden":!this.props.visible,ref:function(t){return e.list=t}},this.props.contentTypes.length?c.a.createElement("ol",{ref:function(t){return e.listElement=t}},c.a.createElement(H,{selected:this.props.focused?this.props.focused.machineName.toLocaleLowerCase().replace(".","-"):null,setFocus:this.props.setFocus,onChange:this.handleSelect,onFocus:this.handleFocus,ref:function(t){return e.choose=t}},t)):c.a.createElement("div",{className:"h5p-hub-no-results"},c.a.createElement("div",{className:"h5p-hub-no-results-title"},B.get("noResultsFound")),c.a.createElement("div",{className:"h5p-hub-no-results-desc"},B.get("noResultsFoundDesc"))))}}]),n}(c.a.Component);$t.propTypes={contentTypes:C.a.array.isRequired,apiVersion:C.a.object.isRequired,focused:C.a.object,visible:C.a.bool,setFocus:C.a.bool,onUse:C.a.func.isRequired,onSelect:C.a.func.isRequired,onFocus:C.a.func.isRequired};var en=$t,tn=(n(93),function(e){var t=e.id,n=e.attributes,r=e.onShowLicenseDetails;return c.a.createElement(Tt,null,c.a.createElement(Pt,{header:B.get("contentTypeLicensePanelTitle"),id:t,attributes:n,onShowLicenseDetails:r}))});tn.propTypes={id:C.a.string,onShowLicenseDetails:C.a.func,attributes:C.a.shape({canHoldLiable:C.a.bool,useCommercially:C.a.bool,modifiable:C.a.bool,distributable:C.a.bool,sublicensable:C.a.bool,mustIncludeCopyright:C.a.bool,mustIncludeLicense:C.a.bool})};var nn=tn;n(94);function rn(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var an=function(e){y()(n,e);var t=rn(n);function n(e){var r;return o()(this,n),(r=t.call(this,e)).state={focusOnRender:!0},r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){e.opened!==this.props.opened&&this.setState({focusOnRender:!0})}},{key:"shouldComponentUpdate",value:function(e,t){return this.state===t}},{key:"componentDidUpdate",value:function(){this.state.focusOnRender&&(this.useButton?this.useButton.focus():this.installButton.focus()),delete this.state.focusOnRender}},{key:"render",value:function(){var e,t=this,n=!1,r=this.props.installed&&!this.props.installing;return this.props.installed&&this.props.updatable?(e=this.props.installing?"Updating":"Update",n=this.props.installing):this.props.installed||(e=this.props.installing?"Installing":"Install",n=this.props.installing),c.a.createElement("div",{className:"h5p-hub-content-type-detail-button-bar"},e&&c.a.createElement("button",{type:"button",className:"h5p-hub-button h5p-hub-button-inverse-primary h5p-hub-button-".concat(e.toLowerCase()),disabled:n,onClick:this.props.installing?void 0:this.props.onInstall,ref:function(e){return t.installButton=e}},B.get("contentType".concat(e,"ButtonLabel"))),r&&c.a.createElement("button",{type:"button",className:"h5p-hub-button h5p-hub-button-primary",onClick:this.props.onUse,ref:function(e){return t.useButton=e}},B.get("contentTypeUseButtonLabel")))}}]),n}(c.a.Component);an.propTypes={canInstall:C.a.bool.isRequired,installed:C.a.bool.isRequired,installing:C.a.bool.isRequired,updatable:C.a.bool.isRequired,onInstall:C.a.func.isRequired,onUse:C.a.func.isRequired,opened:C.a.bool.isRequired};var on=an;n(95);function ln(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var sn={},un=function(e){y()(n,e);var t=ln(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"onTransitionEnd",(function(){!r.state.visible&&r.state.showImageSlider?r.setState({showImageSlider:!1}):r.state.visible&&r.setState({focusUseButton:r.state.visible})})),L()(h()(r),"onImageSelect",(function(e){r.setState({modalType:"screenshots",selectedScreenshot:e})})),L()(h()(r),"onModalClose",(function(){r.setState({modalType:void 0,licenseDetails:void 0})})),L()(h()(r),"handleInstall",(function(){r.setState({installing:!0,errorMessage:null,infoMessage:null}),Q(r.props.getAjaxUrl("library-install",{id:r.props.library.machineName}),"").then((function(e){r.props.onInstall(e.data);var t=r.props.installed?"contentTypeUpdateSuccess":"contentTypeInstallSuccess",n=r.props.library.title||r.props.library.machineName;r.setState({installed:!0,installing:!1,infoMessage:{title:B.get(t,{":contentType":n}),message:e.data.details}})})).catch((function(e){r.setState({updating:!1,installing:!1,errorMessage:e})}))})),L()(h()(r),"handleClose",(function(e){e.preventDefault(),r.props.onClose()})),L()(h()(r),"handleUse",(function(){r.props.onUse(r.props.library)})),L()(h()(r),"handleShowLicenseDetails",(function(){var e=r.props.library.license.id,t=sn[e];t?r.setState({licenseDetails:t}):fetch("https://api.h5p.org/v1/licenses/".concat(r.props.library.license.id)).then((function(e){return e.json()})).then((function(n){t=!1===n.success?B.get("licenseFetchDetailsFailed"):sn[e]=n.description.replace(":owner",r.props.library.owner).replace(":year",(new Date).getFullYear()),r.setState({licenseDetails:t})})).catch((function(){r.setState({licenseDetails:B.get("licenseFetchDetailsFailed")})})),r.setState({modalType:"license"})})),L()(h()(r),"handleErrorDismiss",(function(){r.setState({errorMessage:null})})),L()(h()(r),"handleInfoDismiss",(function(){r.setState({infoMessage:null})})),L()(h()(r),"handleBackKeyPress",(function(e){32===e.which&&r.handleClose(e)})),L()(h()(r),"openExampleUrl",(function(){window.open(r.props.library.example,"_blank")})),r.state={visible:!1,selectedScreenshot:0,modalType:void 0,installed:!1,canInstall:!1,updatable:!1,installing:!1,showImageSlider:!0,message:void 0,opened:!1},r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){e.library&&(this.props.library!==e.library&&this.setState({errorMessage:null,infoMessage:null}),!this.props.visible&&e.visible?this.setState({opened:!0}):this.setState({opened:!1}),this.setState({installed:e.library.installed,canInstall:e.library.canInstall,updatable:Zt(e.library,e.apiVersion),installing:!1,visible:e.visible,showImageSlider:!0}))}},{key:"render",value:function(){var e=this,t="h5p-hub-content-type-detail"+(this.state.visible?" h5p-hub-show":""),n="h5p-hub-content-type-detail-view-title";if(!this.props.library)return c.a.createElement("div",{className:t});var r=function(){return"screenshots"===e.state.modalType?c.a.createElement(Et,{images:e.props.library.screenshots,imagesToShow:1,showProgress:!0,selected:e.state.selectedScreenshot}):"license"===e.state.modalType?c.a.createElement("div",null,c.a.createElement("div",{className:"h5p-hub-modal-header"},B.get("licenseModalTitle")),c.a.createElement("div",{className:"h5p-hub-modal-content"},c.a.createElement("h5",{id:"h5p-hub-license-details-id",className:"h5p-hub-modal-title"},e.props.library.license.id),c.a.createElement("div",{id:"h5p-hub-license-details-description",className:e.state.licenseDetails?void 0:"h5p-hub-loading",dangerouslySetInnerHTML:{__html:e.state.licenseDetails}}))):null},i={};return"screenshots"===this.state.modalType&&(i.label=B.get("imageLightboxTitle")),"license"===this.state.modalType&&this.state.licenseDetails&&(i.labelledby="h5p-hub-license-details-id",i.describedby="h5p-hub-license-details-description"),c.a.createElement("div",{className:t,role:"region",tabIndex:"-1","aria-labelledby":n,onTransitionEnd:this.onTransitionEnd},c.a.createElement("a",{href:"#",className:"h5p-hub-back-button h5p-hub-icon-arrow-thin","aria-label":B.get("contentTypeBackButtonLabel"),onClick:this.handleClose,onKeyPress:this.handleBackKeyPress}),c.a.createElement("div",{className:"h5p-hub-container"},c.a.createElement("div",{className:"h5p-hub-image-wrapper"},c.a.createElement("img",{className:"h5p-hub-img-responsive",src:this.props.library.icon||Gt})),c.a.createElement("div",{className:"h5p-hub-text-details"},c.a.createElement("h2",{id:n,className:"h5p-hub-title",tabIndex:"-1"},this.props.library.title||this.props.library.machineName),c.a.createElement("div",{className:"h5p-hub-owner"},this.props.library.owner),c.a.createElement(xt,{text:this.props.library.description,maxLength:285}),this.props.library.example&&c.a.createElement("a",{className:"h5p-hub-button h5p-hub-demo-button",target:"_blank",href:this.props.library.example||"#",onKeyPress:function(t){return A(t,e.openExampleUrl)}},B.get("contentTypeDemoButtonLabel")))),this.state.showImageSlider&&this.props.library.screenshots&&c.a.createElement(Et,{images:this.props.library.screenshots,onImageSelect:this.onImageSelect,showProgress:!1,selected:this.state.selectedScreenshot}),c.a.createElement("hr",null),!!this.state.errorMessage&&c.a.createElement(Ae,a()({},this.state.errorMessage,{severity:"error",onClose:this.handleErrorDismiss})),!!this.state.infoMessage&&c.a.createElement(Ae,a()({},this.state.infoMessage,{severity:"info",onClose:this.handleInfoDismiss})),c.a.createElement(on,{installed:this.state.installed,canInstall:this.state.canInstall,updatable:this.state.updatable,installing:this.state.installing,onInstall:this.handleInstall,onUse:this.handleUse,opened:this.state.opened}),c.a.createElement(nn,{id:this.props.library.license?this.props.library.license.id:"Unspecified",attributes:this.props.library.license?this.props.library.license.attributes:void 0,onShowLicenseDetails:this.handleShowLicenseDetails}),void 0!==this.state.modalType&&c.a.createElement(bt,{onClose:this.onModalClose,className:"h5p-hub-"+this.state.modalType||!1,aria:i,parentId:"h5p-hub",appElementId:"h5p-hub-panel"},c.a.createElement(r,null)))}}]),n}(c.a.Component);un.propTypes={visible:C.a.bool.isRequired,onInstall:C.a.func.isRequired,onUse:C.a.func.isRequired,onClose:C.a.func.isRequired,getAjaxUrl:C.a.func.isRequired,library:C.a.shape({installed:C.a.bool.isRequired,canInstall:C.a.bool.isRequired,isUpToDate:C.a.bool.isRequired,example:C.a.string,title:C.a.string,description:C.a.string.isRequired,machineName:C.a.string.isRequired,screenshots:C.a.arrayOf(C.a.shape({url:I,alt:I})),owner:C.a.string.isRequired,icon:C.a.string,license:C.a.shape({id:C.a.string.isRequired,attributes:C.a.shape({canHoldLiable:C.a.bool.isRequired,useCommercially:C.a.bool,modifiable:C.a.bool,distributable:C.a.bool,sublicensable:C.a.bool,mustIncludeCopyright:C.a.bool,mustIncludeLicense:C.a.bool})})})};var cn=un,fn=function(e){var t=e.throbbing,n=e.details,r=e.onRetry,a=[B.get("noContentTypesAvailableDesc")];return n&&n.title&&(a.push(n.title),n.details&&(a=a.concat(n.details))),c.a.createElement(Ae,{severity:"error",title:B.get("noContentTypesAvailable"),message:a},c.a.createElement("button",{type:"h5p-hub-button",className:"h5p-hub-button h5p-hub-button-primary h5p-hub-retry-button",tabIndex:"0",onClick:r,disabled:t},B.get("tryAgain")))};fn.propTypes={throbbing:C.a.bool,details:C.a.object,onRetry:C.a.func.isRequired},fn.defaultProps={throbbing:!1};var dn=fn,pn=[{name:"title",max:1e3,min:100},{name:"summary",max:50,min:25},{name:"description",max:50,min:25},{name:"keywords",max:50,min:25},{name:"machineName",max:1,min:.5}],hn={recently:"recently",newest:"createdAt","a-to-z":"title"},mn=["createdAt","updatedAt"];function yn(e,t,n){if(t){var r=e.libraries.map((function(e){return{contentType:e,score:bn(t,e)}})).filter((function(t){return t.score>0&&!gn(t.contentType,e.apiVersion)}));return Mn(r)}var a=[hn[n]];if("recently"===n)if(e.recentlyUsed&&e.recentlyUsed.length){for(var i=0;i<e.recentlyUsed.length;i++)for(var o=e.recentlyUsed[i],l=0;l<e.libraries.length;l++){var s=e.libraries[l];s.machineName===o&&(s.recently=i+1)}a.push("popularity")}else a=["popularity"];else"newest"===n&&a.splice(0,0,"installed");return Mn(e.libraries.filter((function(t){return!gn(t,e.apiVersion)})),a)}var gn=function(e,t){var n=!(t.major>e.h5pMajorVersion||t.major===e.h5pMajorVersion&&t.minor>=e.h5pMinorVersion);return e.restricted||!e.installed&&n},bn=function(e,t){var n=e.split(" ").filter((function(e){return""!==e})).map((function(e){return vn(e,t)}));return n.indexOf(0)>-1?0:n.reduce((function(e,t){return e+t}),0)},vn=function(e,t){e=e.trim();for(var n=0;n<pn.length;n++){var r=pn[n],a=wn(e,t[r.name],r.max,r.min);if(-1!==a)return a}return 0},wn=function e(t,n,r,a){if(!n)return-1;if(n instanceof Array){for(var i=0;i<n.length;i++){var o=e(t,n[i],r,a);if(-1!==o)return o}return-1}var l=n.toLowerCase().indexOf(t.toLowerCase());return-1===l?-1:(r-a)*((n.length-l)/n.length)+a},Mn=function(e,t){return e.map((function(e){return e.hasOwnProperty("score")&&e.hasOwnProperty("contentType")?e:{contentType:e,score:.1}})).sort((function(e,n){return t?Ln(e,n,t[0],t.slice(1)):En(e,n)})).map((function(e){return e.contentType}))},Ln=function e(t,n,r,a){if(!t.contentType.hasOwnProperty(r))return 1;if(!n.contentType.hasOwnProperty(r))return-1;var i=-1===mn.indexOf(r)?1:-1;return t.contentType[r]>n.contentType[r]?1*i:t.contentType[r]<n.contentType[r]?-1*i:a.length?e(t,n,a[0],a.slice(1)):0},En=function(e,t){return t.score!==e.score?t.score-e.score:t.contentType.popularity-e.contentType.popularity};function Cn(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var xn=function(e){y()(n,e);var t=Cn(n);function n(e){var r;o()(this,n),r=t.call(this,e),L()(h()(r),"handleDetailClose",(function(){r.setState((function(e){return{detailViewActive:!1,setFocus:!e.setFocus}}))})),L()(h()(r),"handleDetailUse",(function(e){r.handleDetailClose(),r.props.onUse(e)})),L()(h()(r),"handleListSelect",(function(e){r.setState({library:e,detailViewActive:!0})})),L()(h()(r),"handleFilterOn",(function(e){r.setState({contentTypes:yn(r.props.contentTypes,e,r.state.orderBy),filterOn:e,focused:null,detailViewActive:!1})})),L()(h()(r),"handleOrderBy",(function(e){r.setState({contentTypes:yn(r.props.contentTypes,null,e),orderBy:e,filterOn:"",focused:null})})),L()(h()(r),"handleFocus",(function(e){r.setState({focused:e})})),L()(h()(r),"handleFocusMove",(function(e){for(var t=r.state.focused||r.state.contentTypes[0],n=0;n<r.state.contentTypes.length;n++)if(t===r.state.contentTypes[n])return void(r.state.contentTypes[n+e]&&r.setState({focused:r.state.contentTypes[n+e]}))})),L()(h()(r),"handleSearchSelect",(function(){var e=r.state.focused||r.state.contentTypes[0];e&&(e.installed?r.props.onUse(e):r.handleListSelect(e))})),L()(h()(r),"handleWarningClose",(function(){r.setState({warnOutdated:!1})})),L()(h()(r),"handleRetry",(function(){r.setState({retrying:!0}),r.props.onReload()}));return r.state={orderBy:"recently",contentTypes:yn(e.contentTypes,null,"recently"),detailViewActive:!1,warnOutdated:r.props.contentTypes.outdated},r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){this.setState((function(t){var n;if(t.library)for(var r=0;r<e.contentTypes.libraries.length;r++){var a=e.contentTypes.libraries[r];a.machineName===t.library.machineName&&(n=a)}return{contentTypes:yn(e.contentTypes,t.filterOn,t.orderBy),retrying:void 0,library:n}}))}},{key:"render",value:function(){if(!this.props.contentTypes.libraries||!this.props.contentTypes.libraries.length)return c.a.createElement(dn,{throbbing:this.state.retrying,details:this.props.error,onRetry:this.handleRetry});var e=!(!this.props.contentTypes.recentlyUsed||!this.props.contentTypes.recentlyUsed.length),t=[{id:"recently",text:B.get(e?"recentlyUsedFirst":"popularFirst")},{id:"newest",text:B.get("newestFirst")},{id:"a-to-z",text:B.get("aToZ")}];return c.a.createElement("div",{className:"h5p-hub-content-type-section-view"},c.a.createElement(dt,{value:this.state.filterOn,auto:!this.state.detailViewActive,setFocus:this.props.setFocus,onSearch:this.handleFilterOn,onNavigate:this.handleFocusMove,onSelect:this.handleSearchSelect,instantSearch:!0,placeholder:B.get("contentTypeSearchFieldPlaceholder")}),!!this.state.warnOutdated&&c.a.createElement(Ae,{severity:"warning",title:B.get("contentTypeCacheOutdated"),message:B.get("contentTypeCacheOutdatedDesc"),onClose:this.handleWarningClose}),c.a.createElement("div",{className:"h5p-hub-content-type-section"+(this.state.warnOutdated?" h5p-hub-height-limit":"")+(this.state.filterOn?" h5p-hub-filtering":"")},c.a.createElement(Me,{hits:this.state.contentTypes.length,selected:this.state.orderBy,onChange:this.handleOrderBy,orderVariables:t,orderVisible:!this.state.filterOn,hasSearchResults:!!this.state.filterOn,visible:!this.state.detailViewActive,headerLabel:this.state.filterOn?B.get("searchResults"):B.get("contentTypeSectionAll")}),c.a.createElement(en,{contentTypes:this.state.contentTypes,apiVersion:this.props.contentTypes.apiVersion,focused:this.state.focused,setFocus:!this.state.setFocus,visible:!this.state.detailViewActive,onUse:this.props.onUse,onSelect:this.handleListSelect,onFocus:this.handleFocus}),c.a.createElement(cn,{library:this.state.library,apiVersion:this.props.contentTypes.apiVersion,visible:this.state.detailViewActive,onUse:this.handleDetailUse,onClose:this.handleDetailClose,getAjaxUrl:this.props.getAjaxUrl,onInstall:this.props.onInstall})))}}]),n}(c.a.Component);xn.propTypes={contentTypes:C.a.object.isRequired,setFocus:C.a.bool,getAjaxUrl:C.a.func.isRequired,onUse:C.a.func.isRequired,onInstall:C.a.func.isRequired};var Sn=xn;n(96),n(97);function Tn(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var Nn=function(e){y()(n,e);var t=Tn(n);function n(e){var r;return o()(this,n),(r=t.call(this,e)).clickFileField=r.clickFileField.bind(h()(r)),r.componentDidUpdate=r.componentDidUpdate.bind(h()(r)),r}return s()(n,[{key:"componentDidUpdate",value:function(){this.props.fileSelected?this.useButton.focus():this.fileField.value="",this.props.setFocus&&this.uploadButton.focus()}},{key:"clickFileField",value:function(){this.fileField.click()}},{key:"render",value:function(){var e=this;return c.a.createElement("div",{className:"h5p-hub-upload-form"},c.a.createElement("input",{className:"h5p-hub-upload-path",placeholder:this.props.fileSelected||this.props.fileUploading?this.props.filePath:B.get("uploadPlaceholder"),onClick:this.clickFileField,tabIndex:"-1",disabled:this.props.fileUploading,readOnly:!0}),c.a.createElement("button",{type:"button",ref:function(t){e.useButton=t},className:"h5p-hub-button h5p-hub-use-button","aria-hidden":this.props.fileSelected?"":"true",disabled:this.props.fileUploading,onClick:this.props.onUpload},B.get("contentTypeUseButtonLabel")),c.a.createElement("div",{className:"h5p-hub-input-wrapper"},c.a.createElement("input",{type:"file",accept:".h5p","aria-hidden":"true",ref:function(t){e.fileField=t},onChange:this.props.onValidate}),c.a.createElement("button",{type:"button",ref:function(t){return e.uploadButton=t},className:"h5p-hub-button h5p-hub-upload-button",onClick:this.clickFileField,disabled:this.props.fileUploading,tabIndex:"0"},this.props.fileSelected?B.get("uploadFileButtonChangeLabel"):B.get("uploadFileButtonLabel"))))}}]),n}(c.a.Component);Nn.propTypes={fileSelected:C.a.bool.isRequired,fileUploading:C.a.bool.isRequired,filePath:C.a.string.isRequired,setFocus:C.a.bool.isRequired,onValidate:C.a.func.isRequired,onUpload:C.a.func.isRequired};var jn=Nn;function Dn(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var kn=function(e){y()(n,e);var t=Dn(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"handleErrorDismiss",(function(){r.setState({error:null})})),r.state={fileSelected:!1,filePath:"",fileUploading:!1,error:void 0,uploadData:{}},r.handleValidation=r.handleValidation.bind(h()(r)),r.handleUpload=r.handleUpload.bind(h()(r)),r}return s()(n,[{key:"handleValidation",value:function(e){if(this.setState({error:void 0}),0!==e.target.files.length){var t=e.target.files[0].name;"h5p"!==this.getFileExtension(t)?this.setState({fileSelected:!1,filePath:"",error:{title:B.get("h5pFileWrongExtensionTitle"),message:B.get("h5pFileWrongExtensionContent")}}):(this.setState({fileSelected:!0,filePath:t,fileUploading:!1,uploadData:e.target.files[0]}),e.stopPropagation())}}},{key:"handleUpload",value:function(){var e=this;this.setState({fileSelected:!0,fileUploading:!0});var t=new FormData;t.append("h5p",this.state.uploadData),t.append("contentId",this.props.contentId),Q(this.props.getAjaxUrl("library-upload"),t).then((function(t){e.props.onUpload(t.data),e.setState({fileSelected:!1,fileUploading:!1,filePath:"",uploadData:{}})})).catch((function(t){e.setState({fileSelected:!1,fileUploading:!1,error:t,filePath:"",uploadData:{}})}))}},{key:"getFileExtension",value:function(e){return e.replace(/^.*\./,"")}},{key:"render",value:function(){return c.a.createElement("div",{className:"h5p-hub-upload-wrapper"},!!this.state.error&&c.a.createElement(Ae,a()({},this.state.error,{severity:"error",onClose:this.handleErrorDismiss})),c.a.createElement("div",{className:"h5p-hub-upload-throbber"+(this.state.fileUploading?"":" h5p-hub-hidden"),"aria-label":B.get("uploadingThrobber")}),c.a.createElement("h1",{className:"h5p-hub-upload-instruction-header"},B.get("uploadInstructionsTitle")),c.a.createElement(jn,{fileSelected:this.state.fileSelected,fileUploading:this.state.fileUploading,filePath:this.state.filePath,setFocus:this.props.setFocus,onValidate:this.handleValidation,onUpload:this.handleUpload}),c.a.createElement("p",{className:"h5p-hub-upload-instruction-description",dangerouslySetInnerHTML:{__html:B.get("uploadInstructionsContent")}}))}}]),n}(c.a.Component);kn.propTypes={onUpload:C.a.func.isRequired,getAjaxUrl:C.a.func.isRequired,setFocus:C.a.bool.isRequired};var In=kn;n(98);function On(e){var t=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(e){return!1}}();return function(){var n,r=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b()(this,n)}}var An=function(e){y()(n,e);var t=On(n);function n(e){var r;return o()(this,n),r=t.call(this,e),L()(h()(r),"handleUse",(function(e){r.setState({expanded:!1,title:e.title||e.machineName,infoMessage:null}),r.props.onUse(e)})),L()(h()(r),"handleUpload",(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"upload",n=e.h5p.mainLibrary,a=0;a<e.contentTypes.libraries.length;a++)if(e.contentTypes.libraries[a].machineName===n){n=e.contentTypes.libraries[a].title;break}var i=B.get("uploadSuccess").replace(":title",n);"reuse"===t&&(i=B.get("reuseSuccess").replace(":title",n)),r.setState({expanded:!1,title:n,contentTypes:e.contentTypes,infoMessage:{title:i,message:e.contentTypes.details}}),r.props.onUpload(e)})),L()(h()(r),"handleUpdate",(function(e){r.props.onUpdate(e),r.setState({contentTypes:e})})),L()(h()(r),"handleReload",(function(){Q(r.props.getAjaxUrl("content-type-cache")).then((function(e){return r.handleUpdate(e)})).catch((function(e){return r.setState({error:e})}))})),L()(h()(r),"handleInfoDismiss",(function(){r.setState({infoMessage:null})})),L()(h()(r),"handleTabPanelSelect",(function(e){r.setState({section:e})})),L()(h()(r),"handleRender",(function(e,t){r.props.onRender(e,t)})),r.state={expanded:e.expanded,section:"h5p-hub-content-types",selected:e.selected,title:e.title,contentTypes:e.contentTypes},r}return s()(n,[{key:"componentWillReceiveProps",value:function(e){e.title!==this.state.title&&(this.state.title=e.title),e.expanded!==this.state.expanded&&(this.state.expanded=e.expanded)}},{key:"componentDidUpdate",value:function(){this.props.onResize()}},{key:"render",value:function(){var e=this;return this.handleRender(this.state.title,this.state.expanded),c.a.createElement("section",{className:"h5p-hub",id:"h5p-hub"},c.a.createElement("div",{className:"h5p-hub-panel h5p-hub-section-".concat(this.state.section).concat(this.state.expanded?" h5p-hub-open":""),id:"h5p-hub-panel"},c.a.createElement(W,{title:this.state.title||B.get("hubPanelLabel"),sectionId:this.state.section,isExpanded:this.state.expanded,togglePanel:function(){return e.setState({expanded:!e.state.expanded})}}),c.a.createElement("div",{id:"h5p-hub-panel-body-".concat(this.state.section),role:"region",className:this.state.expanded?"":"h5p-hub-hidden"},c.a.createElement(K,{selected:this.state.section,onSelect:this.handleTabPanelSelect,canPaste:this.props.canPaste,canPasteTitle:this.props.canPasteTitle,onPaste:this.props.onPaste},c.a.createElement(Sn,{id:"h5p-hub-content-types",title:B.get("createContentTabLabel"),contentTypes:this.state.contentTypes,setFocus:this.state.expanded&&"h5p-hub-content-types"===this.state.section,getAjaxUrl:this.props.getAjaxUrl,error:this.state.error,onUse:this.handleUse,onInstall:this.handleUpdate,onReload:this.handleReload}),this.props.enableContentHub&&c.a.createElement(Ht,{id:"h5p-hub-reuse",title:B.get("reuseContentTabLabel"),isVisible:this.state.expanded&&"h5p-hub-reuse"===this.state.section,getAjaxUrl:this.props.getAjaxUrl,onDownload:this.handleUpload}),c.a.createElement(In,{id:"h5p-hub-upload",title:B.get("uploadTabLabel"),getAjaxUrl:this.props.getAjaxUrl,contentId:this.props.contentId,setFocus:this.state.expanded&&"h5p-hub-upload"===this.state.section,onUpload:this.handleUpload})))),!!this.state.infoMessage&&c.a.createElement(Ae,a()({},this.state.infoMessage,{severity:"info",onClose:this.handleInfoDismiss})))}}]),n}(c.a.Component);An.propTypes={title:C.a.string,contentTypes:C.a.object.isRequired,selected:C.a.string,getAjaxUrl:C.a.func.isRequired,onResize:C.a.func.isRequired,onUse:C.a.func.isRequired,onUpload:C.a.func.isRequired,enableContentHub:C.a.bool.isRequired};var Pn=An,Rn=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";o()(this,e),a()(this,{listeners:{},on:function(e,t,n){var r={listener:t,scope:n};return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(r),this},trigger:function(e,t){return(this.listeners[e]||[]).every((function(e){return!1!==e.listener.call(e.scope||this,t)}))},propagate:function(e,t,n){var r=this;e.forEach((function(e){return t.on(e,(function(t){return r.trigger(n||e,t)}))}))}});var i=this,l=this.createContainerElement("div");B.init(n),xe.init(r,t.getAjaxUrl("content-hub-metadata-cache"),t.contentTypes);var s=function(){d.a.render(c.a.createElement(Pn,{title:t.title,expanded:t.expanded,canPaste:t.canPaste,canPasteTitle:t.canPasteTitle,contentId:t.contentId,contentTypes:t.contentTypes,selected:t.selected,getAjaxUrl:t.getAjaxUrl,onResize:i.trigger.bind(i,"resize"),onUse:i.trigger.bind(i,"select"),onUpload:i.trigger.bind(i,"upload"),onUpdate:i.trigger.bind(i,"update"),onPaste:i.trigger.bind(i,"paste"),onRender:function(e,n){t.title=e,t.expanded=n},enableContentHub:t.enableContentHub}),l)};this.setPanelTitle=function(e,n){t.title=e,t.expanded=n,s()},this.setCanPaste=function(e,n){t.canPaste=e,t.canPasteTitle=n,s()},this.getElement=function(){return l},s()}return s()(e,[{key:"createContainerElement",value:function(e){var t=["Enter","Space","Tab"],n=document.createElement(e,{className:"h5p-hub-client-container-using-mouse"});return window.addEventListener("keydown",(function(e){-1!==t.indexOf(e.code)&&n.classList.remove("h5p-hub-client-container-using-mouse")})),window.addEventListener("mousemove",(function(){n.classList.add("h5p-hub-client-container-using-mouse")})),n}}]),e}()}]);