From 7cbcf9117ea680cc7d0f1d3c24e5e93a2afdd6b1 Mon Sep 17 00:00:00 2001 From: Aaron Bushnell Date: Thu, 14 Mar 2024 15:12:07 -0400 Subject: [PATCH] 4.0.3 (#39) --- CHANGELOG.md | 5 +++++ composer.json | 2 +- src/assetbundles/resources/Init.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d22fd5..5538aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes for Palette +## 4.0.3 - 2024-03-14 + +### Fixed +- Recompile the bundle to pull in latest source changes + ## 4.0.2 - 2024-03-14 ### Fixed diff --git a/composer.json b/composer.json index 5a28aa8..0bdcac8 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "trendyminds/craft-palette", "description": "A command palette to easily jump to specific areas within Craft", "type": "craft-plugin", - "version": "4.0.2", + "version": "4.0.3", "keywords": ["palette", "craft", "craft cms", "cmdk", "spotlight", "craft plugin"], "license": "MIT", "authors": [ diff --git a/src/assetbundles/resources/Init.js b/src/assetbundles/resources/Init.js index ababa55..2a61ac6 100644 --- a/src/assetbundles/resources/Init.js +++ b/src/assetbundles/resources/Init.js @@ -40,6 +40,6 @@ function sf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"d Error generating stack: `+l.message+` `+l.stack}return{value:e,source:t,stack:o,digest:null}}function Zi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var am=typeof WeakMap=="function"?WeakMap:Map;function Qd(e,t,n){n=zt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Il||(Il=!0,Xu=r),Bu(e,t)},n}function Zd(e,t,n){n=zt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Bu(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Bu(e,t),typeof r!="function"&&(on===null?on=new Set([this]):on.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Sc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new am;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Em.bind(null,e,t,n),t.then(e,e))}function _c(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wc(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zt(-1,1),t.tag=2,rn(n,t,1))),n.lanes|=1),e)}var cm=Bt.ReactCurrentOwner,be=!1;function Ue(e,t,n,r){t.child=e===null?Nd(t,null,n,r):ur(t,e.child,n,r)}function Rc(e,t,n,r,o){n=n.render;var l=t.ref;return tr(t,o),r=Ws(e,t,n,r,l,o),n=Hs(),e!==null&&!be?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ft(e,t,o)):(he&&n&&Ms(t),t.flags|=1,Ue(e,t,r,o),t.child)}function Ec(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!ea(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Yd(e,t,l,r,o)):(e=dl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var i=l.memoizedProps;if(n=n.compare,n=n!==null?n:io,n(i,r)&&e.ref===t.ref)return Ft(e,t,o)}return t.flags|=1,e=un(l,r),e.ref=t.ref,e.return=t,t.child=e}function Yd(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(io(l,r)&&e.ref===t.ref)if(be=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(be=!0);else return t.lanes=e.lanes,Ft(e,t,o)}return ju(e,t,n,r,o)}function Xd(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(Yn,Je),Je|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(Yn,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,ue(Yn,Je),Je|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,ue(Yn,Je),Je|=r;return Ue(e,t,o,n),t.child}function qd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ju(e,t,n,r,o){var l=Ge(n)?Tn:Oe.current;return l=lr(t,l),tr(t,o),n=Ws(e,t,n,r,l,o),r=Hs(),e!==null&&!be?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ft(e,t,o)):(he&&r&&Ms(t),t.flags|=1,Ue(e,t,n,o),t.child)}function kc(e,t,n,r,o){if(Ge(n)){var l=!0;kl(t)}else l=!1;if(tr(t,o),t.stateNode===null)al(e,t),Td(t,n,r),Fu(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,a=n.contextType;typeof a=="object"&&a!==null?a=dt(a):(a=Ge(n)?Tn:Oe.current,a=lr(t,a));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||s!==a)&&vc(t,i,r,a),bt=!1;var m=t.memoizedState;i.state=m,Al(t,r,i,o),s=t.memoizedState,u!==r||m!==s||Ke.current||bt?(typeof d=="function"&&(Uu(t,n,d,r),s=t.memoizedState),(u=bt||hc(t,n,u,r,m,s,a))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=a,r=u):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ed(e,t),u=t.memoizedProps,a=t.type===t.elementType?u:gt(t.type,u),i.props=a,f=t.pendingProps,m=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=dt(s):(s=Ge(n)?Tn:Oe.current,s=lr(t,s));var w=n.getDerivedStateFromProps;(d=typeof w=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==f||m!==s)&&vc(t,i,r,s),bt=!1,m=t.memoizedState,i.state=m,Al(t,r,i,o);var S=t.memoizedState;u!==f||m!==S||Ke.current||bt?(typeof w=="function"&&(Uu(t,n,w,r),S=t.memoizedState),(a=bt||hc(t,n,a,r,m,S,s)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,S,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,S,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),i.props=r,i.state=S,i.context=s,r=a):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Wu(e,t,n,r,l,o)}function Wu(e,t,n,r,o,l){qd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&ac(t,n,!1),Ft(e,t,l);r=t.stateNode,cm.current=t;var u=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ur(t,e.child,null,l),t.child=ur(t,null,u,l)):Ue(e,t,u,l),t.memoizedState=r.state,o&&ac(t,n,!0),t.child}function Jd(e){var t=e.stateNode;t.pendingContext?sc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sc(e,t.context,!1),Us(e,t.containerInfo)}function Tc(e,t,n,r,o){return ir(),$s(o),t.flags|=256,Ue(e,t,n,r),t.child}var Hu={dehydrated:null,treeContext:null,retryLane:0};function bu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ep(e,t,n){var r=t.pendingProps,o=ge.current,l=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(o&2)!==0),u?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ue(ge,o&1),e===null)return Du(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,l?(r=t.mode,l=t.child,i={mode:"hidden",children:i},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=i):l=Jl(i,r,0,null),e=kn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=bu(n),t.memoizedState=Hu,e):Gs(t,i));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return fm(e,t,i,r,u,o,n);if(l){l=r.fallback,i=t.mode,o=e.child,u=o.sibling;var s={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=un(o,s),r.subtreeFlags=o.subtreeFlags&14680064),u!==null?l=un(u,l):(l=kn(l,i,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,i=e.child.memoizedState,i=i===null?bu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},l.memoizedState=i,l.childLanes=e.childLanes&~n,t.memoizedState=Hu,r}return l=e.child,e=l.sibling,r=un(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gs(e,t){return t=Jl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ko(e,t,n,r){return r!==null&&$s(r),ur(t,e.child,null,n),e=Gs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fm(e,t,n,r,o,l,i){if(n)return t.flags&256?(t.flags&=-257,r=Zi(Error(T(422))),Ko(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=Jl({mode:"visible",children:r.children},o,0,null),l=kn(l,o,i,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&ur(t,e.child,null,i),t.child.memoizedState=bu(i),t.memoizedState=Hu,l);if(!(t.mode&1))return Ko(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var u=r.dgst;return r=u,l=Error(T(419)),r=Zi(l,r,void 0),Ko(e,t,i,r)}if(u=(i&e.childLanes)!==0,be||u){if(r=Ae,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,Ut(e,o),Rt(r,e,o,-1))}return Js(),r=Zi(Error(T(421))),Ko(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=km.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,et=nn(o.nextSibling),tt=t,he=!0,_t=null,e!==null&&(st[at++]=It,st[at++]=Vt,st[at++]=Cn,It=e.id,Vt=e.overflow,Cn=t),t=Gs(t,r.children),t.flags|=4096,t)}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ou(e.return,t,n)}function Yi(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function tp(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(Ue(e,t,r.children,n),r=ge.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ue(ge,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&xl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Yi(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&xl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Yi(t,!0,n,null,l);break;case"together":Yi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function al(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ln|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=un(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=un(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dm(e,t,n){switch(t.tag){case 3:Jd(t),ir();break;case 5:Ld(t);break;case 1:Ge(t.type)&&kl(t);break;case 4:Us(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ue(Nl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(ge,ge.current&1),t.flags|=128,null):n&t.child.childLanes?ep(e,t,n):(ue(ge,ge.current&1),e=Ft(e,t,n),e!==null?e.sibling:null);ue(ge,ge.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return tp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ue(ge,ge.current),r)break;return null;case 22:case 23:return t.lanes=0,Xd(e,t,n)}return Ft(e,t,n)}var np,Ku,rp,op;np=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ku=function(){};rp=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Rn(Lt.current);var l=null;switch(n){case"input":o=hu(e,o),r=hu(e,r),l=[];break;case"select":o=_e({},o,{value:void 0}),r=_e({},r,{value:void 0}),l=[];break;case"textarea":o=yu(e,o),r=yu(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Rl)}Su(n,r);var i;n=null;for(a in o)if(!r.hasOwnProperty(a)&&o.hasOwnProperty(a)&&o[a]!=null)if(a==="style"){var u=o[a];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Jr.hasOwnProperty(a)?l||(l=[]):(l=l||[]).push(a,null));for(a in r){var s=r[a];if(u=o!=null?o[a]:void 0,r.hasOwnProperty(a)&&s!==u&&(s!=null||u!=null))if(a==="style")if(u){for(i in u)!u.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&u[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(l||(l=[]),l.push(a,n)),n=s;else a==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(l=l||[]).push(a,s)):a==="children"?typeof s!="string"&&typeof s!="number"||(l=l||[]).push(a,""+s):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Jr.hasOwnProperty(a)?(s!=null&&a==="onScroll"&&se("scroll",e),l||u===s||(l=[])):(l=l||[]).push(a,s))}n&&(l=l||[]).push("style",n);var a=l;(t.updateQueue=a)&&(t.flags|=4)}};op=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ar(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pm(e,t,n){var r=t.pendingProps;switch(Ps(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return Ge(t.type)&&El(),ze(t),null;case 3:return r=t.stateNode,sr(),ce(Ke),ce(Oe),Bs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ho(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(es(_t),_t=null))),Ku(e,t),ze(t),null;case 5:Fs(t);var o=Rn(fo.current);if(n=t.type,e!==null&&t.stateNode!=null)rp(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return ze(t),null}if(e=Rn(Lt.current),Ho(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Ct]=t,r[ao]=l,e=(t.mode&1)!==0,n){case"dialog":se("cancel",r),se("close",r);break;case"iframe":case"object":case"embed":se("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ct]=t,e[ao]=r,np(e,t,!1,!1),t.stateNode=e;e:{switch(i=_u(n,r),n){case"dialog":se("cancel",e),se("close",e),o=r;break;case"iframe":case"object":case"embed":se("load",e),o=r;break;case"video":case"audio":for(o=0;ocr&&(t.flags|=128,r=!0,Ar(l,!1),t.lanes=4194304)}else{if(!r)if(e=xl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ar(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!he)return ze(t),null}else 2*Re()-l.renderingStartTime>cr&&n!==1073741824&&(t.flags|=128,r=!0,Ar(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(n=l.last,n!==null?n.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Re(),t.sibling=null,n=ge.current,ue(ge,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return qs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function hm(e,t){switch(Ps(t),t.tag){case 1:return Ge(t.type)&&El(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sr(),ce(Ke),ce(Oe),Bs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fs(t),null;case 13:if(ce(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ge),null;case 4:return sr(),null;case 10:return zs(t.type._context),null;case 22:case 23:return qs(),null;case 24:return null;default:return null}}var Go=!1,De=!1,vm=typeof WeakSet=="function"?WeakSet:Set,D=null;function Zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Gu(e,t,n){try{n()}catch(r){we(e,t,r)}}var Nc=!1;function mm(e,t){if(xu=Sl,e=sd(),xs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,a=0,d=0,f=e,m=null;t:for(;;){for(var w;f!==n||o!==0&&f.nodeType!==3||(u=i+o),f!==l||r!==0&&f.nodeType!==3||(s=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(w=f.firstChild)!==null;)m=f,f=w;for(;;){if(f===e)break t;if(m===n&&++a===o&&(u=i),m===l&&++d===r&&(s=i),(w=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=w}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mu={focusedElem:e,selectionRange:n},Sl=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var R=S.memoizedProps,F=S.memoizedState,h=t.stateNode,c=h.getSnapshotBeforeUpdate(t.elementType===t.type?R:gt(t.type,R),F);h.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(_){we(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return S=Nc,Nc=!1,S}function Gr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&Gu(t,n,l)}o=o.next}while(o!==r)}}function Xl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lp(e){var t=e.alternate;t!==null&&(e.alternate=null,lp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[ao],delete t[Iu],delete t[q0],delete t[J0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ip(e){return e.tag===5||e.tag===3||e.tag===4}function Lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ip(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Rl));else if(r!==4&&(e=e.child,e!==null))for(Zu(e,t,n),e=e.sibling;e!==null;)Zu(e,t,n),e=e.sibling}function Yu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}var xe=null,St=!1;function Wt(e,t,n){for(n=n.child;n!==null;)up(e,t,n),n=n.sibling}function up(e,t,n){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Wl,n)}catch{}switch(n.tag){case 5:De||Zn(n,t);case 6:var r=xe,o=St;xe=null,Wt(e,t,n),xe=r,St=o,xe!==null&&(St?(e=xe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xe.removeChild(n.stateNode));break;case 18:xe!==null&&(St?(e=xe,n=n.stateNode,e.nodeType===8?Wi(e.parentNode,n):e.nodeType===1&&Wi(e,n),oo(e)):Wi(xe,n.stateNode));break;case 4:r=xe,o=St,xe=n.stateNode.containerInfo,St=!0,Wt(e,t,n),xe=r,St=o;break;case 0:case 11:case 14:case 15:if(!De&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,i=l.destroy;l=l.tag,i!==void 0&&(l&2||l&4)&&Gu(n,t,i),o=o.next}while(o!==r)}Wt(e,t,n);break;case 1:if(!De&&(Zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){we(n,t,u)}Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:n.mode&1?(De=(r=De)||n.memoizedState!==null,Wt(e,t,n),De=r):Wt(e,t,n);break;default:Wt(e,t,n)}}function Ac(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vm),t.forEach(function(r){var o=Tm.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~l}if(r=o,r=Re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gm(r/1960))-r,10e?16:e,Yt===null)var r=!1;else{if(e=Yt,Yt=null,Vl=0,ne&6)throw Error(T(331));var o=ne;for(ne|=4,D=e.current;D!==null;){var l=D,i=l.child;if(D.flags&16){var u=l.deletions;if(u!==null){for(var s=0;sRe()-Ys?En(e,0):Zs|=n),Qe(e,t)}function vp(e,t){t===0&&(e.mode&1?(t=Oo,Oo<<=1,!(Oo&130023424)&&(Oo=4194304)):t=1);var n=Fe();e=Ut(e,t),e!==null&&(go(e,t,n),Qe(e,n))}function km(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vp(e,n)}function Tm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),vp(e,n)}var mp;mp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)be=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return be=!1,dm(e,t,n);be=!!(e.flags&131072)}else be=!1,he&&t.flags&1048576&&Sd(t,Cl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;al(e,t),e=t.pendingProps;var o=lr(t,Oe.current);tr(t,n),o=Ws(null,t,r,e,o,n);var l=Hs();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(l=!0,kl(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Os(t),o.updater=Zl,t.stateNode=o,o._reactInternals=t,Fu(t,r,e,n),t=Wu(null,t,r,!0,l,n)):(t.tag=0,he&&l&&Ms(t),Ue(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(al(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Nm(r),e=gt(r,e),o){case 0:t=ju(null,t,r,e,n);break e;case 1:t=kc(null,t,r,e,n);break e;case 11:t=Rc(null,t,r,e,n);break e;case 14:t=Ec(null,t,r,gt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),ju(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),kc(e,t,r,o,n);case 3:e:{if(Jd(t),e===null)throw Error(T(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Ed(e,t),Al(t,r,null,n);var i=t.memoizedState;if(r=i.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=ar(Error(T(423)),t),t=Tc(e,t,r,n,o);break e}else if(r!==o){o=ar(Error(T(424)),t),t=Tc(e,t,r,n,o);break e}else for(et=nn(t.stateNode.containerInfo.firstChild),tt=t,he=!0,_t=null,n=Nd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ir(),r===o){t=Ft(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return Ld(t),e===null&&Du(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,Pu(r,o)?i=null:l!==null&&Pu(r,l)&&(t.flags|=32),qd(e,t),Ue(e,t,i,n),t.child;case 6:return e===null&&Du(t),null;case 13:return ep(e,t,n);case 4:return Us(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ur(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Rc(e,t,r,o,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value,ue(Nl,r._currentValue),r._currentValue=i,l!==null)if(Et(l.value,i)){if(l.children===o.children&&!Ke.current){t=Ft(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){i=l.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=zt(-1,n&-n),s.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}}l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ou(l.return,n,t),u.lanes|=n;break}s=s.next}}else if(l.tag===10)i=l.type===t.type?null:l.child;else if(l.tag===18){if(i=l.return,i===null)throw Error(T(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ou(i,n,t),i=l.sibling}else i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}Ue(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,tr(t,n),o=dt(o),r=r(o),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,o=gt(r,t.pendingProps),o=gt(r.type,o),Ec(e,t,r,o,n);case 15:return Yd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),al(e,t),t.tag=1,Ge(r)?(e=!0,kl(t)):e=!1,tr(t,n),Td(t,r,o),Fu(t,r,o,n),Wu(null,t,r,!0,e,n);case 19:return tp(e,t,n);case 22:return Xd(e,t,n)}throw Error(T(156,t.tag))};function yp(e,t){return Wf(e,t)}function Cm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new Cm(e,t,n,r)}function ea(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nm(e){if(typeof e=="function")return ea(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ss)return 11;if(e===_s)return 14}return 2}function un(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function dl(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")ea(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Fn:return kn(n.children,o,l,t);case gs:i=8,o|=8;break;case cu:return e=ct(12,n,t,o|2),e.elementType=cu,e.lanes=l,e;case fu:return e=ct(13,n,t,o),e.elementType=fu,e.lanes=l,e;case du:return e=ct(19,n,t,o),e.elementType=du,e.lanes=l,e;case Cf:return Jl(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case kf:i=10;break e;case Tf:i=9;break e;case Ss:i=11;break e;case _s:i=14;break e;case Ht:i=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=ct(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function kn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Jl(e,t,n,r){return e=ct(22,e,r,t),e.elementType=Cf,e.lanes=n,e.stateNode={isHidden:!1},e}function Xi(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function qi(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lm(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pi(0),this.expirationTimes=Pi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pi(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ta(e,t,n,r,o,l,i,u,s){return e=new Lm(e,t,n,u,s),t===1?(t=1,l===!0&&(t|=8)):t=0,l=ct(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Os(l),e}function Am(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wp)}catch(e){console.error(e)}}wp(),Sf.exports=rt;var Rp=Sf.exports;const Im=sf(Rp);var Ep={};function Vm(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var zm=Vm,X=zm;function Dm(e){return!!e&&typeof e.then=="function"}var ae=Dm;function Om(e,t){if(e!=null)return e;throw X(t??"Got unexpected null or undefined")}var ve=Om;function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class oi{getValue(){throw X("BaseLoadable")}toPromise(){throw X("BaseLoadable")}valueMaybe(){throw X("BaseLoadable")}valueOrThrow(){throw X(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw X("BaseLoadable")}promiseOrThrow(){throw X(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw X("BaseLoadable")}errorOrThrow(){throw X(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw X("BaseLoadable")}}class Um extends oi{constructor(t){super(),Z(this,"state","hasValue"),Z(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return ae(n)?xn(n):fr(n)?n:Ro(n)}catch(n){return ae(n)?xn(n.next(()=>this.map(t))):li(n)}}}class Fm extends oi{constructor(t){super(),Z(this,"state","hasError"),Z(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class kp extends oi{constructor(t){super(),Z(this,"state","loading"),Z(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return xn(this.contents.then(n=>{const r=t(n);if(fr(r)){const o=r;switch(o.state){case"hasValue":return o.contents;case"hasError":throw o.contents;case"loading":return o.contents}}return r}).catch(n=>{if(ae(n))return n.then(()=>this.map(t).contents);throw n}))}}function Ro(e){return Object.freeze(new Um(e))}function li(e){return Object.freeze(new Fm(e))}function xn(e){return Object.freeze(new kp(e))}function Tp(){return Object.freeze(new kp(new Promise(()=>{})))}function Bm(e){return e.every(t=>t.state==="hasValue")?Ro(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?li(ve(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):xn(Promise.all(e.map(t=>t.contents)))}function Cp(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>fr(o)?o:ae(o)?xn(o):Ro(o)),r=Bm(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((l,i,u)=>({...l,[i]:o[u]}),{}))}function fr(e){return e instanceof oi}const jm={of:e=>ae(e)?xn(e):fr(e)?e:Ro(e),error:e=>li(e),loading:()=>Tp(),all:Cp,isLoadable:fr};var In={loadableWithValue:Ro,loadableWithError:li,loadableWithPromise:xn,loadableLoading:Tp,loadableAll:Cp,isLoadable:fr,RecoilLoadable:jm},Wm=In.loadableWithValue,Hm=In.loadableWithError,bm=In.loadableWithPromise,Km=In.loadableLoading,Gm=In.loadableAll,Qm=In.isLoadable,Zm=In.RecoilLoadable,Eo=Object.freeze({__proto__:null,loadableWithValue:Wm,loadableWithError:Hm,loadableWithPromise:bm,loadableLoading:Km,loadableAll:Gm,isLoadable:Qm,RecoilLoadable:Zm});const ts={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"])};function Ym(e,t){var n,r;const o=(n=Ep[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(o==null||o==="")return;if(!["true","false"].includes(o))throw X(`process.env.${e} value must be 'true', 'false', or empty: ${o}`);t(o==="true")}function Xm(e,t){var n;const r=(n=Ep[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function qm(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(Ym("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{ts.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),Xm("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{ts.RECOIL_GKS_ENABLED.add(n)})}))}qm();var Sr=ts;function ii(e){return Sr.RECOIL_GKS_ENABLED.has(e)}ii.setPass=e=>{Sr.RECOIL_GKS_ENABLED.add(e)};ii.setFail=e=>{Sr.RECOIL_GKS_ENABLED.delete(e)};ii.clear=()=>{Sr.RECOIL_GKS_ENABLED.clear()};var ie=ii;function Jm(e,t,{error:n}={}){return null}var e1=Jm,la=e1,Ji,eu,tu;const t1=(Ji=me.createMutableSource)!==null&&Ji!==void 0?Ji:me.unstable_createMutableSource,Np=(eu=me.useMutableSource)!==null&&eu!==void 0?eu:me.unstable_useMutableSource,Lp=(tu=me.useSyncExternalStore)!==null&&tu!==void 0?tu:me.unstable_useSyncExternalStore;function n1(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function r1(){return ie("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:ie("recoil_sync_external_store")&&Lp!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:ie("recoil_mutable_source")&&Np!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?ie("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:ie("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function o1(){return!1}var ko={createMutableSource:t1,useMutableSource:Np,useSyncExternalStore:Lp,currentRendererSupportsUseSyncExternalStore:n1,reactMode:r1,isFastRefreshEnabled:o1};class ia{constructor(t){Z(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class Ap extends ia{}class xp extends ia{}function l1(e){return e instanceof Ap||e instanceof xp}var ui={AbstractRecoilValue:ia,RecoilState:Ap,RecoilValueReadOnly:xp,isRecoilValue:l1},i1=ui.AbstractRecoilValue,u1=ui.RecoilState,s1=ui.RecoilValueReadOnly,a1=ui.isRecoilValue,dr=Object.freeze({__proto__:null,AbstractRecoilValue:i1,RecoilState:u1,RecoilValueReadOnly:s1,isRecoilValue:a1});function c1(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var si=c1;class Mp{}const f1=new Mp,Mn=new Map,ua=new Map;function d1(e){return si(e,t=>ve(ua.get(t)))}function p1(e){if(Mn.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in production. But it is safe to ignore this warning if it occurred because of - hot module replacement.`;console.warn(t)}}function h1(e){Sr.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&p1(e.key),Mn.set(e.key,e);const t=e.set==null?new dr.RecoilValueReadOnly(e.key):new dr.RecoilState(e.key);return ua.set(e.key,t),t}class Pp extends Error{}function v1(e){const t=Mn.get(e);if(t==null)throw new Pp(`Missing definition for RecoilValue: "${e}""`);return t}function m1(e){return Mn.get(e)}const Ol=new Map;function y1(e){var t;if(!ie("recoil_memory_managament_2020"))return;const n=Mn.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Mn.delete(e),(r=$p(e))===null||r===void 0||r(),Ol.delete(e)}}function g1(e,t){ie("recoil_memory_managament_2020")&&(t===void 0?Ol.delete(e):Ol.set(e,t))}function $p(e){return Ol.get(e)}var Ye={nodes:Mn,recoilValues:ua,registerNode:h1,getNode:v1,getNodeMaybe:m1,deleteNodeConfigIfPossible:y1,setConfigDeletionHandler:g1,getConfigDeletionHandler:$p,recoilValuesForKeys:d1,NodeMissingError:Pp,DefaultValue:Mp,DEFAULT_VALUE:f1};function S1(e,t){t()}var _1={enqueueExecution:S1};function w1(e,t){return t={exports:{}},e(t,t.exports),t.exports}var R1=w1(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},n={},r=5,o=Math.pow(2,r),l=o-1,i=o/2,u=o/4,s={},a=function(v){return function(){return v}},d=n.hash=function(g){var v=typeof g>"u"?"undefined":t(g);if(v==="number")return g;v!=="string"&&(g+="");for(var k=0,M=0,P=g.length;M>1&1431655765,v=(v&858993459)+(v>>2&858993459),v=v+(v>>4)&252645135,v+=v>>8,v+=v>>16,v&127},m=function(v,k){return k>>>v&l},w=function(v){return 1<=k;)P[Q--]=P[Q];return P[k]=M,P}for(var b=0,K=0,q=new Array(O+1);b>>=1;return Q[k]=M,fe(v,K+1,Q)},$e=function(v,k,M,P){for(var O=new Array(k-1),Q=0,b=0,K=0,q=P.length;K1?te(v,this.hash,q):q[0]}var pe=P();return pe===s?this:(++b.value,Mt(v,M,this.hash,this,O,V(v,O,Q,pe)))},I=function(v,k,M,P,O,Q,b){var K=this.mask,q=this.children,pe=m(M,O),We=w(pe),Ne=S(K,We),ut=K&We,vt=ut?q[Ne]:L,zn=vt._modify(v,k,M+r,P,O,Q,b);if(vt===zn)return this;var Po=Xe(v,this),wr=K,Rr=void 0;if(ut&&C(zn)){if(wr&=~We,!wr)return L;if(q.length<=2&<(q[Ne^1]))return q[Ne^1];Rr=F(Po,Ne,q)}else if(!ut&&!C(zn)){if(q.length>=i)return oe(v,pe,zn,K,q);wr|=We,Rr=h(Po,Ne,zn,q)}else Rr=R(Po,Ne,zn,q);return Po?(this.mask=wr,this.children=Rr,this):U(v,wr,Rr)},j=function(v,k,M,P,O,Q,b){var K=this.size,q=this.children,pe=m(M,O),We=q[pe],Ne=(We||L)._modify(v,k,M+r,P,O,Q,b);if(We===Ne)return this;var ut=Xe(v,this),vt=void 0;if(C(We)&&!C(Ne))++K,vt=R(ut,pe,Ne,q);else if(!C(We)&&C(Ne)){if(--K,K<=u)return $e(v,K,pe,q);vt=R(ut,pe,L,q)}else vt=R(ut,pe,Ne,q);return ut?(this.size=K,this.children=vt,this):fe(v,K,vt)};L._modify=function(g,v,k,M,P,O,Q){var b=M();return b===s?L:(++Q.value,V(g,P,O,b))};function y(g,v,k,M,P){this._editable=g,this._edit=v,this._config=k,this._root=M,this._size=P}y.prototype.setTree=function(g,v){return this._editable?(this._root=g,this._size=v,this):g===this._root?this:new y(this._editable,this._edit,this._config,g,v)};var A=n.tryGetHash=function(g,v,k,M){for(var P=M._root,O=0,Q=M._config.keyEq;;)switch(P.type){case c:return Q(k,P.key)?P.value:g;case p:{if(v===P.hash)for(var b=P.children,K=0,q=b.length;K{n.set(o,t(r,o))}),n}var Ul=L1;function A1(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function x1(e){return{nodeDeps:Ul(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Ul(e.nodeToNodeSubscriptions,t=>new Set(t))}}function nu(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:l}=n,i=o.get(e);if(i&&r&&i!==r.nodeDeps.get(e))return;o.set(e,t);const u=i==null?t:Yr(t,i);for(const s of u)l.has(s)||l.set(s,new Set),ve(l.get(s)).add(e);if(i){const s=Yr(i,t);for(const a of s){if(!l.has(a))return;const d=ve(l.get(a));d.delete(e),d.size===0&&l.delete(a)}}}function M1(e,t,n,r){var o,l,i,u;const s=n.getState();r===s.currentTree.version||r===((o=s.nextTree)===null||o===void 0?void 0:o.version)||((l=s.previousTree)===null||l===void 0||l.version);const a=n.getGraph(r);if(nu(e,t,a),r===((i=s.previousTree)===null||i===void 0?void 0:i.version)){const f=n.getGraph(s.currentTree.version);nu(e,t,f,a)}if(r===((u=s.previousTree)===null||u===void 0?void 0:u.version)||r===s.currentTree.version){var d;const f=(d=s.nextTree)===null||d===void 0?void 0:d.version;if(f!==void 0){const m=n.getGraph(f);nu(e,t,m,a)}}}var To={cloneGraph:x1,graph:A1,saveDepsToStore:M1};let P1=0;const $1=()=>P1++;let I1=0;const V1=()=>I1++;let z1=0;const D1=()=>z1++;var ai={getNextTreeStateVersion:$1,getNextStoreID:V1,getNextComponentID:D1};const{persistentMap:Dc}=C1,{graph:O1}=To,{getNextTreeStateVersion:Ip}=ai;function Vp(){const e=Ip();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Dc(),nonvalidatedAtoms:Dc()}}function U1(){const e=Vp();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,O1()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var zp={makeEmptyTreeState:Vp,makeEmptyStoreState:U1,getNextTreeStateVersion:Ip};class Dp{}function F1(){return new Dp}var ci={RetentionZone:Dp,retentionZone:F1};function B1(e,t){const n=new Set(e);return n.add(t),n}function j1(e,t){const n=new Set(e);return n.delete(t),n}function W1(e,t,n){const r=new Map(e);return r.set(t,n),r}function H1(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function b1(e,t){const n=new Map(e);return n.delete(t),n}function K1(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var Op={setByAddingToSet:B1,setByDeletingFromSet:j1,mapBySettingInMap:W1,mapByUpdatingInMap:H1,mapByDeletingFromMap:b1,mapByDeletingMultipleFromMap:K1};function*G1(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var ca=G1;function Q1(e,t){return new Proxy(e,{get:(r,o)=>(!(o in r)&&o in t&&(r[o]=t[o]()),r[o]),ownKeys:r=>Object.keys(r)})}var Up=Q1;const{getNode:Co,getNodeMaybe:Z1,recoilValuesForKeys:Oc}=Ye,{RetentionZone:Uc}=ci,{setByAddingToSet:Y1}=Op,X1=Object.freeze(new Set);class q1 extends Error{}function J1(e,t,n){if(!ie("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(l){let i=r.get(l);i||r.set(l,i=new Set),i.add(t)}if(n instanceof Uc)o(n);else if(Array.isArray(n))for(const l of n)o(l);return()=>{if(!ie("recoil_memory_managament_2020"))return;const{retention:l}=e.getState();function i(u){const s=l.nodesRetainedByZone.get(u);s==null||s.delete(t),s&&s.size===0&&l.nodesRetainedByZone.delete(u)}if(n instanceof Uc)i(n);else if(Array.isArray(n))for(const u of n)i(u)}}function fa(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const l=Co(n),i=J1(e,n,l.retainedBy),u=l.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{u(),i()})}function ey(e,t,n){fa(e,e.getState().currentTree,t,n)}function ty(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function ny(e,t,n){return fa(e,t,n,"get"),Co(n).get(e,t)}function Fp(e,t,n){return Co(n).peek(e,t)}function ry(e,t,n){var r;const o=Z1(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Y1(e.dirtyAtoms,t)}}function oy(e,t,n,r){const o=Co(n);if(o.set==null)throw new q1(`Attempt to set read-only RecoilValue: ${n}`);const l=o.set;return fa(e,t,n,"set"),l(e,t,r)}function ly(e,t,n){const r=e.getState(),o=e.getGraph(t.version),l=Co(n).nodeType;return Up({type:l},{loadable:()=>Fp(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>l==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var i;return Oc((i=o.nodeDeps.get(n))!==null&&i!==void 0?i:[])},subscribers:()=>{var i,u;return{nodes:Oc(ca(Bp(e,t,new Set([n])),s=>s!==n)),components:si((i=(u=r.nodeToComponentSubscriptions.get(n))===null||u===void 0?void 0:u.values())!==null&&i!==void 0?i:[],([s])=>({name:s}))}}})}function Bp(e,t,n){const r=new Set,o=Array.from(n),l=e.getGraph(t.version);for(let u=o.pop();u;u=o.pop()){var i;r.add(u);const s=(i=l.nodeToNodeSubscriptions.get(u))!==null&&i!==void 0?i:X1;for(const a of s)r.has(a)||o.push(a)}return r}var hn={getNodeLoadable:ny,peekNodeLoadable:Fp,setNodeValue:oy,initializeNode:ey,cleanUpNode:ty,setUnvalidatedAtomValue_DEPRECATED:ry,peekNodeInfo:ly,getDownstreamNodes:Bp};let jp=null;function iy(e){jp=e}function uy(){var e;(e=jp)===null||e===void 0||e()}var Wp={setInvalidateMemoizedSnapshot:iy,invalidateMemoizedSnapshot:uy};const{getDownstreamNodes:sy,getNodeLoadable:Hp,setNodeValue:ay}=hn,{getNextComponentID:cy}=ai,{getNode:fy,getNodeMaybe:bp}=Ye,{DefaultValue:da}=Ye,{reactMode:dy}=ko,{AbstractRecoilValue:py,RecoilState:hy,RecoilValueReadOnly:vy,isRecoilValue:my}=dr,{invalidateMemoizedSnapshot:yy}=Wp;function gy(e,{key:t},n=e.getState().currentTree){var r,o;const l=e.getState();n.version===l.currentTree.version||n.version===((r=l.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=l.previousTree)===null||o===void 0||o.version);const i=Hp(e,n,t);return i.state==="loading"&&i.contents.catch(()=>{}),i}function Sy(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof da?n.delete(o):n.set(o,r)}),n}function _y(e,t,{key:n},r){if(typeof r=="function"){const o=Hp(e,t,n);if(o.state==="loading"){const l=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw X(l)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function wy(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:l}=n,i=_y(e,t,o,l),u=ay(e,t,o.key,i);for(const[s,a]of u.entries())ns(t,s,a)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:l}=n;ns(t,o,l)}else if(n.type==="markModified"){const{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:o},unvalidatedValue:l}=n,i=bp(o);i==null||(r=i.invalidate)===null||r===void 0||r.call(i,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,l),t.dirtyAtoms.add(o)}else la(`Unknown action ${n.type}`)}function ns(e,t,n){n.state==="hasValue"&&n.contents instanceof da?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function Kp(e,t){e.replaceState(n=>{const r=Gp(n);for(const o of t)wy(e,r,o);return Qp(e,r),yy(),r})}function fi(e,t){if(Xr.length){const n=Xr[Xr.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else Kp(e,[t])}const Xr=[];function Ry(){const e=new Map;return Xr.push(e),()=>{for(const[t,n]of e)Kp(t,n);Xr.pop()}}function Gp(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function Qp(e,t){const n=sy(e,t,t.dirtyAtoms);for(const l of n){var r,o;(r=bp(l))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function Zp(e,t,n){fi(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function Ey(e,t,n){if(n instanceof da)return Zp(e,t,n);fi(e,{type:"setLoadable",recoilValue:t,loadable:n})}function ky(e,t){fi(e,{type:"markModified",recoilValue:t})}function Ty(e,t,n){fi(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function Cy(e,{key:t},n,r=null){const o=cy(),l=e.getState();l.nodeToComponentSubscriptions.has(t)||l.nodeToComponentSubscriptions.set(t,new Map),ve(l.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]);const i=dy();if(i.early&&(i.mode==="LEGACY"||i.mode==="MUTABLE_SOURCE")){const u=e.getState().nextTree;u&&u.dirtyAtoms.has(t)&&n(u)}return{release:()=>{const u=e.getState(),s=u.nodeToComponentSubscriptions.get(t);s===void 0||!s.has(o)||(s.delete(o),s.size===0&&u.nodeToComponentSubscriptions.delete(t))}}}function Ny(e,t){var n;const{currentTree:r}=e.getState(),o=fy(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var At={RecoilValueReadOnly:vy,AbstractRecoilValue:py,RecoilState:hy,getRecoilValueAsLoadable:gy,setRecoilValue:Zp,setRecoilValueLoadable:Ey,markRecoilValueModified:ky,setUnvalidatedRecoilValue:Ty,subscribeToRecoilValue:Cy,isRecoilValue:my,applyAtomValueWrites:Sy,batchStart:Ry,writeLoadableToTreeState:ns,invalidateDownstreams:Qp,copyTreeState:Gp,refreshRecoilValue:Ny};function Ly(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const l=o.value;if(t.call(n,l[1],l[0],e))return!0;o=r.next()}return!1}var Ay=Ly;const{cleanUpNode:xy}=hn,{deleteNodeConfigIfPossible:My,getNode:Yp}=Ye,{RetentionZone:Xp}=ci,Py=12e4,qp=new Set;function Jp(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const i of t)if(i instanceof Xp)for(const u of zy(n,i))o.add(u);else o.add(i);const l=$y(e,o);for(const i of l)Vy(e,r,i)}function $y(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),l=new Set,i=new Set;return u(t),l;function u(s){const a=new Set,d=Iy(e,r,s,l,i);for(const S of d){var f;if(Yp(S).retainedBy==="recoilRoot"){i.add(S);continue}if(((f=n.retention.referenceCounts.get(S))!==null&&f!==void 0?f:0)>0){i.add(S);continue}if(eh(S).some(F=>n.retention.referenceCounts.get(F))){i.add(S);continue}const R=o.nodeToNodeSubscriptions.get(S);if(R&&Ay(R,F=>i.has(F))){i.add(S);continue}l.add(S),a.add(S)}const m=new Set;for(const S of a)for(const R of(w=o.nodeDeps.get(S))!==null&&w!==void 0?w:qp){var w;l.has(R)||m.add(R)}m.size&&u(m)}}function Iy(e,t,n,r,o){const l=e.getGraph(t.version),i=[],u=new Set;for(;n.size>0;)s(ve(n.values().next().value));return i;function s(a){if(r.has(a)||o.has(a)){n.delete(a);return}if(u.has(a))return;const d=l.nodeToNodeSubscriptions.get(a);if(d)for(const f of d)s(f);u.add(a),n.delete(a),i.push(a)}}function Vy(e,t,n){if(!ie("recoil_memory_managament_2020"))return;xy(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const o=eh(n);for(const s of o){var l;(l=r.retention.nodesRetainedByZone.get(s))===null||l===void 0||l.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const i=r.graphsByVersion.get(t.version);if(i){const s=i.nodeDeps.get(n);if(s!==void 0){i.nodeDeps.delete(n);for(const a of s){var u;(u=i.nodeToNodeSubscriptions.get(a))===null||u===void 0||u.delete(n)}}i.nodeToNodeSubscriptions.delete(n)}My(n)}function zy(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:qp}function eh(e){const t=Yp(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof Xp?[t]:t}function Dy(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Jp(e,new Set([t]))}function Oy(e,t,n){var r;if(!ie("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,l=((r=o.get(t))!==null&&r!==void 0?r:0)+n;l===0?th(e,t):o.set(t,l)}function th(e,t){if(!ie("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),Dy(e,t)}function Uy(e){if(!ie("recoil_memory_managament_2020"))return;const t=e.getState();Jp(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function Fy(e){return e===void 0?"recoilRoot":e}var Vn={SUSPENSE_TIMEOUT_MS:Py,updateRetainCount:Oy,updateRetainCountToZero:th,releaseScheduledRetainablesNow:Uy,retainedByOptionWithDefault:Fy};const{unstable_batchedUpdates:By}=Im;var jy={unstable_batchedUpdates:By};const{unstable_batchedUpdates:Wy}=jy;var Hy={unstable_batchedUpdates:Wy};const{batchStart:by}=At,{unstable_batchedUpdates:Ky}=Hy;let pa=Ky||(e=>e());const Gy=e=>{pa=e},Qy=()=>pa,Zy=e=>{pa(()=>{let t=()=>{};try{t=by(),e()}finally{t()}})};var di={getBatcher:Qy,setBatcher:Gy,batchUpdates:Zy};function*Yy(e){for(const t of e)for(const n of t)yield n}var nh=Yy;const rh=typeof Window>"u"||typeof window>"u",Xy=e=>!rh&&(e===window||e instanceof Window),qy=typeof navigator<"u"&&navigator.product==="ReactNative";var pi={isSSR:rh,isReactNative:qy,isWindow:Xy};function Jy(e,t){let n;return(...r)=>{n||(n={});const o=t(...r);return Object.hasOwnProperty.call(n,o)||(n[o]=e(...r)),n[o]}}function eg(e,t){let n,r;return(...o)=>{const l=t(...o);return n===l||(n=l,r=e(...o)),r}}function tg(e,t){let n,r;return[(...i)=>{const u=t(...i);return n===u||(n=u,r=e(...i)),r},()=>{n=null}]}var ng={memoizeWithArgsHash:Jy,memoizeOneWithArgsHash:eg,memoizeOneWithArgsHashAndInvalidation:tg};const{batchUpdates:rs}=di,{initializeNode:rg,peekNodeInfo:og}=hn,{graph:lg}=To,{getNextStoreID:ig}=ai,{DEFAULT_VALUE:ug,recoilValues:Fc,recoilValuesForKeys:Bc}=Ye,{AbstractRecoilValue:sg,getRecoilValueAsLoadable:ag,setRecoilValue:jc,setUnvalidatedRecoilValue:cg}=At,{updateRetainCount:pl}=Vn,{setInvalidateMemoizedSnapshot:fg}=Wp,{getNextTreeStateVersion:dg,makeEmptyStoreState:pg}=zp,{isSSR:hg}=pi,{memoizeOneWithArgsHashAndInvalidation:vg}=ng;class hi{constructor(t,n){Z(this,"_store",void 0),Z(this,"_refCount",1),Z(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),ag(this._store,r))),Z(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),Z(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const i=this._store.getState().currentTree;return Bc(i.dirtyAtoms)}const o=this._store.getState().knownAtoms,l=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Fc.values():r.isInitialized===!0?Bc(nh([o,l])):ca(Fc.values(),({key:i})=>!o.has(i)&&!l.has(i))}),Z(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),og(this._store,this._store.getState().currentTree,r))),Z(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new os(this,rs);return r(o),o}),Z(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new os(this,rs);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:ig(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return ve(o.get(r));const l=lg();return o.set(r,l),l},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw X("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)rg(this._store,r,"get"),pl(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){hg||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!ie("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){ie("recoil_memory_managament_2020")&&this._refCount<=0}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 oh(e,t,n=!1){const r=e.getState(),o=n?dg():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o: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(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(si(r.nodeCleanupFunctions.entries(),([l])=>[l,()=>{}]))}}function mg(e){const t=new hi(pg());return e!=null?t.map(e):t}const[Wc,lh]=vg((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:ve(r.previousTree);return new hi(oh(e,o),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});fg(lh);function yg(e,t="latest"){const n=Wc(e,t);return n.isRetained()?n:(lh(),Wc(e,t))}class os extends hi{constructor(t,n){super(oh(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Z(this,"_batch",void 0),Z(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const l=this.getStore_INTERNAL();this._batch(()=>{pl(l,r.key,1),jc(this.getStore_INTERNAL(),r,o)})}),Z(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{pl(o,r.key,1),jc(this.getStore_INTERNAL(),r,ug)})}),Z(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();rs(()=>{for(const[l,i]of r.entries())pl(o,l,1),cg(o,new sg(l),i)})}),this._batch=n}}var vi={Snapshot:hi,MutableSnapshot:os,freshSnapshot:mg,cloneSnapshot:yg},gg=vi.Snapshot,Sg=vi.MutableSnapshot,_g=vi.freshSnapshot,wg=vi.cloneSnapshot,mi=Object.freeze({__proto__:null,Snapshot:gg,MutableSnapshot:Sg,freshSnapshot:_g,cloneSnapshot:wg});function Rg(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var Eg=Rg;const{useRef:kg}=me;function Tg(e){const t=kg(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var Hc=Tg;const{getNextTreeStateVersion:Cg,makeEmptyStoreState:ih}=zp,{cleanUpNode:Ng,getDownstreamNodes:Lg,initializeNode:Ag,setNodeValue:xg,setUnvalidatedAtomValue_DEPRECATED:Mg}=hn,{graph:Pg}=To,{cloneGraph:$g}=To,{getNextStoreID:uh}=ai,{createMutableSource:ru,reactMode:sh}=ko,{applyAtomValueWrites:Ig}=At,{releaseScheduledRetainablesNow:ah}=Vn,{freshSnapshot:Vg}=mi,{useCallback:zg,useContext:ch,useEffect:ls,useMemo:Dg,useRef:Og,useState:Ug}=me;function Mr(){throw X("This component must be used inside a component.")}const fh=Object.freeze({storeID:uh(),getState:Mr,replaceState:Mr,getGraph:Mr,subscribeToTransactions:Mr,addTransactionMetadata:Mr});let is=!1;function bc(e){if(is)throw X("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(t.nextTree===null){ie("recoil_memory_managament_2020")&&ie("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&ah(e);const n=t.currentTree.version,r=Cg();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,$g(ve(t.graphsByVersion.get(n))))}}const dh=me.createContext({current:fh}),yi=()=>ch(dh),ph=me.createContext(null);function Fg(){return ch(ph)}function ha(e,t,n){const r=Lg(e,n,n.dirtyAtoms);for(const o of r){const l=t.nodeToComponentSubscriptions.get(o);if(l)for(const[i,[u,s]]of l)s(n)}}function hh(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,l]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[i,u]of l)u(e);for(const[o,l]of t.transactionSubscriptions)l(e);(!sh().early||t.suspendedComponentResolvers.size>0)&&(ha(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function Bg(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,hh(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):la("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,ie("recoil_memory_managament_2020")&&n==null&&ah(e)}finally{t.commitDepth--}}function jg({setNotifyBatcherOfChange:e}){const t=yi(),[,n]=Ug([]);return e(()=>n({})),ls(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),ls(()=>{_1.enqueueExecution("Batcher",()=>{Bg(t.current)})}),null}function Wg(e,t){const n=ih();return t({set:(r,o)=>{const l=n.currentTree,i=xg(e,l,r.key,o),u=new Set(i.keys()),s=l.nonvalidatedAtoms.clone();for(const a of u)s.delete(a);n.currentTree={...l,dirtyAtoms:Eg(l.dirtyAtoms,u),atomValues:Ig(l.atomValues,i),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:r=>{r.forEach((o,l)=>{n.currentTree=Mg(n.currentTree,l,o)})}}),n}function Hg(e){const t=Vg(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let Kc=0;function bg({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const l=w=>{const S=o.current.graphsByVersion;if(S.has(w))return ve(S.get(w));const R=Pg();return S.set(w,R),R},i=(w,S)=>{if(S==null){const{transactionSubscriptions:R}=f.current.getState(),F=Kc++;return R.set(F,w),{release:()=>{R.delete(F)}}}else{const{nodeTransactionSubscriptions:R}=f.current.getState();R.has(S)||R.set(S,new Map);const F=Kc++;return ve(R.get(S)).set(F,w),{release:()=>{const h=R.get(S);h&&(h.delete(F),h.size===0&&R.delete(S))}}}},u=w=>{bc(f.current);for(const S of Object.keys(w))ve(f.current.getState().nextTree).transactionMetadata[S]=w[S]},s=w=>{bc(f.current);const S=ve(o.current.nextTree);let R;try{is=!0,R=w(S)}finally{is=!1}R!==S&&(o.current.nextTree=R,sh().early&&ha(f.current,o.current,R),ve(a.current)())},a=Og(null),d=zg(w=>{a.current=w},[a]),f=Hc(()=>n??{storeID:uh(),getState:()=>o.current,replaceState:s,getGraph:l,subscribeToTransactions:i,addTransactionMetadata:u});n!=null&&(f.current=n),o=Hc(()=>e!=null?Wg(f.current,e):t!=null?Hg(t):ih());const m=Dg(()=>ru==null?void 0:ru(o,()=>o.current.currentTree.version),[o]);return ls(()=>{const w=f.current;for(const S of new Set(w.getState().knownAtoms))Ag(w,S,"get");return()=>{for(const S of w.getState().knownAtoms)Ng(w,S)}},[f]),me.createElement(dh.Provider,{value:f},me.createElement(ph.Provider,{value:m},me.createElement(jg,{setNotifyBatcherOfChange:d}),r))}function Kg(e){const{override:t,...n}=e,r=yi();return t===!1&&r.current!==fh?e.children:me.createElement(bg,n)}function Gg(){return yi().current.storeID}var jt={RecoilRoot:Kg,useStoreRef:yi,useRecoilMutableSource:Fg,useRecoilStoreID:Gg,notifyComponents_FOR_TESTING:ha,sendEndOfBatchNotifications_FOR_TESTING:hh};function Qg(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var vh=qg;const{useStoreRef:Jg}=jt,{SUSPENSE_TIMEOUT_MS:eS}=Vn,{updateRetainCount:Pr}=Vn,{RetentionZone:tS}=ci,{useEffect:nS,useRef:rS}=me,{isSSR:Gc}=pi;function oS(e){if(ie("recoil_memory_managament_2020"))return lS(e)}function lS(e){const n=(Array.isArray(e)?e:[e]).map(i=>i instanceof tS?i:i.key),r=Jg();nS(()=>{if(!ie("recoil_memory_managament_2020"))return;const i=r.current;if(o.current&&!Gc)window.clearTimeout(o.current),o.current=null;else for(const u of n)Pr(i,u,1);return()=>{for(const u of n)Pr(i,u,-1)}},[r,...n]);const o=rS(),l=vh(n);if(!Gc&&(l===void 0||!Zg(l,n))){const i=r.current;for(const u of n)Pr(i,u,1);if(l)for(const u of l)Pr(i,u,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const u of n)Pr(i,u,-1)},eS)}}var va=oS;function iS(){return""}var No=iS;const{batchUpdates:uS}=di,{DEFAULT_VALUE:mh}=Ye,{currentRendererSupportsUseSyncExternalStore:sS,reactMode:_r,useMutableSource:aS,useSyncExternalStore:cS}=ko,{useRecoilMutableSource:fS,useStoreRef:xt}=jt,{AbstractRecoilValue:us,getRecoilValueAsLoadable:Lo,setRecoilValue:Fl,setUnvalidatedRecoilValue:dS,subscribeToRecoilValue:pr}=At,{useCallback:Ze,useEffect:hr,useMemo:yh,useRef:qr,useState:ma}=me,{setByAddingToSet:pS}=Op,{isSSR:hS}=pi;function ya(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const l=n.current.getState().suspendedComponentResolvers;l.add(o),hS&&ae(e.contents)&&e.contents.finally(()=>{l.delete(o)})}):e.state==="hasError"?e.contents:X(`Invalid value of loadable atom "${t.key}"`)}function vS(){const e=No(),t=xt(),[,n]=ma([]),r=qr(new Set);r.current=new Set;const o=qr(new Set),l=qr(new Map),i=Ze(s=>{const a=l.current.get(s);a&&(a.release(),l.current.delete(s))},[l]),u=Ze((s,a)=>{l.current.has(a)&&n([])},[]);return hr(()=>{const s=t.current;Yr(r.current,o.current).forEach(a=>{if(l.current.has(a))return;const d=pr(s,new us(a),m=>u(m,a),e);l.current.set(a,d),s.getState().nextTree?s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{u(s.getState(),a)}):u(s.getState(),a)}),Yr(o.current,r.current).forEach(a=>{i(a)}),o.current=r.current}),hr(()=>{const s=l.current;return Yr(r.current,new Set(s.keys())).forEach(a=>{const d=pr(t.current,new us(a),f=>u(f,a),e);s.set(a,d)}),()=>s.forEach((a,d)=>i(d))},[e,t,i,u]),yh(()=>{function s(S){return R=>{Fl(t.current,S,R)}}function a(S){return()=>Fl(t.current,S,mh)}function d(S){var R;r.current.has(S.key)||(r.current=pS(r.current,S.key));const F=t.current.getState();return Lo(t.current,S,_r().early&&(R=F.nextTree)!==null&&R!==void 0?R:F.currentTree)}function f(S){const R=d(S);return ya(R,S,t)}function m(S){return[f(S),s(S)]}function w(S){return[d(S),s(S)]}return{getRecoilValue:f,getRecoilValueLoadable:d,getRecoilState:m,getRecoilStateLoadable:w,getSetRecoilState:s,getResetRecoilState:a}},[r,t])}const mS={current:0};function yS(e){const t=xt(),n=No(),r=Ze(()=>{var u;const s=t.current,a=s.getState(),d=_r().early&&(u=a.nextTree)!==null&&u!==void 0?u:a.currentTree;return{loadable:Lo(s,e,d),key:e.key}},[t,e]),o=Ze(u=>{let s;return()=>{var a,d;const f=u();return(a=s)!==null&&a!==void 0&&a.loadable.is(f.loadable)&&((d=s)===null||d===void 0?void 0:d.key)===f.key?s:(s=f,f)}},[]),l=yh(()=>o(r),[r,o]),i=Ze(u=>{const s=t.current;return pr(s,e,u,n).release},[t,e,n]);return cS(i,l,l).loadable}function gS(e){const t=xt(),n=Ze(()=>{var a;const d=t.current,f=d.getState(),m=_r().early&&(a=f.nextTree)!==null&&a!==void 0?a:f.currentTree;return Lo(d,e,m)},[t,e]),r=Ze(()=>n(),[n]),o=No(),l=Ze((a,d)=>{const f=t.current;return pr(f,e,()=>{if(!ie("recoil_suppress_rerender_in_callback"))return d();const w=n();s.current.is(w)||d(),s.current=w},o).release},[t,e,o,n]),i=fS();if(i==null)throw X("Recoil hooks must be used in components contained within a component.");const u=aS(i,r,l),s=qr(u);return hr(()=>{s.current=u}),u}function ss(e){const t=xt(),n=No(),r=Ze(()=>{var s;const a=t.current,d=a.getState(),f=_r().early&&(s=d.nextTree)!==null&&s!==void 0?s:d.currentTree;return Lo(a,e,f)},[t,e]),o=Ze(()=>({loadable:r(),key:e.key}),[r,e.key]),l=Ze(s=>{const a=o();return s.loadable.is(a.loadable)&&s.key===a.key?s:a},[o]);hr(()=>{const s=pr(t.current,e,a=>{u(l)},n);return u(l),s.release},[n,e,t,l]);const[i,u]=ma(o);return i.key!==e.key?o().loadable:i.loadable}function SS(e){const t=xt(),[,n]=ma([]),r=No(),o=Ze(()=>{var u;const s=t.current,a=s.getState(),d=_r().early&&(u=a.nextTree)!==null&&u!==void 0?u:a.currentTree;return Lo(s,e,d)},[t,e]),l=o(),i=qr(l);return hr(()=>{i.current=l}),hr(()=>{const u=t.current,s=u.getState(),a=pr(u,e,f=>{var m;if(!ie("recoil_suppress_rerender_in_callback"))return n([]);const w=o();(m=i.current)!==null&&m!==void 0&&m.is(w)||n(w),i.current=w},r);if(s.nextTree)u.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{i.current=null,n([])});else{var d;if(!ie("recoil_suppress_rerender_in_callback"))return n([]);const f=o();(d=i.current)!==null&&d!==void 0&&d.is(f)||n(f),i.current=f}return a.release},[r,o,e,t]),l}function ga(e){return ie("recoil_memory_managament_2020")&&va(e),{TRANSITION_SUPPORT:ss,SYNC_EXTERNAL_STORE:sS()?yS:ss,MUTABLE_SOURCE:gS,LEGACY:SS}[_r().mode](e)}function gh(e){const t=xt(),n=ga(e);return ya(n,e,t)}function gi(e){const t=xt();return Ze(n=>{Fl(t.current,e,n)},[t,e])}function _S(e){const t=xt();return Ze(()=>{Fl(t.current,e,mh)},[t,e])}function wS(e){return[gh(e),gi(e)]}function RS(e){return[ga(e),gi(e)]}function ES(){const e=xt();return(t,n={})=>{uS(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>dS(e.current,new us(o),r))})}}function Sh(e){return ie("recoil_memory_managament_2020")&&va(e),ss(e)}function _h(e){const t=xt(),n=Sh(e);return ya(n,e,t)}function kS(e){return[_h(e),gi(e)]}var TS={recoilComponentGetRecoilValueCount_FOR_TESTING:mS,useRecoilInterface:vS,useRecoilState:wS,useRecoilStateLoadable:RS,useRecoilValue:gh,useRecoilValueLoadable:ga,useResetRecoilState:_S,useSetRecoilState:gi,useSetUnvalidatedAtomValues:ES,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Sh,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:_h,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:kS};function CS(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var NS=CS;function LS(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var AS=LS;function xS(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function Yc(e){const t=e.atomValues.toMap(),n=Ul(NS(t,(r,o)=>{const i=wh(o).persistence_UNSTABLE;return i!=null&&i.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return MS(e.nonvalidatedAtoms.toMap(),n)}function US(e){_i(Si(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=Yc(r),l=Yc(n),i=Ul(IS,s=>{var a,d,f,m;return{persistence_UNSTABLE:{type:(a=(d=s.persistence_UNSTABLE)===null||d===void 0?void 0:d.type)!==null&&a!==void 0?a:"none",backButton:(f=(m=s.persistence_UNSTABLE)===null||m===void 0?void 0:m.backButton)!==null&&f!==void 0?f:!1}}}),u=AS(r.dirtyAtoms,s=>o.has(s)||l.has(s));e({atomValues:o,previousAtomValues:l,atomInfo:i,modifiedAtoms:u,transactionMetadata:{...r.transactionMetadata}})},[e]))}function FS(e){_i(Si(t=>{const n=Bl(t,"latest"),r=Bl(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function BS(){const e=Sa(),[t,n]=OS(()=>Bl(e.current)),r=vh(t),o=Qc(),l=Qc();if(_i(Si(u=>n(Bl(u)),[])),Rh(()=>{const u=t.retain();if(o.current&&!Zc){var s;window.clearTimeout(o.current),o.current=null,(s=l.current)===null||s===void 0||s.call(l),l.current=null}return()=>{window.setTimeout(u,10)}},[t]),r!==t&&!Zc){if(o.current){var i;window.clearTimeout(o.current),o.current=null,(i=l.current)===null||i===void 0||i.call(l),l.current=null}l.current=t.retain(),o.current=window.setTimeout(()=>{var u;o.current=null,(u=l.current)===null||u===void 0||u.call(l),l.current=null},DS)}return t}function Eh(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,l=t.getStore_INTERNAL().getState().currentTree;PS(()=>{const i=new Set;for(const a of[o.atomValues.keys(),l.atomValues.keys()])for(const d of a){var u,s;((u=o.atomValues.get(d))===null||u===void 0?void 0:u.contents)!==((s=l.atomValues.get(d))===null||s===void 0?void 0:s.contents)&&wh(d).shouldRestoreFromSnapshots&&i.add(d)}i.forEach(a=>{zS(e,new VS(a),l.atomValues.has(a)?ve(l.atomValues.get(a)):$S)}),e.replaceState(a=>({...a,stateID:t.getID()}))})}function jS(){const e=Sa();return Si(t=>Eh(e.current,t),[e])}var kh={useRecoilSnapshot:BS,gotoSnapshot:Eh,useGotoRecoilSnapshot:jS,useRecoilTransactionObserver:FS,useTransactionObservation_DEPRECATED:US,useTransactionSubscription_DEPRECATED:_i};const{peekNodeInfo:WS}=hn,{useStoreRef:HS}=jt;function bS(){const e=HS();return({key:t})=>WS(e.current,e.current.getState().currentTree,t)}var KS=bS;const{reactMode:GS}=ko,{RecoilRoot:QS,useStoreRef:ZS}=jt,{useMemo:YS}=me;function XS(){GS().mode==="MUTABLE_SOURCE"&&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=ZS().current;return YS(()=>{function t({children:n}){return me.createElement(QS,{store_INTERNAL:e},n)}return t},[e])}var qS=XS;const{loadableWithValue:JS}=Eo,{initializeNode:e2}=hn,{DEFAULT_VALUE:t2,getNode:n2}=Ye,{copyTreeState:r2,getRecoilValueAsLoadable:o2,invalidateDownstreams:l2,writeLoadableToTreeState:i2}=At;function Xc(e){return n2(e.key).nodeType==="atom"}class u2{constructor(t,n){Z(this,"_store",void 0),Z(this,"_treeState",void 0),Z(this,"_changes",void 0),Z(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!Xc(r))throw X("Reading selectors within atomicUpdate is not supported");const o=o2(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:X(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),Z(this,"set",(r,o)=>{if(!Xc(r))throw X("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const l=this.get(r);this._changes.set(r.key,o(l))}else e2(this._store,r.key,"set"),this._changes.set(r.key,o)}),Z(this,"reset",r=>{this.set(r,t2)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=r2(this._treeState);for(const[n,r]of this._changes)i2(t,n,JS(r));return l2(this._store,t),t}}function s2(e){return t=>{e.replaceState(n=>{const r=new u2(e,n);return t(r),r.newTreeState_INTERNAL()})}}var a2={atomicUpdater:s2},c2=a2.atomicUpdater,Th=Object.freeze({__proto__:null,atomicUpdater:c2});function f2(e,t){if(!e)throw new Error(t)}var d2=f2,Fr=d2;const{atomicUpdater:p2}=Th,{batchUpdates:h2}=di,{DEFAULT_VALUE:v2}=Ye,{useStoreRef:m2}=jt,{refreshRecoilValue:y2,setRecoilValue:qc}=At,{cloneSnapshot:g2}=mi,{gotoSnapshot:S2}=kh,{useCallback:_2}=me;class Ch{}const w2=new Ch;function Nh(e,t,n,r){let o=w2,l;if(h2(()=>{const u="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(typeof t!="function")throw X(u);const s=Up({...r??{},set:(d,f)=>qc(e,d,f),reset:d=>qc(e,d,v2),refresh:d=>y2(e,d),gotoSnapshot:d=>S2(e,d),transact_UNSTABLE:d=>p2(e)(d)},{snapshot:()=>{const d=g2(e);return l=d.retain(),d}}),a=t(s);if(typeof a!="function")throw X(u);o=a(...n)}),o instanceof Ch&&Fr(!1),ae(o))o=o.finally(()=>{var u;(u=l)===null||u===void 0||u()});else{var i;(i=l)===null||i===void 0||i()}return o}function R2(e,t){const n=m2();return _2((...r)=>Nh(n.current,e,r),t!=null?[...t,n]:void 0)}var Lh={recoilCallback:Nh,useRecoilCallback:R2};const{useStoreRef:E2}=jt,{refreshRecoilValue:k2}=At,{useCallback:T2}=me;function C2(e){const t=E2();return T2(()=>{const n=t.current;k2(n,e)},[e,t])}var N2=C2;const{atomicUpdater:L2}=Th,{useStoreRef:A2}=jt,{useMemo:x2}=me;function M2(e,t){const n=A2();return x2(()=>(...r)=>{L2(n.current)(l=>{e(l)(...r)})},t!=null?[...t,n]:void 0)}var P2=M2;class $2{constructor(t){Z(this,"value",void 0),this.value=t}}var I2={WrappedValue:$2},V2=I2.WrappedValue,Ah=Object.freeze({__proto__:null,WrappedValue:V2});const{isFastRefreshEnabled:z2}=ko;class Jc extends Error{}class D2{constructor(t){var n,r,o;Z(this,"_name",void 0),Z(this,"_numLeafs",void 0),Z(this,"_root",void 0),Z(this,"_onHit",void 0),Z(this,"_onSet",void 0),Z(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:l=>l}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const o=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(o)}}set(t,n,r){const o=()=>{var l,i,u,s;let a,d;for(const[F,h]of t){var f,m,w;const c=this._root;if((c==null?void 0:c.type)==="leaf")throw this.invalidCacheError();const p=a;if(a=p?p.branches.get(d):c,a=(f=a)!==null&&f!==void 0?f:{type:"branch",nodeKey:F,parent:p,branches:new Map,branchKey:d},a.type!=="branch"||a.nodeKey!==F)throw this.invalidCacheError();p==null||p.branches.set(d,a),r==null||(m=r.onNodeVisit)===null||m===void 0||m.call(r,a),d=this._mapNodeValue(h),this._root=(w=this._root)!==null&&w!==void 0?w:a}const S=a?(l=a)===null||l===void 0?void 0:l.branches.get(d):this._root;if(S!=null&&(S.type!=="leaf"||S.branchKey!==d))throw this.invalidCacheError();const R={type:"leaf",value:n,parent:a,branchKey:d};(i=a)===null||i===void 0||i.branches.set(d,R),this._root=(u=this._root)!==null&&u!==void 0?u:R,this._numLeafs++,this._onSet(R),r==null||(s=r.onNodeVisit)===null||s===void 0||s.call(r,R)};try{o()}catch(l){if(l instanceof Jc)this.clear(),o();else throw l}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,o=t.branchKey;for(;r;){var l;if(r.branches.delete(o),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;o=(l=r)===null||l===void 0?void 0:l.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=z2()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw la(t+(this._name!=null?` - ${this._name}`:"")),new Jc}}var O2={TreeCache:D2},U2=O2.TreeCache,xh=Object.freeze({__proto__:null,TreeCache:U2});class F2{constructor(t){var n;Z(this,"_maxSize",void 0),Z(this,"_size",void 0),Z(this,"_head",void 0),Z(this,"_tail",void 0),Z(this,"_map",void 0),Z(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const l=this.head(),i={key:t,right:l,left:null,value:n};l?l.left=i:this._tail=i,this._map.set(r,i),this._head=i,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=ve(this._map.get(n)),o=r.right,l=r.left;o&&(o.left=r.left),l&&(l.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=l),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var B2={LRUCache:F2},j2=B2.LRUCache,Mh=Object.freeze({__proto__:null,LRUCache:j2});const{LRUCache:W2}=Mh,{TreeCache:H2}=xh;function b2({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new W2({maxSize:t}),o=new H2({name:e,mapNodeValue:n,onHit:l=>{r.set(l,!0)},onSet:l=>{const i=r.tail();r.set(l,!0),i&&o.size()>t&&o.delete(i.key)}});return o}var ef=b2;function yt(e,t,n){if(typeof e=="string"&&!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((t==null?void 0:t.allowFunctions)!==!0)throw X("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(ae(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,l)=>yt(o,t,l.toString()))}]`;if(typeof e.toJSON=="function")return yt(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[l,i]of e)o[typeof l=="string"?l:yt(l,t)]=i;return yt(o,t,n)}return e instanceof Set?yt(Array.from(e).sort((o,l)=>yt(o,t).localeCompare(yt(l,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?yt(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${yt(o,t)}:${yt(e[o],t,o)}`).join(",")}}`}function K2(e,t={allowFunctions:!1}){return yt(e,t)}var wi=K2;const{TreeCache:G2}=xh,Yo={equality:"reference",eviction:"keep-all",maxSize:1/0};function Q2({equality:e=Yo.equality,eviction:t=Yo.eviction,maxSize:n=Yo.maxSize}=Yo,r){const o=Z2(e);return Y2(t,n,o,r)}function Z2(e){switch(e){case"reference":return t=>t;case"value":return t=>wi(t)}throw X(`Unrecognized equality policy ${e}`)}function Y2(e,t,n,r){switch(e){case"keep-all":return new G2({name:r,mapNodeValue:n});case"lru":return ef({name:r,maxSize:ve(t),mapNodeValue:n});case"most-recent":return ef({name:r,maxSize:1,mapNodeValue:n})}throw X(`Unrecognized eviction policy ${e}`)}var X2=Q2;function q2(e){return()=>null}var J2={startPerfBlock:q2};const{isLoadable:e_,loadableWithError:Xo,loadableWithPromise:t_,loadableWithValue:ou}=Eo,{WrappedValue:Ph}=Ah,{getNodeLoadable:qo,peekNodeLoadable:n_,setNodeValue:r_}=hn,{saveDepsToStore:o_}=To,{DEFAULT_VALUE:l_,getConfigDeletionHandler:i_,getNode:u_,registerNode:tf}=Ye,{isRecoilValue:s_}=dr,{markRecoilValueModified:nf}=At,{retainedByOptionWithDefault:a_}=Vn,{recoilCallback:c_}=Lh,{startPerfBlock:f_}=J2;class $h{}const $r=new $h,Ir=[],Jo=new Map,d_=(()=>{let e=0;return()=>e++})();function Ih(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,l=e.set!=null?e.set:void 0,i=new Set,u=X2(o??{equality:"reference",eviction:"keep-all"},n),s=a_(e.retainedBy_UNSTABLE),a=new Map;let d=0;function f(){return!ie("recoil_memory_managament_2020")||d>0}function m(y){return y.getState().knownSelectors.add(n),d++,()=>{d--}}function w(){return i_(n)!==void 0&&!f()}function S(y,A,x,G,z){Ie(A,G,z),R(y,x)}function R(y,A){$e(y,A)&&oe(y),h(A,!0)}function F(y,A){$e(y,A)&&(ve(U(y)).stateVersions.clear(),h(A,!1))}function h(y,A){const x=Jo.get(y);if(x!=null){for(const G of x)nf(G,ve(t));A&&Jo.delete(y)}}function c(y,A){let x=Jo.get(A);x==null&&Jo.set(A,x=new Set),x.add(y)}function p(y,A,x,G,z,Y){return A.then(J=>{if(!f())throw oe(y),$r;const W=ou(J);return S(y,x,z,W,G),J}).catch(J=>{if(!f())throw oe(y),$r;if(ae(J))return _(y,J,x,G,z,Y);const W=Xo(J);throw S(y,x,z,W,G),J})}function _(y,A,x,G,z,Y){return A.then(J=>{if(!f())throw oe(y),$r;Y.loadingDepKey!=null&&Y.loadingDepPromise===A?x.atomValues.set(Y.loadingDepKey,ou(J)):y.getState().knownSelectors.forEach(le=>{x.atomValues.delete(le)});const W=C(y,x);if(W&&W.state!=="loading"){if(($e(y,z)||U(y)==null)&&R(y,z),W.state==="hasValue")return W.contents;throw W.contents}if(!$e(y,z)){const le=te(y,x);if(le!=null)return le.loadingLoadable.contents}const[de,ke]=L(y,x,z);if(de.state!=="loading"&&S(y,x,z,de,ke),de.state==="hasError")throw de.contents;return de.contents}).catch(J=>{if(J instanceof $h)throw $r;if(!f())throw oe(y),$r;const W=Xo(J);throw S(y,x,z,W,G),J})}function E(y,A,x,G){var z,Y,J,W;if($e(y,G)||A.version===((z=y.getState())===null||z===void 0||(Y=z.currentTree)===null||Y===void 0?void 0:Y.version)||A.version===((J=y.getState())===null||J===void 0||(W=J.nextTree)===null||W===void 0?void 0:W.version)){var de,ke,le;o_(n,x,y,(de=(ke=y.getState())===null||ke===void 0||(le=ke.nextTree)===null||le===void 0?void 0:le.version)!==null&&de!==void 0?de:y.getState().currentTree.version)}for(const ye of x)i.add(ye)}function L(y,A,x){const G=f_(n);let z=!0,Y=!0;const J=()=>{G(),Y=!1};let W,de=!1,ke;const le={loadingDepKey:null,loadingDepPromise:null},ye=new Map;function ht({key:it}){const qe=qo(y,A,it);switch(ye.set(it,qe),z||(E(y,A,new Set(ye.keys()),x),F(y,x)),qe.state){case"hasValue":return qe.contents;case"hasError":throw qe.contents;case"loading":throw le.loadingDepKey=it,le.loadingDepPromise=qe.contents,qe.contents}throw X("Invalid Loadable state")}const mn=it=>(...qe)=>{if(Y)throw X("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 t==null&&Fr(!1),c_(y,it,qe,{node:t})};try{W=r({get:ht,getCallback:mn}),W=s_(W)?ht(W):W,e_(W)&&(W.state==="hasError"&&(de=!0),W=W.contents),ae(W)?W=p(y,W,A,ye,x,le).finally(J):J(),W=W instanceof Ph?W.value:W}catch(it){W=it,ae(W)?W=_(y,W,A,ye,x,le).finally(J):(de=!0,J())}return de?ke=Xo(W):ae(W)?ke=t_(W):ke=ou(W),z=!1,lt(y,x,ye),E(y,A,new Set(ye.keys()),x),[ke,ye]}function C(y,A){let x=A.atomValues.get(n);if(x!=null)return x;const G=new Set;try{x=u.get(Y=>(typeof Y!="string"&&Fr(!1),qo(y,A,Y).contents),{onNodeVisit:Y=>{Y.type==="branch"&&Y.nodeKey!==n&&G.add(Y.nodeKey)}})}catch(Y){throw X(`Problem with cache lookup for selector "${n}": ${Y.message}`)}if(x){var z;A.atomValues.set(n,x),E(y,A,G,(z=U(y))===null||z===void 0?void 0:z.executionID)}return x}function V(y,A){const x=C(y,A);if(x!=null)return oe(y),x;const G=te(y,A);if(G!=null){var z;return((z=G.loadingLoadable)===null||z===void 0?void 0:z.state)==="loading"&&c(y,G.executionID),G.loadingLoadable}const Y=d_(),[J,W]=L(y,A,Y);return J.state==="loading"?(fe(y,Y,J,W,A),c(y,Y)):(oe(y),Ie(A,J,W)),J}function te(y,A){const x=nh([a.has(y)?[ve(a.get(y))]:[],si(ca(a,([z])=>z!==y),([,z])=>z)]);function G(z){for(const[Y,J]of z)if(!qo(y,A,Y).is(J))return!0;return!1}for(const z of x){if(z.stateVersions.get(A.version)||!G(z.depValuesDiscoveredSoFarDuringAsyncWork))return z.stateVersions.set(A.version,!0),z;z.stateVersions.set(A.version,!1)}}function U(y){return a.get(y)}function fe(y,A,x,G,z){a.set(y,{depValuesDiscoveredSoFarDuringAsyncWork:G,executionID:A,loadingLoadable:x,stateVersions:new Map([[z.version,!0]])})}function lt(y,A,x){if($e(y,A)){const G=U(y);G!=null&&(G.depValuesDiscoveredSoFarDuringAsyncWork=x)}}function oe(y){a.delete(y)}function $e(y,A){var x;return A===((x=U(y))===null||x===void 0?void 0:x.executionID)}function Mt(y){return Array.from(y.entries()).map(([A,x])=>[A,x.contents])}function Ie(y,A,x){y.atomValues.set(n,A);try{u.set(Mt(x),A)}catch(G){throw X(`Problem with setting cache for selector "${n}": ${G.message}`)}}function Xe(y){if(Ir.includes(n)){const A=`Recoil selector has circular dependencies: ${Ir.slice(Ir.indexOf(n)).join(" → ")}`;return Xo(X(A))}Ir.push(n);try{return y()}finally{Ir.pop()}}function $(y,A){const x=A.atomValues.get(n);return x??u.get(G=>{var z;return typeof G!="string"&&Fr(!1),(z=n_(y,A,G))===null||z===void 0?void 0:z.contents})}function H(y,A){return Xe(()=>V(y,A))}function I(y){y.atomValues.delete(n)}function j(y,A){t==null&&Fr(!1);for(const G of i){var x;const z=u_(G);(x=z.clearCache)===null||x===void 0||x.call(z,y,A)}i.clear(),I(A),u.clear(),nf(y,t)}return l!=null?t=tf({key:n,nodeType:"selector",peek:$,get:H,set:(A,x,G)=>{let z=!1;const Y=new Map;function J({key:le}){if(z)throw X("Recoil: Async selector sets are not currently supported.");const ye=qo(A,x,le);if(ye.state==="hasValue")return ye.contents;if(ye.state==="loading"){const ht=`Getting value of asynchronous atom or selector "${le}" in a pending state while setting selector "${n}" is not yet supported.`;throw X(ht)}else throw ye.contents}function W(le,ye){if(z)throw X("Recoil: Async selector sets are not currently supported.");const ht=typeof ye=="function"?ye(J(le)):ye;r_(A,x,le.key,ht).forEach((it,qe)=>Y.set(qe,it))}function de(le){W(le,l_)}const ke=l({set:W,get:J,reset:de},G);if(ke!==void 0)throw ae(ke)?X("Recoil: Async selector sets are not currently supported."):X("Recoil: selector set should be a void function.");return z=!0,Y},init:m,invalidate:I,clearCache:j,shouldDeleteConfigOnRelease:w,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s}):t=tf({key:n,nodeType:"selector",peek:$,get:H,init:m,invalidate:I,clearCache:j,shouldDeleteConfigOnRelease:w,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}Ih.value=e=>new Ph(e);var vr=Ih;const{isLoadable:p_,loadableWithError:lu,loadableWithPromise:iu,loadableWithValue:On}=Eo,{WrappedValue:Vh}=Ah,{peekNodeInfo:h_}=hn,{DEFAULT_VALUE:Sn,DefaultValue:Kt,getConfigDeletionHandler:zh,registerNode:v_,setConfigDeletionHandler:m_}=Ye,{isRecoilValue:y_}=dr,{getRecoilValueAsLoadable:g_,markRecoilValueModified:S_,setRecoilValue:rf,setRecoilValueLoadable:__}=At,{retainedByOptionWithDefault:w_}=Vn,Vr=e=>e instanceof Vh?e.value:e;function R_(e){const{key:t,persistence_UNSTABLE:n}=e,r=w_(e.retainedBy_UNSTABLE);let o=0;function l(c){return iu(c.then(p=>(i=On(p),p)).catch(p=>{throw i=lu(p),p}))}let i=ae(e.default)?l(e.default):p_(e.default)?e.default.state==="loading"?l(e.default.contents):e.default:On(Vr(e.default));i.contents;let u;const s=new Map;function a(c){return c}function d(c,p){const _=p.then(E=>{var L,C;return((C=((L=c.getState().nextTree)!==null&&L!==void 0?L:c.getState().currentTree).atomValues.get(t))===null||C===void 0?void 0:C.contents)===_&&rf(c,h,E),E}).catch(E=>{var L,C;throw((C=((L=c.getState().nextTree)!==null&&L!==void 0?L:c.getState().currentTree).atomValues.get(t))===null||C===void 0?void 0:C.contents)===_&&__(c,h,lu(E)),E});return _}function f(c,p,_){var E;o++;const L=()=>{var U;o--,(U=s.get(c))===null||U===void 0||U.forEach(fe=>fe()),s.delete(c)};if(c.getState().knownAtoms.add(t),i.state==="loading"){const U=()=>{var fe;((fe=c.getState().nextTree)!==null&&fe!==void 0?fe:c.getState().currentTree).atomValues.has(t)||S_(c,h)};i.contents.finally(U)}const C=(E=e.effects)!==null&&E!==void 0?E:e.effects_UNSTABLE;if(C!=null){let U=function(I){if($e&&I.key===t){const j=oe;return j instanceof Kt?m(c,p):ae(j)?iu(j.then(y=>y instanceof Kt?i.toPromise():y)):On(j)}return g_(c,I)},fe=function(I){return U(I).toPromise()},lt=function(I){var j;const y=h_(c,(j=c.getState().nextTree)!==null&&j!==void 0?j:c.getState().currentTree,I.key);return $e&&I.key===t&&!(oe instanceof Kt)?{...y,isSet:!0,loadable:U(I)}:y},oe=Sn,$e=!0,Mt=!1,Ie=null;const Xe=I=>j=>{if($e){const y=U(h),A=y.state==="hasValue"?y.contents:Sn;oe=typeof j=="function"?j(A):j,ae(oe)&&(oe=oe.then(x=>(Ie={effect:I,value:x},x)))}else{if(ae(j))throw X("Setting atoms to async values is not implemented.");typeof j!="function"&&(Ie={effect:I,value:Vr(j)}),rf(c,h,typeof j=="function"?y=>{const A=Vr(j(y));return Ie={effect:I,value:A},A}:Vr(j))}},$=I=>()=>Xe(I)(Sn),H=I=>j=>{var y;const{release:A}=c.subscribeToTransactions(x=>{var G;let{currentTree:z,previousTree:Y}=x.getState();Y||(Y=z);const J=(G=z.atomValues.get(t))!==null&&G!==void 0?G:i;if(J.state==="hasValue"){var W,de,ke,le;const ye=J.contents,ht=(W=Y.atomValues.get(t))!==null&&W!==void 0?W:i,mn=ht.state==="hasValue"?ht.contents:Sn;((de=Ie)===null||de===void 0?void 0:de.effect)!==I||((ke=Ie)===null||ke===void 0?void 0:ke.value)!==ye?j(ye,mn,!z.atomValues.has(t)):((le=Ie)===null||le===void 0?void 0:le.effect)===I&&(Ie=null)}},t);s.set(c,[...(y=s.get(c))!==null&&y!==void 0?y:[],A])};for(const I of C)try{const j=I({node:h,storeID:c.storeID,parentStoreID_UNSTABLE:c.parentStoreID,trigger:_,setSelf:Xe(I),resetSelf:$(I),onSet:H(I),getPromise:fe,getLoadable:U,getInfo_UNSTABLE:lt});if(j!=null){var V;s.set(c,[...(V=s.get(c))!==null&&V!==void 0?V:[],j])}}catch(j){oe=j,Mt=!0}if($e=!1,!(oe instanceof Kt)){var te;const I=Mt?lu(oe):ae(oe)?iu(d(c,oe)):On(Vr(oe));I.contents,p.atomValues.set(t,I),(te=c.getState().nextTree)===null||te===void 0||te.atomValues.set(t,I)}}return L}function m(c,p){var _,E;return(_=(E=p.atomValues.get(t))!==null&&E!==void 0?E:u)!==null&&_!==void 0?_:i}function w(c,p){if(p.atomValues.has(t))return ve(p.atomValues.get(t));if(p.nonvalidatedAtoms.has(t)){if(u!=null)return u;if(n==null)return i;const _=p.nonvalidatedAtoms.get(t),E=n.validator(_,Sn);return u=E instanceof Kt?i:On(E),u}else return i}function S(){u=void 0}function R(c,p,_){if(p.atomValues.has(t)){const E=ve(p.atomValues.get(t));if(E.state==="hasValue"&&_===E.contents)return new Map}else if(!p.nonvalidatedAtoms.has(t)&&_ instanceof Kt)return new Map;return u=void 0,new Map().set(t,On(_))}function F(){return zh(t)!==void 0&&o<=0}const h=v_({key:t,nodeType:"atom",peek:m,get:w,set:R,init:f,invalidate:S,shouldDeleteConfigOnRelease:F,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return h}function _a(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return y_(n)?E_({...t,default:n}):R_({...t,default:n})}function E_(e){const t=_a({...e,default:Sn,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Kt?r:ve(e.persistence_UNSTABLE).validator(r,Sn)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=vr({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof Kt?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return m_(n.key,zh(e.key)),n}_a.value=e=>new Vh(e);var Dh=_a;class k_{constructor(t){var n;Z(this,"_map",void 0),Z(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var T_={MapCache:k_},C_=T_.MapCache,N_=Object.freeze({__proto__:null,MapCache:C_});const{LRUCache:of}=Mh,{MapCache:L_}=N_,el={equality:"reference",eviction:"none",maxSize:1/0};function A_({equality:e=el.equality,eviction:t=el.eviction,maxSize:n=el.maxSize}=el){const r=x_(e);return M_(t,n,r)}function x_(e){switch(e){case"reference":return t=>t;case"value":return t=>wi(t)}throw X(`Unrecognized equality policy ${e}`)}function M_(e,t,n){switch(e){case"keep-all":return new L_({mapKey:n});case"lru":return new of({mapKey:n,maxSize:ve(t)});case"most-recent":return new of({mapKey:n,maxSize:1})}throw X(`Unrecognized eviction policy ${e}`)}var Oh=A_;const{setConfigDeletionHandler:P_}=Ye;function $_(e){var t,n;const r=Oh({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var l,i;const u=r.get(o);if(u!=null)return u;const{cachePolicyForParams_UNSTABLE:s,...a}=e,d="default"in e?e.default:new Promise(()=>{}),f=Dh({...a,key:`${e.key}__${(l=wi(o))!==null&&l!==void 0?l:"void"}`,default:typeof d=="function"?d(o):d,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(o):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):(i=e.effects)!==null&&i!==void 0?i:e.effects_UNSTABLE});return r.set(o,f),P_(f.key,()=>{r.delete(o)}),f}}var I_=$_;const{setConfigDeletionHandler:V_}=Ye;let z_=0;function D_(e){var t,n;const r=Oh({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var l;let i;try{i=r.get(o)}catch(m){throw X(`Problem with cache lookup for selector ${e.key}: ${m.message}`)}if(i!=null)return i;const u=`${e.key}__selectorFamily/${(l=wi(o,{allowFunctions:!0}))!==null&&l!==void 0?l:"void"}/${z_++}`,s=m=>e.get(o)(m),a=e.cachePolicy_UNSTABLE,d=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const m=e.set;f=vr({key:u,get:s,set:(S,R)=>m(o)(S,R),cachePolicy_UNSTABLE:a,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:d})}else f=vr({key:u,get:s,cachePolicy_UNSTABLE:a,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:d});return r.set(o,f),V_(f.key,()=>{r.delete(o)}),f}}var vn=D_;const O_=vn({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function U_(e){return O_(e)}var F_=U_;const B_=vn({key:"__error",get:e=>()=>{throw X(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function j_(e){return B_(e)}var W_=j_;function H_(e){return e}var b_=H_;const{loadableWithError:Uh,loadableWithPromise:Fh,loadableWithValue:Bh}=Eo;function Ri(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,l]of t.entries())try{n[o]=e(l)}catch(i){r[o]=i}return[n,r]}function K_(e){return e!=null&&!ae(e)}function Ei(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((n,r,o)=>({...n,[r]:t[o]}),{})}function rr(e,t,n){const r=n.map((o,l)=>o==null?Bh(t[l]):ae(o)?Fh(o):Uh(o));return as(e,r)}function G_(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const Q_=vn({key:"__waitForNone",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);return rr(e,r,o)},dangerouslyAllowMutability:!0}),Z_=vn({key:"__waitForAny",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);return o.some(l=>!ae(l))?rr(e,r,o):new Promise(l=>{for(const[i,u]of o.entries())ae(u)&&u.then(s=>{r[i]=s,o[i]=void 0,l(rr(e,r,o))}).catch(s=>{o[i]=s,l(rr(e,r,o))})})},dangerouslyAllowMutability:!0}),Y_=vn({key:"__waitForAll",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);if(o.every(i=>i==null))return as(e,r);const l=o.find(K_);if(l!=null)throw l;return Promise.all(o).then(i=>as(e,G_(r,i)))},dangerouslyAllowMutability:!0}),X_=vn({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);return o.every(l=>!ae(l))?rr(e,r,o):Promise.all(o.map((l,i)=>ae(l)?l.then(u=>{r[i]=u,o[i]=void 0}).catch(u=>{r[i]=void 0,o[i]=u}):null)).then(()=>rr(e,r,o))},dangerouslyAllowMutability:!0}),q_=vn({key:"__noWait",get:e=>({get:t})=>{try{return vr.value(Bh(t(e)))}catch(n){return vr.value(ae(n)?Fh(n):Uh(n))}},dangerouslyAllowMutability:!0});var J_={waitForNone:Q_,waitForAny:Z_,waitForAll:Y_,waitForAllSettled:X_,noWait:q_};const{RecoilLoadable:ew}=Eo,{DefaultValue:tw}=Ye,{RecoilRoot:nw,useRecoilStoreID:rw}=jt,{isRecoilValue:ow}=dr,{retentionZone:lw}=ci,{freshSnapshot:iw}=mi,{useRecoilState:uw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:sw,useRecoilStateLoadable:aw,useRecoilValue:cw,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:fw,useRecoilValueLoadable:dw,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:pw,useResetRecoilState:hw,useSetRecoilState:vw}=TS,{useGotoRecoilSnapshot:mw,useRecoilSnapshot:yw,useRecoilTransactionObserver:gw}=kh,{useRecoilCallback:Sw}=Lh,{noWait:_w,waitForAll:ww,waitForAllSettled:Rw,waitForAny:Ew,waitForNone:kw}=J_;var Ao={DefaultValue:tw,isRecoilValue:ow,RecoilLoadable:ew,RecoilEnv:Sr,RecoilRoot:nw,useRecoilStoreID:rw,useRecoilBridgeAcrossReactRoots_UNSTABLE:qS,atom:Dh,selector:vr,atomFamily:I_,selectorFamily:vn,constSelector:F_,errorSelector:W_,readOnlySelector:b_,noWait:_w,waitForNone:kw,waitForAny:Ew,waitForAll:ww,waitForAllSettled:Rw,useRecoilValue:cw,useRecoilValueLoadable:dw,useRecoilState:uw,useRecoilStateLoadable:aw,useSetRecoilState:vw,useResetRecoilState:hw,useGetRecoilValueInfo_UNSTABLE:KS,useRecoilRefresher_UNSTABLE:N2,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:pw,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:fw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:sw,useRecoilCallback:Sw,useRecoilTransaction_UNSTABLE:P2,useGotoRecoilSnapshot:mw,useRecoilSnapshot:yw,useRecoilTransactionObserver_UNSTABLE:gw,snapshot_UNSTABLE:iw,useRetain:va,retentionZone:lw},Tw=Ao.RecoilRoot,xo=Ao.atom,Cw=Ao.selector,Nw=Ao.useRecoilValue,Mo=Ao.useRecoilState;function jh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Vw=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,l=n.meta,i=n.mod,u=n.shift,s=n.ctrl,a=n.keys,d=t.key,f=t.code,m=t.ctrlKey,w=t.metaKey,S=t.shiftKey,R=t.altKey,F=Xt(f),h=d.toLowerCase();if(!(a!=null&&a.includes(F))&&!(a!=null&&a.includes(h))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(F))return!1;if(!r){if(o===!R&&h!=="alt"||u===!S&&h!=="shift")return!1;if(i){if(!w&&!m)return!1}else if(l===!w&&h!=="meta"&&h!=="os"||s===!m&&h!=="ctrl"&&h!=="control")return!1}return a&&a.length===1&&(a.includes(h)||a.includes(F))?!0:a?xw(a):!a},zw=N.createContext(void 0),Dw=function(){return N.useContext(zw)};function Gh(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&Gh(e[r],t[r])},!0):e===t}var Ow=N.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Uw=function(){return N.useContext(Ow)};function Fw(e){var t=N.useRef(void 0);return Gh(t.current,e)||(t.current=e),t.current}var lf=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Bw=typeof window<"u"?N.useLayoutEffect:N.useEffect;function cn(e,t,n,r){var o=N.useRef(null),l=N.useRef(!1),i=n instanceof Array?r instanceof Array?void 0:r:n,u=Ra(e)?e.join(i==null?void 0:i.splitKey):e,s=n instanceof Array?n:r instanceof Array?r:void 0,a=N.useCallback(t,s??[]),d=N.useRef(a);s?d.current=a:d.current=t;var f=Fw(i),m=Uw(),w=m.enabledScopes,S=Dw();return Bw(function(){if(!((f==null?void 0:f.enabled)===!1||!Iw(w,f==null?void 0:f.scopes))){var R=function(_,E){var L;if(E===void 0&&(E=!1),!($w(_)&&!Kh(_,f==null?void 0:f.enableOnFormTags))){if(o.current!==null){var C=o.current.getRootNode();if((C instanceof Document||C instanceof ShadowRoot)&&C.activeElement!==o.current&&!o.current.contains(C.activeElement)){lf(_);return}}(L=_.target)!=null&&L.isContentEditable&&!(f!=null&&f.enableOnContentEditable)||uu(u,f==null?void 0:f.splitKey).forEach(function(V){var te,U=su(V,f==null?void 0:f.combinationKey);if(Vw(_,U,f==null?void 0:f.ignoreModifiers)||(te=U.keys)!=null&&te.includes("*")){if(f!=null&&f.ignoreEventWhen!=null&&f.ignoreEventWhen(_)||E&&l.current)return;if(Mw(_,U,f==null?void 0:f.preventDefault),!Pw(_,U,f==null?void 0:f.enabled)){lf(_);return}d.current(_,U),E||(l.current=!0)}})}},F=function(_){_.key!==void 0&&(Hh(Xt(_.code)),((f==null?void 0:f.keydown)===void 0&&(f==null?void 0:f.keyup)!==!0||f!=null&&f.keydown)&&R(_))},h=function(_){_.key!==void 0&&(bh(Xt(_.code)),l.current=!1,f!=null&&f.keyup&&R(_,!0))},c=o.current||(i==null?void 0:i.document)||document;return c.addEventListener("keyup",h),c.addEventListener("keydown",F),S&&uu(u,f==null?void 0:f.splitKey).forEach(function(p){return S.addHotkey(su(p,f==null?void 0:f.combinationKey,f==null?void 0:f.description))}),function(){c.removeEventListener("keyup",h),c.removeEventListener("keydown",F),S&&uu(u,f==null?void 0:f.splitKey).forEach(function(p){return S.removeHotkey(su(p,f==null?void 0:f.combinationKey,f==null?void 0:f.description))})}}},[u,f,w]),o}const jw=xo({key:"open",default:!1}),Ww=()=>Mo(jw),Hw=xo({key:"context",default:"ACTIONS"}),Ea=()=>Mo(Hw),Qh=xo({key:"query",default:""}),Zh=()=>Mo(Qh),Yh=xo({key:"unfilteredActionsState",default:[]}),bw=Cw({key:"actionsState",get:({get:e})=>{const t=e(Qh);return e(Yh).filter(r=>r.name.toLowerCase().includes(t.toLowerCase())||r.subtitle.toLowerCase().includes(t.toLowerCase()))}});function Kw(){const[e,t]=Mo(Yh),n=Nw(bw);async function r(){const l=await(await fetch("/actions/palette/actions")).json();t(l)}return{getActions:r,actions:n}}const Gw=xo({key:"focus",default:0});function ka(e){const[t,n]=Mo(Gw);N.useEffect(()=>{n(0)},[e]);async function r(o,l){l.length!==0&&(o==="up"&&t===0||o==="down"&&t===l.length-1||(o==="up"&&n(i=>i-1),o==="down"&&n(i=>i+1)))}return{setFocus:n,moveFocus:r,focus:t}}function Qw({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"}))}const Zw=N.forwardRef(Qw),Yw=Zw;function Xw({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"}))}const qw=N.forwardRef(Xw),Jw=qw;function eR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"}))}const tR=N.forwardRef(eR),nR=tR;function rR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const oR=N.forwardRef(rR),lR=oR;function iR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))}const uR=N.forwardRef(iR),sR=uR;function aR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const cR=N.forwardRef(aR),fR=cR;function dR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 9.75 16.5 12l-2.25 2.25m-4.5 0L7.5 12l2.25-2.25M6 20.25h12A2.25 2.25 0 0 0 20.25 18V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25Z"}))}const pR=N.forwardRef(dR),hR=pR;function vR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z"}),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const mR=N.forwardRef(vR),yR=mR;function gR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const SR=N.forwardRef(gR),uf=SR;function _R({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const wR=N.forwardRef(_R),RR=wR;function ER({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const kR=N.forwardRef(ER),TR=kR;function CR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"}))}const NR=N.forwardRef(CR),LR=NR;function AR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const xR=N.forwardRef(AR),MR=xR;function PR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const $R=N.forwardRef(PR),IR=$R;function VR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"}))}const zR=N.forwardRef(VR),DR=zR;function OR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const UR=N.forwardRef(OR),FR=UR;function BR({name:e,...t}){return e==="document"?B.jsx(uf,{...t}):e==="table"?B.jsx(DR,{...t}):e==="section"?B.jsx(IR,{...t}):e==="code"?B.jsx(hR,{...t}):e==="bolt"?B.jsx(sR,{...t}):e==="settings"?B.jsx(yR,{...t}):e==="search"?B.jsx(TR,{...t}):e==="globe"?B.jsx(RR,{...t}):e==="edit"?B.jsx(MR,{...t}):e==="menu"?B.jsx(lR,{...t}):e==="attachment"?B.jsx(LR,{...t}):e==="database"?B.jsx(fR,{...t}):e==="utility"?B.jsx(Yw,{...t}):e==="user"?B.jsx(FR,{...t}):e==="logout"?B.jsx(Jw,{...t}):B.jsx(uf,{...t})}function Xh({url:e,title:t,subtitle:n,icon:r,type:o,focused:l}){const i=N.useRef(null),[u,s]=Ea(),{focus:a,setFocus:d}=ka();return cn("enter",()=>{l&&(o==="link"?window.location=e:s(e))},{enableOnFormTags:!0}),cn("meta+enter",()=>{l&&(o==="link"?window.open(e,"_blank"):s(e))},{enableOnFormTags:!0}),N.useEffect(()=>{l&&i.current.scrollIntoView({block:"center"})},[a]),B.jsx("a",{className:wa("p-flex p-items-center p-gap-2","p-font-sans p-text-sm p-text-zinc-700 dark:p-text-zinc-300 p-no-underline","p-px-3 p-py-2.5 p-mx-2 p-rounded-lg",l&&"p-bg-zinc-200/75 dark:p-bg-zinc-700/50","hover:p-bg-zinc-200/75 dark:hover:p-bg-zinc-700/50"),onMouseEnter:()=>d(null),href:o==="link"?e:null,onClick:()=>o==="context"?s(e):null,ref:i,children:B.jsx("div",{className:"p-flex p-items-center p-justify-between p-gap-2 p-flex-1",children:B.jsxs("div",{className:"p-flex p-items-center p-gap-3 p-flex-1",children:[B.jsx(BR,{name:r,className:"p-size-5 p-opacity-75"}),B.jsxs("div",{className:"p-flex-1 p-flex p-justify-between p-items-center p-gap-1",children:[B.jsx("p",{className:"p-block p-leading-none p-m-0 p-font-sans p-font-medium",children:t}),n&&B.jsx("p",{className:"p-block p-leading-none p-text-xs p-m-0 p-font-sans p-opacity-75",children:n})]})]})})})}function qh({text:e="No matching results found"}){return B.jsxs("div",{className:"p-flex p-flex-col p-justify-center p-items-center p-py-6 p-text-zinc-400 dark:p-text-zinc-500",children:[B.jsx("div",{children:B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"p-size-12",children:B.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})}),B.jsx("p",{className:"p-text-lg p-mt-1",children:e})]})}function jR(){const{actions:e,getActions:t}=Kw(),{focus:n,moveFocus:r}=ka(e);return cn("up",()=>r("up",e),{enableOnFormTags:!0,preventDefault:!0}),cn("down",()=>r("down",e),{enableOnFormTags:!0,preventDefault:!0}),N.useEffect(()=>{t()},[]),B.jsxs(B.Fragment,{children:[e.length===0&&B.jsx(qh,{}),e.map((o,l)=>B.jsx(Xh,{url:o.url,title:o.name,subtitle:o.subtitle,icon:o.icon,focused:l===n,type:o.type},o.url))]})}function WR(e,t,n){N.useEffect(()=>{const r=setTimeout(()=>e(),n);return()=>clearTimeout(r)},[...t||[],n])}function HR(){const[e]=Zh(),[t,n]=N.useState([]),{focus:r,moveFocus:o}=ka(t);return WR(()=>{fetch(`/actions/palette/search?query=${e}`).then(l=>l.json()).then(l=>n(l))},[e],200),cn("up",()=>o("up",t),{enableOnFormTags:!0,preventDefault:!0}),cn("down",()=>o("down",t),{enableOnFormTags:!0,preventDefault:!0}),B.jsxs(B.Fragment,{children:[t.length===0&&B.jsx(qh,{text:"No matching entries found"}),t.map((l,i)=>B.jsx(Xh,{url:l.url,title:l.name,subtitle:l.subtitle,icon:l.icon,focused:i===r,type:l.type},l.url))]})}function bR({placeholder:e="Search"}){const[t,n]=Zh(),[r,o]=Ea();return N.useEffect(()=>{n("")},[r]),B.jsxs("div",{className:"p-flex p-px-2 p-items-center p-gap-1 p-border-b p-border-zinc-200 dark:p-border-zinc-700",children:[r!=="ACTIONS"&&B.jsx("div",{children:B.jsx("button",{className:"p-size-8 p-flex p-items-center p-justify-center p-border p-border-zinc-300 dark:p-border-zinc-700 p-rounded-lg dark:p-bg-zinc-900",onClick:()=>o("ACTIONS"),children:B.jsx(nR,{className:"p-size-4 p-text-zinc-500"})})}),B.jsx("input",{type:"text",className:wa(["p-bg-transparent","p-w-full p-px-2 p-py-3","p-outline-none p-ring-0 p-shadow-none p-border-0","p-text-base placeholder:p-text-zinc-400 placeholder:dark:p-text-zinc-500 p-text-zinc-700 dark:p-text-zinc-200"]),placeholder:e,onInput:({target:l})=>n(l.value),value:t,autoFocus:!0,spellCheck:!1})]})}function KR(){const[e,t]=Ww(),[n,r]=Ea();return cn("meta+k",()=>{t(o=>!o),r("ACTIONS")},{enableOnFormTags:!0}),cn("esc",()=>{n==="ACTIONS"&&t(!1),r("ACTIONS")},{enableOnFormTags:!0}),B.jsx(B.Fragment,{children:e&&B.jsx("div",{className:"p-fixed p-inset-0 p-z-[9999] p-size-full p-flex p-justify-center p-antialiased",children:B.jsx("div",{className:"p-w-full p-max-w-2xl",children:B.jsxs("div",{className:wa(["p-bg-white/70 dark:p-bg-zinc-950/90","p-outline-zinc-300 dark:p-outline-zinc-900 p-outline p-outline-1","p-border p-border-white dark:p-border-zinc-500","p-rounded-lg p-translate-y-24 p-overflow-hidden p-backdrop-blur-xl p-shadow-2xl"]),children:[B.jsx(bR,{}),B.jsxs("div",{className:"dark:p-bg-zinc-950/10 p-max-h-96 p-overflow-scroll p-py-2",children:[n==="ACTIONS"&&B.jsx(jR,{}),n==="SEARCH_ENTRIES"&&B.jsx(HR,{})]})]})})})})}function GR(){return B.jsx(Tw,{children:B.jsx(KR,{})})}const Jh=document.createElement("div");Jh.setAttribute("data-palette","");document.body.appendChild(Jh);document.querySelectorAll("[data-palette]").forEach(e=>Rp.render(B.jsx(GR,{}),e)); + hot module replacement.`;console.warn(t)}}function h1(e){Sr.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&p1(e.key),Mn.set(e.key,e);const t=e.set==null?new dr.RecoilValueReadOnly(e.key):new dr.RecoilState(e.key);return ua.set(e.key,t),t}class Pp extends Error{}function v1(e){const t=Mn.get(e);if(t==null)throw new Pp(`Missing definition for RecoilValue: "${e}""`);return t}function m1(e){return Mn.get(e)}const Ol=new Map;function y1(e){var t;if(!ie("recoil_memory_managament_2020"))return;const n=Mn.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Mn.delete(e),(r=$p(e))===null||r===void 0||r(),Ol.delete(e)}}function g1(e,t){ie("recoil_memory_managament_2020")&&(t===void 0?Ol.delete(e):Ol.set(e,t))}function $p(e){return Ol.get(e)}var Ye={nodes:Mn,recoilValues:ua,registerNode:h1,getNode:v1,getNodeMaybe:m1,deleteNodeConfigIfPossible:y1,setConfigDeletionHandler:g1,getConfigDeletionHandler:$p,recoilValuesForKeys:d1,NodeMissingError:Pp,DefaultValue:Mp,DEFAULT_VALUE:f1};function S1(e,t){t()}var _1={enqueueExecution:S1};function w1(e,t){return t={exports:{}},e(t,t.exports),t.exports}var R1=w1(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},n={},r=5,o=Math.pow(2,r),l=o-1,i=o/2,u=o/4,s={},a=function(v){return function(){return v}},d=n.hash=function(g){var v=typeof g>"u"?"undefined":t(g);if(v==="number")return g;v!=="string"&&(g+="");for(var k=0,M=0,P=g.length;M>1&1431655765,v=(v&858993459)+(v>>2&858993459),v=v+(v>>4)&252645135,v+=v>>8,v+=v>>16,v&127},m=function(v,k){return k>>>v&l},w=function(v){return 1<=k;)P[Q--]=P[Q];return P[k]=M,P}for(var b=0,K=0,q=new Array(O+1);b>>=1;return Q[k]=M,fe(v,K+1,Q)},$e=function(v,k,M,P){for(var O=new Array(k-1),Q=0,b=0,K=0,q=P.length;K1?te(v,this.hash,q):q[0]}var pe=P();return pe===s?this:(++b.value,Mt(v,M,this.hash,this,O,V(v,O,Q,pe)))},I=function(v,k,M,P,O,Q,b){var K=this.mask,q=this.children,pe=m(M,O),We=w(pe),Ne=S(K,We),ut=K&We,vt=ut?q[Ne]:L,zn=vt._modify(v,k,M+r,P,O,Q,b);if(vt===zn)return this;var Po=Xe(v,this),wr=K,Rr=void 0;if(ut&&C(zn)){if(wr&=~We,!wr)return L;if(q.length<=2&<(q[Ne^1]))return q[Ne^1];Rr=F(Po,Ne,q)}else if(!ut&&!C(zn)){if(q.length>=i)return oe(v,pe,zn,K,q);wr|=We,Rr=h(Po,Ne,zn,q)}else Rr=R(Po,Ne,zn,q);return Po?(this.mask=wr,this.children=Rr,this):U(v,wr,Rr)},j=function(v,k,M,P,O,Q,b){var K=this.size,q=this.children,pe=m(M,O),We=q[pe],Ne=(We||L)._modify(v,k,M+r,P,O,Q,b);if(We===Ne)return this;var ut=Xe(v,this),vt=void 0;if(C(We)&&!C(Ne))++K,vt=R(ut,pe,Ne,q);else if(!C(We)&&C(Ne)){if(--K,K<=u)return $e(v,K,pe,q);vt=R(ut,pe,L,q)}else vt=R(ut,pe,Ne,q);return ut?(this.size=K,this.children=vt,this):fe(v,K,vt)};L._modify=function(g,v,k,M,P,O,Q){var b=M();return b===s?L:(++Q.value,V(g,P,O,b))};function y(g,v,k,M,P){this._editable=g,this._edit=v,this._config=k,this._root=M,this._size=P}y.prototype.setTree=function(g,v){return this._editable?(this._root=g,this._size=v,this):g===this._root?this:new y(this._editable,this._edit,this._config,g,v)};var A=n.tryGetHash=function(g,v,k,M){for(var P=M._root,O=0,Q=M._config.keyEq;;)switch(P.type){case c:return Q(k,P.key)?P.value:g;case p:{if(v===P.hash)for(var b=P.children,K=0,q=b.length;K{n.set(o,t(r,o))}),n}var Ul=L1;function A1(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function x1(e){return{nodeDeps:Ul(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Ul(e.nodeToNodeSubscriptions,t=>new Set(t))}}function nu(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:l}=n,i=o.get(e);if(i&&r&&i!==r.nodeDeps.get(e))return;o.set(e,t);const u=i==null?t:Yr(t,i);for(const s of u)l.has(s)||l.set(s,new Set),ve(l.get(s)).add(e);if(i){const s=Yr(i,t);for(const a of s){if(!l.has(a))return;const d=ve(l.get(a));d.delete(e),d.size===0&&l.delete(a)}}}function M1(e,t,n,r){var o,l,i,u;const s=n.getState();r===s.currentTree.version||r===((o=s.nextTree)===null||o===void 0?void 0:o.version)||((l=s.previousTree)===null||l===void 0||l.version);const a=n.getGraph(r);if(nu(e,t,a),r===((i=s.previousTree)===null||i===void 0?void 0:i.version)){const f=n.getGraph(s.currentTree.version);nu(e,t,f,a)}if(r===((u=s.previousTree)===null||u===void 0?void 0:u.version)||r===s.currentTree.version){var d;const f=(d=s.nextTree)===null||d===void 0?void 0:d.version;if(f!==void 0){const m=n.getGraph(f);nu(e,t,m,a)}}}var To={cloneGraph:x1,graph:A1,saveDepsToStore:M1};let P1=0;const $1=()=>P1++;let I1=0;const V1=()=>I1++;let z1=0;const D1=()=>z1++;var ai={getNextTreeStateVersion:$1,getNextStoreID:V1,getNextComponentID:D1};const{persistentMap:Dc}=C1,{graph:O1}=To,{getNextTreeStateVersion:Ip}=ai;function Vp(){const e=Ip();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Dc(),nonvalidatedAtoms:Dc()}}function U1(){const e=Vp();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,O1()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var zp={makeEmptyTreeState:Vp,makeEmptyStoreState:U1,getNextTreeStateVersion:Ip};class Dp{}function F1(){return new Dp}var ci={RetentionZone:Dp,retentionZone:F1};function B1(e,t){const n=new Set(e);return n.add(t),n}function j1(e,t){const n=new Set(e);return n.delete(t),n}function W1(e,t,n){const r=new Map(e);return r.set(t,n),r}function H1(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function b1(e,t){const n=new Map(e);return n.delete(t),n}function K1(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var Op={setByAddingToSet:B1,setByDeletingFromSet:j1,mapBySettingInMap:W1,mapByUpdatingInMap:H1,mapByDeletingFromMap:b1,mapByDeletingMultipleFromMap:K1};function*G1(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var ca=G1;function Q1(e,t){return new Proxy(e,{get:(r,o)=>(!(o in r)&&o in t&&(r[o]=t[o]()),r[o]),ownKeys:r=>Object.keys(r)})}var Up=Q1;const{getNode:Co,getNodeMaybe:Z1,recoilValuesForKeys:Oc}=Ye,{RetentionZone:Uc}=ci,{setByAddingToSet:Y1}=Op,X1=Object.freeze(new Set);class q1 extends Error{}function J1(e,t,n){if(!ie("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(l){let i=r.get(l);i||r.set(l,i=new Set),i.add(t)}if(n instanceof Uc)o(n);else if(Array.isArray(n))for(const l of n)o(l);return()=>{if(!ie("recoil_memory_managament_2020"))return;const{retention:l}=e.getState();function i(u){const s=l.nodesRetainedByZone.get(u);s==null||s.delete(t),s&&s.size===0&&l.nodesRetainedByZone.delete(u)}if(n instanceof Uc)i(n);else if(Array.isArray(n))for(const u of n)i(u)}}function fa(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const l=Co(n),i=J1(e,n,l.retainedBy),u=l.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{u(),i()})}function ey(e,t,n){fa(e,e.getState().currentTree,t,n)}function ty(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function ny(e,t,n){return fa(e,t,n,"get"),Co(n).get(e,t)}function Fp(e,t,n){return Co(n).peek(e,t)}function ry(e,t,n){var r;const o=Z1(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Y1(e.dirtyAtoms,t)}}function oy(e,t,n,r){const o=Co(n);if(o.set==null)throw new q1(`Attempt to set read-only RecoilValue: ${n}`);const l=o.set;return fa(e,t,n,"set"),l(e,t,r)}function ly(e,t,n){const r=e.getState(),o=e.getGraph(t.version),l=Co(n).nodeType;return Up({type:l},{loadable:()=>Fp(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>l==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var i;return Oc((i=o.nodeDeps.get(n))!==null&&i!==void 0?i:[])},subscribers:()=>{var i,u;return{nodes:Oc(ca(Bp(e,t,new Set([n])),s=>s!==n)),components:si((i=(u=r.nodeToComponentSubscriptions.get(n))===null||u===void 0?void 0:u.values())!==null&&i!==void 0?i:[],([s])=>({name:s}))}}})}function Bp(e,t,n){const r=new Set,o=Array.from(n),l=e.getGraph(t.version);for(let u=o.pop();u;u=o.pop()){var i;r.add(u);const s=(i=l.nodeToNodeSubscriptions.get(u))!==null&&i!==void 0?i:X1;for(const a of s)r.has(a)||o.push(a)}return r}var hn={getNodeLoadable:ny,peekNodeLoadable:Fp,setNodeValue:oy,initializeNode:ey,cleanUpNode:ty,setUnvalidatedAtomValue_DEPRECATED:ry,peekNodeInfo:ly,getDownstreamNodes:Bp};let jp=null;function iy(e){jp=e}function uy(){var e;(e=jp)===null||e===void 0||e()}var Wp={setInvalidateMemoizedSnapshot:iy,invalidateMemoizedSnapshot:uy};const{getDownstreamNodes:sy,getNodeLoadable:Hp,setNodeValue:ay}=hn,{getNextComponentID:cy}=ai,{getNode:fy,getNodeMaybe:bp}=Ye,{DefaultValue:da}=Ye,{reactMode:dy}=ko,{AbstractRecoilValue:py,RecoilState:hy,RecoilValueReadOnly:vy,isRecoilValue:my}=dr,{invalidateMemoizedSnapshot:yy}=Wp;function gy(e,{key:t},n=e.getState().currentTree){var r,o;const l=e.getState();n.version===l.currentTree.version||n.version===((r=l.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=l.previousTree)===null||o===void 0||o.version);const i=Hp(e,n,t);return i.state==="loading"&&i.contents.catch(()=>{}),i}function Sy(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof da?n.delete(o):n.set(o,r)}),n}function _y(e,t,{key:n},r){if(typeof r=="function"){const o=Hp(e,t,n);if(o.state==="loading"){const l=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw X(l)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function wy(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:l}=n,i=_y(e,t,o,l),u=ay(e,t,o.key,i);for(const[s,a]of u.entries())ns(t,s,a)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:l}=n;ns(t,o,l)}else if(n.type==="markModified"){const{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:o},unvalidatedValue:l}=n,i=bp(o);i==null||(r=i.invalidate)===null||r===void 0||r.call(i,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,l),t.dirtyAtoms.add(o)}else la(`Unknown action ${n.type}`)}function ns(e,t,n){n.state==="hasValue"&&n.contents instanceof da?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function Kp(e,t){e.replaceState(n=>{const r=Gp(n);for(const o of t)wy(e,r,o);return Qp(e,r),yy(),r})}function fi(e,t){if(Xr.length){const n=Xr[Xr.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else Kp(e,[t])}const Xr=[];function Ry(){const e=new Map;return Xr.push(e),()=>{for(const[t,n]of e)Kp(t,n);Xr.pop()}}function Gp(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function Qp(e,t){const n=sy(e,t,t.dirtyAtoms);for(const l of n){var r,o;(r=bp(l))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function Zp(e,t,n){fi(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function Ey(e,t,n){if(n instanceof da)return Zp(e,t,n);fi(e,{type:"setLoadable",recoilValue:t,loadable:n})}function ky(e,t){fi(e,{type:"markModified",recoilValue:t})}function Ty(e,t,n){fi(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function Cy(e,{key:t},n,r=null){const o=cy(),l=e.getState();l.nodeToComponentSubscriptions.has(t)||l.nodeToComponentSubscriptions.set(t,new Map),ve(l.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]);const i=dy();if(i.early&&(i.mode==="LEGACY"||i.mode==="MUTABLE_SOURCE")){const u=e.getState().nextTree;u&&u.dirtyAtoms.has(t)&&n(u)}return{release:()=>{const u=e.getState(),s=u.nodeToComponentSubscriptions.get(t);s===void 0||!s.has(o)||(s.delete(o),s.size===0&&u.nodeToComponentSubscriptions.delete(t))}}}function Ny(e,t){var n;const{currentTree:r}=e.getState(),o=fy(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var At={RecoilValueReadOnly:vy,AbstractRecoilValue:py,RecoilState:hy,getRecoilValueAsLoadable:gy,setRecoilValue:Zp,setRecoilValueLoadable:Ey,markRecoilValueModified:ky,setUnvalidatedRecoilValue:Ty,subscribeToRecoilValue:Cy,isRecoilValue:my,applyAtomValueWrites:Sy,batchStart:Ry,writeLoadableToTreeState:ns,invalidateDownstreams:Qp,copyTreeState:Gp,refreshRecoilValue:Ny};function Ly(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const l=o.value;if(t.call(n,l[1],l[0],e))return!0;o=r.next()}return!1}var Ay=Ly;const{cleanUpNode:xy}=hn,{deleteNodeConfigIfPossible:My,getNode:Yp}=Ye,{RetentionZone:Xp}=ci,Py=12e4,qp=new Set;function Jp(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const i of t)if(i instanceof Xp)for(const u of zy(n,i))o.add(u);else o.add(i);const l=$y(e,o);for(const i of l)Vy(e,r,i)}function $y(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),l=new Set,i=new Set;return u(t),l;function u(s){const a=new Set,d=Iy(e,r,s,l,i);for(const S of d){var f;if(Yp(S).retainedBy==="recoilRoot"){i.add(S);continue}if(((f=n.retention.referenceCounts.get(S))!==null&&f!==void 0?f:0)>0){i.add(S);continue}if(eh(S).some(F=>n.retention.referenceCounts.get(F))){i.add(S);continue}const R=o.nodeToNodeSubscriptions.get(S);if(R&&Ay(R,F=>i.has(F))){i.add(S);continue}l.add(S),a.add(S)}const m=new Set;for(const S of a)for(const R of(w=o.nodeDeps.get(S))!==null&&w!==void 0?w:qp){var w;l.has(R)||m.add(R)}m.size&&u(m)}}function Iy(e,t,n,r,o){const l=e.getGraph(t.version),i=[],u=new Set;for(;n.size>0;)s(ve(n.values().next().value));return i;function s(a){if(r.has(a)||o.has(a)){n.delete(a);return}if(u.has(a))return;const d=l.nodeToNodeSubscriptions.get(a);if(d)for(const f of d)s(f);u.add(a),n.delete(a),i.push(a)}}function Vy(e,t,n){if(!ie("recoil_memory_managament_2020"))return;xy(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const o=eh(n);for(const s of o){var l;(l=r.retention.nodesRetainedByZone.get(s))===null||l===void 0||l.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const i=r.graphsByVersion.get(t.version);if(i){const s=i.nodeDeps.get(n);if(s!==void 0){i.nodeDeps.delete(n);for(const a of s){var u;(u=i.nodeToNodeSubscriptions.get(a))===null||u===void 0||u.delete(n)}}i.nodeToNodeSubscriptions.delete(n)}My(n)}function zy(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:qp}function eh(e){const t=Yp(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof Xp?[t]:t}function Dy(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Jp(e,new Set([t]))}function Oy(e,t,n){var r;if(!ie("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,l=((r=o.get(t))!==null&&r!==void 0?r:0)+n;l===0?th(e,t):o.set(t,l)}function th(e,t){if(!ie("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),Dy(e,t)}function Uy(e){if(!ie("recoil_memory_managament_2020"))return;const t=e.getState();Jp(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function Fy(e){return e===void 0?"recoilRoot":e}var Vn={SUSPENSE_TIMEOUT_MS:Py,updateRetainCount:Oy,updateRetainCountToZero:th,releaseScheduledRetainablesNow:Uy,retainedByOptionWithDefault:Fy};const{unstable_batchedUpdates:By}=Im;var jy={unstable_batchedUpdates:By};const{unstable_batchedUpdates:Wy}=jy;var Hy={unstable_batchedUpdates:Wy};const{batchStart:by}=At,{unstable_batchedUpdates:Ky}=Hy;let pa=Ky||(e=>e());const Gy=e=>{pa=e},Qy=()=>pa,Zy=e=>{pa(()=>{let t=()=>{};try{t=by(),e()}finally{t()}})};var di={getBatcher:Qy,setBatcher:Gy,batchUpdates:Zy};function*Yy(e){for(const t of e)for(const n of t)yield n}var nh=Yy;const rh=typeof Window>"u"||typeof window>"u",Xy=e=>!rh&&(e===window||e instanceof Window),qy=typeof navigator<"u"&&navigator.product==="ReactNative";var pi={isSSR:rh,isReactNative:qy,isWindow:Xy};function Jy(e,t){let n;return(...r)=>{n||(n={});const o=t(...r);return Object.hasOwnProperty.call(n,o)||(n[o]=e(...r)),n[o]}}function eg(e,t){let n,r;return(...o)=>{const l=t(...o);return n===l||(n=l,r=e(...o)),r}}function tg(e,t){let n,r;return[(...i)=>{const u=t(...i);return n===u||(n=u,r=e(...i)),r},()=>{n=null}]}var ng={memoizeWithArgsHash:Jy,memoizeOneWithArgsHash:eg,memoizeOneWithArgsHashAndInvalidation:tg};const{batchUpdates:rs}=di,{initializeNode:rg,peekNodeInfo:og}=hn,{graph:lg}=To,{getNextStoreID:ig}=ai,{DEFAULT_VALUE:ug,recoilValues:Fc,recoilValuesForKeys:Bc}=Ye,{AbstractRecoilValue:sg,getRecoilValueAsLoadable:ag,setRecoilValue:jc,setUnvalidatedRecoilValue:cg}=At,{updateRetainCount:pl}=Vn,{setInvalidateMemoizedSnapshot:fg}=Wp,{getNextTreeStateVersion:dg,makeEmptyStoreState:pg}=zp,{isSSR:hg}=pi,{memoizeOneWithArgsHashAndInvalidation:vg}=ng;class hi{constructor(t,n){Z(this,"_store",void 0),Z(this,"_refCount",1),Z(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),ag(this._store,r))),Z(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),Z(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const i=this._store.getState().currentTree;return Bc(i.dirtyAtoms)}const o=this._store.getState().knownAtoms,l=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Fc.values():r.isInitialized===!0?Bc(nh([o,l])):ca(Fc.values(),({key:i})=>!o.has(i)&&!l.has(i))}),Z(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),og(this._store,this._store.getState().currentTree,r))),Z(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new os(this,rs);return r(o),o}),Z(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new os(this,rs);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:ig(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return ve(o.get(r));const l=lg();return o.set(r,l),l},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw X("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)rg(this._store,r,"get"),pl(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){hg||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!ie("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){ie("recoil_memory_managament_2020")&&this._refCount<=0}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 oh(e,t,n=!1){const r=e.getState(),o=n?dg():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o: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(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(si(r.nodeCleanupFunctions.entries(),([l])=>[l,()=>{}]))}}function mg(e){const t=new hi(pg());return e!=null?t.map(e):t}const[Wc,lh]=vg((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:ve(r.previousTree);return new hi(oh(e,o),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});fg(lh);function yg(e,t="latest"){const n=Wc(e,t);return n.isRetained()?n:(lh(),Wc(e,t))}class os extends hi{constructor(t,n){super(oh(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Z(this,"_batch",void 0),Z(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const l=this.getStore_INTERNAL();this._batch(()=>{pl(l,r.key,1),jc(this.getStore_INTERNAL(),r,o)})}),Z(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{pl(o,r.key,1),jc(this.getStore_INTERNAL(),r,ug)})}),Z(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();rs(()=>{for(const[l,i]of r.entries())pl(o,l,1),cg(o,new sg(l),i)})}),this._batch=n}}var vi={Snapshot:hi,MutableSnapshot:os,freshSnapshot:mg,cloneSnapshot:yg},gg=vi.Snapshot,Sg=vi.MutableSnapshot,_g=vi.freshSnapshot,wg=vi.cloneSnapshot,mi=Object.freeze({__proto__:null,Snapshot:gg,MutableSnapshot:Sg,freshSnapshot:_g,cloneSnapshot:wg});function Rg(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var Eg=Rg;const{useRef:kg}=me;function Tg(e){const t=kg(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var Hc=Tg;const{getNextTreeStateVersion:Cg,makeEmptyStoreState:ih}=zp,{cleanUpNode:Ng,getDownstreamNodes:Lg,initializeNode:Ag,setNodeValue:xg,setUnvalidatedAtomValue_DEPRECATED:Mg}=hn,{graph:Pg}=To,{cloneGraph:$g}=To,{getNextStoreID:uh}=ai,{createMutableSource:ru,reactMode:sh}=ko,{applyAtomValueWrites:Ig}=At,{releaseScheduledRetainablesNow:ah}=Vn,{freshSnapshot:Vg}=mi,{useCallback:zg,useContext:ch,useEffect:ls,useMemo:Dg,useRef:Og,useState:Ug}=me;function Mr(){throw X("This component must be used inside a component.")}const fh=Object.freeze({storeID:uh(),getState:Mr,replaceState:Mr,getGraph:Mr,subscribeToTransactions:Mr,addTransactionMetadata:Mr});let is=!1;function bc(e){if(is)throw X("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(t.nextTree===null){ie("recoil_memory_managament_2020")&&ie("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&ah(e);const n=t.currentTree.version,r=Cg();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,$g(ve(t.graphsByVersion.get(n))))}}const dh=me.createContext({current:fh}),yi=()=>ch(dh),ph=me.createContext(null);function Fg(){return ch(ph)}function ha(e,t,n){const r=Lg(e,n,n.dirtyAtoms);for(const o of r){const l=t.nodeToComponentSubscriptions.get(o);if(l)for(const[i,[u,s]]of l)s(n)}}function hh(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,l]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[i,u]of l)u(e);for(const[o,l]of t.transactionSubscriptions)l(e);(!sh().early||t.suspendedComponentResolvers.size>0)&&(ha(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function Bg(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,hh(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):la("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,ie("recoil_memory_managament_2020")&&n==null&&ah(e)}finally{t.commitDepth--}}function jg({setNotifyBatcherOfChange:e}){const t=yi(),[,n]=Ug([]);return e(()=>n({})),ls(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),ls(()=>{_1.enqueueExecution("Batcher",()=>{Bg(t.current)})}),null}function Wg(e,t){const n=ih();return t({set:(r,o)=>{const l=n.currentTree,i=xg(e,l,r.key,o),u=new Set(i.keys()),s=l.nonvalidatedAtoms.clone();for(const a of u)s.delete(a);n.currentTree={...l,dirtyAtoms:Eg(l.dirtyAtoms,u),atomValues:Ig(l.atomValues,i),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:r=>{r.forEach((o,l)=>{n.currentTree=Mg(n.currentTree,l,o)})}}),n}function Hg(e){const t=Vg(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let Kc=0;function bg({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const l=w=>{const S=o.current.graphsByVersion;if(S.has(w))return ve(S.get(w));const R=Pg();return S.set(w,R),R},i=(w,S)=>{if(S==null){const{transactionSubscriptions:R}=f.current.getState(),F=Kc++;return R.set(F,w),{release:()=>{R.delete(F)}}}else{const{nodeTransactionSubscriptions:R}=f.current.getState();R.has(S)||R.set(S,new Map);const F=Kc++;return ve(R.get(S)).set(F,w),{release:()=>{const h=R.get(S);h&&(h.delete(F),h.size===0&&R.delete(S))}}}},u=w=>{bc(f.current);for(const S of Object.keys(w))ve(f.current.getState().nextTree).transactionMetadata[S]=w[S]},s=w=>{bc(f.current);const S=ve(o.current.nextTree);let R;try{is=!0,R=w(S)}finally{is=!1}R!==S&&(o.current.nextTree=R,sh().early&&ha(f.current,o.current,R),ve(a.current)())},a=Og(null),d=zg(w=>{a.current=w},[a]),f=Hc(()=>n??{storeID:uh(),getState:()=>o.current,replaceState:s,getGraph:l,subscribeToTransactions:i,addTransactionMetadata:u});n!=null&&(f.current=n),o=Hc(()=>e!=null?Wg(f.current,e):t!=null?Hg(t):ih());const m=Dg(()=>ru==null?void 0:ru(o,()=>o.current.currentTree.version),[o]);return ls(()=>{const w=f.current;for(const S of new Set(w.getState().knownAtoms))Ag(w,S,"get");return()=>{for(const S of w.getState().knownAtoms)Ng(w,S)}},[f]),me.createElement(dh.Provider,{value:f},me.createElement(ph.Provider,{value:m},me.createElement(jg,{setNotifyBatcherOfChange:d}),r))}function Kg(e){const{override:t,...n}=e,r=yi();return t===!1&&r.current!==fh?e.children:me.createElement(bg,n)}function Gg(){return yi().current.storeID}var jt={RecoilRoot:Kg,useStoreRef:yi,useRecoilMutableSource:Fg,useRecoilStoreID:Gg,notifyComponents_FOR_TESTING:ha,sendEndOfBatchNotifications_FOR_TESTING:hh};function Qg(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var vh=qg;const{useStoreRef:Jg}=jt,{SUSPENSE_TIMEOUT_MS:eS}=Vn,{updateRetainCount:Pr}=Vn,{RetentionZone:tS}=ci,{useEffect:nS,useRef:rS}=me,{isSSR:Gc}=pi;function oS(e){if(ie("recoil_memory_managament_2020"))return lS(e)}function lS(e){const n=(Array.isArray(e)?e:[e]).map(i=>i instanceof tS?i:i.key),r=Jg();nS(()=>{if(!ie("recoil_memory_managament_2020"))return;const i=r.current;if(o.current&&!Gc)window.clearTimeout(o.current),o.current=null;else for(const u of n)Pr(i,u,1);return()=>{for(const u of n)Pr(i,u,-1)}},[r,...n]);const o=rS(),l=vh(n);if(!Gc&&(l===void 0||!Zg(l,n))){const i=r.current;for(const u of n)Pr(i,u,1);if(l)for(const u of l)Pr(i,u,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const u of n)Pr(i,u,-1)},eS)}}var va=oS;function iS(){return""}var No=iS;const{batchUpdates:uS}=di,{DEFAULT_VALUE:mh}=Ye,{currentRendererSupportsUseSyncExternalStore:sS,reactMode:_r,useMutableSource:aS,useSyncExternalStore:cS}=ko,{useRecoilMutableSource:fS,useStoreRef:xt}=jt,{AbstractRecoilValue:us,getRecoilValueAsLoadable:Lo,setRecoilValue:Fl,setUnvalidatedRecoilValue:dS,subscribeToRecoilValue:pr}=At,{useCallback:Ze,useEffect:hr,useMemo:yh,useRef:qr,useState:ma}=me,{setByAddingToSet:pS}=Op,{isSSR:hS}=pi;function ya(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const l=n.current.getState().suspendedComponentResolvers;l.add(o),hS&&ae(e.contents)&&e.contents.finally(()=>{l.delete(o)})}):e.state==="hasError"?e.contents:X(`Invalid value of loadable atom "${t.key}"`)}function vS(){const e=No(),t=xt(),[,n]=ma([]),r=qr(new Set);r.current=new Set;const o=qr(new Set),l=qr(new Map),i=Ze(s=>{const a=l.current.get(s);a&&(a.release(),l.current.delete(s))},[l]),u=Ze((s,a)=>{l.current.has(a)&&n([])},[]);return hr(()=>{const s=t.current;Yr(r.current,o.current).forEach(a=>{if(l.current.has(a))return;const d=pr(s,new us(a),m=>u(m,a),e);l.current.set(a,d),s.getState().nextTree?s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{u(s.getState(),a)}):u(s.getState(),a)}),Yr(o.current,r.current).forEach(a=>{i(a)}),o.current=r.current}),hr(()=>{const s=l.current;return Yr(r.current,new Set(s.keys())).forEach(a=>{const d=pr(t.current,new us(a),f=>u(f,a),e);s.set(a,d)}),()=>s.forEach((a,d)=>i(d))},[e,t,i,u]),yh(()=>{function s(S){return R=>{Fl(t.current,S,R)}}function a(S){return()=>Fl(t.current,S,mh)}function d(S){var R;r.current.has(S.key)||(r.current=pS(r.current,S.key));const F=t.current.getState();return Lo(t.current,S,_r().early&&(R=F.nextTree)!==null&&R!==void 0?R:F.currentTree)}function f(S){const R=d(S);return ya(R,S,t)}function m(S){return[f(S),s(S)]}function w(S){return[d(S),s(S)]}return{getRecoilValue:f,getRecoilValueLoadable:d,getRecoilState:m,getRecoilStateLoadable:w,getSetRecoilState:s,getResetRecoilState:a}},[r,t])}const mS={current:0};function yS(e){const t=xt(),n=No(),r=Ze(()=>{var u;const s=t.current,a=s.getState(),d=_r().early&&(u=a.nextTree)!==null&&u!==void 0?u:a.currentTree;return{loadable:Lo(s,e,d),key:e.key}},[t,e]),o=Ze(u=>{let s;return()=>{var a,d;const f=u();return(a=s)!==null&&a!==void 0&&a.loadable.is(f.loadable)&&((d=s)===null||d===void 0?void 0:d.key)===f.key?s:(s=f,f)}},[]),l=yh(()=>o(r),[r,o]),i=Ze(u=>{const s=t.current;return pr(s,e,u,n).release},[t,e,n]);return cS(i,l,l).loadable}function gS(e){const t=xt(),n=Ze(()=>{var a;const d=t.current,f=d.getState(),m=_r().early&&(a=f.nextTree)!==null&&a!==void 0?a:f.currentTree;return Lo(d,e,m)},[t,e]),r=Ze(()=>n(),[n]),o=No(),l=Ze((a,d)=>{const f=t.current;return pr(f,e,()=>{if(!ie("recoil_suppress_rerender_in_callback"))return d();const w=n();s.current.is(w)||d(),s.current=w},o).release},[t,e,o,n]),i=fS();if(i==null)throw X("Recoil hooks must be used in components contained within a component.");const u=aS(i,r,l),s=qr(u);return hr(()=>{s.current=u}),u}function ss(e){const t=xt(),n=No(),r=Ze(()=>{var s;const a=t.current,d=a.getState(),f=_r().early&&(s=d.nextTree)!==null&&s!==void 0?s:d.currentTree;return Lo(a,e,f)},[t,e]),o=Ze(()=>({loadable:r(),key:e.key}),[r,e.key]),l=Ze(s=>{const a=o();return s.loadable.is(a.loadable)&&s.key===a.key?s:a},[o]);hr(()=>{const s=pr(t.current,e,a=>{u(l)},n);return u(l),s.release},[n,e,t,l]);const[i,u]=ma(o);return i.key!==e.key?o().loadable:i.loadable}function SS(e){const t=xt(),[,n]=ma([]),r=No(),o=Ze(()=>{var u;const s=t.current,a=s.getState(),d=_r().early&&(u=a.nextTree)!==null&&u!==void 0?u:a.currentTree;return Lo(s,e,d)},[t,e]),l=o(),i=qr(l);return hr(()=>{i.current=l}),hr(()=>{const u=t.current,s=u.getState(),a=pr(u,e,f=>{var m;if(!ie("recoil_suppress_rerender_in_callback"))return n([]);const w=o();(m=i.current)!==null&&m!==void 0&&m.is(w)||n(w),i.current=w},r);if(s.nextTree)u.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{i.current=null,n([])});else{var d;if(!ie("recoil_suppress_rerender_in_callback"))return n([]);const f=o();(d=i.current)!==null&&d!==void 0&&d.is(f)||n(f),i.current=f}return a.release},[r,o,e,t]),l}function ga(e){return ie("recoil_memory_managament_2020")&&va(e),{TRANSITION_SUPPORT:ss,SYNC_EXTERNAL_STORE:sS()?yS:ss,MUTABLE_SOURCE:gS,LEGACY:SS}[_r().mode](e)}function gh(e){const t=xt(),n=ga(e);return ya(n,e,t)}function gi(e){const t=xt();return Ze(n=>{Fl(t.current,e,n)},[t,e])}function _S(e){const t=xt();return Ze(()=>{Fl(t.current,e,mh)},[t,e])}function wS(e){return[gh(e),gi(e)]}function RS(e){return[ga(e),gi(e)]}function ES(){const e=xt();return(t,n={})=>{uS(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>dS(e.current,new us(o),r))})}}function Sh(e){return ie("recoil_memory_managament_2020")&&va(e),ss(e)}function _h(e){const t=xt(),n=Sh(e);return ya(n,e,t)}function kS(e){return[_h(e),gi(e)]}var TS={recoilComponentGetRecoilValueCount_FOR_TESTING:mS,useRecoilInterface:vS,useRecoilState:wS,useRecoilStateLoadable:RS,useRecoilValue:gh,useRecoilValueLoadable:ga,useResetRecoilState:_S,useSetRecoilState:gi,useSetUnvalidatedAtomValues:ES,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Sh,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:_h,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:kS};function CS(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var NS=CS;function LS(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var AS=LS;function xS(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function Yc(e){const t=e.atomValues.toMap(),n=Ul(NS(t,(r,o)=>{const i=wh(o).persistence_UNSTABLE;return i!=null&&i.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return MS(e.nonvalidatedAtoms.toMap(),n)}function US(e){_i(Si(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=Yc(r),l=Yc(n),i=Ul(IS,s=>{var a,d,f,m;return{persistence_UNSTABLE:{type:(a=(d=s.persistence_UNSTABLE)===null||d===void 0?void 0:d.type)!==null&&a!==void 0?a:"none",backButton:(f=(m=s.persistence_UNSTABLE)===null||m===void 0?void 0:m.backButton)!==null&&f!==void 0?f:!1}}}),u=AS(r.dirtyAtoms,s=>o.has(s)||l.has(s));e({atomValues:o,previousAtomValues:l,atomInfo:i,modifiedAtoms:u,transactionMetadata:{...r.transactionMetadata}})},[e]))}function FS(e){_i(Si(t=>{const n=Bl(t,"latest"),r=Bl(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function BS(){const e=Sa(),[t,n]=OS(()=>Bl(e.current)),r=vh(t),o=Qc(),l=Qc();if(_i(Si(u=>n(Bl(u)),[])),Rh(()=>{const u=t.retain();if(o.current&&!Zc){var s;window.clearTimeout(o.current),o.current=null,(s=l.current)===null||s===void 0||s.call(l),l.current=null}return()=>{window.setTimeout(u,10)}},[t]),r!==t&&!Zc){if(o.current){var i;window.clearTimeout(o.current),o.current=null,(i=l.current)===null||i===void 0||i.call(l),l.current=null}l.current=t.retain(),o.current=window.setTimeout(()=>{var u;o.current=null,(u=l.current)===null||u===void 0||u.call(l),l.current=null},DS)}return t}function Eh(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,l=t.getStore_INTERNAL().getState().currentTree;PS(()=>{const i=new Set;for(const a of[o.atomValues.keys(),l.atomValues.keys()])for(const d of a){var u,s;((u=o.atomValues.get(d))===null||u===void 0?void 0:u.contents)!==((s=l.atomValues.get(d))===null||s===void 0?void 0:s.contents)&&wh(d).shouldRestoreFromSnapshots&&i.add(d)}i.forEach(a=>{zS(e,new VS(a),l.atomValues.has(a)?ve(l.atomValues.get(a)):$S)}),e.replaceState(a=>({...a,stateID:t.getID()}))})}function jS(){const e=Sa();return Si(t=>Eh(e.current,t),[e])}var kh={useRecoilSnapshot:BS,gotoSnapshot:Eh,useGotoRecoilSnapshot:jS,useRecoilTransactionObserver:FS,useTransactionObservation_DEPRECATED:US,useTransactionSubscription_DEPRECATED:_i};const{peekNodeInfo:WS}=hn,{useStoreRef:HS}=jt;function bS(){const e=HS();return({key:t})=>WS(e.current,e.current.getState().currentTree,t)}var KS=bS;const{reactMode:GS}=ko,{RecoilRoot:QS,useStoreRef:ZS}=jt,{useMemo:YS}=me;function XS(){GS().mode==="MUTABLE_SOURCE"&&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=ZS().current;return YS(()=>{function t({children:n}){return me.createElement(QS,{store_INTERNAL:e},n)}return t},[e])}var qS=XS;const{loadableWithValue:JS}=Eo,{initializeNode:e2}=hn,{DEFAULT_VALUE:t2,getNode:n2}=Ye,{copyTreeState:r2,getRecoilValueAsLoadable:o2,invalidateDownstreams:l2,writeLoadableToTreeState:i2}=At;function Xc(e){return n2(e.key).nodeType==="atom"}class u2{constructor(t,n){Z(this,"_store",void 0),Z(this,"_treeState",void 0),Z(this,"_changes",void 0),Z(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!Xc(r))throw X("Reading selectors within atomicUpdate is not supported");const o=o2(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:X(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),Z(this,"set",(r,o)=>{if(!Xc(r))throw X("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const l=this.get(r);this._changes.set(r.key,o(l))}else e2(this._store,r.key,"set"),this._changes.set(r.key,o)}),Z(this,"reset",r=>{this.set(r,t2)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=r2(this._treeState);for(const[n,r]of this._changes)i2(t,n,JS(r));return l2(this._store,t),t}}function s2(e){return t=>{e.replaceState(n=>{const r=new u2(e,n);return t(r),r.newTreeState_INTERNAL()})}}var a2={atomicUpdater:s2},c2=a2.atomicUpdater,Th=Object.freeze({__proto__:null,atomicUpdater:c2});function f2(e,t){if(!e)throw new Error(t)}var d2=f2,Fr=d2;const{atomicUpdater:p2}=Th,{batchUpdates:h2}=di,{DEFAULT_VALUE:v2}=Ye,{useStoreRef:m2}=jt,{refreshRecoilValue:y2,setRecoilValue:qc}=At,{cloneSnapshot:g2}=mi,{gotoSnapshot:S2}=kh,{useCallback:_2}=me;class Ch{}const w2=new Ch;function Nh(e,t,n,r){let o=w2,l;if(h2(()=>{const u="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(typeof t!="function")throw X(u);const s=Up({...r??{},set:(d,f)=>qc(e,d,f),reset:d=>qc(e,d,v2),refresh:d=>y2(e,d),gotoSnapshot:d=>S2(e,d),transact_UNSTABLE:d=>p2(e)(d)},{snapshot:()=>{const d=g2(e);return l=d.retain(),d}}),a=t(s);if(typeof a!="function")throw X(u);o=a(...n)}),o instanceof Ch&&Fr(!1),ae(o))o=o.finally(()=>{var u;(u=l)===null||u===void 0||u()});else{var i;(i=l)===null||i===void 0||i()}return o}function R2(e,t){const n=m2();return _2((...r)=>Nh(n.current,e,r),t!=null?[...t,n]:void 0)}var Lh={recoilCallback:Nh,useRecoilCallback:R2};const{useStoreRef:E2}=jt,{refreshRecoilValue:k2}=At,{useCallback:T2}=me;function C2(e){const t=E2();return T2(()=>{const n=t.current;k2(n,e)},[e,t])}var N2=C2;const{atomicUpdater:L2}=Th,{useStoreRef:A2}=jt,{useMemo:x2}=me;function M2(e,t){const n=A2();return x2(()=>(...r)=>{L2(n.current)(l=>{e(l)(...r)})},t!=null?[...t,n]:void 0)}var P2=M2;class $2{constructor(t){Z(this,"value",void 0),this.value=t}}var I2={WrappedValue:$2},V2=I2.WrappedValue,Ah=Object.freeze({__proto__:null,WrappedValue:V2});const{isFastRefreshEnabled:z2}=ko;class Jc extends Error{}class D2{constructor(t){var n,r,o;Z(this,"_name",void 0),Z(this,"_numLeafs",void 0),Z(this,"_root",void 0),Z(this,"_onHit",void 0),Z(this,"_onSet",void 0),Z(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:l=>l}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const o=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(o)}}set(t,n,r){const o=()=>{var l,i,u,s;let a,d;for(const[F,h]of t){var f,m,w;const c=this._root;if((c==null?void 0:c.type)==="leaf")throw this.invalidCacheError();const p=a;if(a=p?p.branches.get(d):c,a=(f=a)!==null&&f!==void 0?f:{type:"branch",nodeKey:F,parent:p,branches:new Map,branchKey:d},a.type!=="branch"||a.nodeKey!==F)throw this.invalidCacheError();p==null||p.branches.set(d,a),r==null||(m=r.onNodeVisit)===null||m===void 0||m.call(r,a),d=this._mapNodeValue(h),this._root=(w=this._root)!==null&&w!==void 0?w:a}const S=a?(l=a)===null||l===void 0?void 0:l.branches.get(d):this._root;if(S!=null&&(S.type!=="leaf"||S.branchKey!==d))throw this.invalidCacheError();const R={type:"leaf",value:n,parent:a,branchKey:d};(i=a)===null||i===void 0||i.branches.set(d,R),this._root=(u=this._root)!==null&&u!==void 0?u:R,this._numLeafs++,this._onSet(R),r==null||(s=r.onNodeVisit)===null||s===void 0||s.call(r,R)};try{o()}catch(l){if(l instanceof Jc)this.clear(),o();else throw l}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,o=t.branchKey;for(;r;){var l;if(r.branches.delete(o),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;o=(l=r)===null||l===void 0?void 0:l.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=z2()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw la(t+(this._name!=null?` - ${this._name}`:"")),new Jc}}var O2={TreeCache:D2},U2=O2.TreeCache,xh=Object.freeze({__proto__:null,TreeCache:U2});class F2{constructor(t){var n;Z(this,"_maxSize",void 0),Z(this,"_size",void 0),Z(this,"_head",void 0),Z(this,"_tail",void 0),Z(this,"_map",void 0),Z(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const l=this.head(),i={key:t,right:l,left:null,value:n};l?l.left=i:this._tail=i,this._map.set(r,i),this._head=i,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=ve(this._map.get(n)),o=r.right,l=r.left;o&&(o.left=r.left),l&&(l.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=l),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var B2={LRUCache:F2},j2=B2.LRUCache,Mh=Object.freeze({__proto__:null,LRUCache:j2});const{LRUCache:W2}=Mh,{TreeCache:H2}=xh;function b2({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new W2({maxSize:t}),o=new H2({name:e,mapNodeValue:n,onHit:l=>{r.set(l,!0)},onSet:l=>{const i=r.tail();r.set(l,!0),i&&o.size()>t&&o.delete(i.key)}});return o}var ef=b2;function yt(e,t,n){if(typeof e=="string"&&!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((t==null?void 0:t.allowFunctions)!==!0)throw X("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(ae(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,l)=>yt(o,t,l.toString()))}]`;if(typeof e.toJSON=="function")return yt(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[l,i]of e)o[typeof l=="string"?l:yt(l,t)]=i;return yt(o,t,n)}return e instanceof Set?yt(Array.from(e).sort((o,l)=>yt(o,t).localeCompare(yt(l,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?yt(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${yt(o,t)}:${yt(e[o],t,o)}`).join(",")}}`}function K2(e,t={allowFunctions:!1}){return yt(e,t)}var wi=K2;const{TreeCache:G2}=xh,Yo={equality:"reference",eviction:"keep-all",maxSize:1/0};function Q2({equality:e=Yo.equality,eviction:t=Yo.eviction,maxSize:n=Yo.maxSize}=Yo,r){const o=Z2(e);return Y2(t,n,o,r)}function Z2(e){switch(e){case"reference":return t=>t;case"value":return t=>wi(t)}throw X(`Unrecognized equality policy ${e}`)}function Y2(e,t,n,r){switch(e){case"keep-all":return new G2({name:r,mapNodeValue:n});case"lru":return ef({name:r,maxSize:ve(t),mapNodeValue:n});case"most-recent":return ef({name:r,maxSize:1,mapNodeValue:n})}throw X(`Unrecognized eviction policy ${e}`)}var X2=Q2;function q2(e){return()=>null}var J2={startPerfBlock:q2};const{isLoadable:e_,loadableWithError:Xo,loadableWithPromise:t_,loadableWithValue:ou}=Eo,{WrappedValue:Ph}=Ah,{getNodeLoadable:qo,peekNodeLoadable:n_,setNodeValue:r_}=hn,{saveDepsToStore:o_}=To,{DEFAULT_VALUE:l_,getConfigDeletionHandler:i_,getNode:u_,registerNode:tf}=Ye,{isRecoilValue:s_}=dr,{markRecoilValueModified:nf}=At,{retainedByOptionWithDefault:a_}=Vn,{recoilCallback:c_}=Lh,{startPerfBlock:f_}=J2;class $h{}const $r=new $h,Ir=[],Jo=new Map,d_=(()=>{let e=0;return()=>e++})();function Ih(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,l=e.set!=null?e.set:void 0,i=new Set,u=X2(o??{equality:"reference",eviction:"keep-all"},n),s=a_(e.retainedBy_UNSTABLE),a=new Map;let d=0;function f(){return!ie("recoil_memory_managament_2020")||d>0}function m(y){return y.getState().knownSelectors.add(n),d++,()=>{d--}}function w(){return i_(n)!==void 0&&!f()}function S(y,A,x,G,z){Ie(A,G,z),R(y,x)}function R(y,A){$e(y,A)&&oe(y),h(A,!0)}function F(y,A){$e(y,A)&&(ve(U(y)).stateVersions.clear(),h(A,!1))}function h(y,A){const x=Jo.get(y);if(x!=null){for(const G of x)nf(G,ve(t));A&&Jo.delete(y)}}function c(y,A){let x=Jo.get(A);x==null&&Jo.set(A,x=new Set),x.add(y)}function p(y,A,x,G,z,Y){return A.then(J=>{if(!f())throw oe(y),$r;const W=ou(J);return S(y,x,z,W,G),J}).catch(J=>{if(!f())throw oe(y),$r;if(ae(J))return _(y,J,x,G,z,Y);const W=Xo(J);throw S(y,x,z,W,G),J})}function _(y,A,x,G,z,Y){return A.then(J=>{if(!f())throw oe(y),$r;Y.loadingDepKey!=null&&Y.loadingDepPromise===A?x.atomValues.set(Y.loadingDepKey,ou(J)):y.getState().knownSelectors.forEach(le=>{x.atomValues.delete(le)});const W=C(y,x);if(W&&W.state!=="loading"){if(($e(y,z)||U(y)==null)&&R(y,z),W.state==="hasValue")return W.contents;throw W.contents}if(!$e(y,z)){const le=te(y,x);if(le!=null)return le.loadingLoadable.contents}const[de,ke]=L(y,x,z);if(de.state!=="loading"&&S(y,x,z,de,ke),de.state==="hasError")throw de.contents;return de.contents}).catch(J=>{if(J instanceof $h)throw $r;if(!f())throw oe(y),$r;const W=Xo(J);throw S(y,x,z,W,G),J})}function E(y,A,x,G){var z,Y,J,W;if($e(y,G)||A.version===((z=y.getState())===null||z===void 0||(Y=z.currentTree)===null||Y===void 0?void 0:Y.version)||A.version===((J=y.getState())===null||J===void 0||(W=J.nextTree)===null||W===void 0?void 0:W.version)){var de,ke,le;o_(n,x,y,(de=(ke=y.getState())===null||ke===void 0||(le=ke.nextTree)===null||le===void 0?void 0:le.version)!==null&&de!==void 0?de:y.getState().currentTree.version)}for(const ye of x)i.add(ye)}function L(y,A,x){const G=f_(n);let z=!0,Y=!0;const J=()=>{G(),Y=!1};let W,de=!1,ke;const le={loadingDepKey:null,loadingDepPromise:null},ye=new Map;function ht({key:it}){const qe=qo(y,A,it);switch(ye.set(it,qe),z||(E(y,A,new Set(ye.keys()),x),F(y,x)),qe.state){case"hasValue":return qe.contents;case"hasError":throw qe.contents;case"loading":throw le.loadingDepKey=it,le.loadingDepPromise=qe.contents,qe.contents}throw X("Invalid Loadable state")}const mn=it=>(...qe)=>{if(Y)throw X("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 t==null&&Fr(!1),c_(y,it,qe,{node:t})};try{W=r({get:ht,getCallback:mn}),W=s_(W)?ht(W):W,e_(W)&&(W.state==="hasError"&&(de=!0),W=W.contents),ae(W)?W=p(y,W,A,ye,x,le).finally(J):J(),W=W instanceof Ph?W.value:W}catch(it){W=it,ae(W)?W=_(y,W,A,ye,x,le).finally(J):(de=!0,J())}return de?ke=Xo(W):ae(W)?ke=t_(W):ke=ou(W),z=!1,lt(y,x,ye),E(y,A,new Set(ye.keys()),x),[ke,ye]}function C(y,A){let x=A.atomValues.get(n);if(x!=null)return x;const G=new Set;try{x=u.get(Y=>(typeof Y!="string"&&Fr(!1),qo(y,A,Y).contents),{onNodeVisit:Y=>{Y.type==="branch"&&Y.nodeKey!==n&&G.add(Y.nodeKey)}})}catch(Y){throw X(`Problem with cache lookup for selector "${n}": ${Y.message}`)}if(x){var z;A.atomValues.set(n,x),E(y,A,G,(z=U(y))===null||z===void 0?void 0:z.executionID)}return x}function V(y,A){const x=C(y,A);if(x!=null)return oe(y),x;const G=te(y,A);if(G!=null){var z;return((z=G.loadingLoadable)===null||z===void 0?void 0:z.state)==="loading"&&c(y,G.executionID),G.loadingLoadable}const Y=d_(),[J,W]=L(y,A,Y);return J.state==="loading"?(fe(y,Y,J,W,A),c(y,Y)):(oe(y),Ie(A,J,W)),J}function te(y,A){const x=nh([a.has(y)?[ve(a.get(y))]:[],si(ca(a,([z])=>z!==y),([,z])=>z)]);function G(z){for(const[Y,J]of z)if(!qo(y,A,Y).is(J))return!0;return!1}for(const z of x){if(z.stateVersions.get(A.version)||!G(z.depValuesDiscoveredSoFarDuringAsyncWork))return z.stateVersions.set(A.version,!0),z;z.stateVersions.set(A.version,!1)}}function U(y){return a.get(y)}function fe(y,A,x,G,z){a.set(y,{depValuesDiscoveredSoFarDuringAsyncWork:G,executionID:A,loadingLoadable:x,stateVersions:new Map([[z.version,!0]])})}function lt(y,A,x){if($e(y,A)){const G=U(y);G!=null&&(G.depValuesDiscoveredSoFarDuringAsyncWork=x)}}function oe(y){a.delete(y)}function $e(y,A){var x;return A===((x=U(y))===null||x===void 0?void 0:x.executionID)}function Mt(y){return Array.from(y.entries()).map(([A,x])=>[A,x.contents])}function Ie(y,A,x){y.atomValues.set(n,A);try{u.set(Mt(x),A)}catch(G){throw X(`Problem with setting cache for selector "${n}": ${G.message}`)}}function Xe(y){if(Ir.includes(n)){const A=`Recoil selector has circular dependencies: ${Ir.slice(Ir.indexOf(n)).join(" → ")}`;return Xo(X(A))}Ir.push(n);try{return y()}finally{Ir.pop()}}function $(y,A){const x=A.atomValues.get(n);return x??u.get(G=>{var z;return typeof G!="string"&&Fr(!1),(z=n_(y,A,G))===null||z===void 0?void 0:z.contents})}function H(y,A){return Xe(()=>V(y,A))}function I(y){y.atomValues.delete(n)}function j(y,A){t==null&&Fr(!1);for(const G of i){var x;const z=u_(G);(x=z.clearCache)===null||x===void 0||x.call(z,y,A)}i.clear(),I(A),u.clear(),nf(y,t)}return l!=null?t=tf({key:n,nodeType:"selector",peek:$,get:H,set:(A,x,G)=>{let z=!1;const Y=new Map;function J({key:le}){if(z)throw X("Recoil: Async selector sets are not currently supported.");const ye=qo(A,x,le);if(ye.state==="hasValue")return ye.contents;if(ye.state==="loading"){const ht=`Getting value of asynchronous atom or selector "${le}" in a pending state while setting selector "${n}" is not yet supported.`;throw X(ht)}else throw ye.contents}function W(le,ye){if(z)throw X("Recoil: Async selector sets are not currently supported.");const ht=typeof ye=="function"?ye(J(le)):ye;r_(A,x,le.key,ht).forEach((it,qe)=>Y.set(qe,it))}function de(le){W(le,l_)}const ke=l({set:W,get:J,reset:de},G);if(ke!==void 0)throw ae(ke)?X("Recoil: Async selector sets are not currently supported."):X("Recoil: selector set should be a void function.");return z=!0,Y},init:m,invalidate:I,clearCache:j,shouldDeleteConfigOnRelease:w,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s}):t=tf({key:n,nodeType:"selector",peek:$,get:H,init:m,invalidate:I,clearCache:j,shouldDeleteConfigOnRelease:w,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}Ih.value=e=>new Ph(e);var vr=Ih;const{isLoadable:p_,loadableWithError:lu,loadableWithPromise:iu,loadableWithValue:On}=Eo,{WrappedValue:Vh}=Ah,{peekNodeInfo:h_}=hn,{DEFAULT_VALUE:Sn,DefaultValue:Kt,getConfigDeletionHandler:zh,registerNode:v_,setConfigDeletionHandler:m_}=Ye,{isRecoilValue:y_}=dr,{getRecoilValueAsLoadable:g_,markRecoilValueModified:S_,setRecoilValue:rf,setRecoilValueLoadable:__}=At,{retainedByOptionWithDefault:w_}=Vn,Vr=e=>e instanceof Vh?e.value:e;function R_(e){const{key:t,persistence_UNSTABLE:n}=e,r=w_(e.retainedBy_UNSTABLE);let o=0;function l(c){return iu(c.then(p=>(i=On(p),p)).catch(p=>{throw i=lu(p),p}))}let i=ae(e.default)?l(e.default):p_(e.default)?e.default.state==="loading"?l(e.default.contents):e.default:On(Vr(e.default));i.contents;let u;const s=new Map;function a(c){return c}function d(c,p){const _=p.then(E=>{var L,C;return((C=((L=c.getState().nextTree)!==null&&L!==void 0?L:c.getState().currentTree).atomValues.get(t))===null||C===void 0?void 0:C.contents)===_&&rf(c,h,E),E}).catch(E=>{var L,C;throw((C=((L=c.getState().nextTree)!==null&&L!==void 0?L:c.getState().currentTree).atomValues.get(t))===null||C===void 0?void 0:C.contents)===_&&__(c,h,lu(E)),E});return _}function f(c,p,_){var E;o++;const L=()=>{var U;o--,(U=s.get(c))===null||U===void 0||U.forEach(fe=>fe()),s.delete(c)};if(c.getState().knownAtoms.add(t),i.state==="loading"){const U=()=>{var fe;((fe=c.getState().nextTree)!==null&&fe!==void 0?fe:c.getState().currentTree).atomValues.has(t)||S_(c,h)};i.contents.finally(U)}const C=(E=e.effects)!==null&&E!==void 0?E:e.effects_UNSTABLE;if(C!=null){let U=function(I){if($e&&I.key===t){const j=oe;return j instanceof Kt?m(c,p):ae(j)?iu(j.then(y=>y instanceof Kt?i.toPromise():y)):On(j)}return g_(c,I)},fe=function(I){return U(I).toPromise()},lt=function(I){var j;const y=h_(c,(j=c.getState().nextTree)!==null&&j!==void 0?j:c.getState().currentTree,I.key);return $e&&I.key===t&&!(oe instanceof Kt)?{...y,isSet:!0,loadable:U(I)}:y},oe=Sn,$e=!0,Mt=!1,Ie=null;const Xe=I=>j=>{if($e){const y=U(h),A=y.state==="hasValue"?y.contents:Sn;oe=typeof j=="function"?j(A):j,ae(oe)&&(oe=oe.then(x=>(Ie={effect:I,value:x},x)))}else{if(ae(j))throw X("Setting atoms to async values is not implemented.");typeof j!="function"&&(Ie={effect:I,value:Vr(j)}),rf(c,h,typeof j=="function"?y=>{const A=Vr(j(y));return Ie={effect:I,value:A},A}:Vr(j))}},$=I=>()=>Xe(I)(Sn),H=I=>j=>{var y;const{release:A}=c.subscribeToTransactions(x=>{var G;let{currentTree:z,previousTree:Y}=x.getState();Y||(Y=z);const J=(G=z.atomValues.get(t))!==null&&G!==void 0?G:i;if(J.state==="hasValue"){var W,de,ke,le;const ye=J.contents,ht=(W=Y.atomValues.get(t))!==null&&W!==void 0?W:i,mn=ht.state==="hasValue"?ht.contents:Sn;((de=Ie)===null||de===void 0?void 0:de.effect)!==I||((ke=Ie)===null||ke===void 0?void 0:ke.value)!==ye?j(ye,mn,!z.atomValues.has(t)):((le=Ie)===null||le===void 0?void 0:le.effect)===I&&(Ie=null)}},t);s.set(c,[...(y=s.get(c))!==null&&y!==void 0?y:[],A])};for(const I of C)try{const j=I({node:h,storeID:c.storeID,parentStoreID_UNSTABLE:c.parentStoreID,trigger:_,setSelf:Xe(I),resetSelf:$(I),onSet:H(I),getPromise:fe,getLoadable:U,getInfo_UNSTABLE:lt});if(j!=null){var V;s.set(c,[...(V=s.get(c))!==null&&V!==void 0?V:[],j])}}catch(j){oe=j,Mt=!0}if($e=!1,!(oe instanceof Kt)){var te;const I=Mt?lu(oe):ae(oe)?iu(d(c,oe)):On(Vr(oe));I.contents,p.atomValues.set(t,I),(te=c.getState().nextTree)===null||te===void 0||te.atomValues.set(t,I)}}return L}function m(c,p){var _,E;return(_=(E=p.atomValues.get(t))!==null&&E!==void 0?E:u)!==null&&_!==void 0?_:i}function w(c,p){if(p.atomValues.has(t))return ve(p.atomValues.get(t));if(p.nonvalidatedAtoms.has(t)){if(u!=null)return u;if(n==null)return i;const _=p.nonvalidatedAtoms.get(t),E=n.validator(_,Sn);return u=E instanceof Kt?i:On(E),u}else return i}function S(){u=void 0}function R(c,p,_){if(p.atomValues.has(t)){const E=ve(p.atomValues.get(t));if(E.state==="hasValue"&&_===E.contents)return new Map}else if(!p.nonvalidatedAtoms.has(t)&&_ instanceof Kt)return new Map;return u=void 0,new Map().set(t,On(_))}function F(){return zh(t)!==void 0&&o<=0}const h=v_({key:t,nodeType:"atom",peek:m,get:w,set:R,init:f,invalidate:S,shouldDeleteConfigOnRelease:F,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return h}function _a(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return y_(n)?E_({...t,default:n}):R_({...t,default:n})}function E_(e){const t=_a({...e,default:Sn,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Kt?r:ve(e.persistence_UNSTABLE).validator(r,Sn)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=vr({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof Kt?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return m_(n.key,zh(e.key)),n}_a.value=e=>new Vh(e);var Dh=_a;class k_{constructor(t){var n;Z(this,"_map",void 0),Z(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var T_={MapCache:k_},C_=T_.MapCache,N_=Object.freeze({__proto__:null,MapCache:C_});const{LRUCache:of}=Mh,{MapCache:L_}=N_,el={equality:"reference",eviction:"none",maxSize:1/0};function A_({equality:e=el.equality,eviction:t=el.eviction,maxSize:n=el.maxSize}=el){const r=x_(e);return M_(t,n,r)}function x_(e){switch(e){case"reference":return t=>t;case"value":return t=>wi(t)}throw X(`Unrecognized equality policy ${e}`)}function M_(e,t,n){switch(e){case"keep-all":return new L_({mapKey:n});case"lru":return new of({mapKey:n,maxSize:ve(t)});case"most-recent":return new of({mapKey:n,maxSize:1})}throw X(`Unrecognized eviction policy ${e}`)}var Oh=A_;const{setConfigDeletionHandler:P_}=Ye;function $_(e){var t,n;const r=Oh({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var l,i;const u=r.get(o);if(u!=null)return u;const{cachePolicyForParams_UNSTABLE:s,...a}=e,d="default"in e?e.default:new Promise(()=>{}),f=Dh({...a,key:`${e.key}__${(l=wi(o))!==null&&l!==void 0?l:"void"}`,default:typeof d=="function"?d(o):d,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(o):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):(i=e.effects)!==null&&i!==void 0?i:e.effects_UNSTABLE});return r.set(o,f),P_(f.key,()=>{r.delete(o)}),f}}var I_=$_;const{setConfigDeletionHandler:V_}=Ye;let z_=0;function D_(e){var t,n;const r=Oh({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var l;let i;try{i=r.get(o)}catch(m){throw X(`Problem with cache lookup for selector ${e.key}: ${m.message}`)}if(i!=null)return i;const u=`${e.key}__selectorFamily/${(l=wi(o,{allowFunctions:!0}))!==null&&l!==void 0?l:"void"}/${z_++}`,s=m=>e.get(o)(m),a=e.cachePolicy_UNSTABLE,d=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const m=e.set;f=vr({key:u,get:s,set:(S,R)=>m(o)(S,R),cachePolicy_UNSTABLE:a,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:d})}else f=vr({key:u,get:s,cachePolicy_UNSTABLE:a,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:d});return r.set(o,f),V_(f.key,()=>{r.delete(o)}),f}}var vn=D_;const O_=vn({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function U_(e){return O_(e)}var F_=U_;const B_=vn({key:"__error",get:e=>()=>{throw X(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function j_(e){return B_(e)}var W_=j_;function H_(e){return e}var b_=H_;const{loadableWithError:Uh,loadableWithPromise:Fh,loadableWithValue:Bh}=Eo;function Ri(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,l]of t.entries())try{n[o]=e(l)}catch(i){r[o]=i}return[n,r]}function K_(e){return e!=null&&!ae(e)}function Ei(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((n,r,o)=>({...n,[r]:t[o]}),{})}function rr(e,t,n){const r=n.map((o,l)=>o==null?Bh(t[l]):ae(o)?Fh(o):Uh(o));return as(e,r)}function G_(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const Q_=vn({key:"__waitForNone",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);return rr(e,r,o)},dangerouslyAllowMutability:!0}),Z_=vn({key:"__waitForAny",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);return o.some(l=>!ae(l))?rr(e,r,o):new Promise(l=>{for(const[i,u]of o.entries())ae(u)&&u.then(s=>{r[i]=s,o[i]=void 0,l(rr(e,r,o))}).catch(s=>{o[i]=s,l(rr(e,r,o))})})},dangerouslyAllowMutability:!0}),Y_=vn({key:"__waitForAll",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);if(o.every(i=>i==null))return as(e,r);const l=o.find(K_);if(l!=null)throw l;return Promise.all(o).then(i=>as(e,G_(r,i)))},dangerouslyAllowMutability:!0}),X_=vn({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Ei(e),[r,o]=Ri(t,n);return o.every(l=>!ae(l))?rr(e,r,o):Promise.all(o.map((l,i)=>ae(l)?l.then(u=>{r[i]=u,o[i]=void 0}).catch(u=>{r[i]=void 0,o[i]=u}):null)).then(()=>rr(e,r,o))},dangerouslyAllowMutability:!0}),q_=vn({key:"__noWait",get:e=>({get:t})=>{try{return vr.value(Bh(t(e)))}catch(n){return vr.value(ae(n)?Fh(n):Uh(n))}},dangerouslyAllowMutability:!0});var J_={waitForNone:Q_,waitForAny:Z_,waitForAll:Y_,waitForAllSettled:X_,noWait:q_};const{RecoilLoadable:ew}=Eo,{DefaultValue:tw}=Ye,{RecoilRoot:nw,useRecoilStoreID:rw}=jt,{isRecoilValue:ow}=dr,{retentionZone:lw}=ci,{freshSnapshot:iw}=mi,{useRecoilState:uw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:sw,useRecoilStateLoadable:aw,useRecoilValue:cw,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:fw,useRecoilValueLoadable:dw,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:pw,useResetRecoilState:hw,useSetRecoilState:vw}=TS,{useGotoRecoilSnapshot:mw,useRecoilSnapshot:yw,useRecoilTransactionObserver:gw}=kh,{useRecoilCallback:Sw}=Lh,{noWait:_w,waitForAll:ww,waitForAllSettled:Rw,waitForAny:Ew,waitForNone:kw}=J_;var Ao={DefaultValue:tw,isRecoilValue:ow,RecoilLoadable:ew,RecoilEnv:Sr,RecoilRoot:nw,useRecoilStoreID:rw,useRecoilBridgeAcrossReactRoots_UNSTABLE:qS,atom:Dh,selector:vr,atomFamily:I_,selectorFamily:vn,constSelector:F_,errorSelector:W_,readOnlySelector:b_,noWait:_w,waitForNone:kw,waitForAny:Ew,waitForAll:ww,waitForAllSettled:Rw,useRecoilValue:cw,useRecoilValueLoadable:dw,useRecoilState:uw,useRecoilStateLoadable:aw,useSetRecoilState:vw,useResetRecoilState:hw,useGetRecoilValueInfo_UNSTABLE:KS,useRecoilRefresher_UNSTABLE:N2,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:pw,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:fw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:sw,useRecoilCallback:Sw,useRecoilTransaction_UNSTABLE:P2,useGotoRecoilSnapshot:mw,useRecoilSnapshot:yw,useRecoilTransactionObserver_UNSTABLE:gw,snapshot_UNSTABLE:iw,useRetain:va,retentionZone:lw},Tw=Ao.RecoilRoot,xo=Ao.atom,Cw=Ao.selector,Nw=Ao.useRecoilValue,Mo=Ao.useRecoilState;function jh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Vw=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,l=n.meta,i=n.mod,u=n.shift,s=n.ctrl,a=n.keys,d=t.key,f=t.code,m=t.ctrlKey,w=t.metaKey,S=t.shiftKey,R=t.altKey,F=Xt(f),h=d.toLowerCase();if(!(a!=null&&a.includes(F))&&!(a!=null&&a.includes(h))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(F))return!1;if(!r){if(o===!R&&h!=="alt"||u===!S&&h!=="shift")return!1;if(i){if(!w&&!m)return!1}else if(l===!w&&h!=="meta"&&h!=="os"||s===!m&&h!=="ctrl"&&h!=="control")return!1}return a&&a.length===1&&(a.includes(h)||a.includes(F))?!0:a?xw(a):!a},zw=N.createContext(void 0),Dw=function(){return N.useContext(zw)};function Gh(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&Gh(e[r],t[r])},!0):e===t}var Ow=N.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Uw=function(){return N.useContext(Ow)};function Fw(e){var t=N.useRef(void 0);return Gh(t.current,e)||(t.current=e),t.current}var lf=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Bw=typeof window<"u"?N.useLayoutEffect:N.useEffect;function cn(e,t,n,r){var o=N.useRef(null),l=N.useRef(!1),i=n instanceof Array?r instanceof Array?void 0:r:n,u=Ra(e)?e.join(i==null?void 0:i.splitKey):e,s=n instanceof Array?n:r instanceof Array?r:void 0,a=N.useCallback(t,s??[]),d=N.useRef(a);s?d.current=a:d.current=t;var f=Fw(i),m=Uw(),w=m.enabledScopes,S=Dw();return Bw(function(){if(!((f==null?void 0:f.enabled)===!1||!Iw(w,f==null?void 0:f.scopes))){var R=function(_,E){var L;if(E===void 0&&(E=!1),!($w(_)&&!Kh(_,f==null?void 0:f.enableOnFormTags))){if(o.current!==null){var C=o.current.getRootNode();if((C instanceof Document||C instanceof ShadowRoot)&&C.activeElement!==o.current&&!o.current.contains(C.activeElement)){lf(_);return}}(L=_.target)!=null&&L.isContentEditable&&!(f!=null&&f.enableOnContentEditable)||uu(u,f==null?void 0:f.splitKey).forEach(function(V){var te,U=su(V,f==null?void 0:f.combinationKey);if(Vw(_,U,f==null?void 0:f.ignoreModifiers)||(te=U.keys)!=null&&te.includes("*")){if(f!=null&&f.ignoreEventWhen!=null&&f.ignoreEventWhen(_)||E&&l.current)return;if(Mw(_,U,f==null?void 0:f.preventDefault),!Pw(_,U,f==null?void 0:f.enabled)){lf(_);return}d.current(_,U),E||(l.current=!0)}})}},F=function(_){_.key!==void 0&&(Hh(Xt(_.code)),((f==null?void 0:f.keydown)===void 0&&(f==null?void 0:f.keyup)!==!0||f!=null&&f.keydown)&&R(_))},h=function(_){_.key!==void 0&&(bh(Xt(_.code)),l.current=!1,f!=null&&f.keyup&&R(_,!0))},c=o.current||(i==null?void 0:i.document)||document;return c.addEventListener("keyup",h),c.addEventListener("keydown",F),S&&uu(u,f==null?void 0:f.splitKey).forEach(function(p){return S.addHotkey(su(p,f==null?void 0:f.combinationKey,f==null?void 0:f.description))}),function(){c.removeEventListener("keyup",h),c.removeEventListener("keydown",F),S&&uu(u,f==null?void 0:f.splitKey).forEach(function(p){return S.removeHotkey(su(p,f==null?void 0:f.combinationKey,f==null?void 0:f.description))})}}},[u,f,w]),o}const jw=xo({key:"open",default:!1}),Ww=()=>Mo(jw),Hw=xo({key:"context",default:"ACTIONS"}),Ea=()=>Mo(Hw),Qh=xo({key:"query",default:""}),Zh=()=>Mo(Qh),Yh=xo({key:"unfilteredActionsState",default:[]}),bw=Cw({key:"actionsState",get:({get:e})=>{const t=e(Qh);return e(Yh).filter(r=>r.name.toLowerCase().includes(t.toLowerCase())||r.subtitle.toLowerCase().includes(t.toLowerCase()))}});function Kw(){const[e,t]=Mo(Yh),n=Nw(bw);async function r(){const l=await(await fetch("/actions/palette/actions")).json();t(l)}return{getActions:r,actions:n}}const Gw=xo({key:"focus",default:0});function ka(e){const[t,n]=Mo(Gw);N.useEffect(()=>{n(0)},[e]);async function r(o,l){l.length!==0&&(o==="up"&&t===0||o==="down"&&t===l.length-1||(o==="up"&&n(i=>i-1),o==="down"&&n(i=>i+1)))}return{setFocus:n,moveFocus:r,focus:t}}function Qw({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"}))}const Zw=N.forwardRef(Qw),Yw=Zw;function Xw({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"}))}const qw=N.forwardRef(Xw),Jw=qw;function eR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"}))}const tR=N.forwardRef(eR),nR=tR;function rR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const oR=N.forwardRef(rR),lR=oR;function iR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))}const uR=N.forwardRef(iR),sR=uR;function aR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const cR=N.forwardRef(aR),fR=cR;function dR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 9.75 16.5 12l-2.25 2.25m-4.5 0L7.5 12l2.25-2.25M6 20.25h12A2.25 2.25 0 0 0 20.25 18V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25Z"}))}const pR=N.forwardRef(dR),hR=pR;function vR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z"}),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const mR=N.forwardRef(vR),yR=mR;function gR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const SR=N.forwardRef(gR),uf=SR;function _R({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const wR=N.forwardRef(_R),RR=wR;function ER({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const kR=N.forwardRef(ER),TR=kR;function CR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"}))}const NR=N.forwardRef(CR),LR=NR;function AR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const xR=N.forwardRef(AR),MR=xR;function PR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const $R=N.forwardRef(PR),IR=$R;function VR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"}))}const zR=N.forwardRef(VR),DR=zR;function OR({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const UR=N.forwardRef(OR),FR=UR;function BR({name:e,...t}){return e==="document"?B.jsx(uf,{...t}):e==="table"?B.jsx(DR,{...t}):e==="section"?B.jsx(IR,{...t}):e==="code"?B.jsx(hR,{...t}):e==="bolt"?B.jsx(sR,{...t}):e==="settings"?B.jsx(yR,{...t}):e==="search"?B.jsx(TR,{...t}):e==="globe"?B.jsx(RR,{...t}):e==="edit"?B.jsx(MR,{...t}):e==="menu"?B.jsx(lR,{...t}):e==="attachment"?B.jsx(LR,{...t}):e==="database"?B.jsx(fR,{...t}):e==="utility"?B.jsx(Yw,{...t}):e==="user"?B.jsx(FR,{...t}):e==="logout"?B.jsx(Jw,{...t}):B.jsx(uf,{...t})}function Xh({url:e,title:t,subtitle:n,icon:r,type:o,focused:l}){const i=N.useRef(null),[u,s]=Ea(),{focus:a,setFocus:d}=ka();return cn("enter",()=>{l&&(o==="link"?window.location=e:s(e))},{enableOnFormTags:!0}),cn("meta+enter",()=>{l&&(o==="link"?window.open(e,"_blank"):s(e))},{enableOnFormTags:!0}),N.useEffect(()=>{l&&i.current.scrollIntoView({block:"center"})},[a]),B.jsx("a",{className:wa("p-flex p-items-center p-gap-2","p-font-sans p-text-sm p-text-zinc-700 dark:p-text-zinc-300 p-no-underline","p-px-3 p-py-2.5 p-mx-2 p-rounded-lg",l&&"p-bg-zinc-200/75 dark:p-bg-zinc-700/50","hover:p-bg-zinc-200/75 dark:hover:p-bg-zinc-700/50"),onMouseEnter:()=>d(null),href:o==="link"?e:null,onClick:()=>o==="context"?s(e):null,ref:i,children:B.jsx("div",{className:"p-flex p-items-center p-justify-between p-gap-2 p-flex-1",children:B.jsxs("div",{className:"p-flex p-items-center p-gap-3 p-flex-1",children:[B.jsx(BR,{name:r,className:"p-size-5 p-opacity-75"}),B.jsxs("div",{className:"p-flex-1 p-flex p-justify-between p-items-center p-gap-1",children:[B.jsx("p",{className:"p-block p-leading-none p-m-0 p-font-sans p-font-medium",children:t}),n&&B.jsx("p",{className:"p-block p-leading-none p-text-xs p-m-0 p-font-sans p-opacity-75",children:n})]})]})})})}function qh({text:e="No matching results found"}){return B.jsxs("div",{className:"p-flex p-flex-col p-justify-center p-items-center p-py-6 p-text-zinc-400 dark:p-text-zinc-500",children:[B.jsx("div",{children:B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"p-size-12",children:B.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})}),B.jsx("p",{className:"p-text-lg p-mt-1",children:e})]})}function jR(){const{actions:e,getActions:t}=Kw(),{focus:n,moveFocus:r}=ka(e);return cn("up",()=>r("up",e),{enableOnFormTags:!0,preventDefault:!0}),cn("down",()=>r("down",e),{enableOnFormTags:!0,preventDefault:!0}),N.useEffect(()=>{t()},[]),B.jsxs(B.Fragment,{children:[e.length===0&&B.jsx(qh,{}),e.map((o,l)=>B.jsx(Xh,{url:o.url,title:o.name,subtitle:o.subtitle,icon:o.icon,focused:l===n,type:o.type},o.url))]})}function WR(e,t,n){N.useEffect(()=>{const r=setTimeout(()=>e(),n);return()=>clearTimeout(r)},[...t||[],n])}function HR(){const[e]=Zh(),[t,n]=N.useState([]),{focus:r,moveFocus:o}=ka(t);return WR(()=>{fetch(`/actions/palette/search?query=${e}`).then(l=>l.json()).then(l=>n(l))},[e],200),cn("up",()=>o("up",t),{enableOnFormTags:!0,preventDefault:!0}),cn("down",()=>o("down",t),{enableOnFormTags:!0,preventDefault:!0}),B.jsxs(B.Fragment,{children:[t.length===0&&B.jsx(qh,{text:"No matching entries found"}),t.map((l,i)=>B.jsx(Xh,{url:l.url,title:l.name,subtitle:l.subtitle,icon:l.icon,focused:i===r,type:l.type},l.url))]})}function bR({placeholder:e="Search"}){const[t,n]=Zh(),[r,o]=Ea();return N.useEffect(()=>{n("")},[r]),B.jsxs("div",{className:"p-flex p-px-2 p-items-center p-gap-1 p-border-b p-border-zinc-200 dark:p-border-zinc-700",children:[r!=="ACTIONS"&&B.jsx("div",{children:B.jsx("button",{className:"p-size-8 p-flex p-items-center p-justify-center p-border p-border-zinc-300 dark:p-border-zinc-700 p-rounded-lg dark:p-bg-zinc-900",onClick:()=>o("ACTIONS"),children:B.jsx(nR,{className:"p-size-4 p-text-zinc-500"})})}),B.jsx("input",{type:"text",className:wa(["p-bg-transparent","p-w-full p-px-2 p-py-3","p-outline-none p-ring-0 p-shadow-none p-border-0","p-text-base placeholder:p-text-zinc-400 placeholder:dark:p-text-zinc-500 p-text-zinc-700 dark:p-text-zinc-200"]),placeholder:e,onInput:({target:l})=>n(l.value),value:t,autoFocus:!0,spellCheck:!1})]})}function KR(){const[e,t]=Ww(),[n,r]=Ea();return cn("meta+k",()=>{t(o=>!o),r("ACTIONS")},{enableOnFormTags:!0,preventDefault:!0}),cn("esc",()=>{n==="ACTIONS"&&t(!1),r("ACTIONS")},{enableOnFormTags:!0}),B.jsx(B.Fragment,{children:e&&B.jsx("div",{className:"p-fixed p-inset-0 p-z-[9999] p-size-full p-flex p-justify-center p-antialiased",children:B.jsx("div",{className:"p-w-full p-max-w-2xl",children:B.jsxs("div",{className:wa(["p-bg-white/70 dark:p-bg-zinc-950/90","p-outline-zinc-300 dark:p-outline-zinc-900 p-outline p-outline-1","p-border p-border-white dark:p-border-zinc-500","p-rounded-lg p-translate-y-24 p-overflow-hidden p-backdrop-blur-xl p-shadow-2xl"]),children:[B.jsx(bR,{}),B.jsxs("div",{className:"dark:p-bg-zinc-950/10 p-max-h-96 p-overflow-scroll p-py-2",children:[n==="ACTIONS"&&B.jsx(jR,{}),n==="SEARCH_ENTRIES"&&B.jsx(HR,{})]})]})})})})}function GR(){return B.jsx(Tw,{children:B.jsx(KR,{})})}const Jh=document.createElement("div");Jh.setAttribute("data-palette","");document.body.appendChild(Jh);document.querySelectorAll("[data-palette]").forEach(e=>Rp.render(B.jsx(GR,{}),e)); })() \ No newline at end of file