"use strict";(self.webpackChunk_phs_mfe_apps_search=self.webpackChunk_phs_mfe_apps_search||[]).push([["vendors-node_modules_recoil_es_recoil_js"],{1125:(e,t,n)=>{n.r(t),n.d(t,{DefaultValue:()=>ei,RecoilLoadable:()=>ni,RecoilRoot:()=>oi,atom:()=>si,atomFamily:()=>ci,constSelector:()=>ui,default:()=>Oi,errorSelector:()=>di,isRecoilValue:()=>ti,noWait:()=>hi,readOnlySelector:()=>fi,retentionZone:()=>Di,selector:()=>ii,selectorFamily:()=>li,snapshot_UNSTABLE:()=>Bi,useGetRecoilValueInfo_UNSTABLE:()=>wi,useGotoRecoilSnapshot:()=>Mi,useRecoilBridgeAcrossReactRoots_UNSTABLE:()=>ai,useRecoilCallback:()=>Vi,useRecoilRefresher_UNSTABLE:()=>Ai,useRecoilSnapshot:()=>Ui,useRecoilState:()=>gi,useRecoilStateLoadable:()=>Ri,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:()=>ki,useRecoilStoreID:()=>ri,useRecoilTransactionObserver_UNSTABLE:()=>Ci,useRecoilTransaction_UNSTABLE:()=>Li,useRecoilValue:()=>Si,useRecoilValueLoadable:()=>mi,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:()=>Ni,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:()=>Ei,useResetRecoilState:()=>bi,useRetain:()=>Ii,useSetRecoilState:()=>Ti,waitForAll:()=>yi,waitForAllSettled:()=>_i,waitForAny:()=>vi,waitForNone:()=>pi});var o=n(7900),r=n.n(o),a=n(1830),s=n.n(a);var i=function(e){const t=new Error(e);if(void 0===t.stack)try{throw t}catch(n){}return t};var c=function(e){return!!e&&"function"===typeof e.then};var l=function(e,t){if(null!=e)return e;throw i(null!==t&&void 0!==t?t:"Got unexpected null or undefined")};function u(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 "'.concat(this.state,'" state'))}promiseMaybe(){throw i("BaseLoadable")}promiseOrThrow(){throw i('Loadable expected promise, but in "'.concat(this.state,'" state'))}errorMaybe(){throw i("BaseLoadable")}errorOrThrow(){throw i('Loadable expected error, but in "'.concat(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(),u(this,"state","hasValue"),u(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 c(t)?_(t):m(t)?t:v(t)}catch(t){return c(t)?_(t.next((()=>this.map(e)))):y(t)}}}class h extends d{constructor(e){super(),u(this,"state","hasError"),u(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(),u(this,"state","loading"),u(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(m(n)){const e=n;switch(e.state){case"hasValue":case"loading":return e.contents;case"hasError":throw e.contents}}return n})).catch((t=>{if(c(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 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=>m(e)?e:c(e)?_(e):v(e))));return Array.isArray(e)?t:t.map((t=>Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})))}function m(e){return e instanceof d}const g={of:e=>c(e)?_(e):m(e)?e:v(e),error:e=>y(e),all:S,isLoadable:m};var R={loadableWithValue:v,loadableWithError:y,loadableWithPromise:_,loadableLoading:function(){return Object.freeze(new p(new Promise((()=>{}))))},loadableAll:S,isLoadable:m,RecoilLoadable:g},T=R.loadableWithValue,b=R.loadableWithError,w=R.loadableWithPromise,A=R.loadableLoading,N=R.loadableAll,E=R.isLoadable,k=R.RecoilLoadable,V=Object.freeze({__proto__:null,loadableWithValue:T,loadableWithError:b,loadableWithPromise:w,loadableLoading:A,loadableAll:N,isLoadable:E,RecoilLoadable:k});class L{constructor(e){u(this,"key",void 0),this.key=e}}class M extends L{}class U extends L{}var C={AbstractRecoilValue:L,RecoilState:M,RecoilValueReadOnly:U,isRecoilValue:function(e){return e instanceof M||e instanceof U}},B=C.AbstractRecoilValue,I=C.RecoilState,D=C.RecoilValueReadOnly,O=C.isRecoilValue,P=Object.freeze({__proto__:null,AbstractRecoilValue:B,RecoilState:I,RecoilValueReadOnly:D,isRecoilValue:O});var x=function(e){};const F=(new Map).set("recoil_hamt_2020",!0).set("recoil_sync_external_store",!0).set("recoil_suppress_rerender_in_callback",!0).set("recoil_memory_managament_2020",!0);function z(e){var t;return null!==(t=F.get(e))&&void 0!==t&&t}z.setPass=e=>{F.set(e,!0)},z.setFail=e=>{F.set(e,!1)},z.clear=()=>{F.clear()};var W=z;var G=function(e,t){return function*(){let n=0;for(const o of e)yield t(o,n++)}()};var j=function(e,t){let{error:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null};class H{}const q=new H;class K extends Error{constructor(e){super("Tried to set the value of Recoil selector ".concat(e," using an updater function, but it is an async selector in a pending or error state; this is not supported."))}}const Z=new Map,Y=new Map;class J extends Error{}const X=new Map;function $(e){return X.get(e)}var Q={nodes:Z,recoilValues:Y,registerNode:function(e){if(Z.has(e.key)){const t='Duplicate atom key "'.concat(e.key,'". 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)}Z.set(e.key,e);const t=null==e.set?new P.RecoilValueReadOnly(e.key):new P.RecoilState(e.key);return Y.set(e.key,t),t},getNode:function(e){const t=Z.get(e);if(null==t)throw new J('Missing definition for RecoilValue: "'.concat(e,'""'));return t},getNodeMaybe:function(e){return Z.get(e)},deleteNodeConfigIfPossible:function(e){var t;if(!W("recoil_memory_managament_2020"))return;const n=Z.get(e);var o;null!==n&&void 0!==n&&null!==(t=n.shouldDeleteConfigOnRelease)&&void 0!==t&&t.call(n)&&(Z.delete(e),null===(o=$(e))||void 0===o||o(),X.delete(e))},setConfigDeletionHandler:function(e,t){W("recoil_memory_managament_2020")&&(void 0===t?X.delete(e):X.set(e,t))},getConfigDeletionHandler:$,recoilValuesForKeys:function(e){return G(e,(e=>l(Y.get(e))))},NodeMissingError:J,DefaultValue:H,DEFAULT_VALUE:q,RecoilValueNotReady:K};var ee={enqueueExecution:function(e,t){t()}};var te,ne,oe=(te=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={},c=function(e){return function(){return e}},l=n.hash=function(e){var n="undefined"===typeof e?"undefined":t(e);if("number"===n)return e;"string"!==n&&(e+="");for(var o=0,r=0,a=e.length;r>>e&r},d=function(e){return 1<>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;s1?S(e,this.hash,c):c[0]}var l=o();return l===i?this:(++s.value,R(e,n,this.hash,this,r,_(e,r,a,l)))},A=function(e,t,n,o,r,s,i){var c=this.mask,l=this.children,_=u(n,r),S=d(_),R=f(c,S),b=c&S,w=b?l[R]:v,A=w._modify(e,t,n+5,o,r,s,i);if(w===A)return this;var N,E=T(e,this),k=c,V=void 0;if(b&&y(A)){if(!(k&=~S))return v;if(l.length<=2&&((N=l[1^R])===v||1===N.type||2===N.type))return l[1^R];V=p(E,R,l)}else if(b||y(A))V=h(E,R,A,l);else{if(l.length>=a)return function(e,t,n,o,r){for(var a=[],s=o,i=0,c=0;s;++c)1&s&&(a[c]=r[i++]),s>>>=1;return a[t]=n,g(e,i+1,a)}(e,_,A,c,l);k|=S,V=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,c=new Array(r+1);s1?n-1:0),r=1;r{n.set(o,t(e,o))})),n};function de(e,t,n){const{nodeDeps:o,nodeToNodeSubscriptions:r}=t;e.forEach(((e,t)=>{const a=o.get(t);if(a&&n&&a!==n.nodeDeps.get(t))return;o.set(t,new Set(e));if((null==a?e:le(e,a)).forEach((e=>{r.has(e)||r.set(e,new Set);l(r.get(e)).add(t)})),a){le(a,e).forEach((e=>{if(!r.has(e))return;const n=l(r.get(e));n.delete(t),0===n.size&&r.delete(e)}))}}))}var fe={addToDependencyMap:function(e,t,n){n.has(e)||n.set(e,new Set),l(n.get(e)).add(t)},cloneGraph:function(e){return{nodeDeps:ue(e.nodeDeps,(e=>new Set(e))),nodeToNodeSubscriptions:ue(e.nodeToNodeSubscriptions,(e=>new Set(e)))}},graph:function(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}},mergeDepsIntoDependencyMap:function(e,t){e.forEach(((e,n)=>{t.has(n)||t.set(n,new Set);const o=l(t.get(n));e.forEach((e=>o.add(e)))}))},saveDependencyMapToStore:function(e,t,n){var o,r,a,s;const i=t.getState();n!==i.currentTree.version&&n!==(null===(o=i.nextTree)||void 0===o?void 0:o.version)&&n!==(null===(r=i.previousTree)||void 0===r?void 0:r.version)&&j("Tried to save dependencies to a discarded tree");const c=t.getGraph(n);if(de(e,c),n===(null===(a=i.previousTree)||void 0===a?void 0:a.version)){de(e,t.getGraph(i.currentTree.version),c)}if(n===(null===(s=i.previousTree)||void 0===s?void 0:s.version)||n===i.currentTree.version){var l;const n=null===(l=i.nextTree)||void 0===l?void 0:l.version;if(void 0!==n){de(e,t.getGraph(n),c)}}}};let he=0;let pe=0;let ve=0;var ye={getNextTreeStateVersion:()=>he++,getNextStoreID:()=>pe++,getNextComponentID:()=>ve++};const{persistentMap:_e}=ce,{graph:Se}=fe,{getNextTreeStateVersion:me}=ye;function ge(){const e=me();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:_e(),nonvalidatedAtoms:_e()}}var Re={makeEmptyTreeState:ge,makeEmptyStoreState:function(){const e=ge();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,Se()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}},getNextTreeStateVersion:me};class Te{}var be={RetentionZone:Te,retentionZone:function(){return new Te}};var we={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}};var Ae=function*(e,t){let n=0;for(const o of e)t(o,n++)&&(yield o)};var Ne=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:Ee,getNodeMaybe:ke,recoilValuesForKeys:Ve}=Q,{RetentionZone:Le}=be,{setByAddingToSet:Me}=we,Ue=Object.freeze(new Set);class Ce extends Error{}function Be(e,t,n,o){const r=e.getState();if(r.nodeCleanupFunctions.has(n))return;const a=Ee(n),s=function(e,t,n){if(!W("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 Le)r(n);else if(Array.isArray(n))for(const a of n)r(a);return()=>{if(!W("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function r(e){const n=o.nodesRetainedByZone.get(e);null===n||void 0===n||n.delete(t),n&&0===n.size&&o.nodesRetainedByZone.delete(e)}if(n instanceof Le)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 Ie(e,t,n){return Ee(n).peek(e,t)}function De(e,t,n){const o=new Set,r=Array.from(n),a=e.getGraph(t.version);for(let i=r.pop();i;i=r.pop()){var s;o.add(i);const e=null!==(s=a.nodeToNodeSubscriptions.get(i))&&void 0!==s?s:Ue;for(const t of e)o.has(t)||r.push(t)}return o}var Oe,Pe,xe,Fe={getNodeLoadable:function(e,t,n){return Be(e,t,n,"get"),Ee(n).get(e,t)},peekNodeLoadable:Ie,setNodeValue:function(e,t,n,o){const r=Ee(n);if(null==r.set)throw new Ce("Attempt to set read-only RecoilValue: ".concat(n));const a=r.set;return Be(e,t,n,"set"),a(e,t,o)},initializeNode:function(e,t,n){Be(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=ke(t);return null===r||void 0===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:Me(e.dirtyAtoms,t)}},peekNodeInfo:function(e,t,n){const o=e.getState(),r=e.getGraph(t.version),a=Ee(n).nodeType;return Ne({type:a},{loadable:()=>Ie(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 Ve(null!==(e=r.nodeDeps.get(n))&&void 0!==e?e:[])},subscribers:()=>{var r,a;return{nodes:Ve(Ae(De(e,t,new Set([n])),(e=>e!==n))),components:G(null!==(r=null===(a=o.nodeToComponentSubscriptions.get(n))||void 0===a?void 0:a.values())&&void 0!==r?r:[],(e=>{let[t]=e;return{name:t}}))}}})},getDownstreamNodes:De};const ze=null!==(Oe=r().createMutableSource)&&void 0!==Oe?Oe:r().unstable_createMutableSource,We=null!==(Pe=r().useMutableSource)&&void 0!==Pe?Pe:r().unstable_useMutableSource,Ge=null!==(xe=r().useSyncExternalStore)&&void 0!==xe?xe:r().unstable_useSyncExternalStore;var je={createMutableSource:ze,useMutableSource:We,useSyncExternalStore:Ge,reactMode:function(){return W("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:W("recoil_sync_external_store")&&null!=Ge?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:W("recoil_mutable_source")&&null!=We&&"undefined"!==typeof window&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?W("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:W("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}};const{getDownstreamNodes:He,getNodeLoadable:qe,setNodeValue:Ke}=Fe,{getNextComponentID:Ze}=ye,{getNode:Ye,getNodeMaybe:Je}=Q,{DefaultValue:Xe,RecoilValueNotReady:$e}=Q,{reactMode:Qe}=je,{AbstractRecoilValue:et,RecoilState:tt,RecoilValueReadOnly:nt,isRecoilValue:ot}=P;function rt(e,t,n){if("set"===n.type){const{recoilValue:o,valueOrUpdater:r}=n,a=function(e,t,n,o){let{key:r}=n;if("function"===typeof o){const n=qe(e,t,r);if("loading"===n.state)throw new $e(r);if("hasError"===n.state)throw n.contents;return o(n.contents)}return o}(e,t,o,r),s=Ke(e,t,o.key,a);for(const[e,n]of s.entries())at(t,e,n)}else if("setLoadable"===n.type){const{recoilValue:{key:e},loadable:o}=n;at(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=Je(e);null===a||void 0===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 j("Unknown action ".concat(n.type))}function at(e,t,n){"hasValue"===n.state&&n.contents instanceof Xe?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function st(e,t){e.replaceState((n=>{const o=lt(n);for(const r of t)rt(e,o,r);return ut(e,o),o}))}function it(e,t){if(ct.length){const n=ct[ct.length-1];let o=n.get(e);o||n.set(e,o=[]),o.push(t)}else st(e,[t])}const ct=[];function lt(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function ut(e,t){const n=He(e,t,t.dirtyAtoms);for(const a of n){var o,r;null===(o=Je(a))||void 0===o||null===(r=o.invalidate)||void 0===r||r.call(o,t)}}function dt(e,t,n){it(e,{type:"set",recoilValue:t,valueOrUpdater:n})}var ft={RecoilValueReadOnly:nt,AbstractRecoilValue:et,RecoilState:tt,getRecoilValueAsLoadable:function(e,t){let{key:n}=t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getState().currentTree;var r,a;const s=e.getState();o.version!==s.currentTree.version&&o.version!==(null===(r=s.nextTree)||void 0===r?void 0:r.version)&&o.version!==(null===(a=s.previousTree)||void 0===a?void 0:a.version)&&j("Tried to read from a discarded tree");const i=qe(e,o,n);return"loading"===i.state&&i.contents.catch((()=>{})),i},setRecoilValue:dt,setRecoilValueLoadable:function(e,t,n){if(n instanceof Xe)return dt(e,t,n);it(e,{type:"setLoadable",recoilValue:t,loadable:n})},markRecoilValueModified:function(e,t){it(e,{type:"markModified",recoilValue:t})},setUnvalidatedRecoilValue:function(e,t,n){it(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})},subscribeToRecoilValue:function(e,t,n){let{key:o}=t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const a=Ze(),s=e.getState();s.nodeToComponentSubscriptions.has(o)||s.nodeToComponentSubscriptions.set(o,new Map),l(s.nodeToComponentSubscriptions.get(o)).set(a,[null!==r&&void 0!==r?r:"",n]);const i=Qe();if(i.early&&("LEGACY"===i.mode||"MUTABLE_SOURCE"===i.mode)){const t=e.getState().nextTree;t&&t.dirtyAtoms.has(o)&&n(t)}return{release:()=>{const t=e.getState(),n=t.nodeToComponentSubscriptions.get(o);void 0!==n&&n.has(a)?(n.delete(a),0===n.size&&t.nodeToComponentSubscriptions.delete(o)):j("Subscription missing at release time for atom ".concat(o,". This is a bug in Recoil."))}}},isRecoilValue:ot,applyAtomValueWrites:function(e,t){const n=e.clone();return t.forEach(((e,t)=>{"hasValue"===e.state&&e.contents instanceof Xe?n.delete(t):n.set(t,e)})),n},batchStart:function(){const e=new Map;return ct.push(e),()=>{for(const[t,n]of e)st(t,n);ct.pop()!==e&&j("Incorrect order of batch popping")}},writeLoadableToTreeState:at,invalidateDownstreams:ut,copyTreeState:lt,refreshRecoilValue:function(e,t){var n;const{currentTree:o}=e.getState(),r=Ye(t.key);null===(n=r.clearCache)||void 0===n||n.call(r,e,o)},invalidateDownstreams_FOR_TESTING:ut};var ht=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:pt}=Fe,{deleteNodeConfigIfPossible:vt,getNode:yt}=Q,{RetentionZone:_t}=be,St=new Set;function mt(e,t){const n=e.getState(),o=n.currentTree;if(n.nextTree)return void j("releaseNodesNowOnCurrentTree should only be called at the end of a batch");const r=new Set;for(const s of t)if(s instanceof _t)for(const e of Rt(n,s))r.add(e);else r.add(s);const a=function(e,t){const n=e.getState(),o=n.currentTree,r=e.getGraph(o.version),a=new Set,s=new Set;return i(t),a;function i(t){const c=new Set,u=function(e,t,n,o,r){const a=e.getGraph(t.version),s=[],i=new Set;for(;n.size>0;)c(l(n.values().next().value));return s;function c(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 n of t)c(n);i.add(e),n.delete(e),s.push(e)}}(e,o,t,a,s);for(const e of u){var d;if("recoilRoot"===yt(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(Tt(e).some((e=>n.retention.referenceCounts.get(e)))){s.add(e);continue}const t=r.nodeToNodeSubscriptions.get(e);t&&ht(t,(e=>s.has(e)))?s.add(e):(a.add(e),c.add(e))}const f=new Set;for(const e of c)for(const t of null!==(h=r.nodeDeps.get(e))&&void 0!==h?h:St){var h;a.has(t)||f.add(t)}f.size&&i(f)}}(e,r);for(const s of a)gt(e,o,s)}function gt(e,t,n){if(!W("recoil_memory_managament_2020"))return;pt(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=Tt(n);for(const c of r){var a;null===(a=o.retention.nodesRetainedByZone.get(c))||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)}vt(n)}function Rt(e,t){var n;return null!==(n=e.retention.nodesRetainedByZone.get(t))&&void 0!==n?n:St}function Tt(e){const t=yt(e).retainedBy;return void 0===t||"components"===t||"recoilRoot"===t?[]:t instanceof _t?[t]:t}function bt(e,t){if(!W("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),function(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):mt(e,new Set([t]))}(e,t)}var wt={SUSPENSE_TIMEOUT_MS:12e4,updateRetainCount:function(e,t,n){var o;if(!W("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?bt(e,t):r.set(t,a)},updateRetainCountToZero:bt,releaseScheduledRetainablesNow:function(e){if(!W("recoil_memory_managament_2020"))return;const t=e.getState();mt(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()},retainedByOptionWithDefault:function(e){return void 0===e?"recoilRoot":e}};const{unstable_batchedUpdates:At}=s();var Nt={unstable_batchedUpdates:At};const{unstable_batchedUpdates:Et}=Nt;var kt={unstable_batchedUpdates:Et};const{batchStart:Vt}=ft,{unstable_batchedUpdates:Lt}=kt;let Mt=Lt;var Ut={getBatcher:()=>Mt,setBatcher:e=>{Mt=e},batchUpdates:e=>{Mt((()=>{let t=()=>{};try{t=Vt(),e()}finally{t()}}))}};var Ct=function*(e){for(const t of e)for(const e of t)yield e};var Bt={isSSR:"undefined"===typeof window,isReactNative:"undefined"!==typeof navigator&&"ReactNative"===navigator.product};var It={memoizeWithArgsHash:function(e,t){var n=this;let o;return function(){o||(o={});for(var r=arguments.length,a=new Array(r),s=0;s{o=null}]}};const{batchUpdates:Dt}=Ut,{initializeNode:Ot,peekNodeInfo:Pt}=Fe,{graph:xt}=fe,{getNextStoreID:Ft}=ye,{DEFAULT_VALUE:zt,recoilValues:Wt,recoilValuesForKeys:Gt}=Q,{AbstractRecoilValue:jt,getRecoilValueAsLoadable:Ht,setRecoilValue:qt,setUnvalidatedRecoilValue:Kt}=ft,{updateRetainCount:Zt}=wt,{getNextTreeStateVersion:Yt,makeEmptyStoreState:Jt}=Re,{isSSR:Xt}=Bt,{memoizeOneWithArgsHashAndInvalidation:$t}=It;class Qt{constructor(e){u(this,"_store",void 0),u(this,"_refCount",1),u(this,"getLoadable",(e=>(this.checkRefCount_INTERNAL(),Ht(this._store,e)))),u(this,"getPromise",(e=>(this.checkRefCount_INTERNAL(),this.getLoadable(e).toPromise()))),u(this,"getNodes_UNSTABLE",(e=>{if(this.checkRefCount_INTERNAL(),!0===(null===e||void 0===e?void 0:e.isModified)){if(!1===(null===e||void 0===e?void 0:e.isInitialized))return[];const t=this._store.getState().currentTree;return Gt(t.dirtyAtoms)}const t=this._store.getState().knownAtoms,n=this._store.getState().knownSelectors;return null==(null===e||void 0===e?void 0:e.isInitialized)?Wt.values():!0===e.isInitialized?Gt(Ct([this._store.getState().knownAtoms,this._store.getState().knownSelectors])):Ae(Wt.values(),(e=>{let{key:o}=e;return!t.has(o)&&!n.has(o)}))})),u(this,"getInfo_UNSTABLE",(e=>{let{key:t}=e;return this.checkRefCount_INTERNAL(),Pt(this._store,this._store.getState().currentTree,t)})),u(this,"map",(e=>{this.checkRefCount_INTERNAL();const t=new on(this,Dt);return e(t),t})),u(this,"asyncMap",(async e=>{this.checkRefCount_INTERNAL();const t=new on(this,Dt);return t.retain(),await e(t),t.autoRelease_INTERNAL(),t})),this._store={storeID:Ft(),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=xt();return n.set(t,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw i("Cannot subscribe to Snapshots")}};for(const t of this._store.getState().knownAtoms)Ot(this._store,t,"get"),Zt(this._store,t,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0&&j("Attempt to retain() Snapshot that was already released."),this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){Xt||window.setTimeout((()=>this._release()),0)}_release(){if(this._refCount--,0===this._refCount){if(this._store.getState().nodeCleanupFunctions.forEach((e=>e())),this._store.getState().nodeCleanupFunctions.clear(),!W("recoil_memory_managament_2020"))return}else this._refCount}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){W("recoil_memory_managament_2020")&&this._refCount}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}}function en(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=e.getState(),r=n?Yt():t.version;return{currentTree:n?{version:r,stateID:r,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()}:t,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(G(o.nodeCleanupFunctions.entries(),(e=>{let[t]=e;return[t,()=>{}]})))}}const[tn,nn]=$t(((e,t)=>{const n=e.getState(),o="current"===t?n.currentTree:l(n.previousTree);return new Qt(en(e,o))}),((e,t)=>{var n;return String(t)+String(e.storeID)+String(e.getState().currentTree.version)+String(null===(n=e.getState().previousTree)||void 0===n?void 0:n.version)}));class on extends Qt{constructor(e,t){super(en(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0)),u(this,"_batch",void 0),u(this,"set",((e,t)=>{this.checkRefCount_INTERNAL();const n=this.getStore_INTERNAL();this._batch((()=>{Zt(n,e.key,1),qt(this.getStore_INTERNAL(),e,t)}))})),u(this,"reset",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();this._batch((()=>{Zt(t,e.key,1),qt(this.getStore_INTERNAL(),e,zt)}))})),u(this,"setUnvalidatedAtomValues_DEPRECATED",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();Dt((()=>{for(const[n,o]of e.entries())Zt(t,n,1),Kt(t,new jt(n),o)}))})),this._batch=t}}var rn={Snapshot:Qt,MutableSnapshot:on,freshSnapshot:function(e){const t=new Qt(Jt());return null!=e?t.map(e):t},cloneSnapshot:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"current";const n=tn(e,t);return n.isRetained()?n:(nn(),tn(e,t))}},an=rn.Snapshot,sn=rn.MutableSnapshot,cn=rn.freshSnapshot,ln=rn.cloneSnapshot,un=Object.freeze({__proto__:null,Snapshot:an,MutableSnapshot:sn,freshSnapshot:cn,cloneSnapshot:ln});var dn=function(){const e=new Set;for(var t=arguments.length,n=new Array(t),o=0;o component.")}const Dn=Object.freeze({storeID:bn(),getState:In,replaceState:In,getGraph:In,subscribeToTransactions:In,addTransactionMetadata:In});let On=!1;function Pn(e){if(On)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){W("recoil_memory_managament_2020")&&W("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&En(e);const n=t.currentTree.version,o=pn();t.nextTree={...t.currentTree,version:o,stateID:o,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(o,Tn(l(t.graphsByVersion.get(n))))}}const xn=r().createContext({current:Dn}),Fn=()=>Ln(xn),zn=r().createContext(null);function Wn(e,t,n){const o=_n(e,n,n.dirtyAtoms);for(const r of o){const e=t.nodeToComponentSubscriptions.get(r);if(e)for(const[t,[o,r]]of e)r(n)}}function Gn(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,o]of r)o(e);for(const[n,o]of t.transactionSubscriptions)o(e);(!An().early||t.suspendedComponentResolvers.size>0)&&(Wn(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(e){let{setNotifyBatcherOfChange:t}=e;const n=Fn(),[,o]=Bn([]);return t((()=>o({}))),Mn((()=>(t((()=>o({}))),()=>{t((()=>{}))})),[t]),Mn((()=>{ee.enqueueExecution("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,Gn(e),null!=t.previousTree?t.graphsByVersion.delete(t.previousTree.version):j("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,W("recoil_memory_managament_2020")&&En(e)}finally{t.commitDepth--}}(n.current)}))})),null}let Hn=0;function qn(e){let t,{initializeState_DEPRECATED:n,initializeState:o,store_INTERNAL:a,children:s}=e;const i=e=>{const n=t.current.graphsByVersion;if(n.has(e))return l(n.get(e));const o=Rn();return n.set(e,o),o},c=(e,t)=>{if(null==t){const{transactionSubscriptions:t}=p.current.getState(),n=Hn++;return t.set(n,e),{release:()=>{t.delete(n)}}}{const{nodeTransactionSubscriptions:n}=p.current.getState();n.has(t)||n.set(t,new Map);const o=Hn++;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=>{Pn(p.current);for(const t of Object.keys(e))l(p.current.getState().nextTree).transactionMetadata[t]=e[t]},d=e=>{Pn(p.current);const n=l(t.current.nextTree);let o;try{On=!0,o=e(n)}finally{On=!1}o!==n&&(t.current.nextTree=o,An().early&&Wn(p.current,t.current,o),l(f.current)())},f=Cn(null),h=Vn((e=>{f.current=e}),[f]),p=hn((()=>null!==a&&void 0!==a?a:{storeID:bn(),getState:()=>t.current,replaceState:d,getGraph:i,subscribeToTransactions:c,addTransactionMetadata:u}));null!=a&&(p.current=a),t=hn((()=>null!=n?function(e,t){const n=vn();return t({set:(t,o)=>{const r=n.currentTree,a=mn(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:dn(r.dirtyAtoms,s),atomValues:Nn(r.atomValues,a),nonvalidatedAtoms:i}},setUnvalidatedAtomValues:e=>{e.forEach(((e,t)=>{n.currentTree=gn(n.currentTree,t,e)}))}}),n}(p.current,n):null!=o?function(e){const t=kn().map(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach((e=>e())),n.nodeCleanupFunctions.clear(),n}(o):vn()));const v=Un((()=>null===wn||void 0===wn?void 0:wn(t,(()=>t.current.currentTree.version))),[t]);return Mn((()=>{const e=p.current;for(const t of new Set(e.getState().knownAtoms))Sn(e,t,"get");return()=>{for(const t of e.getState().knownAtoms)yn(e,t)}}),[p]),r().createElement(xn.Provider,{value:p},r().createElement(zn.Provider,{value:v},r().createElement(jn,{setNotifyBatcherOfChange:h}),s))}var Kn={RecoilRoot:function(e){const{override:t,...n}=e,o=Fn();return!1===t&&o.current!==Dn?e.children:r().createElement(qn,n)},useStoreRef:Fn,useRecoilMutableSource:function(){const e=Ln(zn);return null==e&&x("Attempted to use a Recoil hook outside of a . must be an ancestor of any component that uses Recoil hooks."),e},useRecoilStoreID:function(){return Fn().current.storeID},notifyComponents_FOR_TESTING:Wn,sendEndOfBatchNotifications_FOR_TESTING:Gn};var Zn=function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n{t.current=e})),t.current};const{useStoreRef:$n}=Kn,{SUSPENSE_TIMEOUT_MS:Qn}=wt,{updateRetainCount:eo}=wt,{RetentionZone:to}=be,{useEffect:no,useRef:oo}=r(),{isSSR:ro}=Bt;var ao=function(e){if(W("recoil_memory_managament_2020"))return function(e){const t=Array.isArray(e)?e:[e],n=t.map((e=>e instanceof to?e:e.key)),o=$n();no((()=>{if(!W("recoil_memory_managament_2020"))return;const e=o.current;if(r.current&&!ro)window.clearTimeout(r.current),r.current=null;else for(const t of n)eo(e,t,1);return()=>{for(const t of n)eo(e,t,-1)}}),[o,...n]);const r=oo(),a=Xn(n);if(!ro&&(void 0===a||!Zn(a,n))){const e=o.current;for(const t of n)eo(e,t,1);if(a)for(const t of a)eo(e,t,-1);r.current&&window.clearTimeout(r.current),r.current=window.setTimeout((()=>{r.current=null;for(const t of n)eo(e,t,-1)}),Qn)}}(e)};const{useRef:so}=r();var io=function(){return so(),""};const{batchUpdates:co}=Ut,{DEFAULT_VALUE:lo}=Q,{reactMode:uo,useMutableSource:fo,useSyncExternalStore:ho}=je,{useRecoilMutableSource:po,useStoreRef:vo}=Kn,{isRecoilValue:yo}=P,{AbstractRecoilValue:_o,getRecoilValueAsLoadable:So,setRecoilValue:mo,setUnvalidatedRecoilValue:go,subscribeToRecoilValue:Ro}=ft,{useCallback:To,useEffect:bo,useMemo:wo,useRef:Ao,useState:No}=r(),{setByAddingToSet:Eo}=we;function ko(e,t,n){if("hasValue"===e.state)return e.contents;if("loading"===e.state){throw new Promise((e=>{n.current.getState().suspendedComponentResolvers.add(e)}))}throw"hasError"===e.state?e.contents:i('Invalid value of loadable atom "'.concat(t.key,'"'))}function Vo(e){const t=vo(),n=io(),o=To((()=>{var n;const o=t.current,r=o.getState(),a=uo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return{loadable:So(o,e,a),key:e.key}}),[t,e]),r=To((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=wo((()=>r(o)),[o,r]),s=To((o=>{const r=t.current;return Ro(r,e,o,n).release}),[t,e,n]);return ho(s,a,a).loadable}function Lo(e){const t=vo(),n=To((()=>{var n;const o=t.current,r=o.getState(),a=uo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return So(o,e,a)}),[t,e]),o=To((()=>n()),[n]),r=io(),a=To(((o,a)=>{const s=t.current;return Ro(s,e,(()=>{if(!W("recoil_suppress_rerender_in_callback"))return a();const e=n();l.current.is(e)||a(),l.current=e}),r).release}),[t,e,r,n]),s=po();if(null==s)throw i("Recoil hooks must be used in components contained within a component.");const c=fo(s,o,a),l=Ao(c);return bo((()=>{l.current=c})),c}function Mo(e){const t=vo(),n=io(),o=To((()=>{var n;const o=t.current,r=o.getState(),a=uo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return So(o,e,a)}),[t,e]),r=To((()=>({loadable:o(),key:e.key})),[o,e.key]),a=To((e=>{const t=r();return e.loadable.is(t.loadable)&&e.key===t.key?e:t}),[r]);bo((()=>{const o=Ro(t.current,e,(e=>{i(a)}),n);return i(a),o.release}),[n,e,t,a]);const[s,i]=No(r);return s.key!==e.key?r().loadable:s.loadable}function Uo(e){const t=vo(),[,n]=No([]),o=io(),r=To((()=>{var n;const o=t.current,r=o.getState(),a=uo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return So(o,e,a)}),[t,e]),a=r(),s=Ao(a);return bo((()=>{s.current=a})),bo((()=>{const a=t.current,i=a.getState(),c=Ro(a,e,(e=>{var t;if(!W("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 l;if(!W("recoil_suppress_rerender_in_callback"))return n([]);const e=r();null!==(l=s.current)&&void 0!==l&&l.is(e)||n(e),s.current=e}return c.release}),[o,r,e,t]),a}function Co(e){return W("recoil_memory_managament_2020")&&ao(e),{TRANSITION_SUPPORT:Mo,SYNC_EXTERNAL_STORE:Vo,MUTABLE_SOURCE:Lo,LEGACY:Uo}[uo().mode](e)}function Bo(e){const t=vo();return ko(Co(e),e,t)}function Io(e){const t=vo();return To((n=>{mo(t.current,e,n)}),[t,e])}function Do(e){return W("recoil_memory_managament_2020")&&ao(e),Mo(e)}function Oo(e){const t=vo();return ko(Do(e),e,t)}var Po={recoilComponentGetRecoilValueCount_FOR_TESTING:{current:0},useRecoilInterface:function(){const e=io(),t=vo(),[,n]=No([]),o=Ao(new Set);o.current=new Set;const r=Ao(new Set),a=Ao(new Map),s=To((e=>{const t=a.current.get(e);t&&(t.release(),a.current.delete(e))}),[a]),i=To(((e,t)=>{a.current.has(t)&&n([])}),[]);return bo((()=>{const n=t.current;le(o.current,r.current).forEach((t=>{if(a.current.has(t))return void x('Double subscription to RecoilValue "'.concat(t,'"'));const o=Ro(n,new _o(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)})),le(r.current,o.current).forEach((e=>{s(e)})),r.current=o.current})),bo((()=>{const n=a.current;return le(o.current,new Set(n.keys())).forEach((o=>{const r=Ro(t.current,new _o(o),(e=>i(e,o)),e);n.set(o,r)})),()=>n.forEach(((e,t)=>s(t)))}),[e,t,s,i]),wo((()=>{function e(e){return n=>{mo(t.current,e,n)}}function n(e){var n;o.current.has(e.key)||(o.current=Eo(o.current,e.key));const r=t.current.getState();return So(t.current,e,uo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree)}function r(e){return ko(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()=>mo(t.current,e,lo)}}}),[o,t])},useRecoilState:function(e){return[Bo(e),Io(e)]},useRecoilStateLoadable:function(e){return[Co(e),Io(e)]},useRecoilValue:Bo,useRecoilValueLoadable:Co,useResetRecoilState:function(e){const t=vo();return To((()=>{mo(t.current,e,lo)}),[t,e])},useSetRecoilState:Io,useSetUnvalidatedAtomValues:function(){const e=vo();return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};co((()=>{e.current.addTransactionMetadata(n),t.forEach(((t,n)=>go(e.current,new _o(n),t)))}))}},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Do,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Oo,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:function(e){return[Oo(e),Io(e)]}};var xo=function(e,t){const n=new Map;for(const[o,r]of e)t(r,o)&&n.set(o,r);return n};var Fo=function(e,t){const n=new Set;for(const o of e)t(o)&&n.add(o);return n};var zo=function(){const e=new Map;for(var t=arguments.length,n=new Array(t),o=0;ot.current.subscribeToTransactions(e).release),[e,t])}function or(e){const t=e.atomValues.toMap(),n=ue(xo(t,((e,t)=>{const n=jo(t).persistence_UNSTABLE;return null!=n&&"none"!==n.type&&"hasValue"===e.state})),(e=>e.contents));return zo(e.nonvalidatedAtoms.toMap(),n)}function rr(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;Wo((()=>{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)&&jo(t).shouldRestoreFromSnapshots&&n.add(t)}n.forEach((t=>{Zo(e,new Ko(t),a.atomValues.has(t)?l(a.atomValues.get(t)):Go)})),e.replaceState((e=>({...e,stateID:t.getID()})))}))}var ar={useRecoilSnapshot:function(){const e=qo(),[t,n]=er((()=>Jo(e.current))),o=Xn(t),r=Qo(),a=Qo();if(nr(Xo((e=>n(Jo(e))),[])),$o((()=>{const e=t.retain();var n;r.current&&!tr&&(window.clearTimeout(r.current),r.current=null,null===(n=a.current)||void 0===n||n.call(a),a.current=null);return e}),[t]),o!==t&&!tr){var s;if(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}),Yo)}return t},gotoSnapshot:rr,useGotoRecoilSnapshot:function(){const e=qo();return Xo((t=>rr(e.current,t)),[e])},useRecoilTransactionObserver:function(e){nr(Xo((t=>{const n=Jo(t,"current"),o=Jo(t,"previous");e({snapshot:n,previousSnapshot:o})}),[e]))},useTransactionObservation_DEPRECATED:function(e){nr(Xo((t=>{let n=t.getState().previousTree;const o=t.getState().currentTree;n||(j("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),n=t.getState().currentTree);const r=or(o),a=or(n),s=ue(Ho,(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=Fo(o.dirtyAtoms,(e=>r.has(e)||a.has(e)));e({atomValues:r,previousAtomValues:a,atomInfo:s,modifiedAtoms:i,transactionMetadata:{...o.transactionMetadata}})}),[e]))},useTransactionSubscription_DEPRECATED:nr};const{peekNodeInfo:sr}=Fe,{useStoreRef:ir}=Kn;var cr=function(){const e=ir();return t=>{let{key:n}=t;return sr(e.current,e.current.getState().currentTree,n)}};const{reactMode:lr}=je,{RecoilRoot:ur,useStoreRef:dr}=Kn,{useMemo:fr}=r();var hr=function(){"MUTABLE_SOURCE"===lr().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=dr().current;return fr((()=>function(t){let{children:n}=t;return r().createElement(ur,{store_INTERNAL:e},n)}),[e])};const{loadableWithValue:pr}=V,{initializeNode:vr}=Fe,{DEFAULT_VALUE:yr,getNode:_r}=Q,{copyTreeState:Sr,getRecoilValueAsLoadable:mr,invalidateDownstreams:gr,writeLoadableToTreeState:Rr}=ft;function Tr(e){return"atom"===_r(e.key).nodeType}class br{constructor(e,t){u(this,"_store",void 0),u(this,"_treeState",void 0),u(this,"_changes",void 0),u(this,"get",(e=>{if(this._changes.has(e.key))return this._changes.get(e.key);if(!Tr(e))throw i("Reading selectors within atomicUpdate is not supported");const t=mr(this._store,e,this._treeState);if("hasValue"===t.state)return t.contents;throw"hasError"===t.state?t.contents:i("Expected Recoil atom ".concat(e.key," to have a value, but it is in a loading state."))})),u(this,"set",((e,t)=>{if(!Tr(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 vr(this._store,e.key,"set"),this._changes.set(e.key,t)})),u(this,"reset",(e=>{this.set(e,yr)})),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)Rr(e,t,pr(n));return gr(this._store,e),e}}var wr=function(e){return t=>{e.replaceState((n=>{const o=new br(e,n);return t(o),o.newTreeState_INTERNAL()}))}},Ar=wr,Nr=Object.freeze({__proto__:null,atomicUpdater:Ar});var Er=function(e,t){if(!e)throw new Error(t)};const{atomicUpdater:kr}=Nr,{batchUpdates:Vr}=Ut,{DEFAULT_VALUE:Lr}=Q,{useStoreRef:Mr}=Kn,{refreshRecoilValue:Ur,setRecoilValue:Cr}=ft,{Snapshot:Br,cloneSnapshot:Ir}=un,{gotoSnapshot:Dr}=ar,{useCallback:Or}=r();class Pr{}const xr=new Pr;function Fr(e,t,n,o){let r=xr;return Vr((()=>{const a="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(a);const s=Ne({...null!==o&&void 0!==o?o:{},set:(t,n)=>Cr(e,t,n),reset:t=>Cr(e,t,Lr),refresh:t=>Ur(e,t),gotoSnapshot:t=>Dr(e,t),transact_UNSTABLE:t=>kr(e)(t)},{snapshot:()=>Ir(e)}),c=t(s);if("function"!==typeof c)throw i(a);r=c(...n)})),r instanceof Pr&&Er(!1),r}var zr={recoilCallback:Fr,useRecoilCallback:function(e,t){const n=Mr();return Or((function(){for(var t=arguments.length,o=new Array(t),r=0;r{const n=t.current;Gr(n,e)}),[e,t])};const{atomicUpdater:qr}=Nr,{useStoreRef:Kr}=Kn,{useMemo:Zr}=r();var Yr=function(e,t){const n=Kr();return Zr((()=>function(){for(var t=arguments.length,o=new Array(t),r=0;r{e(t)(...o)}))}),null!=t?[...t,n]:void 0)};const Jr=(e,t,n)=>{var o;if(null==e)return;if(null===n||void 0===n||null===(o=n.onNodeVisit)||void 0===o||o.call(n,e),"leaf"===e.type)return e;const r=t(e.nodeKey);return Jr(e.branches.get(r),t,n)},Xr=(e,t,n,o,r,a,s)=>{var i;let c;if(null==e)if(0===t.length)c={type:"leaf",value:o,parent:n,branchKey:r};else{const[e,...i]=t,[l,u]=e;c={type:"branch",nodeKey:l,parent:n,branches:new Map,branchKey:r},c.branches.set(u,Xr(null,i,c,o,u,a,s))}else if(c=e,t.length){const[n,...r]=t,[i,l]=n;if("branch"!==e.type||e.nodeKey!==i)return j("Existing cache must have a branch midway through the route with matching node key. Resetting cache."),s(),c;e.branches.set(l,Xr(e.branches.get(l),r,e,o,l,a,s))}return null===a||void 0===a||null===(i=a.onNodeVisit)||void 0===i||i.call(a,c),c},$r=(e,t,n)=>n?(n.branches.delete(t.branchKey),Qr(e,n,n.parent)):e===t,Qr=(e,t,n)=>n?(0===t.branches.size&&n.branches.delete(t.branchKey),Qr(e,n,n.parent)):e===t,ea=e=>"leaf"===e.type?1:Array.from(e.branches.values()).reduce(((e,t)=>e+ea(t)),0);var ta=class{constructor(e){var t,n,o;u(this,"_numLeafs",void 0),u(this,"_root",void 0),u(this,"_onHit",void 0),u(this,"_onSet",void 0),u(this,"_mapNodeValue",void 0),this._numLeafs=0,this._root=null,this._onHit=null!==(t=null===e||void 0===e?void 0:e.onHit)&&void 0!==t?t:()=>{},this._onSet=null!==(n=null===e||void 0===e?void 0:e.onSet)&&void 0!==n?n:()=>{},this._mapNodeValue=null!==(o=null===e||void 0===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){return Jr(this.root(),(t=>this._mapNodeValue(e(t))),{onNodeVisit:e=>{null===t||void 0===t||t.onNodeVisit(e),"leaf"===e.type&&this._onHit(e)}})}set(e,t,n){let o,r=null;const a=()=>{r=Xr(this.root(),e.map((e=>{let[t,n]=e;return[t,this._mapNodeValue(n)]})),null,t,null,{onNodeVisit:e=>{null===n||void 0===n||n.onNodeVisit(e),"leaf"===e.type&&(o=e)}},(()=>{this.clear(),a()}))};a(),this.root()||(this._root=r),this._numLeafs++,this._onSet(l(o))}delete(e){if(!this.root())return!1;const t=l(this.root());return!!$r(t,e,e.parent)&&(e===t||"branch"===t.type&&!t.branches.size?(this._root=null,this._numLeafs=0,!0):(this._numLeafs-=ea(e),!0))}clear(){this._numLeafs=0,this._root=null}},na=Object.freeze({__proto__:null,TreeCache:ta});var oa=class{constructor(e){var t;u(this,"_maxSize",void 0),u(this,"_size",void 0),u(this,"_head",void 0),u(this,"_tail",void 0),u(this,"_map",void 0),u(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}},ra=Object.freeze({__proto__:null,LRUCache:oa});const{LRUCache:aa}=ra,{TreeCache:sa}=na;var ia=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;const n=new aa({maxSize:e}),o=new sa({mapNodeValue:t,onHit:e=>{n.set(e,!0)},onSet:t=>{const r=n.tail();n.set(t,!0),r&&o.size()>e&&o.delete(r.key)}});return o};function ca(e,t,n){if("string"===typeof e&&!e.includes('"')&&!e.includes("\\"))return'"'.concat(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?void 0:t.allowFunctions))throw i("Attempt to serialize function in a Recoil cache key");return"__FUNCTION(".concat(e.name,")__")}if(null===e)return"null";var o;if("object"!==typeof e)return null!==(o=JSON.stringify(e))&&void 0!==o?o:"";if(c(e))return"__PROMISE__";if(Array.isArray(e))return"[".concat(e.map(((e,n)=>ca(e,t,n.toString()))),"]");if("function"===typeof e.toJSON)return ca(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[n,r]of e)o["string"===typeof n?n:ca(n,t)]=r;return ca(o,t,n)}return e instanceof Set?ca(Array.from(e).sort(((e,n)=>ca(e,t).localeCompare(ca(n,t)))),t,n):void 0!==Symbol&&null!=e[Symbol.iterator]&&"function"===typeof e[Symbol.iterator]?ca(Array.from(e),t,n):"{".concat(Object.keys(e).filter((t=>void 0!==e[t])).sort().map((n=>"".concat(ca(n,t),":").concat(ca(e[n],t,n)))).join(","),"}")}var la=function(e){return ca(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{allowFunctions:!1})};const{TreeCache:ua}=na,da={equality:"reference",eviction:"keep-all",maxSize:1/0};var fa=function(){let{equality:e=da.equality,eviction:t=da.eviction,maxSize:n=da.maxSize}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:da;const o=function(e){switch(e){case"reference":return e=>e;case"value":return e=>la(e)}throw i("Unrecognized equality policy ".concat(e))}(e);return function(e,t,n){switch(e){case"keep-all":return new ua({mapNodeValue:n});case"lru":return ia(l(t),n);case"most-recent":return ia(1,n)}throw i("Unrecognized eviction policy ".concat(e))}(t,n,o)};const{isReactNative:ha,isSSR:pa}=Bt;var va={startPerfBlock:function(e){return()=>null}};const{loadableWithError:ya,loadableWithPromise:_a,loadableWithValue:Sa}=V,{getNodeLoadable:ma,peekNodeLoadable:ga,setNodeValue:Ra}=Fe,{saveDependencyMapToStore:Ta}=fe,{DEFAULT_VALUE:ba,RecoilValueNotReady:wa,getConfigDeletionHandler:Aa,getNode:Na,registerNode:Ea}=Q,{isRecoilValue:ka}=P,{markRecoilValueModified:Va}=ft,{retainedByOptionWithDefault:La}=wt,{recoilCallback:Ma}=zr,{startPerfBlock:Ua}=va;class Ca{}const Ba=new Ca,Ia=[],Da=new Map,Oa=(()=>{let e=0;return()=>e++})();var Pa=function(e){let t=null;const{key:n,get:o,cachePolicy_UNSTABLE:r}=e,a=null!=e.set?e.set:void 0,s=new Set,u=fa(null!==r&&void 0!==r?r:{equality:"reference",eviction:"keep-all"}),d=La(e.retainedBy_UNSTABLE),f=new Map;let h=0;function p(){return!W("recoil_memory_managament_2020")||h>0}function v(e){return e.getState().knownSelectors.add(n),h++,()=>{h--}}function y(){return void 0!==Aa(n)&&!p()}function _(e,t,n,o,r){U(t,o,r),T(e,t,new Set(r.keys()),n),S(e,n)}function S(e,n){M(e,n)&&L(e);const o=Da.get(n);if(void 0!==o){for(const e of o)Va(e,l(t));Da.delete(n)}}function m(e,t){let n=Da.get(t);null==n&&Da.set(t,n=new Set),n.add(e)}function g(e,t,n){const o=e.getState().knownSelectors.has(n);if(o&&t.atomValues.has(n))return l(t.atomValues.get(n));const r=ma(e,t,n);return"loading"!==r.state&&o&&t.atomValues.set(n,r),r}function R(e,t,n,o,r,a){return t.then((o=>{if(!p())throw L(e),Ba;null!=a.loadingDepKey&&a.loadingDepPromise===t?n.atomValues.set(a.loadingDepKey,Sa(o)):e.getState().knownSelectors.forEach((e=>{n.atomValues.delete(e)}));const s=w(e,n);if(s&&"loading"!==s.state){if((M(e,r)||null==k(e))&&S(e,r),"hasValue"===s.state)return s.contents;throw s.contents}if(!M(e,r)){const e=N(n);if("loading"===(null===e||void 0===e?void 0:e.latestLoadable.state))return e.latestLoadable.contents}const[i,c]=b(e,n,r);if(V(e,r,c),"loading"!==i.state&&_(e,n,r,i,c),"hasError"===i.state)throw i.contents;return i.contents})).catch((t=>{if(t instanceof Ca)throw Ba;if(!p())throw L(e),Ba;const a=ya(t);throw _(e,n,r,a,o),t}))}function T(e,t,o,r){var a,i,c,l,u,d,f;(M(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===(c=e.getState())||void 0===c||null===(l=c.nextTree)||void 0===l?void 0:l.version))&&(Ta(new Map([[n,o]]),e,null!==(u=null===(d=e.getState())||void 0===d||null===(f=d.nextTree)||void 0===f?void 0:f.version)&&void 0!==u?u:e.getState().currentTree.version),o.forEach((e=>s.add(e))))}function b(e,r,a){const s=Ua(n);let l=!0;const u=()=>{s(),l=!1};let d,f,h=!1;const v={loadingDepKey:null,loadingDepPromise:null},y=new Map,S=new Set;function m(t){const{key:n}=t;!function(e,t,n,o,r){n.add(o),T(e,t,n,r)}(e,r,S,n,a);const o=g(e,r,n);switch(y.set(n,o),o.state){case"hasValue":return o.contents;case"hasError":throw o.contents;case"loading":throw v.loadingDepKey=n,v.loadingDepPromise=o.contents,o.contents}throw i("Invalid Loadable state")}T(e,r,S,a);const b=n=>function(){if(l)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.");null==t&&Er(!1);for(var o=arguments.length,r=new Array(o),a=0;a{if(!p())throw L(e),Ba;const a=Sa(t);return _(e,n,r,a,o),t})).catch((t=>{if(!p())throw L(e),Ba;if(V(e,r,o),c(t))return R(e,t,n,o,r,a);const s=ya(t);throw _(e,n,r,s,o),t}))}(e,d,r,y,a,v).finally(u):u()}catch(w){d=w,c(d)?d=R(e,d,r,y,a,v).finally(u):(h=!0,u())}return f=h?ya(d):c(d)?_a(d):Sa(d),[f,y]}function w(e,t){const o=new Set,r=k(e);let a;try{a=u.get((n=>{"string"!==typeof n&&Er(!1);return g(e,t,n).contents}),{onNodeVisit:e=>{"branch"===e.type&&e.nodeKey!==n&&o.add(e.nodeKey)}})}catch(s){throw i('Problem with cache lookup for selector "'.concat(n,'": ').concat(s.message))}return a&&T(e,t,o,null===r||void 0===r?void 0:r.latestExecutionId),a}function A(e,t){const n=Oa(),[o,r]=b(e,t,n);return"loading"===o.state?(!function(e,t,n,o,r){f.set(e,{depValuesDiscoveredSoFarDuringAsyncWork:o,latestExecutionId:t,latestLoadable:n,stateVersion:r.version})}(e,n,o,r,t),m(e,n)):(L(e),U(t,o,r)),o}function N(e){var t;const[,n]=null!==(t=Array.from(f.entries()).find((t=>{let[n,o]=t;return null!=o.latestLoadable&&null!=o.latestExecutionId&&!function(e,t){var n,o;const r=k(e),a=null!==(n=null===r||void 0===r?void 0:r.depValuesDiscoveredSoFarDuringAsyncWork)&&void 0!==n?n:new Map,s=Array((null!==(o=E.get(t.version))&&void 0!==o?o:new Map).entries()),i=E.has(t.version)&&s.length===a.size&&s.every((e=>{let[t,n]=e;return a.get(t)===n}));if(null==a||t.version===(null===r||void 0===r?void 0:r.stateVersion)||i)return!1;return E.set(t.version,new Map(a)),Array.from(a).some((n=>{let[o,r]=n;return g(e,t,o).contents!==r.contents}))}(n,e)})))&&void 0!==t?t:[];return n}const E=new Map;function k(e){return f.get(e)}function V(e,t,n){if(M(e,t)){const t=k(e);null!=t&&(t.depValuesDiscoveredSoFarDuringAsyncWork=n)}}function L(e){f.delete(e)}function M(e,t){var n;return t===(null===(n=k(e))||void 0===n?void 0:n.latestExecutionId)}function U(e,t,o){e.atomValues.set(n,t);try{u.set(function(e){return Array.from(e.entries()).map((e=>{let[t,n]=e;return[t,n.contents]}))}(o),t)}catch(r){throw i('Problem with setting cache for selector "'.concat(n,'": ').concat(r.message))}}function C(e,t){return u.get((n=>{var o;return"string"!==typeof n&&Er(!1),null===(o=ga(e,t,n))||void 0===o?void 0:o.contents}))}function B(e,t){return function(e){if(Ia.includes(n)){const e="Recoil selector has circular dependencies: ".concat(Ia.slice(Ia.indexOf(n)).join(" \u2192 "));return ya(i(e))}Ia.push(n);try{return e()}finally{Ia.pop()}}((()=>function(e,t){const n=w(e,t);if(null!=n)return L(e),n;const o=N(t);var r;return null!=o?("loading"===(null===(r=o.latestLoadable)||void 0===r?void 0:r.state)&&m(e,l(o.latestExecutionId)),l(o.latestLoadable)):A(e,t)}(e,t)))}function I(e){e.atomValues.delete(n)}function D(e,n){null==t&&Er(!1);for(const t of s){var o;const r=Na(t);null===(o=r.clearCache)||void 0===o||o.call(r,e,n)}s.clear(),I(n),u.clear(),Va(e,t)}if(null!=a){return t=Ea({key:n,nodeType:"selector",peek:C,get:B,set:(e,t,n)=>{let o=!1;const r=new Map;function s(n){let{key:r}=n;if(o)throw i("Recoil: Async selector sets are not currently supported.");const a=g(e,t,r);if("hasValue"===a.state)return a.contents;throw"loading"===a.state?new wa(r):a.contents}function l(n,a){if(o)throw i("Recoil: Async selector sets are not currently supported.");const c="function"===typeof a?a(s(n)):a;Ra(e,t,n.key,c).forEach(((e,t)=>r.set(t,e)))}const u=a({set:l,get:s,reset:function(e){l(e,ba)}},n);if(void 0!==u)throw c(u)?i("Recoil: Async selector sets are not currently supported."):i("Recoil: selector set should be a void function.");return o=!0,r},init:v,invalidate:I,clearCache:D,shouldDeleteConfigOnRelease:y,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})}return t=Ea({key:n,nodeType:"selector",peek:C,get:B,init:v,invalidate:I,clearCache:D,shouldDeleteConfigOnRelease:y,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})};const{loadableWithError:xa,loadableWithPromise:Fa,loadableWithValue:za}=V,{peekNodeInfo:Wa}=Fe,{DEFAULT_VALUE:Ga,DefaultValue:ja,getConfigDeletionHandler:Ha,registerNode:qa,setConfigDeletionHandler:Ka}=Q,{isRecoilValue:Za}=P,{getRecoilValueAsLoadable:Ya,markRecoilValueModified:Ja,setRecoilValue:Xa,setRecoilValueLoadable:$a}=ft,{retainedByOptionWithDefault:Qa}=wt;function es(e){const{key:t,persistence_UNSTABLE:n}=e,o=Qa(e.retainedBy_UNSTABLE);let r,a=0,s=c(e.default)?Fa(e.default.then((e=>(s=za(e),e))).catch((e=>{throw s=xa(e),e}))):za(e.default);d(e.default);const u=new Map;function d(e){return e}function f(e,n){var o,a;return null!==(o=null!==(a=n.atomValues.get(t))&&void 0!==a?a:r)&&void 0!==o?o:s}const h=qa({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!=r)return r;if(null==n)return x("Tried to restore a persisted value for atom ".concat(t," but it has no persistence settings.")),s;const e=o.nonvalidatedAtoms.get(t),a=n.validator(e,Ga),i=a instanceof ja?s:za(a);return r=i,r}return s},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 ja)return new Map;return r=void 0,(new Map).set(t,za(o))},init:function(n,o,r){var l;if(a++,n.getState().knownAtoms.add(t),"loading"===s.state){const _=()=>{var e;(null!==(e=n.getState().nextTree)&&void 0!==e?e:n.getState().currentTree).atomValues.has(t)||Ja(n,h)};s.contents.finally(_)}const d=null!==(l=e.effects)&&void 0!==l?l:e.effects_UNSTABLE;if(null!=d){let S=!0,m=Ga,g=!1,R=null;function T(e){if(S&&e.key===t){const e=m;return e instanceof ja?f(n,o):c(e)?Fa(e.then((e=>e instanceof ja?s.toPromise():e))):za(e)}return Ya(n,e)}function b(e){return T(e).toPromise()}function w(e){var o;const r=Wa(n,null!==(o=n.getState().nextTree)&&void 0!==o?o:n.getState().currentTree,e.key);return!S||e.key!==t||m instanceof ja?r:{...r,isSet:!0,loadable:T(e)}}const A=e=>t=>{if(S){const n=T(h),o="hasValue"===n.state?n.contents:Ga;m="function"===typeof t?t(o):t,c(m)&&(m=m.then((t=>(R={effect:e,value:t},t))))}else{if(c(t))throw i("Setting atoms to async values is not implemented.");"function"!==typeof t&&(R={effect:e,value:t}),Xa(n,h,"function"===typeof t?n=>{const o=t(n);return R={effect:e,value:o},o}:t)}},N=e=>()=>A(e)(Ga),E=e=>o=>{var r;const{release:a}=n.subscribeToTransactions((n=>{var r;let{currentTree:a,previousTree:i}=n.getState();i||(j("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),i=a);const c=null!==(r=a.atomValues.get(t))&&void 0!==r?r:s;if("hasValue"===c.state){var l,u,d,f;const n=c.contents,r=null!==(l=i.atomValues.get(t))&&void 0!==l?l:s,h="hasValue"===r.state?r.contents:Ga;(null===(u=R)||void 0===u?void 0:u.effect)!==e||(null===(d=R)||void 0===d?void 0:d.value)!==n?o(n,h,!a.atomValues.has(t)):(null===(f=R)||void 0===f?void 0:f.effect)===e&&(R=null)}}),t);u.set(n,[...null!==(r=u.get(n))&&void 0!==r?r:[],a])};for(const k of d)try{const V=k({node:h,storeID:n.storeID,trigger:r,setSelf:A(k),resetSelf:N(k),onSet:E(k),getPromise:b,getLoadable:T,getInfo_UNSTABLE:w});var p;if(null!=V)u.set(n,[...null!==(p=u.get(n))&&void 0!==p?p:[],V])}catch(y){m=y,g=!0}if(S=!1,!(m instanceof ja)){var v;const L=m,M=g?xa(m):c(L)?Fa(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&&Xa(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&&$a(e,h,xa(n)),n}));return o}(n,L)):za(L);o.atomValues.set(t,M),null===(v=n.getState().nextTree)||void 0===v||v.atomValues.set(t,M)}}return()=>{var e;a--,null===(e=u.get(n))||void 0===e||e.forEach((e=>e())),u.delete(n)}},invalidate:function(){r=void 0},shouldDeleteConfigOnRelease:function(){return void 0!==Ha(t)&&a<=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}function ts(e){const{default:t,...n}=e;return Za(t)?function(e){const t=ts({...e,default:Ga,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:{...e.persistence_UNSTABLE,validator:t=>t instanceof ja?t:l(e.persistence_UNSTABLE).validator(t,Ga)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Pa({key:"".concat(e.key,"__withFallback"),get:n=>{let{get:o}=n;const r=o(t);return r instanceof ja?e.default:r},set:(e,n)=>{let{set:o}=e;return o(t,n)},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return Ka(n.key,Ha(e.key)),n}({...n,default:t}):es({...n,default:t})}var ns=ts;var os=class{constructor(e){var t;u(this,"_map",void 0),u(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=null!==(t=null===e||void 0===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()}},rs=Object.freeze({__proto__:null,MapCache:os});const{LRUCache:as}=ra,{MapCache:ss}=rs,is={equality:"reference",eviction:"none",maxSize:1/0};var cs=function(){let{equality:e=is.equality,eviction:t=is.eviction,maxSize:n=is.maxSize}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:is;const o=function(e){switch(e){case"reference":return e=>e;case"value":return e=>la(e)}throw i("Unrecognized equality policy ".concat(e))}(e);return function(e,t,n){switch(e){case"keep-all":return new ss({mapKey:n});case"lru":return new as({mapKey:n,maxSize:l(t)});case"most-recent":return new as({mapKey:n,maxSize:1})}throw i("Unrecognized eviction policy ".concat(e))}(t,n,o)};const{setConfigDeletionHandler:ls}=Q;var us=function(e){var t,n;const o=cs({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,c=ns({...i,key:"".concat(e.key,"__").concat(null!==(n=la(t))&&void 0!==n?n:"void"),default:"function"===typeof e.default?e.default(t):e.default,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,c),ls(c.key,(()=>{o.delete(t)})),c}};const{setConfigDeletionHandler:ds}=Q;let fs=0;var hs=function(e){var t,n;const o=cs({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;const r=o.get(t);if(null!=r)return r;const a="".concat(e.key,"__selectorFamily/").concat(null!==(n=la(t,{allowFunctions:!0}))&&void 0!==n?n:"void","/").concat(fs++),s=n=>e.get(t)(n),i=e.cachePolicy_UNSTABLE,c="function"===typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE;let l;if(null!=e.set){const n=e.set;l=Pa({key:a,get:s,set:(e,o)=>n(t)(e,o),cachePolicy_UNSTABLE:i,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else l=Pa({key:a,get:s,cachePolicy_UNSTABLE:i,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return o.set(t,l),ds(l.key,(()=>{o.delete(t)})),l}};const ps=hs({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});var vs=function(e){return ps(e)};const ys=hs({key:"__error",get:e=>()=>{throw i(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});var _s=function(e){return ys(e)};var Ss=function(e){return e};const{loadableWithError:ms,loadableWithPromise:gs,loadableWithValue:Rs}=V;function Ts(e,t){const n=Array(t.length).fill(void 0),o=Array(t.length).fill(void 0);for(const[a,s]of t.entries())try{n[a]=e(s)}catch(r){o[a]=r}return[n,o]}function bs(e){return null!=e&&!c(e)}function ws(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))}function As(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})}function Ns(e,t,n){return As(e,n.map(((e,n)=>null==e?Rs(t[n]):c(e)?gs(e):ms(e))))}var Es={waitForNone:hs({key:"__waitForNone",get:e=>t=>{let{get:n}=t;const o=ws(e),[r,a]=Ts(n,o);return Ns(e,r,a)},dangerouslyAllowMutability:!0}),waitForAny:hs({key:"__waitForAny",get:e=>t=>{let{get:n}=t;const o=ws(e),[r,a]=Ts(n,o);return a.some((e=>!c(e)))?Ns(e,r,a):new Promise((t=>{for(const[n,o]of a.entries())c(o)&&o.then((o=>{r[n]=o,a[n]=void 0,t(Ns(e,r,a))})).catch((o=>{a[n]=o,t(Ns(e,r,a))}))}))},dangerouslyAllowMutability:!0}),waitForAll:hs({key:"__waitForAll",get:e=>t=>{let{get:n}=t;const o=ws(e),[r,a]=Ts(n,o);if(a.every((e=>null==e)))return As(e,r);const s=a.find(bs);if(null!=s)throw s;return Promise.all(a).then((t=>{return As(e,(n=r,t.map(((e,t)=>void 0===e?n[t]:e))));var n}))},dangerouslyAllowMutability:!0}),waitForAllSettled:hs({key:"__waitForAllSettled",get:e=>t=>{let{get:n}=t;const o=ws(e),[r,a]=Ts(n,o);return a.every((e=>!c(e)))?Ns(e,r,a):Promise.all(a.map(((e,t)=>c(e)?e.then((e=>{r[t]=e,a[t]=void 0})).catch((e=>{r[t]=void 0,a[t]=e})):null))).then((()=>Ns(e,r,a)))},dangerouslyAllowMutability:!0}),noWait:hs({key:"__noWait",get:e=>t=>{let{get:n}=t;try{return Rs(n(e))}catch(o){return c(o)?gs(o):ms(o)}},dangerouslyAllowMutability:!0})};const{RecoilLoadable:ks}=V,{DefaultValue:Vs}=Q,{RecoilRoot:Ls,useRecoilStoreID:Ms}=Kn,{isRecoilValue:Us}=P,{retentionZone:Cs}=be,{freshSnapshot:Bs}=un,{useRecoilState:Is,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:Ds,useRecoilStateLoadable:Os,useRecoilValue:Ps,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:xs,useRecoilValueLoadable:Fs,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:zs,useResetRecoilState:Ws,useSetRecoilState:Gs}=Po,{useGotoRecoilSnapshot:js,useRecoilSnapshot:Hs,useRecoilTransactionObserver:qs}=ar,{useRecoilCallback:Ks}=zr,{noWait:Zs,waitForAll:Ys,waitForAllSettled:Js,waitForAny:Xs,waitForNone:$s}=Es;var Qs={DefaultValue:Vs,isRecoilValue:Us,RecoilLoadable:ks,RecoilRoot:Ls,useRecoilStoreID:Ms,useRecoilBridgeAcrossReactRoots_UNSTABLE:hr,atom:ns,selector:Pa,atomFamily:us,selectorFamily:hs,constSelector:vs,errorSelector:_s,readOnlySelector:Ss,noWait:Zs,waitForNone:$s,waitForAny:Xs,waitForAll:Ys,waitForAllSettled:Js,useRecoilValue:Ps,useRecoilValueLoadable:Fs,useRecoilState:Is,useRecoilStateLoadable:Os,useSetRecoilState:Gs,useResetRecoilState:Ws,useGetRecoilValueInfo_UNSTABLE:cr,useRecoilRefresher_UNSTABLE:Hr,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:zs,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:xs,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:Ds,useRecoilCallback:Ks,useRecoilTransaction_UNSTABLE:Yr,useGotoRecoilSnapshot:js,useRecoilSnapshot:Hs,useRecoilTransactionObserver_UNSTABLE:qs,snapshot_UNSTABLE:Bs,useRetain:ao,retentionZone:Cs},ei=Qs.DefaultValue,ti=Qs.isRecoilValue,ni=Qs.RecoilLoadable,oi=Qs.RecoilRoot,ri=Qs.useRecoilStoreID,ai=Qs.useRecoilBridgeAcrossReactRoots_UNSTABLE,si=Qs.atom,ii=Qs.selector,ci=Qs.atomFamily,li=Qs.selectorFamily,ui=Qs.constSelector,di=Qs.errorSelector,fi=Qs.readOnlySelector,hi=Qs.noWait,pi=Qs.waitForNone,vi=Qs.waitForAny,yi=Qs.waitForAll,_i=Qs.waitForAllSettled,Si=Qs.useRecoilValue,mi=Qs.useRecoilValueLoadable,gi=Qs.useRecoilState,Ri=Qs.useRecoilStateLoadable,Ti=Qs.useSetRecoilState,bi=Qs.useResetRecoilState,wi=Qs.useGetRecoilValueInfo_UNSTABLE,Ai=Qs.useRecoilRefresher_UNSTABLE,Ni=Qs.useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE,Ei=Qs.useRecoilValue_TRANSITION_SUPPORT_UNSTABLE,ki=Qs.useRecoilState_TRANSITION_SUPPORT_UNSTABLE,Vi=Qs.useRecoilCallback,Li=Qs.useRecoilTransaction_UNSTABLE,Mi=Qs.useGotoRecoilSnapshot,Ui=Qs.useRecoilSnapshot,Ci=Qs.useRecoilTransactionObserver_UNSTABLE,Bi=Qs.snapshot_UNSTABLE,Ii=Qs.useRetain,Di=Qs.retentionZone;const Oi=Qs}}]); //# sourceMappingURL=vendors-node_modules_recoil_es_recoil_js.920254c9.chunk.js.map