traitify-widgets 3.0.0-alpha.13 → 3.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/hooks.js +1 -1
- package/build/hooks.js.map +1 -1
- package/build/shared.js +1 -1
- package/build/shared.js.map +1 -1
- package/build/traitify.js +1 -1
- package/build/traitify.js.map +1 -1
- package/package.json +1 -1
package/build/shared.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";var e,t={9853:function(e,t,n){n.d(t,{$P:function(){return Yi},C:function(){return es},CG:function(){return Hi},FV:function(){return Ji},Qv:function(){return qi},Wh:function(){return Ki},Zl:function(){return Xi},cn:function(){return ji},nZ:function(){return $i},rb:function(){return Qi},sJ:function(){return Zi}});var o=n(8370),r=n.n(o),a=n(5771),i=n.n(a),s=function(e){const t=new Error(e);if(void 0===t.stack)try{throw t}catch(e){}return t},u=function(e){return!!e&&"function"==typeof e.then},l=function(e,t){if(null!=e)return e;throw s(null!=t?t:"Got unexpected null or undefined")};function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d{getValue(){throw s("BaseLoadable")}toPromise(){throw s("BaseLoadable")}valueMaybe(){throw s("BaseLoadable")}valueOrThrow(){throw s(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw s("BaseLoadable")}promiseOrThrow(){throw s(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw s("BaseLoadable")}errorOrThrow(){throw s(`Loadable expected error, but in "${this.state}" state`)}is(e){return e.state===this.state&&e.contents===this.contents}map(e){throw s("BaseLoadable")}}class f extends d{constructor(e){super(),c(this,"state","hasValue"),c(this,"contents",void 0),this.contents=e}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(e){try{const t=e(this.contents);return u(t)?_(t):g(t)?t:v(t)}catch(t){return u(t)?_(t.next((()=>this.map(e)))):y(t)}}}class h extends d{constructor(e){super(),c(this,"state","hasError"),c(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(e){return this}}class p extends d{constructor(e){super(),c(this,"state","loading"),c(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(e){return _(this.contents.then((t=>{const n=e(t);if(g(n)){const e=n;switch(e.state){case"hasValue":case"loading":return e.contents;case"hasError":throw e.contents}}return n})).catch((t=>{if(u(t))return t.then((()=>this.map(e).contents));throw t})))}}function v(e){return Object.freeze(new f(e))}function y(e){return Object.freeze(new h(e))}function _(e){return Object.freeze(new p(e))}function m(){return Object.freeze(new p(new Promise((()=>{}))))}function S(e){const t=function(e){return e.every((e=>"hasValue"===e.state))?v(e.map((e=>e.contents))):e.some((e=>"hasError"===e.state))?y(l(e.find((e=>"hasError"===e.state)),"Invalid loadable passed to loadableAll").contents):_(Promise.all(e.map((e=>e.contents))))}((Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))).map((e=>g(e)?e:u(e)?_(e):v(e))));return Array.isArray(e)?t:t.map((t=>Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})))}function g(e){return e instanceof d}const b={of:e=>u(e)?_(e):g(e)?e:v(e),error:e=>y(e),loading:()=>m(),all:S,isLoadable:g};var T={loadableWithValue:v,loadableWithError:y,loadableWithPromise:_,loadableLoading:m,loadableAll:S,isLoadable:g,RecoilLoadable:b},R=T.loadableWithValue,w=T.loadableWithError,A=T.loadableWithPromise,E=T.loadableLoading,N=T.loadableAll,k=T.isLoadable,L=T.RecoilLoadable,V=Object.freeze({__proto__:null,loadableWithValue:R,loadableWithError:w,loadableWithPromise:A,loadableLoading:E,loadableAll:N,isLoadable:k,RecoilLoadable:L});const C={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};var M;"undefined"!=typeof process&&null!=(null===(M=process)||void 0===M?void 0:M.env)&&(function(e,t){var n,o;const r=null===(n=process.env[e])||void 0===n||null===(o=n.toLowerCase())||void 0===o?void 0:o.trim();if(null!=r&&""!==r){if(!["true","false"].includes(r))throw s(`process.env.${e} value must be 'true', 'false', or empty: ${r}`);a="true"===r,C.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=a}var a}("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED"),function(e,t){var n;const o=null===(n=process.env.RECOIL_GKS_ENABLED)||void 0===n?void 0:n.trim();null!=o&&""!==o&&o.split(/\s*,\s*|\s+/).forEach((e=>{C.RECOIL_GKS_ENABLED.add(e)}))}());var U=C;function D(e){return U.RECOIL_GKS_ENABLED.has(e)}D.setPass=e=>{U.RECOIL_GKS_ENABLED.add(e)},D.setFail=e=>{U.RECOIL_GKS_ENABLED.delete(e)},D.clear=()=>{U.RECOIL_GKS_ENABLED.clear()};var B,I,O,P=D;const x=null!==(B=r().createMutableSource)&&void 0!==B?B:r().unstable_createMutableSource,z=null!==(I=r().useMutableSource)&&void 0!==I?I:r().unstable_useMutableSource,F=null!==(O=r().useSyncExternalStore)&&void 0!==O?O:r().unstable_useSyncExternalStore;let W=!1;var G={createMutableSource:x,useMutableSource:z,useSyncExternalStore:F,currentRendererSupportsUseSyncExternalStore:function(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=r().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,o=null!=(null!==(e=null==t?void 0:t.current)&&void 0!==e?e:n.currentDispatcher).useSyncExternalStore;return!F||o||W||(W=!0),o},reactMode:function(){return P("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:P("recoil_sync_external_store")&&null!=F?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:P("recoil_mutable_source")&&null!=z&&"undefined"!=typeof window&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?P("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:P("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}},isFastRefreshEnabled:function(){return!1}};class K{constructor(e){c(this,"key",void 0),this.key=e}toJSON(){return{key:this.key}}}class j extends K{}class $ extends K{}var H={AbstractRecoilValue:K,RecoilState:j,RecoilValueReadOnly:$,isRecoilValue:function(e){return e instanceof j||e instanceof $}},q=H.AbstractRecoilValue,Z=H.RecoilState,Y=H.RecoilValueReadOnly,J=H.isRecoilValue,X=Object.freeze({__proto__:null,AbstractRecoilValue:q,RecoilState:Z,RecoilValueReadOnly:Y,isRecoilValue:J}),Q=function(e,t){return function*(){let n=0;for(const o of e)yield t(o,n++)}()};const{isFastRefreshEnabled:ee}=G;class te{}const ne=new te,oe=new Map,re=new Map;class ae extends Error{}const ie=new Map;function se(e){return ie.get(e)}var ue,le,ce={nodes:oe,recoilValues:re,registerNode:function(e){U.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&function(e){if(oe.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in\n production. But it is safe to ignore this warning if it occurred because of\n hot module replacement.`;console.warn(t)}}(e.key),oe.set(e.key,e);const t=null==e.set?new X.RecoilValueReadOnly(e.key):new X.RecoilState(e.key);return re.set(e.key,t),t},getNode:function(e){const t=oe.get(e);if(null==t)throw new ae(`Missing definition for RecoilValue: "${e}""`);return t},getNodeMaybe:function(e){return oe.get(e)},deleteNodeConfigIfPossible:function(e){var t;if(!P("recoil_memory_managament_2020"))return;const n=oe.get(e);var o;null!=n&&null!==(t=n.shouldDeleteConfigOnRelease)&&void 0!==t&&t.call(n)&&(oe.delete(e),null===(o=se(e))||void 0===o||o(),ie.delete(e))},setConfigDeletionHandler:function(e,t){P("recoil_memory_managament_2020")&&(void 0===t?ie.delete(e):ie.set(e,t))},getConfigDeletionHandler:se,recoilValuesForKeys:function(e){return Q(e,(e=>l(re.get(e))))},NodeMissingError:ae,DefaultValue:te,DEFAULT_VALUE:ne},de=function(e,t){t()},fe=(ue=function(e){var t="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},n={},o=Math.pow(2,5),r=o-1,a=o/2,i=o/4,s={},u=function(e){return function(){return e}},l=n.hash=function(e){var n=void 0===e?"undefined":t(e);if("number"===n)return e;"string"!==n&&(e+="");for(var o=0,r=0,a=e.length;r<a;++r)o=(o<<5)-o+e.charCodeAt(r)|0;return o},c=function(e,t){return t>>>e&r},d=function(e){return 1<<e},f=function(e,t){return n=e&t-1,n=(n=(858993459&(n-=n>>1&1431655765))+(n>>2&858993459))+(n>>4)&252645135,127&(n+=n>>8)+(n>>16);var n},h=function(e,t,n,o){var r=o;if(!e){var a=o.length;r=new Array(a);for(var i=0;i<a;++i)r[i]=o[i]}return r[t]=n,r},p=function(e,t,n){var o=n.length-1,r=0,a=0,i=n;if(e)r=a=t;else for(i=new Array(o);r<t;)i[a++]=n[r++];for(++r;r<=o;)i[a++]=n[r++];return e&&(i.length=o),i},v={__hamt_isEmpty:!0},y=function(e){return e===v||e&&e.__hamt_isEmpty},_=function(e,t,n,o){return{type:1,edit:e,hash:t,key:n,value:o,_modify:R}},m=function(e,t,n){return{type:2,edit:e,hash:t,children:n,_modify:w}},S=function(e,t,n){return{type:3,edit:e,mask:t,children:n,_modify:A}},g=function(e,t,n){return{type:4,edit:e,size:t,children:n,_modify:E}},b=function e(t,n,o,r,a,i){if(o===a)return m(t,o,[i,r]);var s=c(n,o),u=c(n,a);return S(t,d(s)|d(u),s===u?[e(t,n+5,o,r,a,i)]:s<u?[r,i]:[i,r])},T=function(e,t){return e===t.edit},R=function(e,t,n,o,r,a,i){if(t(a,this.key)){var u=o(this.value);return u===this.value?this:u===s?(--i.value,v):T(e,this)?(this.value=u,this):_(e,r,a,u)}var l=o();return l===s?this:(++i.value,b(e,n,this.hash,this,r,_(e,r,a,l)))},w=function(e,t,n,o,r,a,i){if(r===this.hash){var u=function(e,t,n,o,r,a,i,u){for(var l=r.length,c=0;c<l;++c){var d=r[c];if(n(i,d.key)){var f=d.value,v=a(f);return v===f?r:v===s?(--u.value,p(e,c,r)):h(e,c,_(t,o,i,v),r)}}var y=a();return y===s?r:(++u.value,h(e,l,_(t,o,i,y),r))}(T(e,this),e,t,this.hash,this.children,o,a,i);return u===this.children?this:u.length>1?m(e,this.hash,u):u[0]}var l=o();return l===s?this:(++i.value,b(e,n,this.hash,this,r,_(e,r,a,l)))},A=function(e,t,n,o,r,i,s){var u=this.mask,l=this.children,_=c(n,r),m=d(_),b=f(u,m),R=u&m,w=R?l[b]:v,A=w._modify(e,t,n+5,o,r,i,s);if(w===A)return this;var E,N=T(e,this),k=u,L=void 0;if(R&&y(A)){if(!(k&=~m))return v;if(l.length<=2&&((E=l[1^b])===v||1===E.type||2===E.type))return l[1^b];L=p(N,b,l)}else if(R||y(A))L=h(N,b,A,l);else{if(l.length>=a)return function(e,t,n,o,r){for(var a=[],i=o,s=0,u=0;i;++u)1&i&&(a[u]=r[s++]),i>>>=1;return a[t]=n,g(e,s+1,a)}(e,_,A,u,l);k|=m,L=function(e,t,n,o){var r=o.length;if(e){for(var a=r;a>=t;)o[a--]=o[a];return o[t]=n,o}for(var i=0,s=0,u=new Array(r+1);i<t;)u[s++]=o[i++];for(u[t]=n;i<r;)u[++s]=o[i++];return u}(N,b,A,l)}return N?(this.mask=k,this.children=L,this):S(e,k,L)},E=function(e,t,n,o,r,a,s){var u=this.size,l=this.children,d=c(n,r),f=l[d],p=(f||v)._modify(e,t,n+5,o,r,a,s);if(f===p)return this;var _=T(e,this),m=void 0;if(y(f)&&!y(p))++u,m=h(_,d,p,l);else if(!y(f)&&y(p)){if(--u<=i)return function(e,t,n,o){for(var r=new Array(t-1),a=0,i=0,s=0,u=o.length;s<u;++s)if(s!==n){var l=o[s];l&&!y(l)&&(r[a++]=l,i|=1<<s)}return S(e,i,r)}(e,u,d,l);m=h(_,d,v,l)}else m=h(_,d,p,l);return _?(this.size=u,this.children=m,this):g(e,u,m)};function N(e,t,n,o,r){this._editable=e,this._edit=t,this._config=n,this._root=o,this._size=r}v._modify=function(e,t,n,o,r,a,i){var u=o();return u===s?v:(++i.value,_(e,r,a,u))},N.prototype.setTree=function(e,t){return this._editable?(this._root=e,this._size=t,this):e===this._root?this:new N(this._editable,this._edit,this._config,e,t)};var k=n.tryGetHash=function(e,t,n,o){for(var r=o._root,a=0,i=o._config.keyEq;;)switch(r.type){case 1:return i(n,r.key)?r.value:e;case 2:if(t===r.hash)for(var s=r.children,u=0,l=s.length;u<l;++u){var h=s[u];if(i(n,h.key))return h.value}return e;case 3:var p=c(a,t),v=d(p);if(r.mask&v){r=r.children[f(r.mask,v)],a+=5;break}return e;case 4:if(r=r.children[c(a,t)]){a+=5;break}return e;default:return e}};N.prototype.tryGetHash=function(e,t,n){return k(e,t,n,this)};var L=n.tryGet=function(e,t,n){return k(e,n._config.hash(t),t,n)};N.prototype.tryGet=function(e,t){return L(e,t,this)};var V=n.getHash=function(e,t,n){return k(void 0,e,t,n)};N.prototype.getHash=function(e,t){return V(e,t,this)},n.get=function(e,t){return k(void 0,t._config.hash(e),e,t)},N.prototype.get=function(e,t){return L(t,e,this)};var C=n.has=function(e,t,n){return k(s,e,t,n)!==s};N.prototype.hasHash=function(e,t){return C(e,t,this)};var M=n.has=function(e,t){return C(t._config.hash(e),e,t)};N.prototype.has=function(e){return M(e,this)};var U=function(e,t){return e===t};n.make=function(e){return new N(0,0,{keyEq:e&&e.keyEq||U,hash:e&&e.hash||l},v,0)},n.empty=n.make();var D=n.isEmpty=function(e){return e&&!!y(e._root)};N.prototype.isEmpty=function(){return D(this)};var B=n.modifyHash=function(e,t,n,o){var r={value:o._size},a=o._root._modify(o._editable?o._edit:NaN,o._config.keyEq,0,e,t,n,r);return o.setTree(a,r.value)};N.prototype.modifyHash=function(e,t,n){return B(n,e,t,this)};var I=n.modify=function(e,t,n){return B(e,n._config.hash(t),t,n)};N.prototype.modify=function(e,t){return I(t,e,this)};var O=n.setHash=function(e,t,n,o){return B(u(n),e,t,o)};N.prototype.setHash=function(e,t,n){return O(e,t,n,this)};var P=n.set=function(e,t,n){return O(n._config.hash(e),e,t,n)};N.prototype.set=function(e,t){return P(e,t,this)};var x=u(s),z=n.removeHash=function(e,t,n){return B(x,e,t,n)};N.prototype.removeHash=N.prototype.deleteHash=function(e,t){return z(e,t,this)};var F=n.remove=function(e,t){return z(t._config.hash(e),e,t)};N.prototype.remove=N.prototype.delete=function(e){return F(e,this)};var W=n.beginMutation=function(e){return new N(e._editable+1,e._edit+1,e._config,e._root,e._size)};N.prototype.beginMutation=function(){return W(this)};var G=n.endMutation=function(e){return e._editable=e._editable&&e._editable-1,e};N.prototype.endMutation=function(){return G(this)};var K=n.mutate=function(e,t){var n=W(t);return e(n),G(n)};N.prototype.mutate=function(e){return K(e,this)};var j=function(e){return e&&$(e[0],e[1],e[2],e[3],e[4])},$=function(e,t,n,o,r){for(;n<e;){var a=t[n++];if(a&&!y(a))return H(a,o,[e,t,n,o,r])}return j(r)},H=function(e,t,n){switch(e.type){case 1:return{value:t(e),rest:n};case 2:case 4:case 3:var o=e.children;return $(o.length,o,0,t,n);default:return j(n)}},q={done:!0};function Z(e){this.v=e}Z.prototype.next=function(){if(!this.v)return q;var e=this.v;return this.v=j(e.rest),e},Z.prototype[Symbol.iterator]=function(){return this};var Y=function(e,t){return new Z(H(e._root,t))},J=function(e){return[e.key,e.value]},X=n.entries=function(e){return Y(e,J)};N.prototype.entries=N.prototype[Symbol.iterator]=function(){return X(this)};var Q=function(e){return e.key},ee=n.keys=function(e){return Y(e,Q)};N.prototype.keys=function(){return ee(this)};var te=function(e){return e.value},ne=n.values=N.prototype.values=function(e){return Y(e,te)};N.prototype.values=function(){return ne(this)};var oe=n.fold=function(e,t,n){var o=n._root;if(1===o.type)return e(t,o.value,o.key);for(var r=[o.children],a=void 0;a=r.pop();)for(var i=0,s=a.length;i<s;){var u=a[i++];u&&u.type&&(1===u.type?t=e(t,u.value,u.key):r.push(u.children))}return t};N.prototype.fold=function(e,t){return oe(e,t,this)};var re=n.forEach=function(e,t){return oe((function(n,o,r){return e(o,r,t)}),null,t)};N.prototype.forEach=function(e){return re(e,this)};var ae=n.count=function(e){return e._size};N.prototype.count=function(){return ae(this)},Object.defineProperty(N.prototype,"size",{get:N.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n},ue(le={exports:{}}),le.exports);class he{constructor(e){c(this,"_map",void 0),this._map=new Map(null==e?void 0:e.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(e){return this._map.get(e)}has(e){return this._map.has(e)}set(e,t){return this._map.set(e,t),this}delete(e){return this._map.delete(e),this}clone(){return ve(this)}toMap(){return new Map(this._map)}}class pe{constructor(e){if(c(this,"_hamt",fe.empty.beginMutation()),e instanceof pe){const t=e._hamt.endMutation();e._hamt=t.beginMutation(),this._hamt=t.beginMutation()}else if(e)for(const[t,n]of e.entries())this._hamt.set(t,n)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(e){return this._hamt.get(e)}has(e){return this._hamt.has(e)}set(e,t){return this._hamt.set(e,t),this}delete(e){return this._hamt.delete(e),this}clone(){return ve(this)}toMap(){return new Map(this._hamt)}}function ve(e){return P("recoil_hamt_2020")?new pe(e):new he(e)}var ye=ve,_e=Object.freeze({__proto__:null,persistentMap:ye}),me=function(e,...t){const n=new Set;e:for(const o of e){for(const e of t)if(e.has(o))continue e;n.add(o)}return n},Se=function(e,t){const n=new Map;return e.forEach(((e,o)=>{n.set(o,t(e,o))})),n};function ge(e,t,n,o){const{nodeDeps:r,nodeToNodeSubscriptions:a}=n,i=r.get(e);if(i&&o&&i!==o.nodeDeps.get(e))return;r.set(e,t);const s=null==i?t:me(t,i);for(const t of s)a.has(t)||a.set(t,new Set),l(a.get(t)).add(e);if(i){const n=me(i,t);for(const t of n){if(!a.has(t))return;const n=l(a.get(t));n.delete(e),0===n.size&&a.delete(t)}}}var be={cloneGraph:function(e){return{nodeDeps:Se(e.nodeDeps,(e=>new Set(e))),nodeToNodeSubscriptions:Se(e.nodeToNodeSubscriptions,(e=>new Set(e)))}},graph:function(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}},saveDepsToStore:function(e,t,n,o){var r,a,i,s;const u=n.getState();o!==u.currentTree.version&&o!==(null===(r=u.nextTree)||void 0===r?void 0:r.version)&&(null===(a=u.previousTree)||void 0===a||a.version);const l=n.getGraph(o);if(ge(e,t,l),o===(null===(i=u.previousTree)||void 0===i?void 0:i.version)&&ge(e,t,n.getGraph(u.currentTree.version),l),o===(null===(s=u.previousTree)||void 0===s?void 0:s.version)||o===u.currentTree.version){var c;const o=null===(c=u.nextTree)||void 0===c?void 0:c.version;void 0!==o&&ge(e,t,n.getGraph(o),l)}}};let Te=0,Re=0,we=0;var Ae={getNextTreeStateVersion:()=>Te++,getNextStoreID:()=>Re++,getNextComponentID:()=>we++};const{persistentMap:Ee}=_e,{graph:Ne}=be,{getNextTreeStateVersion:ke}=Ae;function Le(){const e=ke();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Ee(),nonvalidatedAtoms:Ee()}}var Ve={makeEmptyTreeState:Le,makeEmptyStoreState:function(){const e=Le();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(e.version,Ne()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}},getNextTreeStateVersion:ke};class Ce{}var Me={RetentionZone:Ce,retentionZone:function(){return new Ce}},Ue={setByAddingToSet:function(e,t){const n=new Set(e);return n.add(t),n},setByDeletingFromSet:function(e,t){const n=new Set(e);return n.delete(t),n},mapBySettingInMap:function(e,t,n){const o=new Map(e);return o.set(t,n),o},mapByUpdatingInMap:function(e,t,n){const o=new Map(e);return o.set(t,n(o.get(t))),o},mapByDeletingFromMap:function(e,t){const n=new Map(e);return n.delete(t),n},mapByDeletingMultipleFromMap:function(e,t){const n=new Map(e);return t.forEach((e=>n.delete(e))),n}},De=function*(e,t){let n=0;for(const o of e)t(o,n++)&&(yield o)},Be=function(e,t){return new Proxy(e,{get:(e,n)=>(!(n in e)&&n in t&&(e[n]=t[n]()),e[n]),ownKeys:e=>Object.keys(e)})};const{getNode:Ie,getNodeMaybe:Oe,recoilValuesForKeys:Pe}=ce,{RetentionZone:xe}=Me,{setByAddingToSet:ze}=Ue,Fe=Object.freeze(new Set);class We extends Error{}function Ge(e,t,n,o){const r=e.getState();if(r.nodeCleanupFunctions.has(n))return;const a=Ie(n),i=function(e,t,n){if(!P("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:o}=e.getState().retention;function r(e){let n=o.get(e);n||o.set(e,n=new Set),n.add(t)}if(n instanceof xe)r(n);else if(Array.isArray(n))for(const e of n)r(e);return()=>{if(!P("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function r(e){const n=o.nodesRetainedByZone.get(e);null==n||n.delete(t),n&&0===n.size&&o.nodesRetainedByZone.delete(e)}if(n instanceof xe)r(n);else if(Array.isArray(n))for(const e of n)r(e)}}(e,n,a.retainedBy),s=a.init(e,t,o);r.nodeCleanupFunctions.set(n,(()=>{s(),i()}))}function Ke(e,t,n){return Ie(n).peek(e,t)}function je(e,t,n){const o=new Set,r=Array.from(n),a=e.getGraph(t.version);for(let e=r.pop();e;e=r.pop()){var i;o.add(e);const t=null!==(i=a.nodeToNodeSubscriptions.get(e))&&void 0!==i?i:Fe;for(const e of t)o.has(e)||r.push(e)}return o}var $e={getNodeLoadable:function(e,t,n){return Ge(e,t,n,"get"),Ie(n).get(e,t)},peekNodeLoadable:Ke,setNodeValue:function(e,t,n,o){const r=Ie(n);if(null==r.set)throw new We(`Attempt to set read-only RecoilValue: ${n}`);const a=r.set;return Ge(e,t,n,"set"),a(e,t,o)},initializeNode:function(e,t,n){Ge(e,e.getState().currentTree,t,n)},cleanUpNode:function(e,t){var n;const o=e.getState();null===(n=o.nodeCleanupFunctions.get(t))||void 0===n||n(),o.nodeCleanupFunctions.delete(t)},setUnvalidatedAtomValue_DEPRECATED:function(e,t,n){var o;const r=Oe(t);return null==r||null===(o=r.invalidate)||void 0===o||o.call(r,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:ze(e.dirtyAtoms,t)}},peekNodeInfo:function(e,t,n){const o=e.getState(),r=e.getGraph(t.version),a=Ie(n).nodeType;return Be({type:a},{loadable:()=>Ke(e,t,n),isActive:()=>o.knownAtoms.has(n)||o.knownSelectors.has(n),isSet:()=>"selector"!==a&&t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var e;return Pe(null!==(e=r.nodeDeps.get(n))&&void 0!==e?e:[])},subscribers:()=>{var r,a;return{nodes:Pe(De(je(e,t,new Set([n])),(e=>e!==n))),components:Q(null!==(r=null===(a=o.nodeToComponentSubscriptions.get(n))||void 0===a?void 0:a.values())&&void 0!==r?r:[],(([e])=>({name:e})))}}})},getDownstreamNodes:je};let He=null;var qe={setInvalidateMemoizedSnapshot:function(e){He=e},invalidateMemoizedSnapshot:function(){var e;null===(e=He)||void 0===e||e()}};const{getDownstreamNodes:Ze,getNodeLoadable:Ye,setNodeValue:Je}=$e,{getNextComponentID:Xe}=Ae,{getNode:Qe,getNodeMaybe:et}=ce,{DefaultValue:tt}=ce,{reactMode:nt}=G,{AbstractRecoilValue:ot,RecoilState:rt,RecoilValueReadOnly:at,isRecoilValue:it}=X,{invalidateMemoizedSnapshot:st}=qe;function ut(e,t,n){if("set"===n.type){const{recoilValue:o,valueOrUpdater:r}=n,a=function(e,t,{key:n},o){if("function"==typeof o){const r=Ye(e,t,n);if("loading"===r.state){const e=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw s(e)}if("hasError"===r.state)throw r.contents;return o(r.contents)}return o}(e,t,o,r),i=Je(e,t,o.key,a);for(const[e,n]of i.entries())lt(t,e,n)}else if("setLoadable"===n.type){const{recoilValue:{key:e},loadable:o}=n;lt(t,e,o)}else if("markModified"===n.type){const{recoilValue:{key:e}}=n;t.dirtyAtoms.add(e)}else if("setUnvalidated"===n.type){var o;const{recoilValue:{key:e},unvalidatedValue:r}=n,a=et(e);null==a||null===(o=a.invalidate)||void 0===o||o.call(a,t),t.atomValues.delete(e),t.nonvalidatedAtoms.set(e,r),t.dirtyAtoms.add(e)}else n.type}function lt(e,t,n){"hasValue"===n.state&&n.contents instanceof tt?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function ct(e,t){e.replaceState((n=>{const o=ht(n);for(const n of t)ut(e,o,n);return pt(e,o),st(),o}))}function dt(e,t){if(ft.length){const n=ft[ft.length-1];let o=n.get(e);o||n.set(e,o=[]),o.push(t)}else ct(e,[t])}const ft=[];function ht(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function pt(e,t){const n=Ze(e,t,t.dirtyAtoms);for(const e of n){var o,r;null===(o=et(e))||void 0===o||null===(r=o.invalidate)||void 0===r||r.call(o,t)}}function vt(e,t,n){dt(e,{type:"set",recoilValue:t,valueOrUpdater:n})}var yt={RecoilValueReadOnly:at,AbstractRecoilValue:ot,RecoilState:rt,getRecoilValueAsLoadable:function(e,{key:t},n=e.getState().currentTree){var o,r;const a=e.getState();n.version!==a.currentTree.version&&n.version!==(null===(o=a.nextTree)||void 0===o?void 0:o.version)&&(n.version,null===(r=a.previousTree)||void 0===r||r.version);const i=Ye(e,n,t);return"loading"===i.state&&i.contents.catch((()=>{})),i},setRecoilValue:vt,setRecoilValueLoadable:function(e,t,n){if(n instanceof tt)return vt(e,t,n);dt(e,{type:"setLoadable",recoilValue:t,loadable:n})},markRecoilValueModified:function(e,t){dt(e,{type:"markModified",recoilValue:t})},setUnvalidatedRecoilValue:function(e,t,n){dt(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})},subscribeToRecoilValue:function(e,{key:t},n,o=null){const r=Xe(),a=e.getState();a.nodeToComponentSubscriptions.has(t)||a.nodeToComponentSubscriptions.set(t,new Map),l(a.nodeToComponentSubscriptions.get(t)).set(r,[null!=o?o:"<not captured>",n]);const i=nt();if(i.early&&("LEGACY"===i.mode||"MUTABLE_SOURCE"===i.mode)){const o=e.getState().nextTree;o&&o.dirtyAtoms.has(t)&&n(o)}return{release:()=>{const n=e.getState(),o=n.nodeToComponentSubscriptions.get(t);void 0!==o&&o.has(r)&&(o.delete(r),0===o.size&&n.nodeToComponentSubscriptions.delete(t))}}},isRecoilValue:it,applyAtomValueWrites:function(e,t){const n=e.clone();return t.forEach(((e,t)=>{"hasValue"===e.state&&e.contents instanceof tt?n.delete(t):n.set(t,e)})),n},batchStart:function(){const e=new Map;return ft.push(e),()=>{for(const[t,n]of e)ct(t,n);ft.pop()}},writeLoadableToTreeState:lt,invalidateDownstreams:pt,copyTreeState:ht,refreshRecoilValue:function(e,t){var n;const{currentTree:o}=e.getState(),r=Qe(t.key);null===(n=r.clearCache)||void 0===n||n.call(r,e,o)}},_t=function(e,t,n){const o=e.entries();let r=o.next();for(;!r.done;){const a=r.value;if(t.call(n,a[1],a[0],e))return!0;r=o.next()}return!1};const{cleanUpNode:mt}=$e,{deleteNodeConfigIfPossible:St,getNode:gt}=ce,{RetentionZone:bt}=Me,Tt=new Set;function Rt(e,t){const n=e.getState(),o=n.currentTree;if(n.nextTree)return;const r=new Set;for(const e of t)if(e instanceof bt)for(const t of At(n,e))r.add(t);else r.add(e);const a=function(e,t){const n=e.getState(),o=n.currentTree,r=e.getGraph(o.version),a=new Set,i=new Set;return function t(s){const u=new Set,c=function(e,t,n,o,r){const a=e.getGraph(t.version),i=[],s=new Set;for(;n.size>0;)u(l(n.values().next().value));return i;function u(e){if(o.has(e)||r.has(e))return void n.delete(e);if(s.has(e))return;const t=a.nodeToNodeSubscriptions.get(e);if(t)for(const e of t)u(e);s.add(e),n.delete(e),i.push(e)}}(e,o,s,a,i);for(const e of c){var d;if("recoilRoot"===gt(e).retainedBy){i.add(e);continue}if((null!==(d=n.retention.referenceCounts.get(e))&&void 0!==d?d:0)>0){i.add(e);continue}if(Et(e).some((e=>n.retention.referenceCounts.get(e)))){i.add(e);continue}const t=r.nodeToNodeSubscriptions.get(e);t&&_t(t,(e=>i.has(e)))?i.add(e):(a.add(e),u.add(e))}const f=new Set;for(const e of u)for(const t of null!==(h=r.nodeDeps.get(e))&&void 0!==h?h:Tt){var h;a.has(t)||f.add(t)}f.size&&t(f)}(t),a}(e,r);for(const t of a)wt(e,o,t)}function wt(e,t,n){if(!P("recoil_memory_managament_2020"))return;mt(e,n);const o=e.getState();o.knownAtoms.delete(n),o.knownSelectors.delete(n),o.nodeTransactionSubscriptions.delete(n),o.retention.referenceCounts.delete(n);const r=Et(n);for(const e of r){var a;null===(a=o.retention.nodesRetainedByZone.get(e))||void 0===a||a.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const i=o.graphsByVersion.get(t.version);if(i){const e=i.nodeDeps.get(n);if(void 0!==e){i.nodeDeps.delete(n);for(const t of e){var s;null===(s=i.nodeToNodeSubscriptions.get(t))||void 0===s||s.delete(n)}}i.nodeToNodeSubscriptions.delete(n)}St(n)}function At(e,t){var n;return null!==(n=e.retention.nodesRetainedByZone.get(t))&&void 0!==n?n:Tt}function Et(e){const t=gt(e).retainedBy;return void 0===t||"components"===t||"recoilRoot"===t?[]:t instanceof bt?[t]:t}function Nt(e,t){P("recoil_memory_managament_2020")&&(e.getState().retention.referenceCounts.delete(t),function(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Rt(e,new Set([t]))}(e,t))}var kt={SUSPENSE_TIMEOUT_MS:12e4,updateRetainCount:function(e,t,n){var o;if(!P("recoil_memory_managament_2020"))return;const r=e.getState().retention.referenceCounts,a=(null!==(o=r.get(t))&&void 0!==o?o:0)+n;0===a?Nt(e,t):r.set(t,a)},updateRetainCountToZero:Nt,releaseScheduledRetainablesNow:function(e){if(!P("recoil_memory_managament_2020"))return;const t=e.getState();Rt(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()},retainedByOptionWithDefault:function(e){return void 0===e?"recoilRoot":e}};const{unstable_batchedUpdates:Lt}=i();var Vt={unstable_batchedUpdates:Lt};const{unstable_batchedUpdates:Ct}=Vt;var Mt={unstable_batchedUpdates:Ct};const{batchStart:Ut}=yt,{unstable_batchedUpdates:Dt}=Mt;let Bt=Dt||(e=>e());var It={getBatcher:()=>Bt,setBatcher:e=>{Bt=e},batchUpdates:e=>{Bt((()=>{let t=()=>{};try{t=Ut(),e()}finally{t()}}))}},Ot=function*(e){for(const t of e)for(const e of t)yield e};const Pt="undefined"==typeof Window||"undefined"==typeof window,xt="undefined"!=typeof navigator&&"ReactNative"===navigator.product;var zt={isSSR:Pt,isReactNative:xt,isWindow:e=>!Pt&&(e===window||e instanceof Window)},Ft={memoizeWithArgsHash:function(e,t){let n;return(...o)=>{n||(n={});const r=t(...o);return Object.hasOwnProperty.call(n,r)||(n[r]=e(...o)),n[r]}},memoizeOneWithArgsHash:function(e,t){let n,o;return(...r)=>{const a=t(...r);return n===a||(n=a,o=e(...r)),o}},memoizeOneWithArgsHashAndInvalidation:function(e,t){let n,o;return[(...r)=>{const a=t(...r);return n===a||(n=a,o=e(...r)),o},()=>{n=null}]}};const{batchUpdates:Wt}=It,{initializeNode:Gt,peekNodeInfo:Kt}=$e,{graph:jt}=be,{getNextStoreID:$t}=Ae,{DEFAULT_VALUE:Ht,recoilValues:qt,recoilValuesForKeys:Zt}=ce,{AbstractRecoilValue:Yt,getRecoilValueAsLoadable:Jt,setRecoilValue:Xt,setUnvalidatedRecoilValue:Qt}=yt,{updateRetainCount:en}=kt,{setInvalidateMemoizedSnapshot:tn}=qe,{getNextTreeStateVersion:nn,makeEmptyStoreState:on}=Ve,{isSSR:rn}=zt,{memoizeOneWithArgsHashAndInvalidation:an}=Ft;class sn{constructor(e,t){c(this,"_store",void 0),c(this,"_refCount",1),c(this,"getLoadable",(e=>(this.checkRefCount_INTERNAL(),Jt(this._store,e)))),c(this,"getPromise",(e=>(this.checkRefCount_INTERNAL(),this.getLoadable(e).toPromise()))),c(this,"getNodes_UNSTABLE",(e=>{if(this.checkRefCount_INTERNAL(),!0===(null==e?void 0:e.isModified)){if(!1===(null==e?void 0:e.isInitialized))return[];const t=this._store.getState().currentTree;return Zt(t.dirtyAtoms)}const t=this._store.getState().knownAtoms,n=this._store.getState().knownSelectors;return null==(null==e?void 0:e.isInitialized)?qt.values():!0===e.isInitialized?Zt(Ot([t,n])):De(qt.values(),(({key:e})=>!t.has(e)&&!n.has(e)))})),c(this,"getInfo_UNSTABLE",(({key:e})=>(this.checkRefCount_INTERNAL(),Kt(this._store,this._store.getState().currentTree,e)))),c(this,"map",(e=>{this.checkRefCount_INTERNAL();const t=new dn(this,Wt);return e(t),t})),c(this,"asyncMap",(async e=>{this.checkRefCount_INTERNAL();const t=new dn(this,Wt);return t.retain(),await e(t),t.autoRelease_INTERNAL(),t})),this._store={storeID:$t(),parentStoreID:t,getState:()=>e,replaceState:t=>{e.currentTree=t(e.currentTree)},getGraph:t=>{const n=e.graphsByVersion;if(n.has(t))return l(n.get(t));const o=jt();return n.set(t,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw s("Cannot subscribe to Snapshots")}};for(const e of this._store.getState().knownAtoms)Gt(this._store,e,"get"),en(this._store,e,1);this.autoRelease_INTERNAL()}retain(){this._refCount,this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){rn||window.setTimeout((()=>this._release()),10)}_release(){if(this._refCount--,0===this._refCount){if(this._store.getState().nodeCleanupFunctions.forEach((e=>e())),this._store.getState().nodeCleanupFunctions.clear(),!P("recoil_memory_managament_2020"))return}else this._refCount}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){P("recoil_memory_managament_2020")&&this._refCount}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function un(e,t,n=!1){const o=e.getState(),r=n?nn():t.version;return{currentTree:{version:n?r:t.version,stateID:n?r:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(o.knownAtoms),knownSelectors:new Set(o.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(r,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Q(o.nodeCleanupFunctions.entries(),(([e])=>[e,()=>{}])))}}const[ln,cn]=an(((e,t)=>{var n;const o=e.getState(),r="latest"===t?null!==(n=o.nextTree)&&void 0!==n?n:o.currentTree:l(o.previousTree);return new sn(un(e,r),e.storeID)}),((e,t)=>{var n,o;return String(t)+String(e.storeID)+String(null===(n=e.getState().nextTree)||void 0===n?void 0:n.version)+String(e.getState().currentTree.version)+String(null===(o=e.getState().previousTree)||void 0===o?void 0:o.version)}));tn(cn);class dn extends sn{constructor(e,t){super(un(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID()),c(this,"_batch",void 0),c(this,"set",((e,t)=>{this.checkRefCount_INTERNAL();const n=this.getStore_INTERNAL();this._batch((()=>{en(n,e.key,1),Xt(this.getStore_INTERNAL(),e,t)}))})),c(this,"reset",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();this._batch((()=>{en(t,e.key,1),Xt(this.getStore_INTERNAL(),e,Ht)}))})),c(this,"setUnvalidatedAtomValues_DEPRECATED",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();Wt((()=>{for(const[n,o]of e.entries())en(t,n,1),Qt(t,new Yt(n),o)}))})),this._batch=t}}var fn={Snapshot:sn,MutableSnapshot:dn,freshSnapshot:function(e){const t=new sn(on());return null!=e?t.map(e):t},cloneSnapshot:function(e,t="latest"){const n=ln(e,t);return n.isRetained()?n:(cn(),ln(e,t))}},hn=fn.Snapshot,pn=fn.MutableSnapshot,vn=fn.freshSnapshot,yn=fn.cloneSnapshot,_n=Object.freeze({__proto__:null,Snapshot:hn,MutableSnapshot:pn,freshSnapshot:vn,cloneSnapshot:yn}),mn=function(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t};const{useRef:Sn}=r();var gn=function(e){const t=Sn(e);return t.current===e&&"function"==typeof e&&(t.current=e()),t};const{getNextTreeStateVersion:bn,makeEmptyStoreState:Tn}=Ve,{cleanUpNode:Rn,getDownstreamNodes:wn,initializeNode:An,setNodeValue:En,setUnvalidatedAtomValue_DEPRECATED:Nn}=$e,{graph:kn}=be,{cloneGraph:Ln}=be,{getNextStoreID:Vn}=Ae,{createMutableSource:Cn,reactMode:Mn}=G,{applyAtomValueWrites:Un}=yt,{releaseScheduledRetainablesNow:Dn}=kt,{freshSnapshot:Bn}=_n,{useCallback:In,useContext:On,useEffect:Pn,useMemo:xn,useRef:zn,useState:Fn}=r();function Wn(){throw s("This component must be used inside a <RecoilRoot> component.")}const Gn=Object.freeze({storeID:Vn(),getState:Wn,replaceState:Wn,getGraph:Wn,subscribeToTransactions:Wn,addTransactionMetadata:Wn});let Kn=!1;function jn(e){if(Kn)throw s("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(null===t.nextTree){P("recoil_memory_managament_2020")&&P("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Dn(e);const n=t.currentTree.version,o=bn();t.nextTree={...t.currentTree,version:o,stateID:o,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(o,Ln(l(t.graphsByVersion.get(n))))}}const $n=r().createContext({current:Gn}),Hn=()=>On($n),qn=r().createContext(null);function Zn(e,t,n){const o=wn(e,n,n.dirtyAtoms);for(const e of o){const o=t.nodeToComponentSubscriptions.get(e);if(o)for(const[e,[t,r]]of o)r(n)}}function Yn(e){const t=e.getState(),n=t.currentTree,o=n.dirtyAtoms;if(o.size){for(const[n,r]of t.nodeTransactionSubscriptions)if(o.has(n))for(const[t,n]of r)n(e);for(const[n,o]of t.transactionSubscriptions)o(e);(!Mn().early||t.suspendedComponentResolvers.size>0)&&(Zn(e,t,n),t.suspendedComponentResolvers.forEach((e=>e())),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach((e=>e(n))),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function Jn({setNotifyBatcherOfChange:e}){const t=Hn(),[,n]=Fn([]);return e((()=>n({}))),Pn((()=>(e((()=>n({}))),()=>{e((()=>{}))})),[e]),Pn((()=>{de("Batcher",(()=>{!function(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(null==n)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,Yn(e),null!=t.previousTree&&t.graphsByVersion.delete(t.previousTree.version),t.previousTree=null,P("recoil_memory_managament_2020")&&null==n&&Dn(e)}finally{t.commitDepth--}}(t.current)}))})),null}let Xn=0;function Qn({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:o}){let a;const i=e=>{const t=a.current.graphsByVersion;if(t.has(e))return l(t.get(e));const n=kn();return t.set(e,n),n},s=(e,t)=>{if(null==t){const{transactionSubscriptions:t}=h.current.getState(),n=Xn++;return t.set(n,e),{release:()=>{t.delete(n)}}}{const{nodeTransactionSubscriptions:n}=h.current.getState();n.has(t)||n.set(t,new Map);const o=Xn++;return l(n.get(t)).set(o,e),{release:()=>{const e=n.get(t);e&&(e.delete(o),0===e.size&&n.delete(t))}}}},u=e=>{jn(h.current);for(const t of Object.keys(e))l(h.current.getState().nextTree).transactionMetadata[t]=e[t]},c=e=>{jn(h.current);const t=l(a.current.nextTree);let n;try{Kn=!0,n=e(t)}finally{Kn=!1}n!==t&&(a.current.nextTree=n,Mn().early&&Zn(h.current,a.current,n),l(d.current)())},d=zn(null),f=In((e=>{d.current=e}),[d]),h=gn((()=>null!=n?n:{storeID:Vn(),getState:()=>a.current,replaceState:c,getGraph:i,subscribeToTransactions:s,addTransactionMetadata:u}));null!=n&&(h.current=n),a=gn((()=>null!=e?function(e,t){const n=Tn();return t({set:(t,o)=>{const r=n.currentTree,a=En(e,r,t.key,o),i=new Set(a.keys()),s=r.nonvalidatedAtoms.clone();for(const e of i)s.delete(e);n.currentTree={...r,dirtyAtoms:mn(r.dirtyAtoms,i),atomValues:Un(r.atomValues,a),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:e=>{e.forEach(((e,t)=>{n.currentTree=Nn(n.currentTree,t,e)}))}}),n}(h.current,e):null!=t?function(e){const t=Bn(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach((e=>e())),n.nodeCleanupFunctions.clear(),n}(t):Tn()));const p=xn((()=>null==Cn?void 0:Cn(a,(()=>a.current.currentTree.version))),[a]);return Pn((()=>{const e=h.current;for(const t of new Set(e.getState().knownAtoms))An(e,t,"get");return()=>{for(const t of e.getState().knownAtoms)Rn(e,t)}}),[h]),r().createElement($n.Provider,{value:h},r().createElement(qn.Provider,{value:p},r().createElement(Jn,{setNotifyBatcherOfChange:f}),o))}var eo={RecoilRoot:function(e){const{override:t,...n}=e,o=Hn();return!1===t&&o.current!==Gn?e.children:r().createElement(Qn,n)},useStoreRef:Hn,useRecoilMutableSource:function(){const e=On(qn);return e},useRecoilStoreID:function(){return Hn().current.storeID},notifyComponents_FOR_TESTING:Zn,sendEndOfBatchNotifications_FOR_TESTING:Yn};const{useEffect:to,useRef:no}=r();var oo=function(e){const t=no();return to((()=>{t.current=e})),t.current};const{useStoreRef:ro}=eo,{SUSPENSE_TIMEOUT_MS:ao}=kt,{updateRetainCount:io}=kt,{RetentionZone:so}=Me,{useEffect:uo,useRef:lo}=r(),{isSSR:co}=zt;var fo=function(e){if(P("recoil_memory_managament_2020"))return function(e){const t=(Array.isArray(e)?e:[e]).map((e=>e instanceof so?e:e.key)),n=ro();uo((()=>{if(!P("recoil_memory_managament_2020"))return;const e=n.current;if(o.current&&!co)window.clearTimeout(o.current),o.current=null;else for(const n of t)io(e,n,1);return()=>{for(const n of t)io(e,n,-1)}}),[n,...t]);const o=lo(),r=oo(t);if(!(co||void 0!==r&&function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0}(r,t))){const e=n.current;for(const n of t)io(e,n,1);if(r)for(const t of r)io(e,t,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout((()=>{o.current=null;for(const n of t)io(e,n,-1)}),ao)}}(e)};const{batchUpdates:ho}=It,{DEFAULT_VALUE:po}=ce,{currentRendererSupportsUseSyncExternalStore:vo,reactMode:yo,useMutableSource:_o,useSyncExternalStore:mo}=G,{useRecoilMutableSource:So,useStoreRef:go}=eo,{isRecoilValue:bo}=X,{AbstractRecoilValue:To,getRecoilValueAsLoadable:Ro,setRecoilValue:wo,setUnvalidatedRecoilValue:Ao,subscribeToRecoilValue:Eo}=yt,{useCallback:No,useEffect:ko,useMemo:Lo,useRef:Vo,useState:Co}=r(),{setByAddingToSet:Mo}=Ue,{isSSR:Uo}=zt;function Do(e,t,n){if("hasValue"===e.state)return e.contents;if("loading"===e.state)throw new Promise((t=>{const o=n.current.getState().suspendedComponentResolvers;o.add(t),Uo&&u(e.contents)&&e.contents.finally((()=>{o.delete(t)}))}));throw"hasError"===e.state?e.contents:s(`Invalid value of loadable atom "${t.key}"`)}function Bo(e){const t=go(),n="<component name not available>",o=No((()=>{var n;const o=t.current,r=o.getState(),a=yo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return{loadable:Ro(o,e,a),key:e.key}}),[t,e]),r=No((e=>{let t;return()=>{var n,o;const r=e();return null!==(n=t)&&void 0!==n&&n.loadable.is(r.loadable)&&(null===(o=t)||void 0===o?void 0:o.key)===r.key?t:(t=r,r)}}),[]),a=Lo((()=>r(o)),[o,r]),i=No((o=>{const r=t.current;return Eo(r,e,o,n).release}),[t,e,n]);return mo(i,a,a).loadable}function Io(e){const t=go(),n=No((()=>{var n;const o=t.current,r=o.getState(),a=yo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return Ro(o,e,a)}),[t,e]),o=No((()=>n()),[n]),r="<component name not available>",a=No(((o,a)=>{const i=t.current;return Eo(i,e,(()=>{if(!P("recoil_suppress_rerender_in_callback"))return a();const e=n();l.current.is(e)||a(),l.current=e}),r).release}),[t,e,r,n]),i=So();if(null==i)throw s("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const u=_o(i,o,a),l=Vo(u);return ko((()=>{l.current=u})),u}function Oo(e){const t=go(),n="<component name not available>",o=No((()=>{var n;const o=t.current,r=o.getState(),a=yo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return Ro(o,e,a)}),[t,e]),r=No((()=>({loadable:o(),key:e.key})),[o,e.key]),a=No((e=>{const t=r();return e.loadable.is(t.loadable)&&e.key===t.key?e:t}),[r]);ko((()=>{const o=Eo(t.current,e,(e=>{s(a)}),n);return s(a),o.release}),[n,e,t,a]);const[i,s]=Co(r);return i.key!==e.key?r().loadable:i.loadable}function Po(e){const t=go(),[,n]=Co([]),o="<component name not available>",r=No((()=>{var n;const o=t.current,r=o.getState(),a=yo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return Ro(o,e,a)}),[t,e]),a=r(),i=Vo(a);return ko((()=>{i.current=a})),ko((()=>{const a=t.current,s=a.getState(),u=Eo(a,e,(e=>{var t;if(!P("recoil_suppress_rerender_in_callback"))return n([]);const o=r();null!==(t=i.current)&&void 0!==t&&t.is(o)||n(o),i.current=o}),o);if(s.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push((()=>{i.current=null,n([])}));else{var l;if(!P("recoil_suppress_rerender_in_callback"))return n([]);const e=r();null!==(l=i.current)&&void 0!==l&&l.is(e)||n(e),i.current=e}return u.release}),[o,r,e,t]),a}function xo(e){return P("recoil_memory_managament_2020")&&fo(e),{TRANSITION_SUPPORT:Oo,SYNC_EXTERNAL_STORE:vo()?Bo:Oo,MUTABLE_SOURCE:Io,LEGACY:Po}[yo().mode](e)}function zo(e){const t=go();return Do(xo(e),e,t)}function Fo(e){const t=go();return No((n=>{wo(t.current,e,n)}),[t,e])}function Wo(e){return P("recoil_memory_managament_2020")&&fo(e),Oo(e)}function Go(e){const t=go();return Do(Wo(e),e,t)}var Ko={recoilComponentGetRecoilValueCount_FOR_TESTING:{current:0},useRecoilInterface:function(){const e="<component name not available>",t=go(),[,n]=Co([]),o=Vo(new Set);o.current=new Set;const r=Vo(new Set),a=Vo(new Map),i=No((e=>{const t=a.current.get(e);t&&(t.release(),a.current.delete(e))}),[a]),s=No(((e,t)=>{a.current.has(t)&&n([])}),[]);return ko((()=>{const n=t.current;me(o.current,r.current).forEach((t=>{if(a.current.has(t))return;const o=Eo(n,new To(t),(e=>s(e,t)),e);a.current.set(t,o),n.getState().nextTree?n.getState().queuedComponentCallbacks_DEPRECATED.push((()=>{s(n.getState(),t)})):s(n.getState(),t)})),me(r.current,o.current).forEach((e=>{i(e)})),r.current=o.current})),ko((()=>{const n=a.current;return me(o.current,new Set(n.keys())).forEach((o=>{const r=Eo(t.current,new To(o),(e=>s(e,o)),e);n.set(o,r)})),()=>n.forEach(((e,t)=>i(t)))}),[e,t,i,s]),Lo((()=>{function e(e){return n=>{wo(t.current,e,n)}}function n(e){var n;o.current.has(e.key)||(o.current=Mo(o.current,e.key));const r=t.current.getState();return Ro(t.current,e,yo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree)}function r(e){return Do(n(e),e,t)}return{getRecoilValue:r,getRecoilValueLoadable:n,getRecoilState:function(t){return[r(t),e(t)]},getRecoilStateLoadable:function(t){return[n(t),e(t)]},getSetRecoilState:e,getResetRecoilState:function(e){return()=>wo(t.current,e,po)}}}),[o,t])},useRecoilState:function(e){return[zo(e),Fo(e)]},useRecoilStateLoadable:function(e){return[xo(e),Fo(e)]},useRecoilValue:zo,useRecoilValueLoadable:xo,useResetRecoilState:function(e){const t=go();return No((()=>{wo(t.current,e,po)}),[t,e])},useSetRecoilState:Fo,useSetUnvalidatedAtomValues:function(){const e=go();return(t,n={})=>{ho((()=>{e.current.addTransactionMetadata(n),t.forEach(((t,n)=>Ao(e.current,new To(n),t)))}))}},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Wo,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Go,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:function(e){return[Go(e),Fo(e)]}};const{batchUpdates:jo}=It,{DEFAULT_VALUE:$o,getNode:Ho,nodes:qo}=ce,{useStoreRef:Zo}=eo,{AbstractRecoilValue:Yo,setRecoilValueLoadable:Jo}=yt,{SUSPENSE_TIMEOUT_MS:Xo}=kt,{cloneSnapshot:Qo}=_n,{useCallback:er,useEffect:tr,useRef:nr,useState:or}=r(),{isSSR:rr}=zt;function ar(e){const t=Zo();tr((()=>t.current.subscribeToTransactions(e).release),[e,t])}function ir(e){const t=e.atomValues.toMap(),n=Se(function(e,t){const n=new Map;for(const[o,r]of e)t(r,o)&&n.set(o,r);return n}(t,((e,t)=>{const n=Ho(t).persistence_UNSTABLE;return null!=n&&"none"!==n.type&&"hasValue"===e.state})),(e=>e.contents));return function(...e){const t=new Map;for(let n=0;n<e.length;n++){const o=e[n].keys();let r;for(;!(r=o.next()).done;)t.set(r.value,e[n].get(r.value))}return t}(e.nonvalidatedAtoms.toMap(),n)}function sr(e,t){var n;const o=e.getState(),r=null!==(n=o.nextTree)&&void 0!==n?n:o.currentTree,a=t.getStore_INTERNAL().getState().currentTree;jo((()=>{const n=new Set;for(const e of[r.atomValues.keys(),a.atomValues.keys()])for(const t of e){var o,i;(null===(o=r.atomValues.get(t))||void 0===o?void 0:o.contents)!==(null===(i=a.atomValues.get(t))||void 0===i?void 0:i.contents)&&Ho(t).shouldRestoreFromSnapshots&&n.add(t)}n.forEach((t=>{Jo(e,new Yo(t),a.atomValues.has(t)?l(a.atomValues.get(t)):$o)})),e.replaceState((e=>({...e,stateID:t.getID()})))}))}var ur={useRecoilSnapshot:function(){const e=Zo(),[t,n]=or((()=>Qo(e.current))),o=oo(t),r=nr(),a=nr();var i;(ar(er((e=>n(Qo(e))),[])),tr((()=>{const e=t.retain();var n;return r.current&&!rr&&(window.clearTimeout(r.current),r.current=null,null===(n=a.current)||void 0===n||n.call(a),a.current=null),()=>{window.setTimeout(e,10)}}),[t]),o===t||rr)||(r.current&&(window.clearTimeout(r.current),r.current=null,null===(i=a.current)||void 0===i||i.call(a),a.current=null),a.current=t.retain(),r.current=window.setTimeout((()=>{var e;r.current=null,null===(e=a.current)||void 0===e||e.call(a),a.current=null}),Xo));return t},gotoSnapshot:sr,useGotoRecoilSnapshot:function(){const e=Zo();return er((t=>sr(e.current,t)),[e])},useRecoilTransactionObserver:function(e){ar(er((t=>{const n=Qo(t,"latest"),o=Qo(t,"previous");e({snapshot:n,previousSnapshot:o})}),[e]))},useTransactionObservation_DEPRECATED:function(e){ar(er((t=>{let n=t.getState().previousTree;const o=t.getState().currentTree;n||(n=t.getState().currentTree);const r=ir(o),a=ir(n),i=Se(qo,(e=>{var t,n,o,r;return{persistence_UNSTABLE:{type:null!==(t=null===(n=e.persistence_UNSTABLE)||void 0===n?void 0:n.type)&&void 0!==t?t:"none",backButton:null!==(o=null===(r=e.persistence_UNSTABLE)||void 0===r?void 0:r.backButton)&&void 0!==o&&o}}})),s=function(e,t){const n=new Set;for(const o of e)t(o)&&n.add(o);return n}(o.dirtyAtoms,(e=>r.has(e)||a.has(e)));e({atomValues:r,previousAtomValues:a,atomInfo:i,modifiedAtoms:s,transactionMetadata:{...o.transactionMetadata}})}),[e]))},useTransactionSubscription_DEPRECATED:ar};const{peekNodeInfo:lr}=$e,{useStoreRef:cr}=eo;const{reactMode:dr}=G,{RecoilRoot:fr,useStoreRef:hr}=eo,{useMemo:pr}=r();const{loadableWithValue:vr}=V,{initializeNode:yr}=$e,{DEFAULT_VALUE:_r,getNode:mr}=ce,{copyTreeState:Sr,getRecoilValueAsLoadable:gr,invalidateDownstreams:br,writeLoadableToTreeState:Tr}=yt;function Rr(e){return"atom"===mr(e.key).nodeType}class wr{constructor(e,t){c(this,"_store",void 0),c(this,"_treeState",void 0),c(this,"_changes",void 0),c(this,"get",(e=>{if(this._changes.has(e.key))return this._changes.get(e.key);if(!Rr(e))throw s("Reading selectors within atomicUpdate is not supported");const t=gr(this._store,e,this._treeState);if("hasValue"===t.state)return t.contents;throw"hasError"===t.state?t.contents:s(`Expected Recoil atom ${e.key} to have a value, but it is in a loading state.`)})),c(this,"set",((e,t)=>{if(!Rr(e))throw s("Setting selectors within atomicUpdate is not supported");if("function"==typeof t){const n=this.get(e);this._changes.set(e.key,t(n))}else yr(this._store,e.key,"set"),this._changes.set(e.key,t)})),c(this,"reset",(e=>{this.set(e,_r)})),this._store=e,this._treeState=t,this._changes=new Map}newTreeState_INTERNAL(){if(0===this._changes.size)return this._treeState;const e=Sr(this._treeState);for(const[t,n]of this._changes)Tr(e,t,vr(n));return br(this._store,e),e}}var Ar=function(e){return t=>{e.replaceState((n=>{const o=new wr(e,n);return t(o),o.newTreeState_INTERNAL()}))}},Er=Object.freeze({__proto__:null,atomicUpdater:Ar}),Nr=function(e,t){if(!e)throw new Error(t)};const{atomicUpdater:kr}=Er,{batchUpdates:Lr}=It,{DEFAULT_VALUE:Vr}=ce,{useStoreRef:Cr}=eo,{refreshRecoilValue:Mr,setRecoilValue:Ur}=yt,{cloneSnapshot:Dr}=_n,{gotoSnapshot:Br}=ur,{useCallback:Ir}=r();class Or{}const Pr=new Or;function xr(e,t,n,o){let r,a=Pr;var i;return Lr((()=>{const i="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if("function"!=typeof t)throw s(i);const u=Be({...null!=o?o:{},set:(t,n)=>Ur(e,t,n),reset:t=>Ur(e,t,Vr),refresh:t=>Mr(e,t),gotoSnapshot:t=>Br(e,t),transact_UNSTABLE:t=>kr(e)(t)},{snapshot:()=>{const t=Dr(e);return r=t.retain(),t}}),l=t(u);if("function"!=typeof l)throw s(i);a=l(...n)})),a instanceof Or&&Nr(!1),u(a)?a=a.finally((()=>{var e;null===(e=r)||void 0===e||e()})):null===(i=r)||void 0===i||i(),a}var zr={recoilCallback:xr,useRecoilCallback:function(e,t){const n=Cr();return Ir(((...t)=>xr(n.current,e,t)),null!=t?[...t,n]:void 0)}};const{useStoreRef:Fr}=eo,{refreshRecoilValue:Wr}=yt,{useCallback:Gr}=r();const{atomicUpdater:Kr}=Er,{useStoreRef:jr}=eo,{useMemo:$r}=r();var Hr=Object.freeze({__proto__:null,WrappedValue:class{constructor(e){c(this,"value",void 0),this.value=e}}});const{isFastRefreshEnabled:qr}=G;class Zr extends Error{}var Yr=Object.freeze({__proto__:null,TreeCache:class{constructor(e){var t,n,o;c(this,"_name",void 0),c(this,"_numLeafs",void 0),c(this,"_root",void 0),c(this,"_onHit",void 0),c(this,"_onSet",void 0),c(this,"_mapNodeValue",void 0),this._name=null==e?void 0:e.name,this._numLeafs=0,this._root=null,this._onHit=null!==(t=null==e?void 0:e.onHit)&&void 0!==t?t:()=>{},this._onSet=null!==(n=null==e?void 0:e.onSet)&&void 0!==n?n:()=>{},this._mapNodeValue=null!==(o=null==e?void 0:e.mapNodeValue)&&void 0!==o?o:e=>e}size(){return this._numLeafs}root(){return this._root}get(e,t){var n;return null===(n=this.getLeafNode(e,t))||void 0===n?void 0:n.value}getLeafNode(e,t){if(null==this._root)return;let n=this._root;for(;n;){if(null==t||t.onNodeVisit(n),"leaf"===n.type)return this._onHit(n),n;const o=this._mapNodeValue(e(n.nodeKey));n=n.branches.get(o)}}set(e,t,n){const o=()=>{var o,r,a,i;let s,u;for(const[t,o]of e){var l,c,d;const e=this._root;if("leaf"===(null==e?void 0:e.type))throw this.invalidCacheError();const r=s;if(s=r?r.branches.get(u):e,s=null!==(l=s)&&void 0!==l?l:{type:"branch",nodeKey:t,parent:r,branches:new Map,branchKey:u},"branch"!==s.type||s.nodeKey!==t)throw this.invalidCacheError();null==r||r.branches.set(u,s),null==n||null===(c=n.onNodeVisit)||void 0===c||c.call(n,s),u=this._mapNodeValue(o),this._root=null!==(d=this._root)&&void 0!==d?d:s}const f=s?null===(o=s)||void 0===o?void 0:o.branches.get(u):this._root;if(null!=f&&("leaf"!==f.type||f.branchKey!==u))throw this.invalidCacheError();const h={type:"leaf",value:t,parent:s,branchKey:u};null===(r=s)||void 0===r||r.branches.set(u,h),this._root=null!==(a=this._root)&&void 0!==a?a:h,this._numLeafs++,this._onSet(h),null==n||null===(i=n.onNodeVisit)||void 0===i||i.call(n,h)};try{o()}catch(e){if(!(e instanceof Zr))throw e;this.clear(),o()}}delete(e){const t=this.root();if(!t)return!1;if(e===t)return this._root=null,this._numLeafs=0,!0;let n=e.parent,o=e.branchKey;for(;n;){var r;if(n.branches.delete(o),n===t)return 0===n.branches.size?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;o=null===(r=n)||void 0===r?void 0:r.branchKey,n=n.parent}for(;n!==t;n=n.parent)if(null==n)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){qr();throw null!=this._name&&this._name,new Zr}}}),Jr=Object.freeze({__proto__:null,LRUCache:class{constructor(e){var t;c(this,"_maxSize",void 0),c(this,"_size",void 0),c(this,"_head",void 0),c(this,"_tail",void 0),c(this,"_map",void 0),c(this,"_keyMapper",void 0),this._maxSize=e.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=null!==(t=e.mapKey)&&void 0!==t?t:e=>e}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(e){return this._map.has(this._keyMapper(e))}get(e){const t=this._keyMapper(e),n=this._map.get(t);if(n)return this.set(e,n.value),n.value}set(e,t){const n=this._keyMapper(e);this._map.get(n)&&this.delete(e);const o=this.head(),r={key:e,right:o,left:null,value:t};o?o.left=r:this._tail=r,this._map.set(n,r),this._head=r,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const e=this.tail();e&&this.delete(e.key)}delete(e){const t=this._keyMapper(e);if(!this._size||!this._map.has(t))return;const n=l(this._map.get(t)),o=n.right,r=n.left;o&&(o.left=n.left),r&&(r.right=n.right),n===this.head()&&(this._head=o),n===this.tail()&&(this._tail=r),this._map.delete(t),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}});const{LRUCache:Xr}=Jr,{TreeCache:Qr}=Yr;var ea=function({name:e,maxSize:t,mapNodeValue:n=(e=>e)}){const o=new Xr({maxSize:t}),r=new Qr({name:e,mapNodeValue:n,onHit:e=>{o.set(e,!0)},onSet:e=>{const n=o.tail();o.set(e,!0),n&&r.size()>t&&r.delete(n.key)}});return r};function ta(e,t,n){if("string"==typeof e&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(!0!==(null==t?void 0:t.allowFunctions))throw s("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(null===e)return"null";var o;if("object"!=typeof e)return null!==(o=JSON.stringify(e))&&void 0!==o?o:"";if(u(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map(((e,n)=>ta(e,t,n.toString())))}]`;if("function"==typeof e.toJSON)return ta(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[n,r]of e)o["string"==typeof n?n:ta(n,t)]=r;return ta(o,t,n)}return e instanceof Set?ta(Array.from(e).sort(((e,n)=>ta(e,t).localeCompare(ta(n,t)))),t,n):void 0!==Symbol&&null!=e[Symbol.iterator]&&"function"==typeof e[Symbol.iterator]?ta(Array.from(e),t,n):`{${Object.keys(e).filter((t=>void 0!==e[t])).sort().map((n=>`${ta(n,t)}:${ta(e[n],t,n)}`)).join(",")}}`}var na=function(e,t={allowFunctions:!1}){return ta(e,t)};const{TreeCache:oa}=Yr,ra={equality:"reference",eviction:"keep-all",maxSize:1/0};const{isReactNative:aa,isWindow:ia}=zt;const{isLoadable:sa,loadableWithError:ua,loadableWithPromise:la,loadableWithValue:ca}=V,{WrappedValue:da}=Hr,{getNodeLoadable:fa,peekNodeLoadable:ha,setNodeValue:pa}=$e,{saveDepsToStore:va}=be,{DEFAULT_VALUE:ya,getConfigDeletionHandler:_a,getNode:ma,registerNode:Sa}=ce,{isRecoilValue:ga}=X,{markRecoilValueModified:ba}=yt,{retainedByOptionWithDefault:Ta}=kt,{recoilCallback:Ra}=zr,{startPerfBlock:wa}={startPerfBlock:function(e){return()=>null}};class Aa{}const Ea=new Aa,Na=[],ka=new Map,La=(()=>{let e=0;return()=>e++})();function Va(e){let t=null;const{key:n,get:o,cachePolicy_UNSTABLE:r}=e,a=null!=e.set?e.set:void 0,i=new Set,c=function({equality:e=ra.equality,eviction:t=ra.eviction,maxSize:n=ra.maxSize}=ra,o){const r=function(e){switch(e){case"reference":return e=>e;case"value":return e=>na(e)}throw s(`Unrecognized equality policy ${e}`)}(e);return function(e,t,n,o){switch(e){case"keep-all":return new oa({name:o,mapNodeValue:n});case"lru":return ea({name:o,maxSize:l(t),mapNodeValue:n});case"most-recent":return ea({name:o,maxSize:1,mapNodeValue:n})}throw s(`Unrecognized eviction policy ${e}`)}(t,n,r,o)}(null!=r?r:{equality:"reference",eviction:"keep-all"},n),d=Ta(e.retainedBy_UNSTABLE),f=new Map;let h=0;function p(){return!P("recoil_memory_managament_2020")||h>0}function v(e){return e.getState().knownSelectors.add(n),h++,()=>{h--}}function y(){return void 0!==_a(n)&&!p()}function _(e,t,n,o,r){L(t,o,r),m(e,n)}function m(e,t){k(e,t)&&N(e),S(t,!0)}function S(e,n){const o=ka.get(e);if(null!=o){for(const e of o)ba(e,l(t));n&&ka.delete(e)}}function g(e,t){let n=ka.get(t);null==n&&ka.set(t,n=new Set),n.add(e)}function b(e,t,n,o,r,a){return t.then((o=>{if(!p())throw N(e),Ea;null!=a.loadingDepKey&&a.loadingDepPromise===t?n.atomValues.set(a.loadingDepKey,ca(o)):e.getState().knownSelectors.forEach((e=>{n.atomValues.delete(e)}));const i=w(e,n);if(i&&"loading"!==i.state){if((k(e,r)||null==E(e))&&m(e,r),"hasValue"===i.state)return i.contents;throw i.contents}if(!k(e,r)){const t=A(e,n);if(null!=t)return t.loadingLoadable.contents}const[s,u]=R(e,n,r);if("loading"!==s.state&&_(e,n,r,s,u),"hasError"===s.state)throw s.contents;return s.contents})).catch((t=>{if(t instanceof Aa)throw Ea;if(!p())throw N(e),Ea;const a=ua(t);throw _(e,n,r,a,o),t}))}function T(e,t,o,r){var a,s,u,l,c,d,f;(k(e,r)||t.version===(null===(a=e.getState())||void 0===a||null===(s=a.currentTree)||void 0===s?void 0:s.version)||t.version===(null===(u=e.getState())||void 0===u||null===(l=u.nextTree)||void 0===l?void 0:l.version))&&va(n,o,e,null!==(c=null===(d=e.getState())||void 0===d||null===(f=d.nextTree)||void 0===f?void 0:f.version)&&void 0!==c?c:e.getState().currentTree.version);for(const e of o)i.add(e)}function R(e,r,a){const i=wa(n);let c=!0,d=!0;const f=()=>{i(),d=!1};let h,v,y=!1;const m={loadingDepKey:null,loadingDepPromise:null},g=new Map;function R({key:t}){const n=fa(e,r,t);switch(g.set(t,n),c||(T(e,r,new Set(g.keys()),a),function(e,t){k(e,t)&&(l(E(e)).stateVersions.clear(),S(t,!1))}(e,a)),n.state){case"hasValue":return n.contents;case"hasError":throw n.contents;case"loading":throw m.loadingDepKey=t,m.loadingDepPromise=n.contents,n.contents}throw s("Invalid Loadable state")}const w=n=>(...o)=>{if(d)throw s("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return null==t&&Nr(!1),Ra(e,n,o,{node:t})};try{h=o({get:R,getCallback:w}),h=ga(h)?R(h):h,sa(h)&&("hasError"===h.state&&(y=!0),h=h.contents),u(h)?h=function(e,t,n,o,r,a){return t.then((t=>{if(!p())throw N(e),Ea;const a=ca(t);return _(e,n,r,a,o),t})).catch((t=>{if(!p())throw N(e),Ea;if(u(t))return b(e,t,n,o,r,a);const i=ua(t);throw _(e,n,r,i,o),t}))}(e,h,r,g,a,m).finally(f):f(),h=h instanceof da?h.value:h}catch(t){h=t,u(h)?h=b(e,h,r,g,a,m).finally(f):(y=!0,f())}return v=y?ua(h):u(h)?la(h):ca(h),c=!1,function(e,t,n){if(k(e,t)){const t=E(e);null!=t&&(t.depValuesDiscoveredSoFarDuringAsyncWork=n)}}(e,a,g),T(e,r,new Set(g.keys()),a),[v,g]}function w(e,t){let o=t.atomValues.get(n);if(null!=o)return o;const r=new Set;try{o=c.get((n=>("string"!=typeof n&&Nr(!1),fa(e,t,n).contents)),{onNodeVisit:e=>{"branch"===e.type&&e.nodeKey!==n&&r.add(e.nodeKey)}})}catch(e){throw s(`Problem with cache lookup for selector "${n}": ${e.message}`)}var a;return o&&(t.atomValues.set(n,o),T(e,t,r,null===(a=E(e))||void 0===a?void 0:a.executionID)),o}function A(e,t){const n=Ot([f.has(e)?[l(f.get(e))]:[],Q(De(f,(([t])=>t!==e)),(([,e])=>e))]);function o(n){for(const[o,r]of n)if(!fa(e,t,o).is(r))return!0;return!1}for(const e of n){if(e.stateVersions.get(t.version)||!o(e.depValuesDiscoveredSoFarDuringAsyncWork))return e.stateVersions.set(t.version,!0),e;e.stateVersions.set(t.version,!1)}}function E(e){return f.get(e)}function N(e){f.delete(e)}function k(e,t){var n;return t===(null===(n=E(e))||void 0===n?void 0:n.executionID)}function L(e,t,o){e.atomValues.set(n,t);try{c.set(function(e){return Array.from(e.entries()).map((([e,t])=>[e,t.contents]))}(o),t)}catch(e){throw s(`Problem with setting cache for selector "${n}": ${e.message}`)}}function V(e,t){const o=t.atomValues.get(n);return null!=o?o:c.get((n=>{var o;return"string"!=typeof n&&Nr(!1),null===(o=ha(e,t,n))||void 0===o?void 0:o.contents}))}function C(e,t){return function(o){if(Na.includes(n)){const e=`Recoil selector has circular dependencies: ${Na.slice(Na.indexOf(n)).join(" → ")}`;return ua(s(e))}Na.push(n);try{return function(e,t){const n=w(e,t);if(null!=n)return N(e),n;const o=A(e,t);var r;if(null!=o)return"loading"===(null===(r=o.loadingLoadable)||void 0===r?void 0:r.state)&&g(e,o.executionID),o.loadingLoadable;const a=La(),[i,s]=R(e,t,a);return"loading"===i.state?(function(e,t,n,o,r){f.set(e,{depValuesDiscoveredSoFarDuringAsyncWork:o,executionID:t,loadingLoadable:n,stateVersions:new Map([[r.version,!0]])})}(e,a,i,s,t),g(e,a)):(N(e),L(t,i,s)),i}(e,t)}finally{Na.pop()}}()}function M(e){e.atomValues.delete(n)}function U(e,n){null==t&&Nr(!1);for(const t of i){var o;const r=ma(t);null===(o=r.clearCache)||void 0===o||o.call(r,e,n)}i.clear(),M(n),c.clear(),ba(e,t)}return t=Sa(null!=a?{key:n,nodeType:"selector",peek:V,get:C,set:(e,t,o)=>{let r=!1;const i=new Map;function l({key:o}){if(r)throw s("Recoil: Async selector sets are not currently supported.");const a=fa(e,t,o);if("hasValue"===a.state)return a.contents;if("loading"===a.state){const e=`Getting value of asynchronous atom or selector "${o}" in a pending state while setting selector "${n}" is not yet supported.`;throw s(e)}throw a.contents}function c(n,o){if(r){const e="Recoil: Async selector sets are not currently supported.";throw s(e)}const a="function"==typeof o?o(l(n)):o;pa(e,t,n.key,a).forEach(((e,t)=>i.set(t,e)))}const d=a({set:c,get:l,reset:function(e){c(e,ya)}},o);if(void 0!==d)throw u(d)?s("Recoil: Async selector sets are not currently supported."):s("Recoil: selector set should be a void function.");return r=!0,i},init:v,invalidate:M,clearCache:U,shouldDeleteConfigOnRelease:y,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d}:{key:n,nodeType:"selector",peek:V,get:C,init:v,invalidate:M,clearCache:U,shouldDeleteConfigOnRelease:y,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})}Va.value=e=>new da(e);var Ca=Va;const{isLoadable:Ma,loadableWithError:Ua,loadableWithPromise:Da,loadableWithValue:Ba}=V,{WrappedValue:Ia}=Hr,{peekNodeInfo:Oa}=$e,{DEFAULT_VALUE:Pa,DefaultValue:xa,getConfigDeletionHandler:za,registerNode:Fa,setConfigDeletionHandler:Wa}=ce,{isRecoilValue:Ga}=X,{getRecoilValueAsLoadable:Ka,markRecoilValueModified:ja,setRecoilValue:$a,setRecoilValueLoadable:Ha}=yt,{retainedByOptionWithDefault:qa}=kt,Za=e=>e instanceof Ia?e.value:e;function Ya(e){const{...t}=e,n="default"in e?e.default:new Promise((()=>{}));return Ga(n)?function(e){const t=Ya({...e,default:Pa,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:{...e.persistence_UNSTABLE,validator:t=>t instanceof xa?t:l(e.persistence_UNSTABLE).validator(t,Pa)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Ca({key:`${e.key}__withFallback`,get:({get:n})=>{const o=n(t);return o instanceof xa?e.default:o},set:({set:e},n)=>e(t,n),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return Wa(n.key,za(e.key)),n}({...t,default:n}):function(e){const{key:t,persistence_UNSTABLE:n}=e,o=qa(e.retainedBy_UNSTABLE);let r=0;function a(e){return Da(e.then((e=>(c=Ba(e),e))).catch((e=>{throw c=Ua(e),e})))}let i,c=u(e.default)?a(e.default):Ma(e.default)?"loading"===e.default.state?a(e.default.contents):e.default:Ba(Za(e.default));c.contents;const d=new Map;function f(e,n){var o,r;return null!==(o=null!==(r=n.atomValues.get(t))&&void 0!==r?r:i)&&void 0!==o?o:c}const h=Fa({key:t,nodeType:"atom",peek:f,get:function(e,o){if(o.atomValues.has(t))return l(o.atomValues.get(t));if(o.nonvalidatedAtoms.has(t)){if(null!=i)return i;if(null==n)return c;const e=o.nonvalidatedAtoms.get(t),r=n.validator(e,Pa),a=r instanceof xa?c:Ba(r);return i=a,i}return c},set:function(e,n,o){if(n.atomValues.has(t)){const e=l(n.atomValues.get(t));if("hasValue"===e.state&&o===e.contents)return new Map}else if(!n.nonvalidatedAtoms.has(t)&&o instanceof xa)return new Map;return i=void 0,(new Map).set(t,Ba(o))},init:function(n,o,a){var i;if(r++,n.getState().knownAtoms.add(t),"loading"===c.state){const y=()=>{var e;(null!==(e=n.getState().nextTree)&&void 0!==e?e:n.getState().currentTree).atomValues.has(t)||ja(n,h)};c.contents.finally(y)}const l=null!==(i=e.effects)&&void 0!==i?i:e.effects_UNSTABLE;if(null!=l){let _=Pa,m=!0,S=!1,g=null;function b(e){if(m&&e.key===t){const e=_;return e instanceof xa?f(0,o):u(e)?Da(e.then((e=>e instanceof xa?c.toPromise():e))):Ba(e)}return Ka(n,e)}function T(e){return b(e).toPromise()}function R(e){var o;const r=Oa(n,null!==(o=n.getState().nextTree)&&void 0!==o?o:n.getState().currentTree,e.key);return!m||e.key!==t||_ instanceof xa?r:{...r,isSet:!0,loadable:b(e)}}const w=e=>t=>{if(m){const n=b(h),o="hasValue"===n.state?n.contents:Pa;_="function"==typeof t?t(o):t,u(_)&&(_=_.then((t=>(g={effect:e,value:t},t))))}else{if(u(t))throw s("Setting atoms to async values is not implemented.");"function"!=typeof t&&(g={effect:e,value:Za(t)}),$a(n,h,"function"==typeof t?n=>{const o=Za(t(n));return g={effect:e,value:o},o}:Za(t))}},A=e=>()=>w(e)(Pa),E=e=>o=>{var r;const{release:a}=n.subscribeToTransactions((n=>{var r;let{currentTree:a,previousTree:i}=n.getState();i||(i=a);const s=null!==(r=a.atomValues.get(t))&&void 0!==r?r:c;if("hasValue"===s.state){var u,l,d,f;const n=s.contents,r=null!==(u=i.atomValues.get(t))&&void 0!==u?u:c,h="hasValue"===r.state?r.contents:Pa;(null===(l=g)||void 0===l?void 0:l.effect)!==e||(null===(d=g)||void 0===d?void 0:d.value)!==n?o(n,h,!a.atomValues.has(t)):(null===(f=g)||void 0===f?void 0:f.effect)===e&&(g=null)}}),t);d.set(n,[...null!==(r=d.get(n))&&void 0!==r?r:[],a])};for(const N of l)try{const k=N({node:h,storeID:n.storeID,parentStoreID_UNSTABLE:n.parentStoreID,trigger:a,setSelf:w(N),resetSelf:A(N),onSet:E(N),getPromise:T,getLoadable:b,getInfo_UNSTABLE:R});var p;null!=k&&d.set(n,[...null!==(p=d.get(n))&&void 0!==p?p:[],k])}catch(L){_=L,S=!0}if(m=!1,!(_ instanceof xa)){var v;const V=S?Ua(_):u(_)?Da(function(e,n){const o=n.then((n=>{var r,a;return(null===(a=(null!==(r=e.getState().nextTree)&&void 0!==r?r:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===o&&$a(e,h,n),n})).catch((n=>{var r,a;throw(null===(a=(null!==(r=e.getState().nextTree)&&void 0!==r?r:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===o&&Ha(e,h,Ua(n)),n}));return o}(n,_)):Ba(Za(_));V.contents,o.atomValues.set(t,V),null===(v=n.getState().nextTree)||void 0===v||v.atomValues.set(t,V)}}return()=>{var e;r--,null===(e=d.get(n))||void 0===e||e.forEach((e=>e())),d.delete(n)}},invalidate:function(){i=void 0},shouldDeleteConfigOnRelease:function(){return void 0!==za(t)&&r<=0},dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:o});return h}({...t,default:n})}Ya.value=e=>new Ia(e);var Ja=Ya,Xa=Object.freeze({__proto__:null,MapCache:class{constructor(e){var t;c(this,"_map",void 0),c(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=null!==(t=null==e?void 0:e.mapKey)&&void 0!==t?t:e=>e}size(){return this._map.size}has(e){return this._map.has(this._keyMapper(e))}get(e){return this._map.get(this._keyMapper(e))}set(e,t){this._map.set(this._keyMapper(e),t)}delete(e){this._map.delete(this._keyMapper(e))}clear(){this._map.clear()}}});const{LRUCache:Qa}=Jr,{MapCache:ei}=Xa,ti={equality:"reference",eviction:"none",maxSize:1/0};var ni=function({equality:e=ti.equality,eviction:t=ti.eviction,maxSize:n=ti.maxSize}=ti){const o=function(e){switch(e){case"reference":return e=>e;case"value":return e=>na(e)}throw s(`Unrecognized equality policy ${e}`)}(e),r=function(e,t,n){switch(e){case"keep-all":return new ei({mapKey:n});case"lru":return new Qa({mapKey:n,maxSize:l(t)});case"most-recent":return new Qa({mapKey:n,maxSize:1})}throw s(`Unrecognized eviction policy ${e}`)}(t,n,o);return r};const{setConfigDeletionHandler:oi}=ce;const{setConfigDeletionHandler:ri}=ce;let ai=0;var ii=function(e){var t,n;const o=ni({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return t=>{var n;let r;try{r=o.get(t)}catch(t){throw s(`Problem with cache lookup for selector ${e.key}: ${t.message}`)}if(null!=r)return r;const a=`${e.key}__selectorFamily/${null!==(n=na(t,{allowFunctions:!0}))&&void 0!==n?n:"void"}/${ai++}`,i=n=>e.get(t)(n),u=e.cachePolicy_UNSTABLE,l="function"==typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE;let c;if(null!=e.set){const n=e.set;c=Ca({key:a,get:i,set:(e,o)=>n(t)(e,o),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:l})}else c=Ca({key:a,get:i,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:l});return o.set(t,c),ri(c.key,(()=>{o.delete(t)})),c}};const si=ii({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});const ui=ii({key:"__error",get:e=>()=>{throw s(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:li,loadableWithPromise:ci,loadableWithValue:di}=V;function fi(e,t){const n=Array(t.length).fill(void 0),o=Array(t.length).fill(void 0);for(const[r,a]of t.entries())try{n[r]=e(a)}catch(e){o[r]=e}return[n,o]}function hi(e){return null!=e&&!u(e)}function pi(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))}function vi(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})}function yi(e,t,n){return vi(e,n.map(((e,n)=>null==e?di(t[n]):u(e)?ci(e):li(e))))}var _i={waitForNone:ii({key:"__waitForNone",get:e=>({get:t})=>{const n=pi(e),[o,r]=fi(t,n);return yi(e,o,r)},dangerouslyAllowMutability:!0}),waitForAny:ii({key:"__waitForAny",get:e=>({get:t})=>{const n=pi(e),[o,r]=fi(t,n);return r.some((e=>!u(e)))?yi(e,o,r):new Promise((t=>{for(const[n,a]of r.entries())u(a)&&a.then((a=>{o[n]=a,r[n]=void 0,t(yi(e,o,r))})).catch((a=>{r[n]=a,t(yi(e,o,r))}))}))},dangerouslyAllowMutability:!0}),waitForAll:ii({key:"__waitForAll",get:e=>({get:t})=>{const n=pi(e),[o,r]=fi(t,n);if(r.every((e=>null==e)))return vi(e,o);const a=r.find(hi);if(null!=a)throw a;return Promise.all(r).then((t=>{return vi(e,(n=o,t.map(((e,t)=>void 0===e?n[t]:e))));var n}))},dangerouslyAllowMutability:!0}),waitForAllSettled:ii({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=pi(e),[o,r]=fi(t,n);return r.every((e=>!u(e)))?yi(e,o,r):Promise.all(r.map(((e,t)=>u(e)?e.then((e=>{o[t]=e,r[t]=void 0})).catch((e=>{o[t]=void 0,r[t]=e})):null))).then((()=>yi(e,o,r)))},dangerouslyAllowMutability:!0}),noWait:ii({key:"__noWait",get:e=>({get:t})=>{try{return Ca.value(di(t(e)))}catch(e){return Ca.value(u(e)?ci(e):li(e))}},dangerouslyAllowMutability:!0})};const{RecoilLoadable:mi}=V,{DefaultValue:Si}=ce,{RecoilRoot:gi,useRecoilStoreID:bi}=eo,{isRecoilValue:Ti}=X,{retentionZone:Ri}=Me,{freshSnapshot:wi}=_n,{useRecoilState:Ai,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:Ei,useRecoilStateLoadable:Ni,useRecoilValue:ki,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Li,useRecoilValueLoadable:Vi,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Ci,useResetRecoilState:Mi,useSetRecoilState:Ui}=Ko,{useGotoRecoilSnapshot:Di,useRecoilSnapshot:Bi,useRecoilTransactionObserver:Ii}=ur,{useRecoilCallback:Oi}=zr,{noWait:Pi,waitForAll:xi,waitForAllSettled:zi,waitForAny:Fi,waitForNone:Wi}=_i;var Gi={DefaultValue:Si,isRecoilValue:Ti,RecoilLoadable:mi,RecoilEnv:U,RecoilRoot:gi,useRecoilStoreID:bi,useRecoilBridgeAcrossReactRoots_UNSTABLE:function(){"MUTABLE_SOURCE"===dr().mode&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=hr().current;return pr((()=>function({children:t}){return r().createElement(fr,{store_INTERNAL:e},t)}),[e])},atom:Ja,selector:Ca,atomFamily:function(e){var t,n;const o=ni({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return t=>{var n,r;const a=o.get(t);if(null!=a)return a;const{cachePolicyForParams_UNSTABLE:i,...s}=e,u="default"in e?e.default:new Promise((()=>{})),l=Ja({...s,key:`${e.key}__${null!==(n=na(t))&&void 0!==n?n:"void"}`,default:"function"==typeof u?u(t):u,retainedBy_UNSTABLE:"function"==typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE,effects:"function"==typeof e.effects?e.effects(t):"function"==typeof e.effects_UNSTABLE?e.effects_UNSTABLE(t):null!==(r=e.effects)&&void 0!==r?r:e.effects_UNSTABLE});return o.set(t,l),oi(l.key,(()=>{o.delete(t)})),l}},selectorFamily:ii,constSelector:function(e){return si(e)},errorSelector:function(e){return ui(e)},readOnlySelector:function(e){return e},noWait:Pi,waitForNone:Wi,waitForAny:Fi,waitForAll:xi,waitForAllSettled:zi,useRecoilValue:ki,useRecoilValueLoadable:Vi,useRecoilState:Ai,useRecoilStateLoadable:Ni,useSetRecoilState:Ui,useResetRecoilState:Mi,useGetRecoilValueInfo_UNSTABLE:function(){const e=cr();return({key:t})=>lr(e.current,e.current.getState().currentTree,t)},useRecoilRefresher_UNSTABLE:function(e){const t=Fr();return Gr((()=>{const n=t.current;Wr(n,e)}),[e,t])},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Ci,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Li,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:Ei,useRecoilCallback:Oi,useRecoilTransaction_UNSTABLE:function(e,t){const n=jr();return $r((()=>(...t)=>{Kr(n.current)((n=>{e(n)(...t)}))}),null!=t?[...t,n]:void 0)},useGotoRecoilSnapshot:Di,useRecoilSnapshot:Bi,useRecoilTransactionObserver_UNSTABLE:Ii,snapshot_UNSTABLE:wi,useRetain:fo,retentionZone:Ri},Ki=Gi.RecoilRoot,ji=Gi.atom,$i=Gi.selector,Hi=Gi.selectorFamily,qi=Gi.noWait,Zi=Gi.useRecoilValue,Yi=Gi.useRecoilValueLoadable,Ji=Gi.useRecoilState,Xi=Gi.useSetRecoilState,Qi=Gi.useResetRecoilState,es=Gi.useRecoilRefresher_UNSTABLE},8370:function(e){e.exports=void 0},5771:function(e){e.exports=void 0}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=function(t,n,r,a){if(!n){var i=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],a=e[c][2];for(var s=!0,u=0;u<n.length;u++)(!1&a||i>=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(s=!1,a<i&&(i=a));if(s){e.splice(c--,1);var l=r();void 0!==l&&(t=l)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[n,r,a]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={712:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,i=n[0],s=n[1],u=n[2],l=0;if(i.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(u)var c=u(o)}for(t&&t(n);l<i.length;l++)a=i[l],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),o.nc=void 0;var r=o(9853);r=o.O(r)}();
|
|
1
|
+
!function(){"use strict";var e,t={9853:function(e,t,n){n.r(t),n.d(t,{DefaultValue:function(){return js},RecoilEnv:function(){return Hs},RecoilLoadable:function(){return $s},RecoilRoot:function(){return qs},atom:function(){return Js},atomFamily:function(){return Qs},constSelector:function(){return ti},errorSelector:function(){return ni},isRecoilValue:function(){return Ks},noWait:function(){return ri},readOnlySelector:function(){return oi},retentionZone:function(){return Ni},selector:function(){return Xs},selectorFamily:function(){return ei},snapshot_UNSTABLE:function(){return wi},useGetRecoilValueInfo_UNSTABLE:function(){return vi},useGotoRecoilSnapshot:function(){return Ti},useRecoilBridgeAcrossReactRoots_UNSTABLE:function(){return Ys},useRecoilCallback:function(){return gi},useRecoilRefresher_UNSTABLE:function(){return _i},useRecoilSnapshot:function(){return bi},useRecoilState:function(){return di},useRecoilStateLoadable:function(){return fi},useRecoilState_TRANSITION_SUPPORT_UNSTABLE:function(){return mi},useRecoilStoreID:function(){return Zs},useRecoilTransactionObserver_UNSTABLE:function(){return Ai},useRecoilTransaction_UNSTABLE:function(){return Ri},useRecoilValue:function(){return ui},useRecoilValueLoadable:function(){return ci},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:function(){return Si},useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:function(){return yi},useResetRecoilState:function(){return pi},useRetain:function(){return Ei},useSetRecoilState:function(){return hi},waitForAll:function(){return ii},waitForAllSettled:function(){return li},waitForAny:function(){return si},waitForNone:function(){return ai}});var o=n(4073),r=n.n(o),a=n(5648),s=n.n(a),i=function(e){const t=new Error(e);if(void 0===t.stack)try{throw t}catch(e){}return t},l=function(e){return!!e&&"function"==typeof e.then},u=function(e,t){if(null!=e)return e;throw i(null!=t?t:"Got unexpected null or undefined")};function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d{getValue(){throw i("BaseLoadable")}toPromise(){throw i("BaseLoadable")}valueMaybe(){throw i("BaseLoadable")}valueOrThrow(){throw i(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw i("BaseLoadable")}promiseOrThrow(){throw i(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw i("BaseLoadable")}errorOrThrow(){throw i(`Loadable expected error, but in "${this.state}" state`)}is(e){return e.state===this.state&&e.contents===this.contents}map(e){throw i("BaseLoadable")}}class f extends d{constructor(e){super(),c(this,"state","hasValue"),c(this,"contents",void 0),this.contents=e}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(e){try{const t=e(this.contents);return l(t)?S(t):g(t)?t:v(t)}catch(t){return l(t)?S(t.next((()=>this.map(e)))):_(t)}}}class h extends d{constructor(e){super(),c(this,"state","hasError"),c(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(e){return this}}class p extends d{constructor(e){super(),c(this,"state","loading"),c(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(e){return S(this.contents.then((t=>{const n=e(t);if(g(n)){const e=n;switch(e.state){case"hasValue":case"loading":return e.contents;case"hasError":throw e.contents}}return n})).catch((t=>{if(l(t))return t.then((()=>this.map(e).contents));throw t})))}}function v(e){return Object.freeze(new f(e))}function _(e){return Object.freeze(new h(e))}function S(e){return Object.freeze(new p(e))}function y(){return Object.freeze(new p(new Promise((()=>{}))))}function m(e){const t=function(e){return e.every((e=>"hasValue"===e.state))?v(e.map((e=>e.contents))):e.some((e=>"hasError"===e.state))?_(u(e.find((e=>"hasError"===e.state)),"Invalid loadable passed to loadableAll").contents):S(Promise.all(e.map((e=>e.contents))))}((Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))).map((e=>g(e)?e:l(e)?S(e):v(e))));return Array.isArray(e)?t:t.map((t=>Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})))}function g(e){return e instanceof d}const R={of:e=>l(e)?S(e):g(e)?e:v(e),error:e=>_(e),loading:()=>y(),all:m,isLoadable:g};var T={loadableWithValue:v,loadableWithError:_,loadableWithPromise:S,loadableLoading:y,loadableAll:m,isLoadable:g,RecoilLoadable:R},b=T.loadableWithValue,A=T.loadableWithError,w=T.loadableWithPromise,E=T.loadableLoading,N=T.loadableAll,L=T.isLoadable,k=T.RecoilLoadable,V=Object.freeze({__proto__:null,loadableWithValue:b,loadableWithError:A,loadableWithPromise:w,loadableLoading:E,loadableAll:N,isLoadable:L,RecoilLoadable:k});const U={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};var C;"undefined"!=typeof process&&null!=(null===(C=process)||void 0===C?void 0:C.env)&&(function(e,t){var n,o;const r=null===(n=process.env[e])||void 0===n||null===(o=n.toLowerCase())||void 0===o?void 0:o.trim();if(null!=r&&""!==r){if(!["true","false"].includes(r))throw i(`process.env.${e} value must be 'true', 'false', or empty: ${r}`);a="true"===r,U.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=a}var a}("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED"),function(e,t){var n;const o=null===(n=process.env.RECOIL_GKS_ENABLED)||void 0===n?void 0:n.trim();null!=o&&""!==o&&o.split(/\s*,\s*|\s+/).forEach((e=>{U.RECOIL_GKS_ENABLED.add(e)}))}());var M=U;function B(e){return M.RECOIL_GKS_ENABLED.has(e)}B.setPass=e=>{M.RECOIL_GKS_ENABLED.add(e)},B.setFail=e=>{M.RECOIL_GKS_ENABLED.delete(e)},B.clear=()=>{M.RECOIL_GKS_ENABLED.clear()};var I,O,D,x=B;const P=null!==(I=r().createMutableSource)&&void 0!==I?I:r().unstable_createMutableSource,F=null!==(O=r().useMutableSource)&&void 0!==O?O:r().unstable_useMutableSource,z=null!==(D=r().useSyncExternalStore)&&void 0!==D?D:r().unstable_useSyncExternalStore;let G=!1;var W={createMutableSource:P,useMutableSource:F,useSyncExternalStore:z,currentRendererSupportsUseSyncExternalStore:function(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=r().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,o=null!=(null!==(e=null==t?void 0:t.current)&&void 0!==e?e:n.currentDispatcher).useSyncExternalStore;return!z||o||G||(G=!0),o},reactMode:function(){return x("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:x("recoil_sync_external_store")&&null!=z?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:x("recoil_mutable_source")&&null!=F&&"undefined"!=typeof window&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?x("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:x("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}},isFastRefreshEnabled:function(){return!1}};class j{constructor(e){c(this,"key",void 0),this.key=e}toJSON(){return{key:this.key}}}class K extends j{}class $ extends j{}var H={AbstractRecoilValue:j,RecoilState:K,RecoilValueReadOnly:$,isRecoilValue:function(e){return e instanceof K||e instanceof $}},q=H.AbstractRecoilValue,Z=H.RecoilState,Y=H.RecoilValueReadOnly,J=H.isRecoilValue,X=Object.freeze({__proto__:null,AbstractRecoilValue:q,RecoilState:Z,RecoilValueReadOnly:Y,isRecoilValue:J}),Q=function(e,t){return function*(){let n=0;for(const o of e)yield t(o,n++)}()};const{isFastRefreshEnabled:ee}=W;class te{}const ne=new te,oe=new Map,re=new Map;class ae extends Error{}const se=new Map;function ie(e){return se.get(e)}var le,ue,ce={nodes:oe,recoilValues:re,registerNode:function(e){M.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&function(e){if(oe.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in\n production. But it is safe to ignore this warning if it occurred because of\n hot module replacement.`;console.warn(t)}}(e.key),oe.set(e.key,e);const t=null==e.set?new X.RecoilValueReadOnly(e.key):new X.RecoilState(e.key);return re.set(e.key,t),t},getNode:function(e){const t=oe.get(e);if(null==t)throw new ae(`Missing definition for RecoilValue: "${e}""`);return t},getNodeMaybe:function(e){return oe.get(e)},deleteNodeConfigIfPossible:function(e){var t;if(!x("recoil_memory_managament_2020"))return;const n=oe.get(e);var o;null!=n&&null!==(t=n.shouldDeleteConfigOnRelease)&&void 0!==t&&t.call(n)&&(oe.delete(e),null===(o=ie(e))||void 0===o||o(),se.delete(e))},setConfigDeletionHandler:function(e,t){x("recoil_memory_managament_2020")&&(void 0===t?se.delete(e):se.set(e,t))},getConfigDeletionHandler:ie,recoilValuesForKeys:function(e){return Q(e,(e=>u(re.get(e))))},NodeMissingError:ae,DefaultValue:te,DEFAULT_VALUE:ne},de=function(e,t){t()},fe=(le=function(e){var t="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},n={},o=Math.pow(2,5),r=o-1,a=o/2,s=o/4,i={},l=function(e){return function(){return e}},u=n.hash=function(e){var n=void 0===e?"undefined":t(e);if("number"===n)return e;"string"!==n&&(e+="");for(var o=0,r=0,a=e.length;r<a;++r)o=(o<<5)-o+e.charCodeAt(r)|0;return o},c=function(e,t){return t>>>e&r},d=function(e){return 1<<e},f=function(e,t){return n=e&t-1,n=(n=(858993459&(n-=n>>1&1431655765))+(n>>2&858993459))+(n>>4)&252645135,127&(n+=n>>8)+(n>>16);var n},h=function(e,t,n,o){var r=o;if(!e){var a=o.length;r=new Array(a);for(var s=0;s<a;++s)r[s]=o[s]}return r[t]=n,r},p=function(e,t,n){var o=n.length-1,r=0,a=0,s=n;if(e)r=a=t;else for(s=new Array(o);r<t;)s[a++]=n[r++];for(++r;r<=o;)s[a++]=n[r++];return e&&(s.length=o),s},v={__hamt_isEmpty:!0},_=function(e){return e===v||e&&e.__hamt_isEmpty},S=function(e,t,n,o){return{type:1,edit:e,hash:t,key:n,value:o,_modify:b}},y=function(e,t,n){return{type:2,edit:e,hash:t,children:n,_modify:A}},m=function(e,t,n){return{type:3,edit:e,mask:t,children:n,_modify:w}},g=function(e,t,n){return{type:4,edit:e,size:t,children:n,_modify:E}},R=function e(t,n,o,r,a,s){if(o===a)return y(t,o,[s,r]);var i=c(n,o),l=c(n,a);return m(t,d(i)|d(l),i===l?[e(t,n+5,o,r,a,s)]:i<l?[r,s]:[s,r])},T=function(e,t){return e===t.edit},b=function(e,t,n,o,r,a,s){if(t(a,this.key)){var l=o(this.value);return l===this.value?this:l===i?(--s.value,v):T(e,this)?(this.value=l,this):S(e,r,a,l)}var u=o();return u===i?this:(++s.value,R(e,n,this.hash,this,r,S(e,r,a,u)))},A=function(e,t,n,o,r,a,s){if(r===this.hash){var l=function(e,t,n,o,r,a,s,l){for(var u=r.length,c=0;c<u;++c){var d=r[c];if(n(s,d.key)){var f=d.value,v=a(f);return v===f?r:v===i?(--l.value,p(e,c,r)):h(e,c,S(t,o,s,v),r)}}var _=a();return _===i?r:(++l.value,h(e,u,S(t,o,s,_),r))}(T(e,this),e,t,this.hash,this.children,o,a,s);return l===this.children?this:l.length>1?y(e,this.hash,l):l[0]}var u=o();return u===i?this:(++s.value,R(e,n,this.hash,this,r,S(e,r,a,u)))},w=function(e,t,n,o,r,s,i){var l=this.mask,u=this.children,S=c(n,r),y=d(S),R=f(l,y),b=l&y,A=b?u[R]:v,w=A._modify(e,t,n+5,o,r,s,i);if(A===w)return this;var E,N=T(e,this),L=l,k=void 0;if(b&&_(w)){if(!(L&=~y))return v;if(u.length<=2&&((E=u[1^R])===v||1===E.type||2===E.type))return u[1^R];k=p(N,R,u)}else if(b||_(w))k=h(N,R,w,u);else{if(u.length>=a)return function(e,t,n,o,r){for(var a=[],s=o,i=0,l=0;s;++l)1&s&&(a[l]=r[i++]),s>>>=1;return a[t]=n,g(e,i+1,a)}(e,S,w,l,u);L|=y,k=function(e,t,n,o){var r=o.length;if(e){for(var a=r;a>=t;)o[a--]=o[a];return o[t]=n,o}for(var s=0,i=0,l=new Array(r+1);s<t;)l[i++]=o[s++];for(l[t]=n;s<r;)l[++i]=o[s++];return l}(N,R,w,u)}return N?(this.mask=L,this.children=k,this):m(e,L,k)},E=function(e,t,n,o,r,a,i){var l=this.size,u=this.children,d=c(n,r),f=u[d],p=(f||v)._modify(e,t,n+5,o,r,a,i);if(f===p)return this;var S=T(e,this),y=void 0;if(_(f)&&!_(p))++l,y=h(S,d,p,u);else if(!_(f)&&_(p)){if(--l<=s)return function(e,t,n,o){for(var r=new Array(t-1),a=0,s=0,i=0,l=o.length;i<l;++i)if(i!==n){var u=o[i];u&&!_(u)&&(r[a++]=u,s|=1<<i)}return m(e,s,r)}(e,l,d,u);y=h(S,d,v,u)}else y=h(S,d,p,u);return S?(this.size=l,this.children=y,this):g(e,l,y)};function N(e,t,n,o,r){this._editable=e,this._edit=t,this._config=n,this._root=o,this._size=r}v._modify=function(e,t,n,o,r,a,s){var l=o();return l===i?v:(++s.value,S(e,r,a,l))},N.prototype.setTree=function(e,t){return this._editable?(this._root=e,this._size=t,this):e===this._root?this:new N(this._editable,this._edit,this._config,e,t)};var L=n.tryGetHash=function(e,t,n,o){for(var r=o._root,a=0,s=o._config.keyEq;;)switch(r.type){case 1:return s(n,r.key)?r.value:e;case 2:if(t===r.hash)for(var i=r.children,l=0,u=i.length;l<u;++l){var h=i[l];if(s(n,h.key))return h.value}return e;case 3:var p=c(a,t),v=d(p);if(r.mask&v){r=r.children[f(r.mask,v)],a+=5;break}return e;case 4:if(r=r.children[c(a,t)]){a+=5;break}return e;default:return e}};N.prototype.tryGetHash=function(e,t,n){return L(e,t,n,this)};var k=n.tryGet=function(e,t,n){return L(e,n._config.hash(t),t,n)};N.prototype.tryGet=function(e,t){return k(e,t,this)};var V=n.getHash=function(e,t,n){return L(void 0,e,t,n)};N.prototype.getHash=function(e,t){return V(e,t,this)},n.get=function(e,t){return L(void 0,t._config.hash(e),e,t)},N.prototype.get=function(e,t){return k(t,e,this)};var U=n.has=function(e,t,n){return L(i,e,t,n)!==i};N.prototype.hasHash=function(e,t){return U(e,t,this)};var C=n.has=function(e,t){return U(t._config.hash(e),e,t)};N.prototype.has=function(e){return C(e,this)};var M=function(e,t){return e===t};n.make=function(e){return new N(0,0,{keyEq:e&&e.keyEq||M,hash:e&&e.hash||u},v,0)},n.empty=n.make();var B=n.isEmpty=function(e){return e&&!!_(e._root)};N.prototype.isEmpty=function(){return B(this)};var I=n.modifyHash=function(e,t,n,o){var r={value:o._size},a=o._root._modify(o._editable?o._edit:NaN,o._config.keyEq,0,e,t,n,r);return o.setTree(a,r.value)};N.prototype.modifyHash=function(e,t,n){return I(n,e,t,this)};var O=n.modify=function(e,t,n){return I(e,n._config.hash(t),t,n)};N.prototype.modify=function(e,t){return O(t,e,this)};var D=n.setHash=function(e,t,n,o){return I(l(n),e,t,o)};N.prototype.setHash=function(e,t,n){return D(e,t,n,this)};var x=n.set=function(e,t,n){return D(n._config.hash(e),e,t,n)};N.prototype.set=function(e,t){return x(e,t,this)};var P=l(i),F=n.removeHash=function(e,t,n){return I(P,e,t,n)};N.prototype.removeHash=N.prototype.deleteHash=function(e,t){return F(e,t,this)};var z=n.remove=function(e,t){return F(t._config.hash(e),e,t)};N.prototype.remove=N.prototype.delete=function(e){return z(e,this)};var G=n.beginMutation=function(e){return new N(e._editable+1,e._edit+1,e._config,e._root,e._size)};N.prototype.beginMutation=function(){return G(this)};var W=n.endMutation=function(e){return e._editable=e._editable&&e._editable-1,e};N.prototype.endMutation=function(){return W(this)};var j=n.mutate=function(e,t){var n=G(t);return e(n),W(n)};N.prototype.mutate=function(e){return j(e,this)};var K=function(e){return e&&$(e[0],e[1],e[2],e[3],e[4])},$=function(e,t,n,o,r){for(;n<e;){var a=t[n++];if(a&&!_(a))return H(a,o,[e,t,n,o,r])}return K(r)},H=function(e,t,n){switch(e.type){case 1:return{value:t(e),rest:n};case 2:case 4:case 3:var o=e.children;return $(o.length,o,0,t,n);default:return K(n)}},q={done:!0};function Z(e){this.v=e}Z.prototype.next=function(){if(!this.v)return q;var e=this.v;return this.v=K(e.rest),e},Z.prototype[Symbol.iterator]=function(){return this};var Y=function(e,t){return new Z(H(e._root,t))},J=function(e){return[e.key,e.value]},X=n.entries=function(e){return Y(e,J)};N.prototype.entries=N.prototype[Symbol.iterator]=function(){return X(this)};var Q=function(e){return e.key},ee=n.keys=function(e){return Y(e,Q)};N.prototype.keys=function(){return ee(this)};var te=function(e){return e.value},ne=n.values=N.prototype.values=function(e){return Y(e,te)};N.prototype.values=function(){return ne(this)};var oe=n.fold=function(e,t,n){var o=n._root;if(1===o.type)return e(t,o.value,o.key);for(var r=[o.children],a=void 0;a=r.pop();)for(var s=0,i=a.length;s<i;){var l=a[s++];l&&l.type&&(1===l.type?t=e(t,l.value,l.key):r.push(l.children))}return t};N.prototype.fold=function(e,t){return oe(e,t,this)};var re=n.forEach=function(e,t){return oe((function(n,o,r){return e(o,r,t)}),null,t)};N.prototype.forEach=function(e){return re(e,this)};var ae=n.count=function(e){return e._size};N.prototype.count=function(){return ae(this)},Object.defineProperty(N.prototype,"size",{get:N.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n},le(ue={exports:{}}),ue.exports);class he{constructor(e){c(this,"_map",void 0),this._map=new Map(null==e?void 0:e.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(e){return this._map.get(e)}has(e){return this._map.has(e)}set(e,t){return this._map.set(e,t),this}delete(e){return this._map.delete(e),this}clone(){return ve(this)}toMap(){return new Map(this._map)}}class pe{constructor(e){if(c(this,"_hamt",fe.empty.beginMutation()),e instanceof pe){const t=e._hamt.endMutation();e._hamt=t.beginMutation(),this._hamt=t.beginMutation()}else if(e)for(const[t,n]of e.entries())this._hamt.set(t,n)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(e){return this._hamt.get(e)}has(e){return this._hamt.has(e)}set(e,t){return this._hamt.set(e,t),this}delete(e){return this._hamt.delete(e),this}clone(){return ve(this)}toMap(){return new Map(this._hamt)}}function ve(e){return x("recoil_hamt_2020")?new pe(e):new he(e)}var _e=ve,Se=Object.freeze({__proto__:null,persistentMap:_e}),ye=function(e,...t){const n=new Set;e:for(const o of e){for(const e of t)if(e.has(o))continue e;n.add(o)}return n},me=function(e,t){const n=new Map;return e.forEach(((e,o)=>{n.set(o,t(e,o))})),n};function ge(e,t,n,o){const{nodeDeps:r,nodeToNodeSubscriptions:a}=n,s=r.get(e);if(s&&o&&s!==o.nodeDeps.get(e))return;r.set(e,t);const i=null==s?t:ye(t,s);for(const t of i)a.has(t)||a.set(t,new Set),u(a.get(t)).add(e);if(s){const n=ye(s,t);for(const t of n){if(!a.has(t))return;const n=u(a.get(t));n.delete(e),0===n.size&&a.delete(t)}}}var Re={cloneGraph:function(e){return{nodeDeps:me(e.nodeDeps,(e=>new Set(e))),nodeToNodeSubscriptions:me(e.nodeToNodeSubscriptions,(e=>new Set(e)))}},graph:function(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}},saveDepsToStore:function(e,t,n,o){var r,a,s,i;const l=n.getState();o!==l.currentTree.version&&o!==(null===(r=l.nextTree)||void 0===r?void 0:r.version)&&(null===(a=l.previousTree)||void 0===a||a.version);const u=n.getGraph(o);if(ge(e,t,u),o===(null===(s=l.previousTree)||void 0===s?void 0:s.version)&&ge(e,t,n.getGraph(l.currentTree.version),u),o===(null===(i=l.previousTree)||void 0===i?void 0:i.version)||o===l.currentTree.version){var c;const o=null===(c=l.nextTree)||void 0===c?void 0:c.version;void 0!==o&&ge(e,t,n.getGraph(o),u)}}};let Te=0,be=0,Ae=0;var we={getNextTreeStateVersion:()=>Te++,getNextStoreID:()=>be++,getNextComponentID:()=>Ae++};const{persistentMap:Ee}=Se,{graph:Ne}=Re,{getNextTreeStateVersion:Le}=we;function ke(){const e=Le();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Ee(),nonvalidatedAtoms:Ee()}}var Ve={makeEmptyTreeState:ke,makeEmptyStoreState:function(){const e=ke();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(e.version,Ne()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}},getNextTreeStateVersion:Le};class Ue{}var Ce={RetentionZone:Ue,retentionZone:function(){return new Ue}},Me={setByAddingToSet:function(e,t){const n=new Set(e);return n.add(t),n},setByDeletingFromSet:function(e,t){const n=new Set(e);return n.delete(t),n},mapBySettingInMap:function(e,t,n){const o=new Map(e);return o.set(t,n),o},mapByUpdatingInMap:function(e,t,n){const o=new Map(e);return o.set(t,n(o.get(t))),o},mapByDeletingFromMap:function(e,t){const n=new Map(e);return n.delete(t),n},mapByDeletingMultipleFromMap:function(e,t){const n=new Map(e);return t.forEach((e=>n.delete(e))),n}},Be=function*(e,t){let n=0;for(const o of e)t(o,n++)&&(yield o)},Ie=function(e,t){return new Proxy(e,{get:(e,n)=>(!(n in e)&&n in t&&(e[n]=t[n]()),e[n]),ownKeys:e=>Object.keys(e)})};const{getNode:Oe,getNodeMaybe:De,recoilValuesForKeys:xe}=ce,{RetentionZone:Pe}=Ce,{setByAddingToSet:Fe}=Me,ze=Object.freeze(new Set);class Ge extends Error{}function We(e,t,n,o){const r=e.getState();if(r.nodeCleanupFunctions.has(n))return;const a=Oe(n),s=function(e,t,n){if(!x("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:o}=e.getState().retention;function r(e){let n=o.get(e);n||o.set(e,n=new Set),n.add(t)}if(n instanceof Pe)r(n);else if(Array.isArray(n))for(const e of n)r(e);return()=>{if(!x("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function r(e){const n=o.nodesRetainedByZone.get(e);null==n||n.delete(t),n&&0===n.size&&o.nodesRetainedByZone.delete(e)}if(n instanceof Pe)r(n);else if(Array.isArray(n))for(const e of n)r(e)}}(e,n,a.retainedBy),i=a.init(e,t,o);r.nodeCleanupFunctions.set(n,(()=>{i(),s()}))}function je(e,t,n){return Oe(n).peek(e,t)}function Ke(e,t,n){const o=new Set,r=Array.from(n),a=e.getGraph(t.version);for(let e=r.pop();e;e=r.pop()){var s;o.add(e);const t=null!==(s=a.nodeToNodeSubscriptions.get(e))&&void 0!==s?s:ze;for(const e of t)o.has(e)||r.push(e)}return o}var $e={getNodeLoadable:function(e,t,n){return We(e,t,n,"get"),Oe(n).get(e,t)},peekNodeLoadable:je,setNodeValue:function(e,t,n,o){const r=Oe(n);if(null==r.set)throw new Ge(`Attempt to set read-only RecoilValue: ${n}`);const a=r.set;return We(e,t,n,"set"),a(e,t,o)},initializeNode:function(e,t,n){We(e,e.getState().currentTree,t,n)},cleanUpNode:function(e,t){var n;const o=e.getState();null===(n=o.nodeCleanupFunctions.get(t))||void 0===n||n(),o.nodeCleanupFunctions.delete(t)},setUnvalidatedAtomValue_DEPRECATED:function(e,t,n){var o;const r=De(t);return null==r||null===(o=r.invalidate)||void 0===o||o.call(r,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Fe(e.dirtyAtoms,t)}},peekNodeInfo:function(e,t,n){const o=e.getState(),r=e.getGraph(t.version),a=Oe(n).nodeType;return Ie({type:a},{loadable:()=>je(e,t,n),isActive:()=>o.knownAtoms.has(n)||o.knownSelectors.has(n),isSet:()=>"selector"!==a&&t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var e;return xe(null!==(e=r.nodeDeps.get(n))&&void 0!==e?e:[])},subscribers:()=>{var r,a;return{nodes:xe(Be(Ke(e,t,new Set([n])),(e=>e!==n))),components:Q(null!==(r=null===(a=o.nodeToComponentSubscriptions.get(n))||void 0===a?void 0:a.values())&&void 0!==r?r:[],(([e])=>({name:e})))}}})},getDownstreamNodes:Ke};let He=null;var qe={setInvalidateMemoizedSnapshot:function(e){He=e},invalidateMemoizedSnapshot:function(){var e;null===(e=He)||void 0===e||e()}};const{getDownstreamNodes:Ze,getNodeLoadable:Ye,setNodeValue:Je}=$e,{getNextComponentID:Xe}=we,{getNode:Qe,getNodeMaybe:et}=ce,{DefaultValue:tt}=ce,{reactMode:nt}=W,{AbstractRecoilValue:ot,RecoilState:rt,RecoilValueReadOnly:at,isRecoilValue:st}=X,{invalidateMemoizedSnapshot:it}=qe;function lt(e,t,n){if("set"===n.type){const{recoilValue:o,valueOrUpdater:r}=n,a=function(e,t,{key:n},o){if("function"==typeof o){const r=Ye(e,t,n);if("loading"===r.state){const e=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw i(e)}if("hasError"===r.state)throw r.contents;return o(r.contents)}return o}(e,t,o,r),s=Je(e,t,o.key,a);for(const[e,n]of s.entries())ut(t,e,n)}else if("setLoadable"===n.type){const{recoilValue:{key:e},loadable:o}=n;ut(t,e,o)}else if("markModified"===n.type){const{recoilValue:{key:e}}=n;t.dirtyAtoms.add(e)}else if("setUnvalidated"===n.type){var o;const{recoilValue:{key:e},unvalidatedValue:r}=n,a=et(e);null==a||null===(o=a.invalidate)||void 0===o||o.call(a,t),t.atomValues.delete(e),t.nonvalidatedAtoms.set(e,r),t.dirtyAtoms.add(e)}else n.type}function ut(e,t,n){"hasValue"===n.state&&n.contents instanceof tt?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function ct(e,t){e.replaceState((n=>{const o=ht(n);for(const n of t)lt(e,o,n);return pt(e,o),it(),o}))}function dt(e,t){if(ft.length){const n=ft[ft.length-1];let o=n.get(e);o||n.set(e,o=[]),o.push(t)}else ct(e,[t])}const ft=[];function ht(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function pt(e,t){const n=Ze(e,t,t.dirtyAtoms);for(const e of n){var o,r;null===(o=et(e))||void 0===o||null===(r=o.invalidate)||void 0===r||r.call(o,t)}}function vt(e,t,n){dt(e,{type:"set",recoilValue:t,valueOrUpdater:n})}var _t={RecoilValueReadOnly:at,AbstractRecoilValue:ot,RecoilState:rt,getRecoilValueAsLoadable:function(e,{key:t},n=e.getState().currentTree){var o,r;const a=e.getState();n.version!==a.currentTree.version&&n.version!==(null===(o=a.nextTree)||void 0===o?void 0:o.version)&&(n.version,null===(r=a.previousTree)||void 0===r||r.version);const s=Ye(e,n,t);return"loading"===s.state&&s.contents.catch((()=>{})),s},setRecoilValue:vt,setRecoilValueLoadable:function(e,t,n){if(n instanceof tt)return vt(e,t,n);dt(e,{type:"setLoadable",recoilValue:t,loadable:n})},markRecoilValueModified:function(e,t){dt(e,{type:"markModified",recoilValue:t})},setUnvalidatedRecoilValue:function(e,t,n){dt(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})},subscribeToRecoilValue:function(e,{key:t},n,o=null){const r=Xe(),a=e.getState();a.nodeToComponentSubscriptions.has(t)||a.nodeToComponentSubscriptions.set(t,new Map),u(a.nodeToComponentSubscriptions.get(t)).set(r,[null!=o?o:"<not captured>",n]);const s=nt();if(s.early&&("LEGACY"===s.mode||"MUTABLE_SOURCE"===s.mode)){const o=e.getState().nextTree;o&&o.dirtyAtoms.has(t)&&n(o)}return{release:()=>{const n=e.getState(),o=n.nodeToComponentSubscriptions.get(t);void 0!==o&&o.has(r)&&(o.delete(r),0===o.size&&n.nodeToComponentSubscriptions.delete(t))}}},isRecoilValue:st,applyAtomValueWrites:function(e,t){const n=e.clone();return t.forEach(((e,t)=>{"hasValue"===e.state&&e.contents instanceof tt?n.delete(t):n.set(t,e)})),n},batchStart:function(){const e=new Map;return ft.push(e),()=>{for(const[t,n]of e)ct(t,n);ft.pop()}},writeLoadableToTreeState:ut,invalidateDownstreams:pt,copyTreeState:ht,refreshRecoilValue:function(e,t){var n;const{currentTree:o}=e.getState(),r=Qe(t.key);null===(n=r.clearCache)||void 0===n||n.call(r,e,o)}},St=function(e,t,n){const o=e.entries();let r=o.next();for(;!r.done;){const a=r.value;if(t.call(n,a[1],a[0],e))return!0;r=o.next()}return!1};const{cleanUpNode:yt}=$e,{deleteNodeConfigIfPossible:mt,getNode:gt}=ce,{RetentionZone:Rt}=Ce,Tt=new Set;function bt(e,t){const n=e.getState(),o=n.currentTree;if(n.nextTree)return;const r=new Set;for(const e of t)if(e instanceof Rt)for(const t of wt(n,e))r.add(t);else r.add(e);const a=function(e,t){const n=e.getState(),o=n.currentTree,r=e.getGraph(o.version),a=new Set,s=new Set;return function t(i){const l=new Set,c=function(e,t,n,o,r){const a=e.getGraph(t.version),s=[],i=new Set;for(;n.size>0;)l(u(n.values().next().value));return s;function l(e){if(o.has(e)||r.has(e))return void n.delete(e);if(i.has(e))return;const t=a.nodeToNodeSubscriptions.get(e);if(t)for(const e of t)l(e);i.add(e),n.delete(e),s.push(e)}}(e,o,i,a,s);for(const e of c){var d;if("recoilRoot"===gt(e).retainedBy){s.add(e);continue}if((null!==(d=n.retention.referenceCounts.get(e))&&void 0!==d?d:0)>0){s.add(e);continue}if(Et(e).some((e=>n.retention.referenceCounts.get(e)))){s.add(e);continue}const t=r.nodeToNodeSubscriptions.get(e);t&&St(t,(e=>s.has(e)))?s.add(e):(a.add(e),l.add(e))}const f=new Set;for(const e of l)for(const t of null!==(h=r.nodeDeps.get(e))&&void 0!==h?h:Tt){var h;a.has(t)||f.add(t)}f.size&&t(f)}(t),a}(e,r);for(const t of a)At(e,o,t)}function At(e,t,n){if(!x("recoil_memory_managament_2020"))return;yt(e,n);const o=e.getState();o.knownAtoms.delete(n),o.knownSelectors.delete(n),o.nodeTransactionSubscriptions.delete(n),o.retention.referenceCounts.delete(n);const r=Et(n);for(const e of r){var a;null===(a=o.retention.nodesRetainedByZone.get(e))||void 0===a||a.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const s=o.graphsByVersion.get(t.version);if(s){const e=s.nodeDeps.get(n);if(void 0!==e){s.nodeDeps.delete(n);for(const t of e){var i;null===(i=s.nodeToNodeSubscriptions.get(t))||void 0===i||i.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}mt(n)}function wt(e,t){var n;return null!==(n=e.retention.nodesRetainedByZone.get(t))&&void 0!==n?n:Tt}function Et(e){const t=gt(e).retainedBy;return void 0===t||"components"===t||"recoilRoot"===t?[]:t instanceof Rt?[t]:t}function Nt(e,t){x("recoil_memory_managament_2020")&&(e.getState().retention.referenceCounts.delete(t),function(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):bt(e,new Set([t]))}(e,t))}var Lt={SUSPENSE_TIMEOUT_MS:12e4,updateRetainCount:function(e,t,n){var o;if(!x("recoil_memory_managament_2020"))return;const r=e.getState().retention.referenceCounts,a=(null!==(o=r.get(t))&&void 0!==o?o:0)+n;0===a?Nt(e,t):r.set(t,a)},updateRetainCountToZero:Nt,releaseScheduledRetainablesNow:function(e){if(!x("recoil_memory_managament_2020"))return;const t=e.getState();bt(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()},retainedByOptionWithDefault:function(e){return void 0===e?"recoilRoot":e}};const{unstable_batchedUpdates:kt}=s();var Vt={unstable_batchedUpdates:kt};const{unstable_batchedUpdates:Ut}=Vt;var Ct={unstable_batchedUpdates:Ut};const{batchStart:Mt}=_t,{unstable_batchedUpdates:Bt}=Ct;let It=Bt||(e=>e());var Ot={getBatcher:()=>It,setBatcher:e=>{It=e},batchUpdates:e=>{It((()=>{let t=()=>{};try{t=Mt(),e()}finally{t()}}))}},Dt=function*(e){for(const t of e)for(const e of t)yield e};const xt="undefined"==typeof Window||"undefined"==typeof window,Pt="undefined"!=typeof navigator&&"ReactNative"===navigator.product;var Ft={isSSR:xt,isReactNative:Pt,isWindow:e=>!xt&&(e===window||e instanceof Window)},zt={memoizeWithArgsHash:function(e,t){let n;return(...o)=>{n||(n={});const r=t(...o);return Object.hasOwnProperty.call(n,r)||(n[r]=e(...o)),n[r]}},memoizeOneWithArgsHash:function(e,t){let n,o;return(...r)=>{const a=t(...r);return n===a||(n=a,o=e(...r)),o}},memoizeOneWithArgsHashAndInvalidation:function(e,t){let n,o;return[(...r)=>{const a=t(...r);return n===a||(n=a,o=e(...r)),o},()=>{n=null}]}};const{batchUpdates:Gt}=Ot,{initializeNode:Wt,peekNodeInfo:jt}=$e,{graph:Kt}=Re,{getNextStoreID:$t}=we,{DEFAULT_VALUE:Ht,recoilValues:qt,recoilValuesForKeys:Zt}=ce,{AbstractRecoilValue:Yt,getRecoilValueAsLoadable:Jt,setRecoilValue:Xt,setUnvalidatedRecoilValue:Qt}=_t,{updateRetainCount:en}=Lt,{setInvalidateMemoizedSnapshot:tn}=qe,{getNextTreeStateVersion:nn,makeEmptyStoreState:on}=Ve,{isSSR:rn}=Ft,{memoizeOneWithArgsHashAndInvalidation:an}=zt;class sn{constructor(e,t){c(this,"_store",void 0),c(this,"_refCount",1),c(this,"getLoadable",(e=>(this.checkRefCount_INTERNAL(),Jt(this._store,e)))),c(this,"getPromise",(e=>(this.checkRefCount_INTERNAL(),this.getLoadable(e).toPromise()))),c(this,"getNodes_UNSTABLE",(e=>{if(this.checkRefCount_INTERNAL(),!0===(null==e?void 0:e.isModified)){if(!1===(null==e?void 0:e.isInitialized))return[];const t=this._store.getState().currentTree;return Zt(t.dirtyAtoms)}const t=this._store.getState().knownAtoms,n=this._store.getState().knownSelectors;return null==(null==e?void 0:e.isInitialized)?qt.values():!0===e.isInitialized?Zt(Dt([t,n])):Be(qt.values(),(({key:e})=>!t.has(e)&&!n.has(e)))})),c(this,"getInfo_UNSTABLE",(({key:e})=>(this.checkRefCount_INTERNAL(),jt(this._store,this._store.getState().currentTree,e)))),c(this,"map",(e=>{this.checkRefCount_INTERNAL();const t=new dn(this,Gt);return e(t),t})),c(this,"asyncMap",(async e=>{this.checkRefCount_INTERNAL();const t=new dn(this,Gt);return t.retain(),await e(t),t.autoRelease_INTERNAL(),t})),this._store={storeID:$t(),parentStoreID:t,getState:()=>e,replaceState:t=>{e.currentTree=t(e.currentTree)},getGraph:t=>{const n=e.graphsByVersion;if(n.has(t))return u(n.get(t));const o=Kt();return n.set(t,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw i("Cannot subscribe to Snapshots")}};for(const e of this._store.getState().knownAtoms)Wt(this._store,e,"get"),en(this._store,e,1);this.autoRelease_INTERNAL()}retain(){this._refCount,this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){rn||window.setTimeout((()=>this._release()),10)}_release(){if(this._refCount--,0===this._refCount){if(this._store.getState().nodeCleanupFunctions.forEach((e=>e())),this._store.getState().nodeCleanupFunctions.clear(),!x("recoil_memory_managament_2020"))return}else this._refCount}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){x("recoil_memory_managament_2020")&&this._refCount}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function ln(e,t,n=!1){const o=e.getState(),r=n?nn():t.version;return{currentTree:{version:n?r:t.version,stateID:n?r:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(o.knownAtoms),knownSelectors:new Set(o.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(r,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Q(o.nodeCleanupFunctions.entries(),(([e])=>[e,()=>{}])))}}const[un,cn]=an(((e,t)=>{var n;const o=e.getState(),r="latest"===t?null!==(n=o.nextTree)&&void 0!==n?n:o.currentTree:u(o.previousTree);return new sn(ln(e,r),e.storeID)}),((e,t)=>{var n,o;return String(t)+String(e.storeID)+String(null===(n=e.getState().nextTree)||void 0===n?void 0:n.version)+String(e.getState().currentTree.version)+String(null===(o=e.getState().previousTree)||void 0===o?void 0:o.version)}));tn(cn);class dn extends sn{constructor(e,t){super(ln(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID()),c(this,"_batch",void 0),c(this,"set",((e,t)=>{this.checkRefCount_INTERNAL();const n=this.getStore_INTERNAL();this._batch((()=>{en(n,e.key,1),Xt(this.getStore_INTERNAL(),e,t)}))})),c(this,"reset",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();this._batch((()=>{en(t,e.key,1),Xt(this.getStore_INTERNAL(),e,Ht)}))})),c(this,"setUnvalidatedAtomValues_DEPRECATED",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();Gt((()=>{for(const[n,o]of e.entries())en(t,n,1),Qt(t,new Yt(n),o)}))})),this._batch=t}}var fn={Snapshot:sn,MutableSnapshot:dn,freshSnapshot:function(e){const t=new sn(on());return null!=e?t.map(e):t},cloneSnapshot:function(e,t="latest"){const n=un(e,t);return n.isRetained()?n:(cn(),un(e,t))}},hn=fn.Snapshot,pn=fn.MutableSnapshot,vn=fn.freshSnapshot,_n=fn.cloneSnapshot,Sn=Object.freeze({__proto__:null,Snapshot:hn,MutableSnapshot:pn,freshSnapshot:vn,cloneSnapshot:_n}),yn=function(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t};const{useRef:mn}=r();var gn=function(e){const t=mn(e);return t.current===e&&"function"==typeof e&&(t.current=e()),t};const{getNextTreeStateVersion:Rn,makeEmptyStoreState:Tn}=Ve,{cleanUpNode:bn,getDownstreamNodes:An,initializeNode:wn,setNodeValue:En,setUnvalidatedAtomValue_DEPRECATED:Nn}=$e,{graph:Ln}=Re,{cloneGraph:kn}=Re,{getNextStoreID:Vn}=we,{createMutableSource:Un,reactMode:Cn}=W,{applyAtomValueWrites:Mn}=_t,{releaseScheduledRetainablesNow:Bn}=Lt,{freshSnapshot:In}=Sn,{useCallback:On,useContext:Dn,useEffect:xn,useMemo:Pn,useRef:Fn,useState:zn}=r();function Gn(){throw i("This component must be used inside a <RecoilRoot> component.")}const Wn=Object.freeze({storeID:Vn(),getState:Gn,replaceState:Gn,getGraph:Gn,subscribeToTransactions:Gn,addTransactionMetadata:Gn});let jn=!1;function Kn(e){if(jn)throw i("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(null===t.nextTree){x("recoil_memory_managament_2020")&&x("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Bn(e);const n=t.currentTree.version,o=Rn();t.nextTree={...t.currentTree,version:o,stateID:o,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(o,kn(u(t.graphsByVersion.get(n))))}}const $n=r().createContext({current:Wn}),Hn=()=>Dn($n),qn=r().createContext(null);function Zn(e,t,n){const o=An(e,n,n.dirtyAtoms);for(const e of o){const o=t.nodeToComponentSubscriptions.get(e);if(o)for(const[e,[t,r]]of o)r(n)}}function Yn(e){const t=e.getState(),n=t.currentTree,o=n.dirtyAtoms;if(o.size){for(const[n,r]of t.nodeTransactionSubscriptions)if(o.has(n))for(const[t,n]of r)n(e);for(const[n,o]of t.transactionSubscriptions)o(e);(!Cn().early||t.suspendedComponentResolvers.size>0)&&(Zn(e,t,n),t.suspendedComponentResolvers.forEach((e=>e())),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach((e=>e(n))),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function Jn({setNotifyBatcherOfChange:e}){const t=Hn(),[,n]=zn([]);return e((()=>n({}))),xn((()=>(e((()=>n({}))),()=>{e((()=>{}))})),[e]),xn((()=>{de("Batcher",(()=>{!function(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(null==n)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,Yn(e),null!=t.previousTree&&t.graphsByVersion.delete(t.previousTree.version),t.previousTree=null,x("recoil_memory_managament_2020")&&null==n&&Bn(e)}finally{t.commitDepth--}}(t.current)}))})),null}let Xn=0;function Qn({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:o}){let a;const s=e=>{const t=a.current.graphsByVersion;if(t.has(e))return u(t.get(e));const n=Ln();return t.set(e,n),n},i=(e,t)=>{if(null==t){const{transactionSubscriptions:t}=h.current.getState(),n=Xn++;return t.set(n,e),{release:()=>{t.delete(n)}}}{const{nodeTransactionSubscriptions:n}=h.current.getState();n.has(t)||n.set(t,new Map);const o=Xn++;return u(n.get(t)).set(o,e),{release:()=>{const e=n.get(t);e&&(e.delete(o),0===e.size&&n.delete(t))}}}},l=e=>{Kn(h.current);for(const t of Object.keys(e))u(h.current.getState().nextTree).transactionMetadata[t]=e[t]},c=e=>{Kn(h.current);const t=u(a.current.nextTree);let n;try{jn=!0,n=e(t)}finally{jn=!1}n!==t&&(a.current.nextTree=n,Cn().early&&Zn(h.current,a.current,n),u(d.current)())},d=Fn(null),f=On((e=>{d.current=e}),[d]),h=gn((()=>null!=n?n:{storeID:Vn(),getState:()=>a.current,replaceState:c,getGraph:s,subscribeToTransactions:i,addTransactionMetadata:l}));null!=n&&(h.current=n),a=gn((()=>null!=e?function(e,t){const n=Tn();return t({set:(t,o)=>{const r=n.currentTree,a=En(e,r,t.key,o),s=new Set(a.keys()),i=r.nonvalidatedAtoms.clone();for(const e of s)i.delete(e);n.currentTree={...r,dirtyAtoms:yn(r.dirtyAtoms,s),atomValues:Mn(r.atomValues,a),nonvalidatedAtoms:i}},setUnvalidatedAtomValues:e=>{e.forEach(((e,t)=>{n.currentTree=Nn(n.currentTree,t,e)}))}}),n}(h.current,e):null!=t?function(e){const t=In(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach((e=>e())),n.nodeCleanupFunctions.clear(),n}(t):Tn()));const p=Pn((()=>null==Un?void 0:Un(a,(()=>a.current.currentTree.version))),[a]);return xn((()=>{const e=h.current;for(const t of new Set(e.getState().knownAtoms))wn(e,t,"get");return()=>{for(const t of e.getState().knownAtoms)bn(e,t)}}),[h]),r().createElement($n.Provider,{value:h},r().createElement(qn.Provider,{value:p},r().createElement(Jn,{setNotifyBatcherOfChange:f}),o))}var eo={RecoilRoot:function(e){const{override:t,...n}=e,o=Hn();return!1===t&&o.current!==Wn?e.children:r().createElement(Qn,n)},useStoreRef:Hn,useRecoilMutableSource:function(){const e=Dn(qn);return e},useRecoilStoreID:function(){return Hn().current.storeID},notifyComponents_FOR_TESTING:Zn,sendEndOfBatchNotifications_FOR_TESTING:Yn};const{useEffect:to,useRef:no}=r();var oo=function(e){const t=no();return to((()=>{t.current=e})),t.current};const{useStoreRef:ro}=eo,{SUSPENSE_TIMEOUT_MS:ao}=Lt,{updateRetainCount:so}=Lt,{RetentionZone:io}=Ce,{useEffect:lo,useRef:uo}=r(),{isSSR:co}=Ft;var fo=function(e){if(x("recoil_memory_managament_2020"))return function(e){const t=(Array.isArray(e)?e:[e]).map((e=>e instanceof io?e:e.key)),n=ro();lo((()=>{if(!x("recoil_memory_managament_2020"))return;const e=n.current;if(o.current&&!co)window.clearTimeout(o.current),o.current=null;else for(const n of t)so(e,n,1);return()=>{for(const n of t)so(e,n,-1)}}),[n,...t]);const o=uo(),r=oo(t);if(!(co||void 0!==r&&function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0}(r,t))){const e=n.current;for(const n of t)so(e,n,1);if(r)for(const t of r)so(e,t,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout((()=>{o.current=null;for(const n of t)so(e,n,-1)}),ao)}}(e)};const{batchUpdates:ho}=Ot,{DEFAULT_VALUE:po}=ce,{currentRendererSupportsUseSyncExternalStore:vo,reactMode:_o,useMutableSource:So,useSyncExternalStore:yo}=W,{useRecoilMutableSource:mo,useStoreRef:go}=eo,{isRecoilValue:Ro}=X,{AbstractRecoilValue:To,getRecoilValueAsLoadable:bo,setRecoilValue:Ao,setUnvalidatedRecoilValue:wo,subscribeToRecoilValue:Eo}=_t,{useCallback:No,useEffect:Lo,useMemo:ko,useRef:Vo,useState:Uo}=r(),{setByAddingToSet:Co}=Me,{isSSR:Mo}=Ft;function Bo(e,t,n){if("hasValue"===e.state)return e.contents;if("loading"===e.state)throw new Promise((t=>{const o=n.current.getState().suspendedComponentResolvers;o.add(t),Mo&&l(e.contents)&&e.contents.finally((()=>{o.delete(t)}))}));throw"hasError"===e.state?e.contents:i(`Invalid value of loadable atom "${t.key}"`)}function Io(e){const t=go(),n="<component name not available>",o=No((()=>{var n;const o=t.current,r=o.getState(),a=_o().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return{loadable:bo(o,e,a),key:e.key}}),[t,e]),r=No((e=>{let t;return()=>{var n,o;const r=e();return null!==(n=t)&&void 0!==n&&n.loadable.is(r.loadable)&&(null===(o=t)||void 0===o?void 0:o.key)===r.key?t:(t=r,r)}}),[]),a=ko((()=>r(o)),[o,r]),s=No((o=>{const r=t.current;return Eo(r,e,o,n).release}),[t,e,n]);return yo(s,a,a).loadable}function Oo(e){const t=go(),n=No((()=>{var n;const o=t.current,r=o.getState(),a=_o().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return bo(o,e,a)}),[t,e]),o=No((()=>n()),[n]),r="<component name not available>",a=No(((o,a)=>{const s=t.current;return Eo(s,e,(()=>{if(!x("recoil_suppress_rerender_in_callback"))return a();const e=n();u.current.is(e)||a(),u.current=e}),r).release}),[t,e,r,n]),s=mo();if(null==s)throw i("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const l=So(s,o,a),u=Vo(l);return Lo((()=>{u.current=l})),l}function Do(e){const t=go(),n="<component name not available>",o=No((()=>{var n;const o=t.current,r=o.getState(),a=_o().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return bo(o,e,a)}),[t,e]),r=No((()=>({loadable:o(),key:e.key})),[o,e.key]),a=No((e=>{const t=r();return e.loadable.is(t.loadable)&&e.key===t.key?e:t}),[r]);Lo((()=>{const o=Eo(t.current,e,(e=>{i(a)}),n);return i(a),o.release}),[n,e,t,a]);const[s,i]=Uo(r);return s.key!==e.key?r().loadable:s.loadable}function xo(e){const t=go(),[,n]=Uo([]),o="<component name not available>",r=No((()=>{var n;const o=t.current,r=o.getState(),a=_o().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return bo(o,e,a)}),[t,e]),a=r(),s=Vo(a);return Lo((()=>{s.current=a})),Lo((()=>{const a=t.current,i=a.getState(),l=Eo(a,e,(e=>{var t;if(!x("recoil_suppress_rerender_in_callback"))return n([]);const o=r();null!==(t=s.current)&&void 0!==t&&t.is(o)||n(o),s.current=o}),o);if(i.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push((()=>{s.current=null,n([])}));else{var u;if(!x("recoil_suppress_rerender_in_callback"))return n([]);const e=r();null!==(u=s.current)&&void 0!==u&&u.is(e)||n(e),s.current=e}return l.release}),[o,r,e,t]),a}function Po(e){return x("recoil_memory_managament_2020")&&fo(e),{TRANSITION_SUPPORT:Do,SYNC_EXTERNAL_STORE:vo()?Io:Do,MUTABLE_SOURCE:Oo,LEGACY:xo}[_o().mode](e)}function Fo(e){const t=go();return Bo(Po(e),e,t)}function zo(e){const t=go();return No((n=>{Ao(t.current,e,n)}),[t,e])}function Go(e){return x("recoil_memory_managament_2020")&&fo(e),Do(e)}function Wo(e){const t=go();return Bo(Go(e),e,t)}var jo={recoilComponentGetRecoilValueCount_FOR_TESTING:{current:0},useRecoilInterface:function(){const e="<component name not available>",t=go(),[,n]=Uo([]),o=Vo(new Set);o.current=new Set;const r=Vo(new Set),a=Vo(new Map),s=No((e=>{const t=a.current.get(e);t&&(t.release(),a.current.delete(e))}),[a]),i=No(((e,t)=>{a.current.has(t)&&n([])}),[]);return Lo((()=>{const n=t.current;ye(o.current,r.current).forEach((t=>{if(a.current.has(t))return;const o=Eo(n,new To(t),(e=>i(e,t)),e);a.current.set(t,o),n.getState().nextTree?n.getState().queuedComponentCallbacks_DEPRECATED.push((()=>{i(n.getState(),t)})):i(n.getState(),t)})),ye(r.current,o.current).forEach((e=>{s(e)})),r.current=o.current})),Lo((()=>{const n=a.current;return ye(o.current,new Set(n.keys())).forEach((o=>{const r=Eo(t.current,new To(o),(e=>i(e,o)),e);n.set(o,r)})),()=>n.forEach(((e,t)=>s(t)))}),[e,t,s,i]),ko((()=>{function e(e){return n=>{Ao(t.current,e,n)}}function n(e){var n;o.current.has(e.key)||(o.current=Co(o.current,e.key));const r=t.current.getState();return bo(t.current,e,_o().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree)}function r(e){return Bo(n(e),e,t)}return{getRecoilValue:r,getRecoilValueLoadable:n,getRecoilState:function(t){return[r(t),e(t)]},getRecoilStateLoadable:function(t){return[n(t),e(t)]},getSetRecoilState:e,getResetRecoilState:function(e){return()=>Ao(t.current,e,po)}}}),[o,t])},useRecoilState:function(e){return[Fo(e),zo(e)]},useRecoilStateLoadable:function(e){return[Po(e),zo(e)]},useRecoilValue:Fo,useRecoilValueLoadable:Po,useResetRecoilState:function(e){const t=go();return No((()=>{Ao(t.current,e,po)}),[t,e])},useSetRecoilState:zo,useSetUnvalidatedAtomValues:function(){const e=go();return(t,n={})=>{ho((()=>{e.current.addTransactionMetadata(n),t.forEach(((t,n)=>wo(e.current,new To(n),t)))}))}},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Go,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Wo,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:function(e){return[Wo(e),zo(e)]}};const{batchUpdates:Ko}=Ot,{DEFAULT_VALUE:$o,getNode:Ho,nodes:qo}=ce,{useStoreRef:Zo}=eo,{AbstractRecoilValue:Yo,setRecoilValueLoadable:Jo}=_t,{SUSPENSE_TIMEOUT_MS:Xo}=Lt,{cloneSnapshot:Qo}=Sn,{useCallback:er,useEffect:tr,useRef:nr,useState:or}=r(),{isSSR:rr}=Ft;function ar(e){const t=Zo();tr((()=>t.current.subscribeToTransactions(e).release),[e,t])}function sr(e){const t=e.atomValues.toMap(),n=me(function(e,t){const n=new Map;for(const[o,r]of e)t(r,o)&&n.set(o,r);return n}(t,((e,t)=>{const n=Ho(t).persistence_UNSTABLE;return null!=n&&"none"!==n.type&&"hasValue"===e.state})),(e=>e.contents));return function(...e){const t=new Map;for(let n=0;n<e.length;n++){const o=e[n].keys();let r;for(;!(r=o.next()).done;)t.set(r.value,e[n].get(r.value))}return t}(e.nonvalidatedAtoms.toMap(),n)}function ir(e,t){var n;const o=e.getState(),r=null!==(n=o.nextTree)&&void 0!==n?n:o.currentTree,a=t.getStore_INTERNAL().getState().currentTree;Ko((()=>{const n=new Set;for(const e of[r.atomValues.keys(),a.atomValues.keys()])for(const t of e){var o,s;(null===(o=r.atomValues.get(t))||void 0===o?void 0:o.contents)!==(null===(s=a.atomValues.get(t))||void 0===s?void 0:s.contents)&&Ho(t).shouldRestoreFromSnapshots&&n.add(t)}n.forEach((t=>{Jo(e,new Yo(t),a.atomValues.has(t)?u(a.atomValues.get(t)):$o)})),e.replaceState((e=>({...e,stateID:t.getID()})))}))}var lr={useRecoilSnapshot:function(){const e=Zo(),[t,n]=or((()=>Qo(e.current))),o=oo(t),r=nr(),a=nr();var s;(ar(er((e=>n(Qo(e))),[])),tr((()=>{const e=t.retain();var n;return r.current&&!rr&&(window.clearTimeout(r.current),r.current=null,null===(n=a.current)||void 0===n||n.call(a),a.current=null),()=>{window.setTimeout(e,10)}}),[t]),o===t||rr)||(r.current&&(window.clearTimeout(r.current),r.current=null,null===(s=a.current)||void 0===s||s.call(a),a.current=null),a.current=t.retain(),r.current=window.setTimeout((()=>{var e;r.current=null,null===(e=a.current)||void 0===e||e.call(a),a.current=null}),Xo));return t},gotoSnapshot:ir,useGotoRecoilSnapshot:function(){const e=Zo();return er((t=>ir(e.current,t)),[e])},useRecoilTransactionObserver:function(e){ar(er((t=>{const n=Qo(t,"latest"),o=Qo(t,"previous");e({snapshot:n,previousSnapshot:o})}),[e]))},useTransactionObservation_DEPRECATED:function(e){ar(er((t=>{let n=t.getState().previousTree;const o=t.getState().currentTree;n||(n=t.getState().currentTree);const r=sr(o),a=sr(n),s=me(qo,(e=>{var t,n,o,r;return{persistence_UNSTABLE:{type:null!==(t=null===(n=e.persistence_UNSTABLE)||void 0===n?void 0:n.type)&&void 0!==t?t:"none",backButton:null!==(o=null===(r=e.persistence_UNSTABLE)||void 0===r?void 0:r.backButton)&&void 0!==o&&o}}})),i=function(e,t){const n=new Set;for(const o of e)t(o)&&n.add(o);return n}(o.dirtyAtoms,(e=>r.has(e)||a.has(e)));e({atomValues:r,previousAtomValues:a,atomInfo:s,modifiedAtoms:i,transactionMetadata:{...o.transactionMetadata}})}),[e]))},useTransactionSubscription_DEPRECATED:ar};const{peekNodeInfo:ur}=$e,{useStoreRef:cr}=eo;const{reactMode:dr}=W,{RecoilRoot:fr,useStoreRef:hr}=eo,{useMemo:pr}=r();const{loadableWithValue:vr}=V,{initializeNode:_r}=$e,{DEFAULT_VALUE:Sr,getNode:yr}=ce,{copyTreeState:mr,getRecoilValueAsLoadable:gr,invalidateDownstreams:Rr,writeLoadableToTreeState:Tr}=_t;function br(e){return"atom"===yr(e.key).nodeType}class Ar{constructor(e,t){c(this,"_store",void 0),c(this,"_treeState",void 0),c(this,"_changes",void 0),c(this,"get",(e=>{if(this._changes.has(e.key))return this._changes.get(e.key);if(!br(e))throw i("Reading selectors within atomicUpdate is not supported");const t=gr(this._store,e,this._treeState);if("hasValue"===t.state)return t.contents;throw"hasError"===t.state?t.contents:i(`Expected Recoil atom ${e.key} to have a value, but it is in a loading state.`)})),c(this,"set",((e,t)=>{if(!br(e))throw i("Setting selectors within atomicUpdate is not supported");if("function"==typeof t){const n=this.get(e);this._changes.set(e.key,t(n))}else _r(this._store,e.key,"set"),this._changes.set(e.key,t)})),c(this,"reset",(e=>{this.set(e,Sr)})),this._store=e,this._treeState=t,this._changes=new Map}newTreeState_INTERNAL(){if(0===this._changes.size)return this._treeState;const e=mr(this._treeState);for(const[t,n]of this._changes)Tr(e,t,vr(n));return Rr(this._store,e),e}}var wr=function(e){return t=>{e.replaceState((n=>{const o=new Ar(e,n);return t(o),o.newTreeState_INTERNAL()}))}},Er=Object.freeze({__proto__:null,atomicUpdater:wr}),Nr=function(e,t){if(!e)throw new Error(t)};const{atomicUpdater:Lr}=Er,{batchUpdates:kr}=Ot,{DEFAULT_VALUE:Vr}=ce,{useStoreRef:Ur}=eo,{refreshRecoilValue:Cr,setRecoilValue:Mr}=_t,{cloneSnapshot:Br}=Sn,{gotoSnapshot:Ir}=lr,{useCallback:Or}=r();class Dr{}const xr=new Dr;function Pr(e,t,n,o){let r,a=xr;var s;return kr((()=>{const s="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if("function"!=typeof t)throw i(s);const l=Ie({...null!=o?o:{},set:(t,n)=>Mr(e,t,n),reset:t=>Mr(e,t,Vr),refresh:t=>Cr(e,t),gotoSnapshot:t=>Ir(e,t),transact_UNSTABLE:t=>Lr(e)(t)},{snapshot:()=>{const t=Br(e);return r=t.retain(),t}}),u=t(l);if("function"!=typeof u)throw i(s);a=u(...n)})),a instanceof Dr&&Nr(!1),l(a)?a=a.finally((()=>{var e;null===(e=r)||void 0===e||e()})):null===(s=r)||void 0===s||s(),a}var Fr={recoilCallback:Pr,useRecoilCallback:function(e,t){const n=Ur();return Or(((...t)=>Pr(n.current,e,t)),null!=t?[...t,n]:void 0)}};const{useStoreRef:zr}=eo,{refreshRecoilValue:Gr}=_t,{useCallback:Wr}=r();const{atomicUpdater:jr}=Er,{useStoreRef:Kr}=eo,{useMemo:$r}=r();var Hr=Object.freeze({__proto__:null,WrappedValue:class{constructor(e){c(this,"value",void 0),this.value=e}}});const{isFastRefreshEnabled:qr}=W;class Zr extends Error{}var Yr=Object.freeze({__proto__:null,TreeCache:class{constructor(e){var t,n,o;c(this,"_name",void 0),c(this,"_numLeafs",void 0),c(this,"_root",void 0),c(this,"_onHit",void 0),c(this,"_onSet",void 0),c(this,"_mapNodeValue",void 0),this._name=null==e?void 0:e.name,this._numLeafs=0,this._root=null,this._onHit=null!==(t=null==e?void 0:e.onHit)&&void 0!==t?t:()=>{},this._onSet=null!==(n=null==e?void 0:e.onSet)&&void 0!==n?n:()=>{},this._mapNodeValue=null!==(o=null==e?void 0:e.mapNodeValue)&&void 0!==o?o:e=>e}size(){return this._numLeafs}root(){return this._root}get(e,t){var n;return null===(n=this.getLeafNode(e,t))||void 0===n?void 0:n.value}getLeafNode(e,t){if(null==this._root)return;let n=this._root;for(;n;){if(null==t||t.onNodeVisit(n),"leaf"===n.type)return this._onHit(n),n;const o=this._mapNodeValue(e(n.nodeKey));n=n.branches.get(o)}}set(e,t,n){const o=()=>{var o,r,a,s;let i,l;for(const[t,o]of e){var u,c,d;const e=this._root;if("leaf"===(null==e?void 0:e.type))throw this.invalidCacheError();const r=i;if(i=r?r.branches.get(l):e,i=null!==(u=i)&&void 0!==u?u:{type:"branch",nodeKey:t,parent:r,branches:new Map,branchKey:l},"branch"!==i.type||i.nodeKey!==t)throw this.invalidCacheError();null==r||r.branches.set(l,i),null==n||null===(c=n.onNodeVisit)||void 0===c||c.call(n,i),l=this._mapNodeValue(o),this._root=null!==(d=this._root)&&void 0!==d?d:i}const f=i?null===(o=i)||void 0===o?void 0:o.branches.get(l):this._root;if(null!=f&&("leaf"!==f.type||f.branchKey!==l))throw this.invalidCacheError();const h={type:"leaf",value:t,parent:i,branchKey:l};null===(r=i)||void 0===r||r.branches.set(l,h),this._root=null!==(a=this._root)&&void 0!==a?a:h,this._numLeafs++,this._onSet(h),null==n||null===(s=n.onNodeVisit)||void 0===s||s.call(n,h)};try{o()}catch(e){if(!(e instanceof Zr))throw e;this.clear(),o()}}delete(e){const t=this.root();if(!t)return!1;if(e===t)return this._root=null,this._numLeafs=0,!0;let n=e.parent,o=e.branchKey;for(;n;){var r;if(n.branches.delete(o),n===t)return 0===n.branches.size?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;o=null===(r=n)||void 0===r?void 0:r.branchKey,n=n.parent}for(;n!==t;n=n.parent)if(null==n)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){qr();throw null!=this._name&&this._name,new Zr}}}),Jr=Object.freeze({__proto__:null,LRUCache:class{constructor(e){var t;c(this,"_maxSize",void 0),c(this,"_size",void 0),c(this,"_head",void 0),c(this,"_tail",void 0),c(this,"_map",void 0),c(this,"_keyMapper",void 0),this._maxSize=e.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=null!==(t=e.mapKey)&&void 0!==t?t:e=>e}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(e){return this._map.has(this._keyMapper(e))}get(e){const t=this._keyMapper(e),n=this._map.get(t);if(n)return this.set(e,n.value),n.value}set(e,t){const n=this._keyMapper(e);this._map.get(n)&&this.delete(e);const o=this.head(),r={key:e,right:o,left:null,value:t};o?o.left=r:this._tail=r,this._map.set(n,r),this._head=r,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const e=this.tail();e&&this.delete(e.key)}delete(e){const t=this._keyMapper(e);if(!this._size||!this._map.has(t))return;const n=u(this._map.get(t)),o=n.right,r=n.left;o&&(o.left=n.left),r&&(r.right=n.right),n===this.head()&&(this._head=o),n===this.tail()&&(this._tail=r),this._map.delete(t),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}});const{LRUCache:Xr}=Jr,{TreeCache:Qr}=Yr;var ea=function({name:e,maxSize:t,mapNodeValue:n=(e=>e)}){const o=new Xr({maxSize:t}),r=new Qr({name:e,mapNodeValue:n,onHit:e=>{o.set(e,!0)},onSet:e=>{const n=o.tail();o.set(e,!0),n&&r.size()>t&&r.delete(n.key)}});return r};function ta(e,t,n){if("string"==typeof e&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(!0!==(null==t?void 0:t.allowFunctions))throw i("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(null===e)return"null";var o;if("object"!=typeof e)return null!==(o=JSON.stringify(e))&&void 0!==o?o:"";if(l(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map(((e,n)=>ta(e,t,n.toString())))}]`;if("function"==typeof e.toJSON)return ta(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[n,r]of e)o["string"==typeof n?n:ta(n,t)]=r;return ta(o,t,n)}return e instanceof Set?ta(Array.from(e).sort(((e,n)=>ta(e,t).localeCompare(ta(n,t)))),t,n):void 0!==Symbol&&null!=e[Symbol.iterator]&&"function"==typeof e[Symbol.iterator]?ta(Array.from(e),t,n):`{${Object.keys(e).filter((t=>void 0!==e[t])).sort().map((n=>`${ta(n,t)}:${ta(e[n],t,n)}`)).join(",")}}`}var na=function(e,t={allowFunctions:!1}){return ta(e,t)};const{TreeCache:oa}=Yr,ra={equality:"reference",eviction:"keep-all",maxSize:1/0};const{isReactNative:aa,isWindow:sa}=Ft;const{isLoadable:ia,loadableWithError:la,loadableWithPromise:ua,loadableWithValue:ca}=V,{WrappedValue:da}=Hr,{getNodeLoadable:fa,peekNodeLoadable:ha,setNodeValue:pa}=$e,{saveDepsToStore:va}=Re,{DEFAULT_VALUE:_a,getConfigDeletionHandler:Sa,getNode:ya,registerNode:ma}=ce,{isRecoilValue:ga}=X,{markRecoilValueModified:Ra}=_t,{retainedByOptionWithDefault:Ta}=Lt,{recoilCallback:ba}=Fr,{startPerfBlock:Aa}={startPerfBlock:function(e){return()=>null}};class wa{}const Ea=new wa,Na=[],La=new Map,ka=(()=>{let e=0;return()=>e++})();function Va(e){let t=null;const{key:n,get:o,cachePolicy_UNSTABLE:r}=e,a=null!=e.set?e.set:void 0,s=new Set,c=function({equality:e=ra.equality,eviction:t=ra.eviction,maxSize:n=ra.maxSize}=ra,o){const r=function(e){switch(e){case"reference":return e=>e;case"value":return e=>na(e)}throw i(`Unrecognized equality policy ${e}`)}(e);return function(e,t,n,o){switch(e){case"keep-all":return new oa({name:o,mapNodeValue:n});case"lru":return ea({name:o,maxSize:u(t),mapNodeValue:n});case"most-recent":return ea({name:o,maxSize:1,mapNodeValue:n})}throw i(`Unrecognized eviction policy ${e}`)}(t,n,r,o)}(null!=r?r:{equality:"reference",eviction:"keep-all"},n),d=Ta(e.retainedBy_UNSTABLE),f=new Map;let h=0;function p(){return!x("recoil_memory_managament_2020")||h>0}function v(e){return e.getState().knownSelectors.add(n),h++,()=>{h--}}function _(){return void 0!==Sa(n)&&!p()}function S(e,t,n,o,r){k(t,o,r),y(e,n)}function y(e,t){L(e,t)&&N(e),m(t,!0)}function m(e,n){const o=La.get(e);if(null!=o){for(const e of o)Ra(e,u(t));n&&La.delete(e)}}function g(e,t){let n=La.get(t);null==n&&La.set(t,n=new Set),n.add(e)}function R(e,t,n,o,r,a){return t.then((o=>{if(!p())throw N(e),Ea;null!=a.loadingDepKey&&a.loadingDepPromise===t?n.atomValues.set(a.loadingDepKey,ca(o)):e.getState().knownSelectors.forEach((e=>{n.atomValues.delete(e)}));const s=A(e,n);if(s&&"loading"!==s.state){if((L(e,r)||null==E(e))&&y(e,r),"hasValue"===s.state)return s.contents;throw s.contents}if(!L(e,r)){const t=w(e,n);if(null!=t)return t.loadingLoadable.contents}const[i,l]=b(e,n,r);if("loading"!==i.state&&S(e,n,r,i,l),"hasError"===i.state)throw i.contents;return i.contents})).catch((t=>{if(t instanceof wa)throw Ea;if(!p())throw N(e),Ea;const a=la(t);throw S(e,n,r,a,o),t}))}function T(e,t,o,r){var a,i,l,u,c,d,f;(L(e,r)||t.version===(null===(a=e.getState())||void 0===a||null===(i=a.currentTree)||void 0===i?void 0:i.version)||t.version===(null===(l=e.getState())||void 0===l||null===(u=l.nextTree)||void 0===u?void 0:u.version))&&va(n,o,e,null!==(c=null===(d=e.getState())||void 0===d||null===(f=d.nextTree)||void 0===f?void 0:f.version)&&void 0!==c?c:e.getState().currentTree.version);for(const e of o)s.add(e)}function b(e,r,a){const s=Aa(n);let c=!0,d=!0;const f=()=>{s(),d=!1};let h,v,_=!1;const y={loadingDepKey:null,loadingDepPromise:null},g=new Map;function b({key:t}){const n=fa(e,r,t);switch(g.set(t,n),c||(T(e,r,new Set(g.keys()),a),function(e,t){L(e,t)&&(u(E(e)).stateVersions.clear(),m(t,!1))}(e,a)),n.state){case"hasValue":return n.contents;case"hasError":throw n.contents;case"loading":throw y.loadingDepKey=t,y.loadingDepPromise=n.contents,n.contents}throw i("Invalid Loadable state")}const A=n=>(...o)=>{if(d)throw i("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return null==t&&Nr(!1),ba(e,n,o,{node:t})};try{h=o({get:b,getCallback:A}),h=ga(h)?b(h):h,ia(h)&&("hasError"===h.state&&(_=!0),h=h.contents),l(h)?h=function(e,t,n,o,r,a){return t.then((t=>{if(!p())throw N(e),Ea;const a=ca(t);return S(e,n,r,a,o),t})).catch((t=>{if(!p())throw N(e),Ea;if(l(t))return R(e,t,n,o,r,a);const s=la(t);throw S(e,n,r,s,o),t}))}(e,h,r,g,a,y).finally(f):f(),h=h instanceof da?h.value:h}catch(t){h=t,l(h)?h=R(e,h,r,g,a,y).finally(f):(_=!0,f())}return v=_?la(h):l(h)?ua(h):ca(h),c=!1,function(e,t,n){if(L(e,t)){const t=E(e);null!=t&&(t.depValuesDiscoveredSoFarDuringAsyncWork=n)}}(e,a,g),T(e,r,new Set(g.keys()),a),[v,g]}function A(e,t){let o=t.atomValues.get(n);if(null!=o)return o;const r=new Set;try{o=c.get((n=>("string"!=typeof n&&Nr(!1),fa(e,t,n).contents)),{onNodeVisit:e=>{"branch"===e.type&&e.nodeKey!==n&&r.add(e.nodeKey)}})}catch(e){throw i(`Problem with cache lookup for selector "${n}": ${e.message}`)}var a;return o&&(t.atomValues.set(n,o),T(e,t,r,null===(a=E(e))||void 0===a?void 0:a.executionID)),o}function w(e,t){const n=Dt([f.has(e)?[u(f.get(e))]:[],Q(Be(f,(([t])=>t!==e)),(([,e])=>e))]);function o(n){for(const[o,r]of n)if(!fa(e,t,o).is(r))return!0;return!1}for(const e of n){if(e.stateVersions.get(t.version)||!o(e.depValuesDiscoveredSoFarDuringAsyncWork))return e.stateVersions.set(t.version,!0),e;e.stateVersions.set(t.version,!1)}}function E(e){return f.get(e)}function N(e){f.delete(e)}function L(e,t){var n;return t===(null===(n=E(e))||void 0===n?void 0:n.executionID)}function k(e,t,o){e.atomValues.set(n,t);try{c.set(function(e){return Array.from(e.entries()).map((([e,t])=>[e,t.contents]))}(o),t)}catch(e){throw i(`Problem with setting cache for selector "${n}": ${e.message}`)}}function V(e,t){const o=t.atomValues.get(n);return null!=o?o:c.get((n=>{var o;return"string"!=typeof n&&Nr(!1),null===(o=ha(e,t,n))||void 0===o?void 0:o.contents}))}function U(e,t){return function(o){if(Na.includes(n)){const e=`Recoil selector has circular dependencies: ${Na.slice(Na.indexOf(n)).join(" → ")}`;return la(i(e))}Na.push(n);try{return function(e,t){const n=A(e,t);if(null!=n)return N(e),n;const o=w(e,t);var r;if(null!=o)return"loading"===(null===(r=o.loadingLoadable)||void 0===r?void 0:r.state)&&g(e,o.executionID),o.loadingLoadable;const a=ka(),[s,i]=b(e,t,a);return"loading"===s.state?(function(e,t,n,o,r){f.set(e,{depValuesDiscoveredSoFarDuringAsyncWork:o,executionID:t,loadingLoadable:n,stateVersions:new Map([[r.version,!0]])})}(e,a,s,i,t),g(e,a)):(N(e),k(t,s,i)),s}(e,t)}finally{Na.pop()}}()}function C(e){e.atomValues.delete(n)}function M(e,n){null==t&&Nr(!1);for(const t of s){var o;const r=ya(t);null===(o=r.clearCache)||void 0===o||o.call(r,e,n)}s.clear(),C(n),c.clear(),Ra(e,t)}return t=ma(null!=a?{key:n,nodeType:"selector",peek:V,get:U,set:(e,t,o)=>{let r=!1;const s=new Map;function u({key:o}){if(r)throw i("Recoil: Async selector sets are not currently supported.");const a=fa(e,t,o);if("hasValue"===a.state)return a.contents;if("loading"===a.state){const e=`Getting value of asynchronous atom or selector "${o}" in a pending state while setting selector "${n}" is not yet supported.`;throw i(e)}throw a.contents}function c(n,o){if(r){const e="Recoil: Async selector sets are not currently supported.";throw i(e)}const a="function"==typeof o?o(u(n)):o;pa(e,t,n.key,a).forEach(((e,t)=>s.set(t,e)))}const d=a({set:c,get:u,reset:function(e){c(e,_a)}},o);if(void 0!==d)throw l(d)?i("Recoil: Async selector sets are not currently supported."):i("Recoil: selector set should be a void function.");return r=!0,s},init:v,invalidate:C,clearCache:M,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d}:{key:n,nodeType:"selector",peek:V,get:U,init:v,invalidate:C,clearCache:M,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})}Va.value=e=>new da(e);var Ua=Va;const{isLoadable:Ca,loadableWithError:Ma,loadableWithPromise:Ba,loadableWithValue:Ia}=V,{WrappedValue:Oa}=Hr,{peekNodeInfo:Da}=$e,{DEFAULT_VALUE:xa,DefaultValue:Pa,getConfigDeletionHandler:Fa,registerNode:za,setConfigDeletionHandler:Ga}=ce,{isRecoilValue:Wa}=X,{getRecoilValueAsLoadable:ja,markRecoilValueModified:Ka,setRecoilValue:$a,setRecoilValueLoadable:Ha}=_t,{retainedByOptionWithDefault:qa}=Lt,Za=e=>e instanceof Oa?e.value:e;function Ya(e){const{...t}=e,n="default"in e?e.default:new Promise((()=>{}));return Wa(n)?function(e){const t=Ya({...e,default:xa,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:{...e.persistence_UNSTABLE,validator:t=>t instanceof Pa?t:u(e.persistence_UNSTABLE).validator(t,xa)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Ua({key:`${e.key}__withFallback`,get:({get:n})=>{const o=n(t);return o instanceof Pa?e.default:o},set:({set:e},n)=>e(t,n),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return Ga(n.key,Fa(e.key)),n}({...t,default:n}):function(e){const{key:t,persistence_UNSTABLE:n}=e,o=qa(e.retainedBy_UNSTABLE);let r=0;function a(e){return Ba(e.then((e=>(c=Ia(e),e))).catch((e=>{throw c=Ma(e),e})))}let s,c=l(e.default)?a(e.default):Ca(e.default)?"loading"===e.default.state?a(e.default.contents):e.default:Ia(Za(e.default));c.contents;const d=new Map;function f(e,n){var o,r;return null!==(o=null!==(r=n.atomValues.get(t))&&void 0!==r?r:s)&&void 0!==o?o:c}const h=za({key:t,nodeType:"atom",peek:f,get:function(e,o){if(o.atomValues.has(t))return u(o.atomValues.get(t));if(o.nonvalidatedAtoms.has(t)){if(null!=s)return s;if(null==n)return c;const e=o.nonvalidatedAtoms.get(t),r=n.validator(e,xa),a=r instanceof Pa?c:Ia(r);return s=a,s}return c},set:function(e,n,o){if(n.atomValues.has(t)){const e=u(n.atomValues.get(t));if("hasValue"===e.state&&o===e.contents)return new Map}else if(!n.nonvalidatedAtoms.has(t)&&o instanceof Pa)return new Map;return s=void 0,(new Map).set(t,Ia(o))},init:function(n,o,a){var s;if(r++,n.getState().knownAtoms.add(t),"loading"===c.state){const _=()=>{var e;(null!==(e=n.getState().nextTree)&&void 0!==e?e:n.getState().currentTree).atomValues.has(t)||Ka(n,h)};c.contents.finally(_)}const u=null!==(s=e.effects)&&void 0!==s?s:e.effects_UNSTABLE;if(null!=u){let S=xa,y=!0,m=!1,g=null;function R(e){if(y&&e.key===t){const e=S;return e instanceof Pa?f(0,o):l(e)?Ba(e.then((e=>e instanceof Pa?c.toPromise():e))):Ia(e)}return ja(n,e)}function T(e){return R(e).toPromise()}function b(e){var o;const r=Da(n,null!==(o=n.getState().nextTree)&&void 0!==o?o:n.getState().currentTree,e.key);return!y||e.key!==t||S instanceof Pa?r:{...r,isSet:!0,loadable:R(e)}}const A=e=>t=>{if(y){const n=R(h),o="hasValue"===n.state?n.contents:xa;S="function"==typeof t?t(o):t,l(S)&&(S=S.then((t=>(g={effect:e,value:t},t))))}else{if(l(t))throw i("Setting atoms to async values is not implemented.");"function"!=typeof t&&(g={effect:e,value:Za(t)}),$a(n,h,"function"==typeof t?n=>{const o=Za(t(n));return g={effect:e,value:o},o}:Za(t))}},w=e=>()=>A(e)(xa),E=e=>o=>{var r;const{release:a}=n.subscribeToTransactions((n=>{var r;let{currentTree:a,previousTree:s}=n.getState();s||(s=a);const i=null!==(r=a.atomValues.get(t))&&void 0!==r?r:c;if("hasValue"===i.state){var l,u,d,f;const n=i.contents,r=null!==(l=s.atomValues.get(t))&&void 0!==l?l:c,h="hasValue"===r.state?r.contents:xa;(null===(u=g)||void 0===u?void 0:u.effect)!==e||(null===(d=g)||void 0===d?void 0:d.value)!==n?o(n,h,!a.atomValues.has(t)):(null===(f=g)||void 0===f?void 0:f.effect)===e&&(g=null)}}),t);d.set(n,[...null!==(r=d.get(n))&&void 0!==r?r:[],a])};for(const N of u)try{const L=N({node:h,storeID:n.storeID,parentStoreID_UNSTABLE:n.parentStoreID,trigger:a,setSelf:A(N),resetSelf:w(N),onSet:E(N),getPromise:T,getLoadable:R,getInfo_UNSTABLE:b});var p;null!=L&&d.set(n,[...null!==(p=d.get(n))&&void 0!==p?p:[],L])}catch(k){S=k,m=!0}if(y=!1,!(S instanceof Pa)){var v;const V=m?Ma(S):l(S)?Ba(function(e,n){const o=n.then((n=>{var r,a;return(null===(a=(null!==(r=e.getState().nextTree)&&void 0!==r?r:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===o&&$a(e,h,n),n})).catch((n=>{var r,a;throw(null===(a=(null!==(r=e.getState().nextTree)&&void 0!==r?r:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===o&&Ha(e,h,Ma(n)),n}));return o}(n,S)):Ia(Za(S));V.contents,o.atomValues.set(t,V),null===(v=n.getState().nextTree)||void 0===v||v.atomValues.set(t,V)}}return()=>{var e;r--,null===(e=d.get(n))||void 0===e||e.forEach((e=>e())),d.delete(n)}},invalidate:function(){s=void 0},shouldDeleteConfigOnRelease:function(){return void 0!==Fa(t)&&r<=0},dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:o});return h}({...t,default:n})}Ya.value=e=>new Oa(e);var Ja=Ya,Xa=Object.freeze({__proto__:null,MapCache:class{constructor(e){var t;c(this,"_map",void 0),c(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=null!==(t=null==e?void 0:e.mapKey)&&void 0!==t?t:e=>e}size(){return this._map.size}has(e){return this._map.has(this._keyMapper(e))}get(e){return this._map.get(this._keyMapper(e))}set(e,t){this._map.set(this._keyMapper(e),t)}delete(e){this._map.delete(this._keyMapper(e))}clear(){this._map.clear()}}});const{LRUCache:Qa}=Jr,{MapCache:es}=Xa,ts={equality:"reference",eviction:"none",maxSize:1/0};var ns=function({equality:e=ts.equality,eviction:t=ts.eviction,maxSize:n=ts.maxSize}=ts){const o=function(e){switch(e){case"reference":return e=>e;case"value":return e=>na(e)}throw i(`Unrecognized equality policy ${e}`)}(e),r=function(e,t,n){switch(e){case"keep-all":return new es({mapKey:n});case"lru":return new Qa({mapKey:n,maxSize:u(t)});case"most-recent":return new Qa({mapKey:n,maxSize:1})}throw i(`Unrecognized eviction policy ${e}`)}(t,n,o);return r};const{setConfigDeletionHandler:os}=ce;const{setConfigDeletionHandler:rs}=ce;let as=0;var ss=function(e){var t,n;const o=ns({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return t=>{var n;let r;try{r=o.get(t)}catch(t){throw i(`Problem with cache lookup for selector ${e.key}: ${t.message}`)}if(null!=r)return r;const a=`${e.key}__selectorFamily/${null!==(n=na(t,{allowFunctions:!0}))&&void 0!==n?n:"void"}/${as++}`,s=n=>e.get(t)(n),l=e.cachePolicy_UNSTABLE,u="function"==typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE;let c;if(null!=e.set){const n=e.set;c=Ua({key:a,get:s,set:(e,o)=>n(t)(e,o),cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:u})}else c=Ua({key:a,get:s,cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:u});return o.set(t,c),rs(c.key,(()=>{o.delete(t)})),c}};const is=ss({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});const ls=ss({key:"__error",get:e=>()=>{throw i(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:us,loadableWithPromise:cs,loadableWithValue:ds}=V;function fs(e,t){const n=Array(t.length).fill(void 0),o=Array(t.length).fill(void 0);for(const[r,a]of t.entries())try{n[r]=e(a)}catch(e){o[r]=e}return[n,o]}function hs(e){return null!=e&&!l(e)}function ps(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))}function vs(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})}function _s(e,t,n){return vs(e,n.map(((e,n)=>null==e?ds(t[n]):l(e)?cs(e):us(e))))}var Ss={waitForNone:ss({key:"__waitForNone",get:e=>({get:t})=>{const n=ps(e),[o,r]=fs(t,n);return _s(e,o,r)},dangerouslyAllowMutability:!0}),waitForAny:ss({key:"__waitForAny",get:e=>({get:t})=>{const n=ps(e),[o,r]=fs(t,n);return r.some((e=>!l(e)))?_s(e,o,r):new Promise((t=>{for(const[n,a]of r.entries())l(a)&&a.then((a=>{o[n]=a,r[n]=void 0,t(_s(e,o,r))})).catch((a=>{r[n]=a,t(_s(e,o,r))}))}))},dangerouslyAllowMutability:!0}),waitForAll:ss({key:"__waitForAll",get:e=>({get:t})=>{const n=ps(e),[o,r]=fs(t,n);if(r.every((e=>null==e)))return vs(e,o);const a=r.find(hs);if(null!=a)throw a;return Promise.all(r).then((t=>{return vs(e,(n=o,t.map(((e,t)=>void 0===e?n[t]:e))));var n}))},dangerouslyAllowMutability:!0}),waitForAllSettled:ss({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=ps(e),[o,r]=fs(t,n);return r.every((e=>!l(e)))?_s(e,o,r):Promise.all(r.map(((e,t)=>l(e)?e.then((e=>{o[t]=e,r[t]=void 0})).catch((e=>{o[t]=void 0,r[t]=e})):null))).then((()=>_s(e,o,r)))},dangerouslyAllowMutability:!0}),noWait:ss({key:"__noWait",get:e=>({get:t})=>{try{return Ua.value(ds(t(e)))}catch(e){return Ua.value(l(e)?cs(e):us(e))}},dangerouslyAllowMutability:!0})};const{RecoilLoadable:ys}=V,{DefaultValue:ms}=ce,{RecoilRoot:gs,useRecoilStoreID:Rs}=eo,{isRecoilValue:Ts}=X,{retentionZone:bs}=Ce,{freshSnapshot:As}=Sn,{useRecoilState:ws,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:Es,useRecoilStateLoadable:Ns,useRecoilValue:Ls,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:ks,useRecoilValueLoadable:Vs,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Us,useResetRecoilState:Cs,useSetRecoilState:Ms}=jo,{useGotoRecoilSnapshot:Bs,useRecoilSnapshot:Is,useRecoilTransactionObserver:Os}=lr,{useRecoilCallback:Ds}=Fr,{noWait:xs,waitForAll:Ps,waitForAllSettled:Fs,waitForAny:zs,waitForNone:Gs}=Ss;var Ws={DefaultValue:ms,isRecoilValue:Ts,RecoilLoadable:ys,RecoilEnv:M,RecoilRoot:gs,useRecoilStoreID:Rs,useRecoilBridgeAcrossReactRoots_UNSTABLE:function(){"MUTABLE_SOURCE"===dr().mode&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=hr().current;return pr((()=>function({children:t}){return r().createElement(fr,{store_INTERNAL:e},t)}),[e])},atom:Ja,selector:Ua,atomFamily:function(e){var t,n;const o=ns({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return t=>{var n,r;const a=o.get(t);if(null!=a)return a;const{cachePolicyForParams_UNSTABLE:s,...i}=e,l="default"in e?e.default:new Promise((()=>{})),u=Ja({...i,key:`${e.key}__${null!==(n=na(t))&&void 0!==n?n:"void"}`,default:"function"==typeof l?l(t):l,retainedBy_UNSTABLE:"function"==typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE,effects:"function"==typeof e.effects?e.effects(t):"function"==typeof e.effects_UNSTABLE?e.effects_UNSTABLE(t):null!==(r=e.effects)&&void 0!==r?r:e.effects_UNSTABLE});return o.set(t,u),os(u.key,(()=>{o.delete(t)})),u}},selectorFamily:ss,constSelector:function(e){return is(e)},errorSelector:function(e){return ls(e)},readOnlySelector:function(e){return e},noWait:xs,waitForNone:Gs,waitForAny:zs,waitForAll:Ps,waitForAllSettled:Fs,useRecoilValue:Ls,useRecoilValueLoadable:Vs,useRecoilState:ws,useRecoilStateLoadable:Ns,useSetRecoilState:Ms,useResetRecoilState:Cs,useGetRecoilValueInfo_UNSTABLE:function(){const e=cr();return({key:t})=>ur(e.current,e.current.getState().currentTree,t)},useRecoilRefresher_UNSTABLE:function(e){const t=zr();return Wr((()=>{const n=t.current;Gr(n,e)}),[e,t])},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Us,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:ks,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:Es,useRecoilCallback:Ds,useRecoilTransaction_UNSTABLE:function(e,t){const n=Kr();return $r((()=>(...t)=>{jr(n.current)((n=>{e(n)(...t)}))}),null!=t?[...t,n]:void 0)},useGotoRecoilSnapshot:Bs,useRecoilSnapshot:Is,useRecoilTransactionObserver_UNSTABLE:Os,snapshot_UNSTABLE:As,useRetain:fo,retentionZone:bs},js=Ws.DefaultValue,Ks=Ws.isRecoilValue,$s=Ws.RecoilLoadable,Hs=Ws.RecoilEnv,qs=Ws.RecoilRoot,Zs=Ws.useRecoilStoreID,Ys=Ws.useRecoilBridgeAcrossReactRoots_UNSTABLE,Js=Ws.atom,Xs=Ws.selector,Qs=Ws.atomFamily,ei=Ws.selectorFamily,ti=Ws.constSelector,ni=Ws.errorSelector,oi=Ws.readOnlySelector,ri=Ws.noWait,ai=Ws.waitForNone,si=Ws.waitForAny,ii=Ws.waitForAll,li=Ws.waitForAllSettled,ui=Ws.useRecoilValue,ci=Ws.useRecoilValueLoadable,di=Ws.useRecoilState,fi=Ws.useRecoilStateLoadable,hi=Ws.useSetRecoilState,pi=Ws.useResetRecoilState,vi=Ws.useGetRecoilValueInfo_UNSTABLE,_i=Ws.useRecoilRefresher_UNSTABLE,Si=Ws.useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE,yi=Ws.useRecoilValue_TRANSITION_SUPPORT_UNSTABLE,mi=Ws.useRecoilState_TRANSITION_SUPPORT_UNSTABLE,gi=Ws.useRecoilCallback,Ri=Ws.useRecoilTransaction_UNSTABLE,Ti=Ws.useGotoRecoilSnapshot,bi=Ws.useRecoilSnapshot,Ai=Ws.useRecoilTransactionObserver_UNSTABLE,wi=Ws.snapshot_UNSTABLE,Ei=Ws.useRetain,Ni=Ws.retentionZone;t.default=Ws},4073:function(e){e.exports=require("react")},5648:function(e){e.exports=require("react-dom")}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=function(t,n,r,a){if(!n){var s=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],a=e[c][2];for(var i=!0,l=0;l<n.length;l++)(!1&a||s>=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(i=!1,a<s&&(s=a));if(i){e.splice(c--,1);var u=r();void 0!==u&&(t=u)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[n,r,a]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={712:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,s=n[0],i=n[1],l=n[2],u=0;if(s.some((function(t){return 0!==e[t]}))){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);if(l)var c=l(o)}for(t&&t(n);u<s.length;u++)a=s[u],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),o.nc=void 0;var r=o(9853);r=o.O(r),exports.DefaultValue=r.DefaultValue,exports.RecoilEnv=r.RecoilEnv,exports.RecoilLoadable=r.RecoilLoadable,exports.RecoilRoot=r.RecoilRoot,exports.atom=r.atom,exports.atomFamily=r.atomFamily,exports.constSelector=r.constSelector,exports.default=r.default,exports.errorSelector=r.errorSelector,exports.isRecoilValue=r.isRecoilValue,exports.noWait=r.noWait,exports.readOnlySelector=r.readOnlySelector,exports.retentionZone=r.retentionZone,exports.selector=r.selector,exports.selectorFamily=r.selectorFamily,exports.snapshot_UNSTABLE=r.snapshot_UNSTABLE,exports.useGetRecoilValueInfo_UNSTABLE=r.useGetRecoilValueInfo_UNSTABLE,exports.useGotoRecoilSnapshot=r.useGotoRecoilSnapshot,exports.useRecoilBridgeAcrossReactRoots_UNSTABLE=r.useRecoilBridgeAcrossReactRoots_UNSTABLE,exports.useRecoilCallback=r.useRecoilCallback,exports.useRecoilRefresher_UNSTABLE=r.useRecoilRefresher_UNSTABLE,exports.useRecoilSnapshot=r.useRecoilSnapshot,exports.useRecoilState=r.useRecoilState,exports.useRecoilStateLoadable=r.useRecoilStateLoadable,exports.useRecoilState_TRANSITION_SUPPORT_UNSTABLE=r.useRecoilState_TRANSITION_SUPPORT_UNSTABLE,exports.useRecoilStoreID=r.useRecoilStoreID,exports.useRecoilTransactionObserver_UNSTABLE=r.useRecoilTransactionObserver_UNSTABLE,exports.useRecoilTransaction_UNSTABLE=r.useRecoilTransaction_UNSTABLE,exports.useRecoilValue=r.useRecoilValue,exports.useRecoilValueLoadable=r.useRecoilValueLoadable,exports.useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE=r.useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE,exports.useRecoilValue_TRANSITION_SUPPORT_UNSTABLE=r.useRecoilValue_TRANSITION_SUPPORT_UNSTABLE,exports.useResetRecoilState=r.useResetRecoilState,exports.useRetain=r.useRetain,exports.useSetRecoilState=r.useSetRecoilState,exports.waitForAll=r.waitForAll,exports.waitForAllSettled=r.waitForAllSettled,exports.waitForAny=r.waitForAny,exports.waitForNone=r.waitForNone,Object.defineProperty(exports,"__esModule",{value:!0})}();
|
|
2
2
|
//# sourceMappingURL=shared.js.map
|