"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2506],{62526:function(e,t,n){n.d(t,{f:function(){return createContainer}});var r=n(67294),o=n(45697),i=n.n(o),a=n(90423),u=n(45710),c=n(793),s=n(79438);let l=["children"],d=["scope","isGlobal"];function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}let noop=()=>()=>{};function createContainer(e,t){void 0===e&&(e={});let{onInit:n=noop,onUpdate:r=noop,onCleanup:o=noop,displayName:i=""}=void 0===t?{}:t;if("key"in e){let t=e,a=i||`Container(${t.key.split("__")[0]})`;return createFunctionContainer({displayName:a,override:{Store:t,handlers:Object.assign({},n!==noop&&{onInit:()=>n()},o!==noop&&{onDestroy:()=>o()},r!==noop&&{onContainerUpdate:()=>r()})}})}return createFunctionContainer(e)}function createFunctionContainer(e){let{displayName:t,override:n}=void 0===e?{}:e,check=e=>n?e===n.Store:e.containedBy===FunctionContainer;function FunctionContainer(e){let{children:t}=e,o=_objectWithoutPropertiesLoose(e,l),{scope:i,isGlobal:f}=o,h=_objectWithoutPropertiesLoose(o,d),p=(0,r.useContext)(a._),S=function(e,t,n){let{globalRegistry:o}=n;return(0,r.useMemo)(()=>{let n=!e&&!t;return n?new u.pM("__local__"):o},[e,t,o])}(i,f,p),y=(0,r.useRef)({prev:null,next:o,sub:h});y.current={prev:y.current.next,next:o,sub:h};let[b,g]=function(e,t,n,o,i){let a=(0,r.useMemo)(()=>new Map,[e]),u=(0,r.useCallback)(r=>{let u=a.get(r);if(!u){let s=t.hasStore(r,e),l={props:()=>n.current.sub,contained:o},{storeState:d}=t.getStore(r,e,l),f=(0,c.k)(r.actions,d,l),h=(0,c.k)(Object.assign({},r.handlers,null==i?void 0:i.handlers),d,l,f);u={storeState:d,actions:f,handlers:h,unsubscribe:void 0},a.set(r,u),(!s||i)&&(null==h.onInit||h.onInit())}return u},[a,e,t,n,o,i]);return[a,u]}(i,S,y,check,n),v=function(e,t,n){let{globalRegistry:o,retrieveStore:i}=n,a=(0,r.useRef)();return a.current=n=>e(n)?t(n):i(n),(0,r.useMemo)(()=>({globalRegistry:o,retrieveStore:e=>a.current(e)}),[o])}(check,g,p);return(0,s.Z)(y.current.next,y.current.prev)||b.forEach(e=>{let{handlers:t}=e;null==t.onContainerUpdate||t.onContainerUpdate(y.current.next,y.current.prev)}),(0,r.useEffect)(()=>{b.forEach(e=>{if(!e.unsubscribe){let t=e.storeState.subscribe(()=>null==e.handlers.onUpdate?void 0:e.handlers.onUpdate());e.unsubscribe=()=>{t(),e.unsubscribe=void 0}}})},[b,b.size]),n&&!b.size&&(i||f)&&g(n.Store),(0,r.useEffect)(()=>()=>{b.forEach((e,t)=>{let{storeState:n,handlers:r,unsubscribe:o}=e;null==o||o(),n.notify(),Promise.resolve().then(()=>{var e;n.listeners().size||n!==(null==(e=S.getStore(t,i,null))?void 0:e.storeState)||(null==r.onDestroy||r.onDestroy(),f||S.deleteStore(t,i))})})},[S,i,f,b]),r.createElement(a._.Provider,{value:v},t)}return FunctionContainer.displayName=t||"Container",FunctionContainer.propTypes={children:i().node,scope:i().string,isGlobal:i().bool},FunctionContainer}},2588:function(e,t,n){n.d(t,{Bi:function(){return createHook}});var r=n(67294),o=n(61688),i=n(90423),a=n(79438);function memoize(e,t){let n;void 0===t&&(t=!1);let r=[],o=!1;return function(){if(o&&function(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;if(e&&2===t.length)return t[0]===n[0]&&(0,a.Z)(t[1],n[1]);for(let e=0;ee,(e,t)=>t],r=t?e.resultFunc:e;return function(){for(var e=arguments.length,t=Array(e),n=0;nvoid 0,DEFAULT_SELECTOR=e=>e;function createHook(e,t){let{selector:n}=void 0===t?{}:t;return function(t){let{retrieveStore:a}=(0,r.useContext)(i._),{storeState:c,actions:s}=a(e),l=void 0!==t,d=(0,r.useRef)(t);d.current=t;let f=(0,r.useMemo)(()=>n?function(e,t,n){if(!n){u.has(t)||u.set(t,new WeakMap);let n=u.get(t);return n.has(e)||n.set(e,createMemoizedSelector(e)),n.get(e)}return createMemoizedSelector(e)}(n,c,l):null===n?EMPTY_SELECTOR:DEFAULT_SELECTOR,[l,c]),h=(0,r.useState)({})[1],p=(0,r.useCallback)(()=>{a(e).storeState!==c&&h({});let t=c.getState();return f(t,d.current)},[a,c,f,h]),S=(0,o.useSyncExternalStore)(c.subscribe,p,p);return[S,s]}}},90423:function(e,t,n){n.d(t,{_:function(){return i}});var r=n(67294),o=n(45710);let i=r.createContext({globalRegistry:o.oA,retrieveStore:e=>o.oA.getStore(e)},()=>0)},53762:function(e,t,n){n(67294);let r={batchUpdates:!0,devtools:!1,middlewares:new Set,mutator:(e,t)=>Object.assign({},e,t)};t.Z=r},793:function(e,t,n){n.d(t,{k:function(){return bindActions}});var r=n(53762);let namedMutator=(e,t)=>function(){return e.mutator.actionName=t,e.mutator(...arguments)},o=new WeakMap,bindAction=(e,t,n,i,a)=>{let callThunk=(e,n,u)=>n({setState:r.Z.devtools?namedMutator(e.storeState,u):e.storeState.mutator,getState:e.storeState.getState,get actions(){return o.has(t)||o.set(t,console.warn(`react-sweet-state 'actions' property has been deprecated and will be removed in the next mayor. Please check action '${u}' of Store '${e.storeState.key}' and use 'dispatch' instead`)),a},dispatch:t=>callThunk(e,t,`${u}.dispatch`)},i.props());return function(){return callThunk({storeState:e,actions:a},t(...arguments),n)}},bindActions=function(e,t,n,r){return void 0===r&&(r=null),Object.keys(e).reduce((o,i)=>(o[i]=bindAction(t,e[i],i,n,r||o),o),{})}},35946:function(e,t,n){n.d(t,{M:function(){return createStore}});function createStore(e){let t,{name:n="",initialState:r,actions:o,containedBy:i,handlers:a={}}=e;return{get key(){return t||(t=function(e,t,n){let r=n?"":Object.keys(t).reduce((e,n)=>e+t[n].toString(),"");return[n,function(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))*1540483477+(((t>>>16)*1540483477&65535)<<16),t^=t>>>24,r=(65535&r)*1540483477+(((r>>>16)*1540483477&65535)<<16)^(t=(65535&t)*1540483477+(((t>>>16)*1540483477&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r^=255&e.charCodeAt(o),r=(65535&r)*1540483477+(((r>>>16)*1540483477&65535)<<16)}return r^=r>>>13,r=(65535&r)*1540483477+(((r>>>16)*1540483477&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(r+JSON.stringify(e))].filter(Boolean).join("__")}(r,o,n))},initialState:r,actions:o,containedBy:i,handlers:a}}},45710:function(e,t,n){let r;n.d(t,{pM:function(){return StoreRegistry},oA:function(){return p}});var o,i={scheduling:()=>"undefined"!=typeof window&&"function"==typeof MessageChannel},a=n(793),u=n(53762),c=n(79438),update=e=>t=>n=>{let r;let o=e.getState(),i=t(o,n,e=>{r=e});return(0,c.Z)(i,o)||e.setState(i),r},middlewares=(e,t)=>Array.from(t).concat(update).reduceRight((t,n)=>n(e)(t),u.Z.mutator);let connectDevTools=(e,t)=>{let n=window.__REDUX_DEVTOOLS_EXTENSION__.connect(Object.assign({name:`Store ${e.key}`,serialize:!0,trace:!0},t));return n.init(e.getState()),n.subscribe(t=>{if("DISPATCH"===t.type)switch(t.payload.type){case"RESET":e.resetState(),n.init(e.getState());return;case"COMMIT":n.init(e.getState());return;case"ROLLBACK":e.setState(JSON.parse(t.state)),n.init(e.getState());return;case"JUMP_TO_STATE":case"JUMP_TO_ACTION":e.setState(JSON.parse(t.state));return}else if("ACTION"===t.type){let n=JSON.parse(t.payload);e.setState(n.payload)}}),n};var s=n(73935),l=n(63840);let d=!1;function batch(e){return u.Z.batchUpdates&&i.scheduling()&&!d?(d=!0,(0,l.unstable_scheduleCallback)(l.unstable_ImmediatePriority,function(){(0,s.unstable_batchedUpdates)(e),d=!1})):(0,s.unstable_batchedUpdates)(e)}let f=[];var h=(o=function(e,t){let n=new Set,o=t,a={key:e,getState:()=>o,setState(e){o=e,function(e){if(!u.Z.batchUpdates||!i.scheduling())return batch(()=>e());f.includes(e)||f.push(e),r||(r=batch(()=>{let e;for(;e=f.shift();)e();r=null}))}(a.notify)},resetState(){a.setState(t)},notify(){for(let e of n)e(a.getState())},subscribe:e=>(n.add(e),function(){n.delete(e)}),listeners:()=>n};return a.mutator=middlewares(a,u.Z.middlewares),a},function(){let e=o(...arguments);if(u.Z.devtools&&window&&window.__REDUX_DEVTOOLS_EXTENSION__){let t;let n=e.mutator;e.mutator=r=>{let o=n(r);try{if(!t){let n="function"==typeof u.Z.devtools?u.Z.devtools(e):{};t=connectDevTools(e,n)}t.send({type:e.mutator.actionName,payload:r},e.getState(),{},e.key)}catch(e){}return o}}return e});let StoreRegistry=class StoreRegistry{constructor(e){var t=this;void 0===e&&(e="__global__"),this.stores=new Map,this.initStore=(e,t,n)=>{let r;let{initialState:o,actions:u}=t;if(t.containedBy&&!n.contained(t)){let e=Error(`Store ${t.key} should be contained by a container but it is used globally. While it might still work, it will likely cause unexpected behaviours.`);if(i.scheduling())Promise.reject(e);else throw e}let c=h(e,o),s={storeState:c,get actions(){return r||(r=(0,a.k)(u,c,n)),r}};return this.stores.set(e,s),s},this.hasStore=function(e,n){void 0===n&&(n=t.defaultScope);let r=t.generateKey(e,n);return t.stores.has(r)},this.getStore=function(e,n,r){void 0===n&&(n=t.defaultScope),void 0===r&&(r={props:()=>({}),contained:()=>!1});let o=t.generateKey(e,n);return t.stores.get(o)||r&&t.initStore(o,e,r)},this.deleteStore=function(e,n){void 0===n&&(n=t.defaultScope);let r=t.generateKey(e,n);t.stores.delete(r)},this.generateKey=(e,t)=>`${e.key}@${t}`,this.defaultScope=e}};let p=new StoreRegistry},79438:function(e,t,n){n.d(t,{Z:function(){return shallowEqual}});let r=Object.prototype.hasOwnProperty,o=new WeakMap;function shallowEqual(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n