@zuplo/cli 1.62.0 → 1.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/assets/index-03352ce7.js +101 -22
- package/dist/editor/assets/index-416489b7.css +1 -1
- package/dist/editor/icons/arrow_head_down.svg +7 -0
- package/dist/editor/icons/arrow_head_up.svg +7 -0
- package/dist/editor/icons/arrow_line.svg +7 -0
- package/dist/editor/server/server.js +32 -9
- package/package.json +5 -5
- package/scripts/post-build.js +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var rS=Object.defineProperty;var oS=(e,t,n)=>t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>(oS(e,typeof t!="symbol"?t+"":t,n),n),Nc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Z=(e,t,n)=>(Nc(e,t,"read from private field"),n?n.call(e):t.get(e)),bt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ge=(e,t,n,r)=>(Nc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var yo=(e,t,n)=>(Nc(e,t,"access private method"),n);function iS(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cy={exports:{}},au={},Ty={exports:{}},ye={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var vg=Object.defineProperty;var gg=(e,t,n)=>t in e?vg(e,t,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ba=Symbol.for("react.element"),aS=Symbol.for("react.portal"),lS=Symbol.for("react.fragment"),sS=Symbol.for("react.strict_mode"),uS=Symbol.for("react.profiler"),cS=Symbol.for("react.provider"),dS=Symbol.for("react.context"),pS=Symbol.for("react.forward_ref"),fS=Symbol.for("react.suspense"),mS=Symbol.for("react.memo"),gS=Symbol.for("react.lazy"),bg=Symbol.iterator;function hS(e){return e===null||typeof e!="object"?null:(e=bg&&e[bg]||e["@@iterator"],typeof e=="function"?e:null)}var Ey={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jy=Object.assign,Py={};function li(e,t,n){this.props=e,this.context=t,this.refs=Py,this.updater=n||Ey}li.prototype.isReactComponent={};li.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};li.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ly(){}Ly.prototype=li.prototype;function nf(e,t,n){this.props=e,this.context=t,this.refs=Py,this.updater=n||Ey}var rf=nf.prototype=new Ly;rf.constructor=nf;jy(rf,li.prototype);rf.isPureReactComponent=!0;var xg=Array.isArray,Ry=Object.prototype.hasOwnProperty,of={current:null},Oy={key:!0,ref:!0,__self:!0,__source:!0};function ky(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Ry.call(t,r)&&!Oy.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Ba,type:e,key:i,ref:a,props:o,_owner:of.current}}function vS(e,t){return{$$typeof:Ba,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function af(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ba}function yS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Sg=/\/+/g;function Dc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yS(""+e.key):t.toString(36)}function Jl(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ba:case aS:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+Dc(a,0):r,xg(o)?(n="",e!=null&&(n=e.replace(Sg,"$&/")+"/"),Jl(o,t,n,"",function(u){return u})):o!=null&&(af(o)&&(o=vS(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Sg,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",xg(e))for(var l=0;l<e.length;l++){i=e[l];var s=r+Dc(i,l);a+=Jl(i,t,n,s,o)}else if(s=hS(e),typeof s=="function")for(e=s.call(e),l=0;!(i=e.next()).done;)i=i.value,s=r+Dc(i,l++),a+=Jl(i,t,n,s,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function yl(e,t,n){if(e==null)return e;var r=[],o=0;return Jl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function IS(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var At={current:null},Xl={transition:null},MS={ReactCurrentDispatcher:At,ReactCurrentBatchConfig:Xl,ReactCurrentOwner:of};ye.Children={map:yl,forEach:function(e,t,n){yl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return yl(e,function(){t++}),t},toArray:function(e){return yl(e,function(t){return t})||[]},only:function(e){if(!af(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=li;ye.Fragment=lS;ye.Profiler=uS;ye.PureComponent=nf;ye.StrictMode=sS;ye.Suspense=fS;ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MS;ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=jy({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=of.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)Ry.call(t,s)&&!Oy.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&l!==void 0?l[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){l=Array(s);for(var u=0;u<s;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ba,type:e.type,key:o,ref:i,props:r,_owner:a}};ye.createContext=function(e){return e={$$typeof:dS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:cS,_context:e},e.Consumer=e};ye.createElement=ky;ye.createFactory=function(e){var t=ky.bind(null,e);return t.type=e,t};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:pS,render:e}};ye.isValidElement=af;ye.lazy=function(e){return{$$typeof:gS,_payload:{_status:-1,_result:e},_init:IS}};ye.memo=function(e,t){return{$$typeof:mS,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Xl.transition;Xl.transition={};try{e()}finally{Xl.transition=t}};ye.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ye.useCallback=function(e,t){return At.current.useCallback(e,t)};ye.useContext=function(e){return At.current.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e){return At.current.useDeferredValue(e)};ye.useEffect=function(e,t){return At.current.useEffect(e,t)};ye.useId=function(){return At.current.useId()};ye.useImperativeHandle=function(e,t,n){return At.current.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return At.current.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return At.current.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return At.current.useMemo(e,t)};ye.useReducer=function(e,t,n){return At.current.useReducer(e,t,n)};ye.useRef=function(e){return At.current.useRef(e)};ye.useState=function(e){return At.current.useState(e)};ye.useSyncExternalStore=function(e,t,n){return At.current.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return At.current.useTransition()};ye.version="18.2.0";Ty.exports=ye;var v=Ty.exports;const O=Ua(v),Wo=iS({__proto__:null,default:O},[v]);/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var vg=Object.defineProperty;var gg=(e,t,n)=>t in e?vg(e,t,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var wS=v,bS=Symbol.for("react.element"),xS=Symbol.for("react.fragment"),SS=Object.prototype.hasOwnProperty,NS=wS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,DS={key:!0,ref:!0,__self:!0,__source:!0};function zy(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)SS.call(t,r)&&!DS.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:bS,type:e,key:i,ref:a,props:o,_owner:NS.current}}au.Fragment=xS;au.jsx=zy;au.jsxs=zy;Cy.exports=au;var m=Cy.exports,Od={},Uy={exports:{}},Qt={},By={exports:{}},_y={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var vg=Object.defineProperty;var gg=(e,t,n)=>t in e?vg(e,t,{enumerable:!0,config
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(
|
|
25
|
+
*/(function(e){function t(P,z){var _=P.length;P.push(z);e:for(;0<_;){var G=_-1>>>1,S=P[G];if(0<o(S,z))P[G]=z,P[_]=S,_=G;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var z=P[0],_=P.pop();if(_!==z){P[0]=_;e:for(var G=0,S=P.length,C=S>>>1;G<C;){var T=2*(G+1)-1,k=P[T],B=T+1,oe=P[B];if(0>o(k,_))B<S&&0>o(oe,k)?(P[G]=oe,P[B]=_,G=B):(P[G]=k,P[T]=_,G=T);else if(B<S&&0>o(oe,_))P[G]=oe,P[B]=_,G=B;else break e}}return z}function o(P,z){var _=P.sortIndex-z.sortIndex;return _!==0?_:P.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,d=null,p=3,f=!1,g=!1,I=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(P){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=P)r(u),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(u)}}function b(P){if(I=!1,M(P),!g)if(n(s)!==null)g=!0,F(N);else{var z=n(u);z!==null&&ne(b,z.startTime-P)}}function N(P,z){g=!1,I&&(I=!1,y(j),j=-1),f=!0;var _=p;try{for(M(z),d=n(s);d!==null&&(!(d.expirationTime>z)||P&&!U());){var G=d.callback;if(typeof G=="function"){d.callback=null,p=d.priorityLevel;var S=G(d.expirationTime<=z);z=e.unstable_now(),typeof S=="function"?d.callback=S:d===n(s)&&r(s),M(z)}else r(s);d=n(s)}if(d!==null)var C=!0;else{var T=n(u);T!==null&&ne(b,T.startTime-z),C=!1}return C}finally{d=null,p=_,f=!1}}var x=!1,D=null,j=-1,L=5,R=-1;function U(){return!(e.unstable_now()-R<L)}function ee(){if(D!==null){var P=e.unstable_now();R=P;var z=!0;try{z=D(!0,P)}finally{z?W():(x=!1,D=null)}}else x=!1}var W;if(typeof h=="function")W=function(){h(ee)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,Y=q.port2;q.port1.onmessage=ee,W=function(){Y.postMessage(null)}}else W=function(){w(ee,0)};function F(P){D=P,x||(x=!0,W())}function ne(P,z){j=w(function(){P(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){g||f||(g=!0,F(N))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var _=p;p=z;try{return P()}finally{p=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var _=p;p=P;try{return z()}finally{p=_}},e.unstable_scheduleCallback=function(P,z,_){var G=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?G+_:G):_=G,P){case 1:var S=-1;break;case 2:S=250;break;case 5:S=1073741823;break;case 4:S=1e4;break;default:S=5e3}return S=_+S,P={id:c++,callback:z,priorityLevel:P,startTime:_,expirationTime:S,sortIndex:-1},_>G?(P.sortIndex=_,t(u,P),n(s)===null&&P===n(u)&&(I?(y(j),j=-1):I=!0,ne(b,_-G))):(P.sortIndex=S,t(s,P),g||f||(g=!0,F(N))),P},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(P){var z=p;return function(){var _=p;p=z;try{return P.apply(this,arguments)}finally{p=_}}}})(_y);By.exports=_y;var AS=By.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,29 +30,31 @@ var vg=Object.defineProperty;var gg=(e,t,n)=>t in e?vg(e,t,{enumerable:!0,config
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
34
|
-
`+
|
|
35
|
-
`),
|
|
36
|
-
`),
|
|
37
|
-
`+o[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=i&&0<=a);break}}}finally{za=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xo(e):""}function Hg(e){switch(e.tag){case 5:return xo(e.type);case 16:return xo("Lazy");case 13:return xo("Suspense");case 19:return xo("SuspenseList");case 0:case 2:case 15:return e=Ba(e.type,!1),e;case 11:return e=Ba(e.type.render,!1),e;case 1:return e=Ba(e.type,!0),e;default:return""}}function Is(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yr:return"Fragment";case gr:return"Portal";case As:return"Profiler";case Xu:return"StrictMode";case Os:return"Suspense";case $s:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qp:return(e.displayName||"Context")+".Consumer";case Zp:return(e._context.displayName||"Context")+".Provider";case Ju:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ec:return t=e.displayName||null,t!==null?t:Is(e.type)||"Memo";case gn:t=e._payload,e=e._init;try{return Is(e(t))}catch{}}return null}function Kg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Is(t);case 8:return t===Xu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $n(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gg(e){var t=Jp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,l.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kl(e){e._valueTracker||(e._valueTracker=Gg(e))}function eh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ms(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Md(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$n(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function th(e,t){t=t.checked,t!=null&&qu(e,"checked",t,!1)}function js(e,t){th(e,t);var n=$n(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ds(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ds(e,t.type,$n(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ds(e,t,n){(t!=="number"||fi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Eo=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$n(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Fs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(Eo(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$n(n)}}function nh(e,t){var n=$n(t.value),r=$n(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Fd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Us(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ll,oh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ll=Ll||document.createElement("div"),Ll.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ll.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Co={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qg=["Webkit","ms","Moz","O"];Object.keys(Co).forEach(function(e){Qg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Co[t]=Co[e]})});function lh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Co.hasOwnProperty(e)&&Co[e]?(""+t).trim():t+"px"}function ih(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=lh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Yg=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vs(e,t){if(t){if(Yg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function zs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bs=null;function tc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ws=null,br=null,Pr=null;function Ud(e){if(e=ul(e)){if(typeof Ws!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Qi(t),Ws(e.stateNode,e.type,t))}}function ah(e){br?Pr?Pr.push(e):Pr=[e]:br=e}function sh(){if(br){var e=br,t=Pr;if(Pr=br=null,Ud(e),t)for(e=0;e<t.length;e++)Ud(t[e])}}function uh(e,t){return e(t)}function ch(){}var Wa=!1;function dh(e,t,n){if(Wa)return e(t,n);Wa=!0;try{return uh(e,t,n)}finally{Wa=!1,(br!==null||Pr!==null)&&(ch(),sh())}}function Bo(e,t){var n=e.stateNode;if(n===null)return null;var r=Qi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var Hs=!1;if(sn)try{var io={};Object.defineProperty(io,"passive",{get:function(){Hs=!0}}),window.addEventListener("test",io,io),window.removeEventListener("test",io,io)}catch{Hs=!1}function Zg(e,t,n,r,o,l,i,a,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ko=!1,pi=null,hi=!1,Ks=null,qg={onError:function(e){ko=!0,pi=e}};function Xg(e,t,n,r,o,l,i,a,s){ko=!1,pi=null,Zg.apply(qg,arguments)}function Jg(e,t,n,r,o,l,i,a,s){if(Xg.apply(this,arguments),ko){if(ko){var u=pi;ko=!1,pi=null}else throw Error(I(198));hi||(hi=!0,Ks=u)}}function dr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function fh(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Vd(e){if(dr(e)!==e)throw Error(I(188))}function ey(e){var t=e.alternate;if(!t){if(t=dr(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return Vd(o),e;if(l===r)return Vd(o),t;l=l.sibling}throw Error(I(188))}if(n.return!==r.return)n=o,r=l;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=l;break}if(a===r){i=!0,r=o,n=l;break}a=a.sibling}if(!i){for(a=l.child;a;){if(a===n){i=!0,n=l,r=o;break}if(a===r){i=!0,r=l,n=o;break}a=a.sibling}if(!i)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function ph(e){return e=ey(e),e!==null?hh(e):null}function hh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hh(e);if(t!==null)return t;e=e.sibling}return null}var mh=wt.unstable_scheduleCallback,zd=wt.unstable_cancelCallback,ty=wt.unstable_shouldYield,ny=wt.unstable_requestPaint,Me=wt.unstable_now,ry=wt.unstable_getCurrentPriorityLevel,nc=wt.unstable_ImmediatePriority,vh=wt.unstable_UserBlockingPriority,mi=wt.unstable_NormalPriority,oy=wt.unstable_LowPriority,gh=wt.unstable_IdlePriority,Wi=null,Gt=null;function ly(e){if(Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(Wi,e,void 0,(e.current.flags&128)===128)}catch{}}var Ft=Math.clz32?Math.clz32:sy,iy=Math.log,ay=Math.LN2;function sy(e){return e>>>=0,e===0?32:31-(iy(e)/ay|0)|0}var bl=64,Pl=4194304;function _o(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;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:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=_o(a):(l&=i,l!==0&&(r=_o(l)))}else i=n&~o,i!==0?r=_o(i):l!==0&&(r=_o(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ft(t),o=1<<n,r|=e[n],t&=~o;return r}function uy(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32: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:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cy(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var i=31-Ft(l),a=1<<i,s=o[i];s===-1?(!(a&n)||a&r)&&(o[i]=uy(a,t)):s<=t&&(e.expiredLanes|=a),l&=~a}}function Gs(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yh(){var e=bl;return bl<<=1,!(bl&4194240)&&(bl=64),e}function Ha(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function al(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ft(t),e[t]=n}function dy(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ft(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function rc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ft(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ve=0;function Sh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wh,oc,xh,Eh,_h,Qs=!1,Al=[],Nn=null,Cn=null,kn=null,Wo=new Map,Ho=new Map,wn=[],fy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Bd(e,t){switch(e){case"focusin":case"focusout":Nn=null;break;case"dragenter":case"dragleave":Cn=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":Wo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function ao(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=ul(t),t!==null&&oc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function py(e,t,n,r,o){switch(t){case"focusin":return Nn=ao(Nn,e,t,n,r,o),!0;case"dragenter":return Cn=ao(Cn,e,t,n,r,o),!0;case"mouseover":return kn=ao(kn,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return Wo.set(l,ao(Wo.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,Ho.set(l,ao(Ho.get(l)||null,e,t,n,r,o)),!0}return!1}function Rh(e){var t=Gn(e.target);if(t!==null){var n=dr(t);if(n!==null){if(t=n.tag,t===13){if(t=fh(n),t!==null){e.blockedOn=t,_h(e.priority,function(){xh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ei(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ys(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bs=r,n.target.dispatchEvent(r),Bs=null}else return t=ul(n),t!==null&&oc(t),e.blockedOn=n,!1;t.shift()}return!0}function Wd(e,t,n){ei(e)&&n.delete(t)}function hy(){Qs=!1,Nn!==null&&ei(Nn)&&(Nn=null),Cn!==null&&ei(Cn)&&(Cn=null),kn!==null&&ei(kn)&&(kn=null),Wo.forEach(Wd),Ho.forEach(Wd)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Qs||(Qs=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,hy)))}function Ko(e){function t(o){return so(o,e)}if(0<Al.length){so(Al[0],e);for(var n=1;n<Al.length;n++){var r=Al[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Nn!==null&&so(Nn,e),Cn!==null&&so(Cn,e),kn!==null&&so(kn,e),Wo.forEach(t),Ho.forEach(t),n=0;n<wn.length;n++)r=wn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wn.length&&(n=wn[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&wn.shift()}var Ar=pn.ReactCurrentBatchConfig,gi=!0;function my(e,t,n,r){var o=ve,l=Ar.transition;Ar.transition=null;try{ve=1,lc(e,t,n,r)}finally{ve=o,Ar.transition=l}}function vy(e,t,n,r){var o=ve,l=Ar.transition;Ar.transition=null;try{ve=4,lc(e,t,n,r)}finally{ve=o,Ar.transition=l}}function lc(e,t,n,r){if(gi){var o=Ys(e,t,n,r);if(o===null)ts(e,t,r,yi,n),Bd(e,r);else if(py(o,e,t,n,r))r.stopPropagation();else if(Bd(e,r),t&4&&-1<fy.indexOf(e)){for(;o!==null;){var l=ul(o);if(l!==null&&wh(l),l=Ys(e,t,n,r),l===null&&ts(e,t,r,yi,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else ts(e,t,r,null,n)}}var yi=null;function Ys(e,t,n,r){if(yi=null,e=tc(r),e=Gn(e),e!==null)if(t=dr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=fh(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yi=e,null}function Th(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ry()){case nc:return 1;case vh:return 4;case mi:case oy:return 16;case gh:return 536870912;default:return 16}default:return 16}}var _n=null,ic=null,ti=null;function Nh(){if(ti)return ti;var e,t=ic,n=t.length,r,o="value"in _n?_n.value:_n.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[l-r];r++);return ti=o.slice(e,1<r?1-r:void 0)}function ni(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ol(){return!0}function Hd(){return!1}function Et(e){function t(n,r,o,l,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(l):l[a]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Ol:Hd,this.isPropagationStopped=Hd,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var Zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ac=Et(Zr),sl=Pe({},Zr,{view:0,detail:0}),gy=Et(sl),Ka,Ga,uo,Hi=Pe({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==uo&&(uo&&e.type==="mousemove"?(Ka=e.screenX-uo.screenX,Ga=e.screenY-uo.screenY):Ga=Ka=0,uo=e),Ka)},movementY:function(e){return"movementY"in e?e.movementY:Ga}}),Kd=Et(Hi),yy=Pe({},Hi,{dataTransfer:0}),Sy=Et(yy),wy=Pe({},sl,{relatedTarget:0}),Qa=Et(wy),xy=Pe({},Zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ey=Et(xy),_y=Pe({},Zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ry=Et(_y),Ty=Pe({},Zr,{data:0}),Gd=Et(Ty),Ny={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cy={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ky={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ly(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ky[e])?!!t[e]:!1}function sc(){return Ly}var by=Pe({},sl,{key:function(e){if(e.key){var t=Ny[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ni(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sc,charCode:function(e){return e.type==="keypress"?ni(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ni(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Py=Et(by),Ay=Pe({},Hi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qd=Et(Ay),Oy=Pe({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sc}),$y=Et(Oy),Iy=Pe({},Zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),My=Et(Iy),jy=Pe({},Hi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dy=Et(jy),Fy=[9,13,27,32],uc=sn&&"CompositionEvent"in window,Lo=null;sn&&"documentMode"in document&&(Lo=document.documentMode);var Uy=sn&&"TextEvent"in window&&!Lo,Ch=sn&&(!uc||Lo&&8<Lo&&11>=Lo),Yd=String.fromCharCode(32),Zd=!1;function kh(e,t){switch(e){case"keyup":return Fy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sr=!1;function Vy(e,t){switch(e){case"compositionend":return Lh(t);case"keypress":return t.which!==32?null:(Zd=!0,Yd);case"textInput":return e=t.data,e===Yd&&Zd?null:e;default:return null}}function zy(e,t){if(Sr)return e==="compositionend"||!uc&&kh(e,t)?(e=Nh(),ti=ic=_n=null,Sr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ch&&t.locale!=="ko"?null:t.data;default:return null}}var By={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!By[e.type]:t==="textarea"}function bh(e,t,n,r){ah(r),t=Si(t,"onChange"),0<t.length&&(n=new ac("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bo=null,Go=null;function Wy(e){Vh(e,0)}function Ki(e){var t=Er(e);if(eh(t))return e}function Hy(e,t){if(e==="change")return t}var Ph=!1;if(sn){var Ya;if(sn){var Za="oninput"in document;if(!Za){var Xd=document.createElement("div");Xd.setAttribute("oninput","return;"),Za=typeof Xd.oninput=="function"}Ya=Za}else Ya=!1;Ph=Ya&&(!document.documentMode||9<document.documentMode)}function Jd(){bo&&(bo.detachEvent("onpropertychange",Ah),Go=bo=null)}function Ah(e){if(e.propertyName==="value"&&Ki(Go)){var t=[];bh(t,Go,e,tc(e)),dh(Wy,t)}}function Ky(e,t,n){e==="focusin"?(Jd(),bo=t,Go=n,bo.attachEvent("onpropertychange",Ah)):e==="focusout"&&Jd()}function Gy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ki(Go)}function Qy(e,t){if(e==="click")return Ki(t)}function Yy(e,t){if(e==="input"||e==="change")return Ki(t)}function Zy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:Zy;function Qo(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ps.call(t,o)||!Vt(e[o],t[o]))return!1}return!0}function ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tf(e,t){var n=ef(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ef(n)}}function Oh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Oh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $h(){for(var e=window,t=fi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fi(e.document)}return t}function cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qy(e){var t=$h(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Oh(n.ownerDocument.documentElement,n)){if(r!==null&&cc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=tf(n,l);var i=tf(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Xy=sn&&"documentMode"in document&&11>=document.documentMode,wr=null,Zs=null,Po=null,qs=!1;function nf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qs||wr==null||wr!==fi(r)||(r=wr,"selectionStart"in r&&cc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Po&&Qo(Po,r)||(Po=r,r=Si(Zs,"onSelect"),0<r.length&&(t=new ac("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}function $l(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionend:$l("Transition","TransitionEnd")},qa={},Ih={};sn&&(Ih=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);function Gi(e){if(qa[e])return qa[e];if(!xr[e])return e;var t=xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ih)return qa[e]=t[n];return e}var Mh=Gi("animationend"),jh=Gi("animationiteration"),Dh=Gi("animationstart"),Fh=Gi("transitionend"),Uh=new Map,rf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jn(e,t){Uh.set(e,t),cr(t,[e])}for(var Xa=0;Xa<rf.length;Xa++){var Ja=rf[Xa],Jy=Ja.toLowerCase(),e1=Ja[0].toUpperCase()+Ja.slice(1);jn(Jy,"on"+e1)}jn(Mh,"onAnimationEnd");jn(jh,"onAnimationIteration");jn(Dh,"onAnimationStart");jn("dblclick","onDoubleClick");jn("focusin","onFocus");jn("focusout","onBlur");jn(Fh,"onTransitionEnd");jr("onMouseEnter",["mouseout","mouseover"]);jr("onMouseLeave",["mouseout","mouseover"]);jr("onPointerEnter",["pointerout","pointerover"]);jr("onPointerLeave",["pointerout","pointerover"]);cr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cr("onBeforeInput",["compositionend","keypress","textInput","paste"]);cr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),t1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ro));function of(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jg(r,t,void 0,e),e.currentTarget=null}function Vh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],s=a.instance,u=a.currentTarget;if(a=a.listener,s!==l&&o.isPropagationStopped())break e;of(o,a,u),l=s}else for(i=0;i<r.length;i++){if(a=r[i],s=a.instance,u=a.currentTarget,a=a.listener,s!==l&&o.isPropagationStopped())break e;of(o,a,u),l=s}}}if(hi)throw e=Ks,hi=!1,Ks=null,e}function xe(e,t){var n=t[nu];n===void 0&&(n=t[nu]=new Set);var r=e+"__bubble";n.has(r)||(zh(t,e,2,!1),n.add(r))}function es(e,t,n){var r=0;t&&(r|=4),zh(n,e,r,t)}var Il="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[Il]){e[Il]=!0,Yp.forEach(function(n){n!=="selectionchange"&&(t1.has(n)||es(n,!1,e),es(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Il]||(t[Il]=!0,es("selectionchange",!1,t))}}function zh(e,t,n,r){switch(Th(t)){case 1:var o=my;break;case 4:o=vy;break;default:o=lc}n=o.bind(null,t,n,e),o=void 0,!Hs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ts(e,t,n,r,o){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var s=i.tag;if((s===3||s===4)&&(s=i.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Gn(a),i===null)return;if(s=i.tag,s===5||s===6){r=l=i;continue e}a=a.parentNode}}r=r.return}dh(function(){var u=l,c=tc(n),d=[];e:{var h=Uh.get(e);if(h!==void 0){var S=ac,y=e;switch(e){case"keypress":if(ni(n)===0)break e;case"keydown":case"keyup":S=Py;break;case"focusin":y="focus",S=Qa;break;case"focusout":y="blur",S=Qa;break;case"beforeblur":case"afterblur":S=Qa;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=Kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Sy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=$y;break;case Mh:case jh:case Dh:S=Ey;break;case Fh:S=My;break;case"scroll":S=gy;break;case"wheel":S=Dy;break;case"copy":case"cut":case"paste":S=Ry;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=Qd}var w=(t&4)!==0,x=!w&&e==="scroll",m=w?h!==null?h+"Capture":null:h;w=[];for(var f=u,g;f!==null;){g=f;var R=g.stateNode;if(g.tag===5&&R!==null&&(g=R,m!==null&&(R=Bo(f,m),R!=null&&w.push(Zo(f,R,g)))),x)break;f=f.return}0<w.length&&(h=new S(h,y,null,n,c),d.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",h&&n!==Bs&&(y=n.relatedTarget||n.fromElement)&&(Gn(y)||y[un]))break e;if((S||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,S?(y=n.relatedTarget||n.toElement,S=u,y=y?Gn(y):null,y!==null&&(x=dr(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(S=null,y=u),S!==y)){if(w=Kd,R="onMouseLeave",m="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(w=Qd,R="onPointerLeave",m="onPointerEnter",f="pointer"),x=S==null?h:Er(S),g=y==null?h:Er(y),h=new w(R,f+"leave",S,n,c),h.target=x,h.relatedTarget=g,R=null,Gn(c)===u&&(w=new w(m,f+"enter",y,n,c),w.target=g,w.relatedTarget=x,R=w),x=R,S&&y)t:{for(w=S,m=y,f=0,g=w;g;g=mr(g))f++;for(g=0,R=m;R;R=mr(R))g++;for(;0<f-g;)w=mr(w),f--;for(;0<g-f;)m=mr(m),g--;for(;f--;){if(w===m||m!==null&&w===m.alternate)break t;w=mr(w),m=mr(m)}w=null}else w=null;S!==null&&lf(d,h,S,w,!1),y!==null&&x!==null&&lf(d,x,y,w,!0)}}e:{if(h=u?Er(u):window,S=h.nodeName&&h.nodeName.toLowerCase(),S==="select"||S==="input"&&h.type==="file")var L=Hy;else if(qd(h))if(Ph)L=Yy;else{L=Gy;var N=Ky}else(S=h.nodeName)&&S.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(L=Qy);if(L&&(L=L(e,u))){bh(d,L,n,c);break e}N&&N(e,h,u),e==="focusout"&&(N=h._wrapperState)&&N.controlled&&h.type==="number"&&Ds(h,"number",h.value)}switch(N=u?Er(u):window,e){case"focusin":(qd(N)||N.contentEditable==="true")&&(wr=N,Zs=u,Po=null);break;case"focusout":Po=Zs=wr=null;break;case"mousedown":qs=!0;break;case"contextmenu":case"mouseup":case"dragend":qs=!1,nf(d,n,c);break;case"selectionchange":if(Xy)break;case"keydown":case"keyup":nf(d,n,c)}var k;if(uc)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Sr?kh(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Ch&&n.locale!=="ko"&&(Sr||A!=="onCompositionStart"?A==="onCompositionEnd"&&Sr&&(k=Nh()):(_n=c,ic="value"in _n?_n.value:_n.textContent,Sr=!0)),N=Si(u,A),0<N.length&&(A=new Gd(A,e,null,n,c),d.push({event:A,listeners:N}),k?A.data=k:(k=Lh(n),k!==null&&(A.data=k)))),(k=Uy?Vy(e,n):zy(e,n))&&(u=Si(u,"onBeforeInput"),0<u.length&&(c=new Gd("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=k))}Vh(d,t)})}function Zo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Si(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=Bo(e,n),l!=null&&r.unshift(Zo(e,l,o)),l=Bo(e,t),l!=null&&r.push(Zo(e,l,o))),e=e.return}return r}function mr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lf(e,t,n,r,o){for(var l=t._reactName,i=[];n!==null&&n!==r;){var a=n,s=a.alternate,u=a.stateNode;if(s!==null&&s===r)break;a.tag===5&&u!==null&&(a=u,o?(s=Bo(n,l),s!=null&&i.unshift(Zo(n,s,a))):o||(s=Bo(n,l),s!=null&&i.push(Zo(n,s,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var n1=/\r\n?/g,r1=/\u0000|\uFFFD/g;function af(e){return(typeof e=="string"?e:""+e).replace(n1,`
|
|
38
|
-
`).replace(r1,"")}function Ml(e,t,n){if(t=af(t),af(e)!==t&&n)throw Error(I(425))}function wi(){}var Xs=null,Js=null;function eu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tu=typeof setTimeout=="function"?setTimeout:void 0,o1=typeof clearTimeout=="function"?clearTimeout:void 0,sf=typeof Promise=="function"?Promise:void 0,l1=typeof queueMicrotask=="function"?queueMicrotask:typeof sf<"u"?function(e){return sf.resolve(null).then(e).catch(i1)}:tu;function i1(e){setTimeout(function(){throw e})}function ns(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ko(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ko(t)}function Ln(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qr=Math.random().toString(36).slice(2),Ht="__reactFiber$"+qr,qo="__reactProps$"+qr,un="__reactContainer$"+qr,nu="__reactEvents$"+qr,a1="__reactListeners$"+qr,s1="__reactHandles$"+qr;function Gn(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[un]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uf(e);e!==null;){if(n=e[Ht])return n;e=uf(e)}return t}e=n,n=e.parentNode}return null}function ul(e){return e=e[Ht]||e[un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Er(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function Qi(e){return e[qo]||null}var ru=[],_r=-1;function Dn(e){return{current:e}}function _e(e){0>_r||(e.current=ru[_r],ru[_r]=null,_r--)}function we(e,t){_r++,ru[_r]=e.current,e.current=t}var In={},Je=Dn(In),ct=Dn(!1),nr=In;function Dr(e,t){var n=e.type.contextTypes;if(!n)return In;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dt(e){return e=e.childContextTypes,e!=null}function xi(){_e(ct),_e(Je)}function cf(e,t,n){if(Je.current!==In)throw Error(I(168));we(Je,t),we(ct,n)}function Bh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,Kg(e)||"Unknown",o));return Pe({},n,r)}function Ei(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||In,nr=Je.current,we(Je,e),we(ct,ct.current),!0}function df(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Bh(e,t,nr),r.__reactInternalMemoizedMergedChildContext=e,_e(ct),_e(Je),we(Je,e)):_e(ct),we(ct,n)}var nn=null,Yi=!1,rs=!1;function Wh(e){nn===null?nn=[e]:nn.push(e)}function u1(e){Yi=!0,Wh(e)}function Fn(){if(!rs&&nn!==null){rs=!0;var e=0,t=ve;try{var n=nn;for(ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}nn=null,Yi=!1}catch(o){throw nn!==null&&(nn=nn.slice(e+1)),mh(nc,Fn),o}finally{ve=t,rs=!1}}return null}var Rr=[],Tr=0,_i=null,Ri=0,Nt=[],Ct=0,rr=null,rn=1,on="";function Wn(e,t){Rr[Tr++]=Ri,Rr[Tr++]=_i,_i=e,Ri=t}function Hh(e,t,n){Nt[Ct++]=rn,Nt[Ct++]=on,Nt[Ct++]=rr,rr=e;var r=rn;e=on;var o=32-Ft(r)-1;r&=~(1<<o),n+=1;var l=32-Ft(t)+o;if(30<l){var i=o-o%5;l=(r&(1<<i)-1).toString(32),r>>=i,o-=i,rn=1<<32-Ft(t)+o|n<<o|r,on=l+e}else rn=1<<l|n<<o|r,on=e}function dc(e){e.return!==null&&(Wn(e,1),Hh(e,1,0))}function fc(e){for(;e===_i;)_i=Rr[--Tr],Rr[Tr]=null,Ri=Rr[--Tr],Rr[Tr]=null;for(;e===rr;)rr=Nt[--Ct],Nt[Ct]=null,on=Nt[--Ct],Nt[Ct]=null,rn=Nt[--Ct],Nt[Ct]=null}var yt=null,vt=null,Ne=!1,jt=null;function Kh(e,t){var n=kt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ff(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yt=e,vt=Ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yt=e,vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=rr!==null?{id:rn,overflow:on}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=kt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yt=e,vt=null,!0):!1;default:return!1}}function ou(e){return(e.mode&1)!==0&&(e.flags&128)===0}function lu(e){if(Ne){var t=vt;if(t){var n=t;if(!ff(e,t)){if(ou(e))throw Error(I(418));t=Ln(n.nextSibling);var r=yt;t&&ff(e,t)?Kh(r,n):(e.flags=e.flags&-4097|2,Ne=!1,yt=e)}}else{if(ou(e))throw Error(I(418));e.flags=e.flags&-4097|2,Ne=!1,yt=e}}}function pf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yt=e}function jl(e){if(e!==yt)return!1;if(!Ne)return pf(e),Ne=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!eu(e.type,e.memoizedProps)),t&&(t=vt)){if(ou(e))throw Gh(),Error(I(418));for(;t;)Kh(e,t),t=Ln(t.nextSibling)}if(pf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){vt=Ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}vt=null}}else vt=yt?Ln(e.stateNode.nextSibling):null;return!0}function Gh(){for(var e=vt;e;)e=Ln(e.nextSibling)}function Fr(){vt=yt=null,Ne=!1}function pc(e){jt===null?jt=[e]:jt.push(e)}var c1=pn.ReactCurrentBatchConfig;function It(e,t){if(e&&e.defaultProps){t=Pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ti=Dn(null),Ni=null,Nr=null,hc=null;function mc(){hc=Nr=Ni=null}function vc(e){var t=Ti.current;_e(Ti),e._currentValue=t}function iu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Or(e,t){Ni=e,hc=Nr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(st=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(hc!==e)if(e={context:e,memoizedValue:t,next:null},Nr===null){if(Ni===null)throw Error(I(308));Nr=e,Ni.dependencies={lanes:0,firstContext:e}}else Nr=Nr.next=e;return t}var Qn=null;function gc(e){Qn===null?Qn=[e]:Qn.push(e)}function Qh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,gc(t)):(n.next=o.next,o.next=n),t.interleaved=n,cn(e,r)}function cn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var yn=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ln(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,cn(e,n)}return o=r.interleaved,o===null?(t.next=t,gc(r)):(t.next=o.next,o.next=t),r.interleaved=t,cn(e,n)}function ri(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rc(e,n)}}function hf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=i:l=l.next=i,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ci(e,t,n,r){var o=e.updateQueue;yn=!1;var l=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var s=a,u=s.next;s.next=null,i===null?l=u:i.next=u,i=s;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=s))}if(l!==null){var d=o.baseState;i=0,c=u=s=null,a=l;do{var h=a.lane,S=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,w=a;switch(h=t,S=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){d=y.call(S,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,h=typeof y=="function"?y.call(S,d,h):y,h==null)break e;d=Pe({},d,h);break e;case 2:yn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else S={eventTime:S,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=S,s=d):c=c.next=S,i|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(1);if(c===null&&(s=d),o.baseState=s,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);lr|=i,e.lanes=i,e.memoizedState=d}}function mf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(I(191,o));o.call(r)}}}var Zh=new Qp.Component().refs;function au(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zi={isMounted:function(e){return(e=e._reactInternals)?dr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=rt(),o=An(e),l=ln(r,o);l.payload=t,n!=null&&(l.callback=n),t=bn(e,l,o),t!==null&&(Ut(t,e,o,r),ri(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=rt(),o=An(e),l=ln(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=bn(e,l,o),t!==null&&(Ut(t,e,o,r),ri(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rt(),r=An(e),o=ln(n,r);o.tag=2,t!=null&&(o.callback=t),t=bn(e,o,r),t!==null&&(Ut(t,e,r,n),ri(t,e,r))}};function vf(e,t,n,r,o,l,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,i):t.prototype&&t.prototype.isPureReactComponent?!Qo(n,r)||!Qo(o,l):!0}function qh(e,t,n){var r=!1,o=In,l=t.contextType;return typeof l=="object"&&l!==null?l=bt(l):(o=dt(t)?nr:Je.current,r=t.contextTypes,l=(r=r!=null)?Dr(e,o):In),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function gf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zi.enqueueReplaceState(t,t.state,null)}function su(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Zh,yc(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=bt(l):(l=dt(t)?nr:Je.current,o.context=Dr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(au(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Zi.enqueueReplaceState(o,o.state,null),Ci(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function co(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(i){var a=o.refs;a===Zh&&(a=o.refs={}),i===null?delete a[l]:a[l]=i},t._stringRef=l,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function Dl(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yf(e){var t=e._init;return t(e._payload)}function Xh(e){function t(m,f){if(e){var g=m.deletions;g===null?(m.deletions=[f],m.flags|=16):g.push(f)}}function n(m,f){if(!e)return null;for(;f!==null;)t(m,f),f=f.sibling;return null}function r(m,f){for(m=new Map;f!==null;)f.key!==null?m.set(f.key,f):m.set(f.index,f),f=f.sibling;return m}function o(m,f){return m=On(m,f),m.index=0,m.sibling=null,m}function l(m,f,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<f?(m.flags|=2,f):g):(m.flags|=2,f)):(m.flags|=1048576,f)}function i(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,f,g,R){return f===null||f.tag!==6?(f=cs(g,m.mode,R),f.return=m,f):(f=o(f,g),f.return=m,f)}function s(m,f,g,R){var L=g.type;return L===yr?c(m,f,g.props.children,R,g.key):f!==null&&(f.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===gn&&yf(L)===f.type)?(R=o(f,g.props),R.ref=co(m,f,g),R.return=m,R):(R=ui(g.type,g.key,g.props,null,m.mode,R),R.ref=co(m,f,g),R.return=m,R)}function u(m,f,g,R){return f===null||f.tag!==4||f.stateNode.containerInfo!==g.containerInfo||f.stateNode.implementation!==g.implementation?(f=ds(g,m.mode,R),f.return=m,f):(f=o(f,g.children||[]),f.return=m,f)}function c(m,f,g,R,L){return f===null||f.tag!==7?(f=Jn(g,m.mode,R,L),f.return=m,f):(f=o(f,g),f.return=m,f)}function d(m,f,g){if(typeof f=="string"&&f!==""||typeof f=="number")return f=cs(""+f,m.mode,g),f.return=m,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Cl:return g=ui(f.type,f.key,f.props,null,m.mode,g),g.ref=co(m,null,f),g.return=m,g;case gr:return f=ds(f,m.mode,g),f.return=m,f;case gn:var R=f._init;return d(m,R(f._payload),g)}if(Eo(f)||lo(f))return f=Jn(f,m.mode,g,null),f.return=m,f;Dl(m,f)}return null}function h(m,f,g,R){var L=f!==null?f.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return L!==null?null:a(m,f,""+g,R);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Cl:return g.key===L?s(m,f,g,R):null;case gr:return g.key===L?u(m,f,g,R):null;case gn:return L=g._init,h(m,f,L(g._payload),R)}if(Eo(g)||lo(g))return L!==null?null:c(m,f,g,R,null);Dl(m,g)}return null}function S(m,f,g,R,L){if(typeof R=="string"&&R!==""||typeof R=="number")return m=m.get(g)||null,a(f,m,""+R,L);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case Cl:return m=m.get(R.key===null?g:R.key)||null,s(f,m,R,L);case gr:return m=m.get(R.key===null?g:R.key)||null,u(f,m,R,L);case gn:var N=R._init;return S(m,f,g,N(R._payload),L)}if(Eo(R)||lo(R))return m=m.get(g)||null,c(f,m,R,L,null);Dl(f,R)}return null}function y(m,f,g,R){for(var L=null,N=null,k=f,A=f=0,K=null;k!==null&&A<g.length;A++){k.index>A?(K=k,k=null):K=k.sibling;var B=h(m,k,g[A],R);if(B===null){k===null&&(k=K);break}e&&k&&B.alternate===null&&t(m,k),f=l(B,f,A),N===null?L=B:N.sibling=B,N=B,k=K}if(A===g.length)return n(m,k),Ne&&Wn(m,A),L;if(k===null){for(;A<g.length;A++)k=d(m,g[A],R),k!==null&&(f=l(k,f,A),N===null?L=k:N.sibling=k,N=k);return Ne&&Wn(m,A),L}for(k=r(m,k);A<g.length;A++)K=S(k,m,A,g[A],R),K!==null&&(e&&K.alternate!==null&&k.delete(K.key===null?A:K.key),f=l(K,f,A),N===null?L=K:N.sibling=K,N=K);return e&&k.forEach(function(G){return t(m,G)}),Ne&&Wn(m,A),L}function w(m,f,g,R){var L=lo(g);if(typeof L!="function")throw Error(I(150));if(g=L.call(g),g==null)throw Error(I(151));for(var N=L=null,k=f,A=f=0,K=null,B=g.next();k!==null&&!B.done;A++,B=g.next()){k.index>A?(K=k,k=null):K=k.sibling;var G=h(m,k,B.value,R);if(G===null){k===null&&(k=K);break}e&&k&&G.alternate===null&&t(m,k),f=l(G,f,A),N===null?L=G:N.sibling=G,N=G,k=K}if(B.done)return n(m,k),Ne&&Wn(m,A),L;if(k===null){for(;!B.done;A++,B=g.next())B=d(m,B.value,R),B!==null&&(f=l(B,f,A),N===null?L=B:N.sibling=B,N=B);return Ne&&Wn(m,A),L}for(k=r(m,k);!B.done;A++,B=g.next())B=S(k,m,A,B.value,R),B!==null&&(e&&B.alternate!==null&&k.delete(B.key===null?A:B.key),f=l(B,f,A),N===null?L=B:N.sibling=B,N=B);return e&&k.forEach(function(te){return t(m,te)}),Ne&&Wn(m,A),L}function x(m,f,g,R){if(typeof g=="object"&&g!==null&&g.type===yr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Cl:e:{for(var L=g.key,N=f;N!==null;){if(N.key===L){if(L=g.type,L===yr){if(N.tag===7){n(m,N.sibling),f=o(N,g.props.children),f.return=m,m=f;break e}}else if(N.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===gn&&yf(L)===N.type){n(m,N.sibling),f=o(N,g.props),f.ref=co(m,N,g),f.return=m,m=f;break e}n(m,N);break}else t(m,N);N=N.sibling}g.type===yr?(f=Jn(g.props.children,m.mode,R,g.key),f.return=m,m=f):(R=ui(g.type,g.key,g.props,null,m.mode,R),R.ref=co(m,f,g),R.return=m,m=R)}return i(m);case gr:e:{for(N=g.key;f!==null;){if(f.key===N)if(f.tag===4&&f.stateNode.containerInfo===g.containerInfo&&f.stateNode.implementation===g.implementation){n(m,f.sibling),f=o(f,g.children||[]),f.return=m,m=f;break e}else{n(m,f);break}else t(m,f);f=f.sibling}f=ds(g,m.mode,R),f.return=m,m=f}return i(m);case gn:return N=g._init,x(m,f,N(g._payload),R)}if(Eo(g))return y(m,f,g,R);if(lo(g))return w(m,f,g,R);Dl(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,f!==null&&f.tag===6?(n(m,f.sibling),f=o(f,g),f.return=m,m=f):(n(m,f),f=cs(g,m.mode,R),f.return=m,m=f),i(m)):n(m,f)}return x}var Ur=Xh(!0),Jh=Xh(!1),cl={},Qt=Dn(cl),Xo=Dn(cl),Jo=Dn(cl);function Yn(e){if(e===cl)throw Error(I(174));return e}function Sc(e,t){switch(we(Jo,t),we(Xo,e),we(Qt,cl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Us(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Us(t,e)}_e(Qt),we(Qt,t)}function Vr(){_e(Qt),_e(Xo),_e(Jo)}function em(e){Yn(Jo.current);var t=Yn(Qt.current),n=Us(t,e.type);t!==n&&(we(Xo,e),we(Qt,n))}function wc(e){Xo.current===e&&(_e(Qt),_e(Xo))}var ke=Dn(0);function ki(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var os=[];function xc(){for(var e=0;e<os.length;e++)os[e]._workInProgressVersionPrimary=null;os.length=0}var oi=pn.ReactCurrentDispatcher,ls=pn.ReactCurrentBatchConfig,or=0,be=null,Fe=null,ze=null,Li=!1,Ao=!1,el=0,d1=0;function Ye(){throw Error(I(321))}function Ec(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vt(e[n],t[n]))return!1;return!0}function _c(e,t,n,r,o,l){if(or=l,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oi.current=e===null||e.memoizedState===null?m1:v1,e=n(r,o),Ao){l=0;do{if(Ao=!1,el=0,25<=l)throw Error(I(301));l+=1,ze=Fe=null,t.updateQueue=null,oi.current=g1,e=n(r,o)}while(Ao)}if(oi.current=bi,t=Fe!==null&&Fe.next!==null,or=0,ze=Fe=be=null,Li=!1,t)throw Error(I(300));return e}function Rc(){var e=el!==0;return el=0,e}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?be.memoizedState=ze=e:ze=ze.next=e,ze}function Pt(){if(Fe===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=ze===null?be.memoizedState:ze.next;if(t!==null)ze=t,Fe=e;else{if(e===null)throw Error(I(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},ze===null?be.memoizedState=ze=e:ze=ze.next=e}return ze}function tl(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Pt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Fe,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var i=o.next;o.next=l.next,l.next=i}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var a=i=null,s=null,u=l;do{var c=u.lane;if((or&c)===c)s!==null&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};s===null?(a=s=d,i=r):s=s.next=d,be.lanes|=c,lr|=c}u=u.next}while(u!==null&&u!==l);s===null?i=r:s.next=a,Vt(r,t.memoizedState)||(st=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,be.lanes|=l,lr|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function as(e){var t=Pt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do l=e(l,i.action),i=i.next;while(i!==o);Vt(l,t.memoizedState)||(st=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function tm(){}function nm(e,t){var n=be,r=Pt(),o=t(),l=!Vt(r.memoizedState,o);if(l&&(r.memoizedState=o,st=!0),r=r.queue,Tc(lm.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,nl(9,om.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));or&30||rm(n,t,o)}return o}function rm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function om(e,t,n,r){t.value=n,t.getSnapshot=r,im(t)&&am(e)}function lm(e,t,n){return n(function(){im(t)&&am(e)})}function im(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vt(e,n)}catch{return!0}}function am(e){var t=cn(e,1);t!==null&&Ut(t,e,1,-1)}function Sf(e){var t=Bt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tl,lastRenderedState:e},t.queue=e,e=e.dispatch=h1.bind(null,be,e),[t.memoizedState,e]}function nl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function sm(){return Pt().memoizedState}function li(e,t,n,r){var o=Bt();be.flags|=e,o.memoizedState=nl(1|t,n,void 0,r===void 0?null:r)}function qi(e,t,n,r){var o=Pt();r=r===void 0?null:r;var l=void 0;if(Fe!==null){var i=Fe.memoizedState;if(l=i.destroy,r!==null&&Ec(r,i.deps)){o.memoizedState=nl(t,n,l,r);return}}be.flags|=e,o.memoizedState=nl(1|t,n,l,r)}function wf(e,t){return li(8390656,8,e,t)}function Tc(e,t){return qi(2048,8,e,t)}function um(e,t){return qi(4,2,e,t)}function cm(e,t){return qi(4,4,e,t)}function dm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fm(e,t,n){return n=n!=null?n.concat([e]):null,qi(4,4,dm.bind(null,t,e),n)}function Nc(){}function pm(e,t){var n=Pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ec(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hm(e,t){var n=Pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ec(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mm(e,t,n){return or&21?(Vt(n,t)||(n=yh(),be.lanes|=n,lr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,st=!0),e.memoizedState=n)}function f1(e,t){var n=ve;ve=n!==0&&4>n?n:4,e(!0);var r=ls.transition;ls.transition={};try{e(!1),t()}finally{ve=n,ls.transition=r}}function vm(){return Pt().memoizedState}function p1(e,t,n){var r=An(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gm(e))ym(t,n);else if(n=Qh(e,t,n,r),n!==null){var o=rt();Ut(n,e,r,o),Sm(n,t,r)}}function h1(e,t,n){var r=An(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gm(e))ym(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var i=t.lastRenderedState,a=l(i,n);if(o.hasEagerState=!0,o.eagerState=a,Vt(a,i)){var s=t.interleaved;s===null?(o.next=o,gc(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=Qh(e,t,o,r),n!==null&&(o=rt(),Ut(n,e,r,o),Sm(n,t,r))}}function gm(e){var t=e.alternate;return e===be||t!==null&&t===be}function ym(e,t){Ao=Li=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rc(e,n)}}var bi={readContext:bt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},m1={readContext:bt,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:wf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,li(4194308,4,dm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return li(4194308,4,e,t)},useInsertionEffect:function(e,t){return li(4,2,e,t)},useMemo:function(e,t){var n=Bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=p1.bind(null,be,e),[r.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:Sf,useDebugValue:Nc,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=Sf(!1),t=e[0];return e=f1.bind(null,e[1]),Bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=be,o=Bt();if(Ne){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));or&30||rm(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,wf(lm.bind(null,r,l,e),[e]),r.flags|=2048,nl(9,om.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Bt(),t=Be.identifierPrefix;if(Ne){var n=on,r=rn;n=(r&~(1<<32-Ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=d1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},v1={readContext:bt,useCallback:pm,useContext:bt,useEffect:Tc,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:hm,useReducer:is,useRef:sm,useState:function(){return is(tl)},useDebugValue:Nc,useDeferredValue:function(e){var t=Pt();return mm(t,Fe.memoizedState,e)},useTransition:function(){var e=is(tl)[0],t=Pt().memoizedState;return[e,t]},useMutableSource:tm,useSyncExternalStore:nm,useId:vm,unstable_isNewReconciler:!1},g1={readContext:bt,useCallback:pm,useContext:bt,useEffect:Tc,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:hm,useReducer:as,useRef:sm,useState:function(){return as(tl)},useDebugValue:Nc,useDeferredValue:function(e){var t=Pt();return Fe===null?t.memoizedState=e:mm(t,Fe.memoizedState,e)},useTransition:function(){var e=as(tl)[0],t=Pt().memoizedState;return[e,t]},useMutableSource:tm,useSyncExternalStore:nm,useId:vm,unstable_isNewReconciler:!1};function zr(e,t){try{var n="",r=t;do n+=Hg(r),r=r.return;while(r);var o=n}catch(l){o=`
|
|
39
|
-
Error generating stack: `+
|
|
40
|
-
`+l.stack}return{value:e,source:t,stack:o,digest:null}}function ss(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function uu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var y1=typeof WeakMap=="function"?WeakMap:Map;function wm(e,t,n){n=ln(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ai||(Ai=!0,Su=r),uu(e,t)},n}function xm(e,t,n){n=ln(-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(){uu(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){uu(e,t),typeof r!="function"&&(Pn===null?Pn=new Set([this]):Pn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function xf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new y1;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=A1.bind(null,e,t,n),t.then(e,e))}function Ef(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 _f(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=ln(-1,1),t.tag=2,bn(n,t,1))),n.lanes|=1),e)}var S1=pn.ReactCurrentOwner,st=!1;function tt(e,t,n,r){t.child=e===null?Jh(t,null,n,r):Ur(t,e.child,n,r)}function Rf(e,t,n,r,o){n=n.render;var l=t.ref;return Or(t,o),r=_c(e,t,n,r,l,o),n=Rc(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,dn(e,t,o)):(Ne&&n&&dc(t),t.flags|=1,tt(e,t,r,o),t.child)}function Tf(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!$c(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Em(e,t,l,r,o)):(e=ui(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:Qo,n(i,r)&&e.ref===t.ref)return dn(e,t,o)}return t.flags|=1,e=On(l,r),e.ref=t.ref,e.return=t,t.child=e}function Em(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(Qo(l,r)&&e.ref===t.ref)if(st=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(st=!0);else return t.lanes=e.lanes,dn(e,t,o)}return cu(e,t,n,r,o)}function _m(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},we(kr,mt),mt|=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,we(kr,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,we(kr,mt),mt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,we(kr,mt),mt|=r;return tt(e,t,o,n),t.child}function Rm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cu(e,t,n,r,o){var l=dt(n)?nr:Je.current;return l=Dr(t,l),Or(t,o),n=_c(e,t,n,r,l,o),r=Rc(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,dn(e,t,o)):(Ne&&r&&dc(t),t.flags|=1,tt(e,t,n,o),t.child)}function Nf(e,t,n,r,o){if(dt(n)){var l=!0;Ei(t)}else l=!1;if(Or(t,o),t.stateNode===null)ii(e,t),qh(t,n,r),su(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var s=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=bt(u):(u=dt(n)?nr:Je.current,u=Dr(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||s!==u)&&gf(t,i,r,u),yn=!1;var h=t.memoizedState;i.state=h,Ci(t,r,i,o),s=t.memoizedState,a!==r||h!==s||ct.current||yn?(typeof c=="function"&&(au(t,n,c,r),s=t.memoizedState),(a=yn||vf(t,n,a,r,h,s,u))?(d||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=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Yh(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:It(t.type,a),i.props=u,d=t.pendingProps,h=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=bt(s):(s=dt(n)?nr:Je.current,s=Dr(t,s));var S=n.getDerivedStateFromProps;(c=typeof S=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||h!==s)&&gf(t,i,r,s),yn=!1,h=t.memoizedState,i.state=h,Ci(t,r,i,o);var y=t.memoizedState;a!==d||h!==y||ct.current||yn?(typeof S=="function"&&(au(t,n,S,r),y=t.memoizedState),(u=yn||vf(t,n,u,r,h,y,s)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,y,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,y,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),i.props=r,i.state=y,i.context=s,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return du(e,t,n,r,l,o)}function du(e,t,n,r,o,l){Rm(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&df(t,n,!1),dn(e,t,l);r=t.stateNode,S1.current=t;var a=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,a,l)):tt(e,t,a,l),t.memoizedState=r.state,o&&df(t,n,!0),t.child}function Tm(e){var t=e.stateNode;t.pendingContext?cf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cf(e,t.context,!1),Sc(e,t.containerInfo)}function Cf(e,t,n,r,o){return Fr(),pc(o),t.flags|=256,tt(e,t,n,r),t.child}var fu={dehydrated:null,treeContext:null,retryLane:0};function pu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nm(e,t,n){var r=t.pendingProps,o=ke.current,l=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),we(ke,o&1),e===null)return lu(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=ea(i,r,0,null),e=Jn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=pu(n),t.memoizedState=fu,e):Cc(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return w1(e,t,i,r,a,o,n);if(l){l=r.fallback,i=t.mode,o=e.child,a=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=On(o,s),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?l=On(a,l):(l=Jn(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?pu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},l.memoizedState=i,l.childLanes=e.childLanes&~n,t.memoizedState=fu,r}return l=e.child,e=l.sibling,r=On(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 Cc(e,t){return t=ea({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fl(e,t,n,r){return r!==null&&pc(r),Ur(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function w1(e,t,n,r,o,l,i){if(n)return t.flags&256?(t.flags&=-257,r=ss(Error(I(422))),Fl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=ea({mode:"visible",children:r.children},o,0,null),l=Jn(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=pu(i),t.memoizedState=fu,l);if(!(t.mode&1))return Fl(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,l=Error(I(419)),r=ss(l,r,void 0),Fl(e,t,i,r)}if(a=(i&e.childLanes)!==0,st||a){if(r=Be,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,cn(e,o),Ut(r,e,o,-1))}return Oc(),r=ss(Error(I(421))),Fl(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=O1.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,vt=Ln(o.nextSibling),yt=t,Ne=!0,jt=null,e!==null&&(Nt[Ct++]=rn,Nt[Ct++]=on,Nt[Ct++]=rr,rn=e.id,on=e.overflow,rr=t),t=Cc(t,r.children),t.flags|=4096,t)}function kf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),iu(e.return,t,n)}function us(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 Cm(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(tt(e,t,r.children,n),r=ke.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&&kf(e,n,t);else if(e.tag===19)kf(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(we(ke,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&&ki(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),us(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&&ki(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}us(t,!0,n,null,l);break;case"together":us(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ii(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),lr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=On(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=On(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function x1(e,t,n){switch(t.tag){case 3:Tm(t),Fr();break;case 5:em(t);break;case 1:dt(t.type)&&Ei(t);break;case 4:Sc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;we(Ti,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(ke,ke.current&1),t.flags|=128,null):n&t.child.childLanes?Nm(e,t,n):(we(ke,ke.current&1),e=dn(e,t,n),e!==null?e.sibling:null);we(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),we(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,_m(e,t,n)}return dn(e,t,n)}var km,hu,Lm,bm;km=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}};hu=function(){};Lm=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Yn(Qt.current);var l=null;switch(n){case"input":o=Ms(e,o),r=Ms(e,r),l=[];break;case"select":o=Pe({},o,{value:void 0}),r=Pe({},r,{value:void 0}),l=[];break;case"textarea":o=Fs(e,o),r=Fs(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wi)}Vs(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Vo.hasOwnProperty(u)?l||(l=[]):(l=l||[]).push(u,null));for(u in r){var s=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&s!==a&&(s!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&a[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(l||(l=[]),l.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,a=a?a.__html:void 0,s!=null&&a!==s&&(l=l||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(l=l||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Vo.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&xe("scroll",e),l||a===s||(l=[])):(l=l||[]).push(u,s))}n&&(l=l||[]).push("style",n);var u=l;(t.updateQueue=u)&&(t.flags|=4)}};bm=function(e,t,n,r){n!==r&&(t.flags|=4)};function fo(e,t){if(!Ne)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 E1(e,t,n){var r=t.pendingProps;switch(fc(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 dt(t.type)&&xi(),Ze(t),null;case 3:return r=t.stateNode,Vr(),_e(ct),_e(Je),xc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(jl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jt!==null&&(Eu(jt),jt=null))),hu(e,t),Ze(t),null;case 5:wc(t);var o=Yn(Jo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lm(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Ze(t),null}if(e=Yn(Qt.current),jl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Ht]=t,r[qo]=l,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<Ro.length;o++)xe(Ro[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Md(r,l),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},xe("invalid",r);break;case"textarea":Dd(r,l),xe("invalid",r)}Vs(n,l),o=null;for(var i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="children"?typeof a=="string"?r.textContent!==a&&(l.suppressHydrationWarning!==!0&&Ml(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(l.suppressHydrationWarning!==!0&&Ml(r.textContent,a,e),o=["children",""+a]):Vo.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":kl(r),jd(r,l,!0);break;case"textarea":kl(r),Fd(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=wi)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/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[Ht]=t,e[qo]=r,km(e,t,!1,!1),t.stateNode=e;e:{switch(i=zs(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ro.length;o++)xe(Ro[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":Md(e,r),o=Ms(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Pe({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Dd(e,r),o=Fs(e,r),xe("invalid",e);break;default:o=r}Vs(n,o),a=o;for(l in a)if(a.hasOwnProperty(l)){var s=a[l];l==="style"?ih(e,s):l==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&oh(e,s)):l==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&zo(e,s):typeof s=="number"&&zo(e,""+s):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Vo.hasOwnProperty(l)?s!=null&&l==="onScroll"&&xe("scroll",e):s!=null&&qu(e,l,s,i))}switch(n){case"input":kl(e),jd(e,r,!1);break;case"textarea":kl(e),Fd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$n(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Lr(e,!!r.multiple,l,!1):r.defaultValue!=null&&Lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=wi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)bm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=Yn(Jo.current),Yn(Qt.current),jl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ht]=t,(l=r.nodeValue!==n)&&(e=yt,e!==null))switch(e.tag){case 3:Ml(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ml(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ht]=t,t.stateNode=r}return Ze(t),null;case 13:if(_e(ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ne&&vt!==null&&t.mode&1&&!(t.flags&128))Gh(),Fr(),t.flags|=98560,l=!1;else if(l=jl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(I(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(I(317));l[Ht]=t}else Fr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),l=!1}else jt!==null&&(Eu(jt),jt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ke.current&1?Ue===0&&(Ue=3):Oc())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Vr(),hu(e,t),e===null&&Yo(t.stateNode.containerInfo),Ze(t),null;case 10:return vc(t.type._context),Ze(t),null;case 17:return dt(t.type)&&xi(),Ze(t),null;case 19:if(_e(ke),l=t.memoizedState,l===null)return Ze(t),null;if(r=(t.flags&128)!==0,i=l.rendering,i===null)if(r)fo(l,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ki(e),i!==null){for(t.flags|=128,fo(l,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,i=l.alternate,i===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,l.type=i.type,e=i.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(ke,ke.current&1|2),t.child}e=e.sibling}l.tail!==null&&Me()>Br&&(t.flags|=128,r=!0,fo(l,!1),t.lanes=4194304)}else{if(!r)if(e=ki(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fo(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Ne)return Ze(t),null}else 2*Me()-l.renderingStartTime>Br&&n!==1073741824&&(t.flags|=128,r=!0,fo(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=Me(),t.sibling=null,n=ke.current,we(ke,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return Ac(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?mt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function _1(e,t){switch(fc(t),t.tag){case 1:return dt(t.type)&&xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),_e(ct),_e(Je),xc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wc(t),null;case 13:if(_e(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(ke),null;case 4:return Vr(),null;case 10:return vc(t.type._context),null;case 22:case 23:return Ac(),null;case 24:return null;default:return null}}var Ul=!1,qe=!1,R1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Cr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Oe(e,t,r)}else n.current=null}function mu(e,t,n){try{n()}catch(r){Oe(e,t,r)}}var Lf=!1;function T1(e,t){if(Xs=gi,e=$h(),cc(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,a=-1,s=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var S;d!==n||o!==0&&d.nodeType!==3||(a=i+o),d!==l||r!==0&&d.nodeType!==3||(s=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(S=d.firstChild)!==null;)h=d,d=S;for(;;){if(d===e)break t;if(h===n&&++u===o&&(a=i),h===l&&++c===r&&(s=i),(S=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=S}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Js={focusedElem:e,selectionRange:n},gi=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,x=y.memoizedState,m=t.stateNode,f=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:It(t.type,w),x);m.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(R){Oe(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return y=Lf,Lf=!1,y}function Oo(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&&mu(t,n,l)}o=o.next}while(o!==r)}}function Xi(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 vu(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 Pm(e){var t=e.alternate;t!==null&&(e.alternate=null,Pm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ht],delete t[qo],delete t[nu],delete t[a1],delete t[s1])),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 Am(e){return e.tag===5||e.tag===3||e.tag===4}function bf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Am(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 gu(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=wi));else if(r!==4&&(e=e.child,e!==null))for(gu(e,t,n),e=e.sibling;e!==null;)gu(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 He=null,Mt=!1;function mn(e,t,n){for(n=n.child;n!==null;)Om(e,t,n),n=n.sibling}function Om(e,t,n){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(Wi,n)}catch{}switch(n.tag){case 5:qe||Cr(n,t);case 6:var r=He,o=Mt;He=null,mn(e,t,n),He=r,Mt=o,He!==null&&(Mt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Mt?(e=He,n=n.stateNode,e.nodeType===8?ns(e.parentNode,n):e.nodeType===1&&ns(e,n),Ko(e)):ns(He,n.stateNode));break;case 4:r=He,o=Mt,He=n.stateNode.containerInfo,Mt=!0,mn(e,t,n),He=r,Mt=o;break;case 0:case 11:case 14:case 15:if(!qe&&(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)&&mu(n,t,i),o=o.next}while(o!==r)}mn(e,t,n);break;case 1:if(!qe&&(Cr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Oe(n,t,a)}mn(e,t,n);break;case 21:mn(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,mn(e,t,n),qe=r):mn(e,t,n);break;default:mn(e,t,n)}}function Pf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R1),t.forEach(function(r){var o=$1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ot(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:He=a.stateNode,Mt=!1;break e;case 3:He=a.stateNode.containerInfo,Mt=!0;break e;case 4:He=a.stateNode.containerInfo,Mt=!0;break e}a=a.return}if(He===null)throw Error(I(160));Om(l,i,o),He=null,Mt=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(u){Oe(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)$m(t,e),t=t.sibling}function $m(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ot(t,e),zt(e),r&4){try{Oo(3,e,e.return),Xi(3,e)}catch(w){Oe(e,e.return,w)}try{Oo(5,e,e.return)}catch(w){Oe(e,e.return,w)}}break;case 1:Ot(t,e),zt(e),r&512&&n!==null&&Cr(n,n.return);break;case 5:if(Ot(t,e),zt(e),r&512&&n!==null&&Cr(n,n.return),e.flags&32){var o=e.stateNode;try{zo(o,"")}catch(w){Oe(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,i=n!==null?n.memoizedProps:l,a=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{a==="input"&&l.type==="radio"&&l.name!=null&&th(o,l),zs(a,i);var u=zs(a,l);for(i=0;i<s.length;i+=2){var c=s[i],d=s[i+1];c==="style"?ih(o,d):c==="dangerouslySetInnerHTML"?oh(o,d):c==="children"?zo(o,d):qu(o,c,d,u)}switch(a){case"input":js(o,l);break;case"textarea":nh(o,l);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var S=l.value;S!=null?Lr(o,!!l.multiple,S,!1):h!==!!l.multiple&&(l.defaultValue!=null?Lr(o,!!l.multiple,l.defaultValue,!0):Lr(o,!!l.multiple,l.multiple?[]:"",!1))}o[qo]=l}catch(w){Oe(e,e.return,w)}}break;case 6:if(Ot(t,e),zt(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(w){Oe(e,e.return,w)}}break;case 3:if(Ot(t,e),zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ko(t.containerInfo)}catch(w){Oe(e,e.return,w)}break;case 4:Ot(t,e),zt(e);break;case 13:Ot(t,e),zt(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(bc=Me())),r&4&&Pf(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(qe=(u=qe)||c,Ot(t,e),qe=u):Ot(t,e),zt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Q=e,c=e.child;c!==null;){for(d=Q=c;Q!==null;){switch(h=Q,S=h.child,h.tag){case 0:case 11:case 14:case 15:Oo(4,h,h.return);break;case 1:Cr(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){Oe(r,n,w)}}break;case 5:Cr(h,h.return);break;case 22:if(h.memoizedState!==null){Of(d);continue}}S!==null?(S.return=h,Q=S):Of(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(a=d.stateNode,s=d.memoizedProps.style,i=s!=null&&s.hasOwnProperty("display")?s.display:null,a.style.display=lh("display",i))}catch(w){Oe(e,e.return,w)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(w){Oe(e,e.return,w)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ot(t,e),zt(e),r&4&&Pf(e);break;case 21:break;default:Ot(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Am(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(zo(o,""),r.flags&=-33);var l=bf(e);yu(e,l,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=bf(e);gu(e,a,i);break;default:throw Error(I(161))}}catch(s){Oe(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function N1(e,t,n){Q=e,Im(e)}function Im(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var o=Q,l=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Ul;if(!i){var a=o.alternate,s=a!==null&&a.memoizedState!==null||qe;a=Ul;var u=qe;if(Ul=i,(qe=s)&&!u)for(Q=o;Q!==null;)i=Q,s=i.child,i.tag===22&&i.memoizedState!==null?$f(o):s!==null?(s.return=i,Q=s):$f(o);for(;l!==null;)Q=l,Im(l),l=l.sibling;Q=o,Ul=a,qe=u}Af(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,Q=l):Af(e)}}function Af(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qe||Xi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!qe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:It(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&mf(t,l,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}mf(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ko(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}qe||t.flags&512&&vu(t)}catch(h){Oe(t,t.return,h)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Of(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function $f(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xi(4,t)}catch(s){Oe(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){Oe(t,o,s)}}var l=t.return;try{vu(t)}catch(s){Oe(t,l,s)}break;case 5:var i=t.return;try{vu(t)}catch(s){Oe(t,i,s)}}}catch(s){Oe(t,t.return,s)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var C1=Math.ceil,Pi=pn.ReactCurrentDispatcher,kc=pn.ReactCurrentOwner,Lt=pn.ReactCurrentBatchConfig,fe=0,Be=null,je=null,Ke=0,mt=0,kr=Dn(0),Ue=0,rl=null,lr=0,Ji=0,Lc=0,$o=null,at=null,bc=0,Br=1/0,tn=null,Ai=!1,Su=null,Pn=null,Vl=!1,Rn=null,Oi=0,Io=0,wu=null,ai=-1,si=0;function rt(){return fe&6?Me():ai!==-1?ai:ai=Me()}function An(e){return e.mode&1?fe&2&&Ke!==0?Ke&-Ke:c1.transition!==null?(si===0&&(si=yh()),si):(e=ve,e!==0||(e=window.event,e=e===void 0?16:Th(e.type)),e):1}function Ut(e,t,n,r){if(50<Io)throw Io=0,wu=null,Error(I(185));al(e,n,r),(!(fe&2)||e!==Be)&&(e===Be&&(!(fe&2)&&(Ji|=n),Ue===4&&xn(e,Ke)),ft(e,r),n===1&&fe===0&&!(t.mode&1)&&(Br=Me()+500,Yi&&Fn()))}function ft(e,t){var n=e.callbackNode;cy(e,t);var r=vi(e,e===Be?Ke:0);if(r===0)n!==null&&zd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zd(n),t===1)e.tag===0?u1(If.bind(null,e)):Wh(If.bind(null,e)),l1(function(){!(fe&6)&&Fn()}),n=null;else{switch(Sh(r)){case 1:n=nc;break;case 4:n=vh;break;case 16:n=mi;break;case 536870912:n=gh;break;default:n=mi}n=Bm(n,Mm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Mm(e,t){if(ai=-1,si=0,fe&6)throw Error(I(327));var n=e.callbackNode;if($r()&&e.callbackNode!==n)return null;var r=vi(e,e===Be?Ke:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=$i(e,r);else{t=r;var o=fe;fe|=2;var l=Dm();(Be!==e||Ke!==t)&&(tn=null,Br=Me()+500,Xn(e,t));do try{b1();break}catch(a){jm(e,a)}while(1);mc(),Pi.current=l,fe=o,je!==null?t=0:(Be=null,Ke=0,t=Ue)}if(t!==0){if(t===2&&(o=Gs(e),o!==0&&(r=o,t=xu(e,o))),t===1)throw n=rl,Xn(e,0),xn(e,r),ft(e,Me()),n;if(t===6)xn(e,r);else{if(o=e.current.alternate,!(r&30)&&!k1(o)&&(t=$i(e,r),t===2&&(l=Gs(e),l!==0&&(r=l,t=xu(e,l))),t===1))throw n=rl,Xn(e,0),xn(e,r),ft(e,Me()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:Hn(e,at,tn);break;case 3:if(xn(e,r),(r&130023424)===r&&(t=bc+500-Me(),10<t)){if(vi(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=tu(Hn.bind(null,e,at,tn),t);break}Hn(e,at,tn);break;case 4:if(xn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Ft(r);l=1<<i,i=t[i],i>o&&(o=i),r&=~l}if(r=o,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C1(r/1960))-r,10<r){e.timeoutHandle=tu(Hn.bind(null,e,at,tn),r);break}Hn(e,at,tn);break;case 5:Hn(e,at,tn);break;default:throw Error(I(329))}}}return ft(e,Me()),e.callbackNode===n?Mm.bind(null,e):null}function xu(e,t){var n=$o;return e.current.memoizedState.isDehydrated&&(Xn(e,t).flags|=256),e=$i(e,t),e!==2&&(t=at,at=n,t!==null&&Eu(t)),e}function Eu(e){at===null?at=e:at.push.apply(at,e)}function k1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!Vt(l(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xn(e,t){for(t&=~Lc,t&=~Ji,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ft(t),r=1<<n;e[n]=-1,t&=~r}}function If(e){if(fe&6)throw Error(I(327));$r();var t=vi(e,0);if(!(t&1))return ft(e,Me()),null;var n=$i(e,t);if(e.tag!==0&&n===2){var r=Gs(e);r!==0&&(t=r,n=xu(e,r))}if(n===1)throw n=rl,Xn(e,0),xn(e,t),ft(e,Me()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hn(e,at,tn),ft(e,Me()),null}function Pc(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(Br=Me()+500,Yi&&Fn())}}function ir(e){Rn!==null&&Rn.tag===0&&!(fe&6)&&$r();var t=fe;fe|=1;var n=Lt.transition,r=ve;try{if(Lt.transition=null,ve=1,e)return e()}finally{ve=r,Lt.transition=n,fe=t,!(fe&6)&&Fn()}}function Ac(){mt=kr.current,_e(kr)}function Xn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,o1(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(fc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xi();break;case 3:Vr(),_e(ct),_e(Je),xc();break;case 5:wc(r);break;case 4:Vr();break;case 13:_e(ke);break;case 19:_e(ke);break;case 10:vc(r.type._context);break;case 22:case 23:Ac()}n=n.return}if(Be=e,je=e=On(e.current,null),Ke=mt=t,Ue=0,rl=null,Lc=Ji=lr=0,at=$o=null,Qn!==null){for(t=0;t<Qn.length;t++)if(n=Qn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var i=l.next;l.next=o,r.next=i}n.pending=r}Qn=null}return e}function jm(e,t){do{var n=je;try{if(mc(),oi.current=bi,Li){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Li=!1}if(or=0,ze=Fe=be=null,Ao=!1,el=0,kc.current=null,n===null||n.return===null){Ue=1,rl=t,je=null;break}e:{var l=e,i=n.return,a=n,s=t;if(t=Ke,a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var u=s,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var S=Ef(i);if(S!==null){S.flags&=-257,_f(S,i,a,l,t),S.mode&1&&xf(l,u,t),t=S,s=u;var y=t.updateQueue;if(y===null){var w=new Set;w.add(s),t.updateQueue=w}else y.add(s);break e}else{if(!(t&1)){xf(l,u,t),Oc();break e}s=Error(I(426))}}else if(Ne&&a.mode&1){var x=Ef(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),_f(x,i,a,l,t),pc(zr(s,a));break e}}l=s=zr(s,a),Ue!==4&&(Ue=2),$o===null?$o=[l]:$o.push(l),l=i;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var m=wm(l,s,t);hf(l,m);break e;case 1:a=s;var f=l.type,g=l.stateNode;if(!(l.flags&128)&&(typeof f.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Pn===null||!Pn.has(g)))){l.flags|=65536,t&=-t,l.lanes|=t;var R=xm(l,a,t);hf(l,R);break e}}l=l.return}while(l!==null)}Um(n)}catch(L){t=L,je===n&&n!==null&&(je=n=n.return);continue}break}while(1)}function Dm(){var e=Pi.current;return Pi.current=bi,e===null?bi:e}function Oc(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),Be===null||!(lr&268435455)&&!(Ji&268435455)||xn(Be,Ke)}function $i(e,t){var n=fe;fe|=2;var r=Dm();(Be!==e||Ke!==t)&&(tn=null,Xn(e,t));do try{L1();break}catch(o){jm(e,o)}while(1);if(mc(),fe=n,Pi.current=r,je!==null)throw Error(I(261));return Be=null,Ke=0,Ue}function L1(){for(;je!==null;)Fm(je)}function b1(){for(;je!==null&&!ty();)Fm(je)}function Fm(e){var t=zm(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?Um(e):je=t,kc.current=null}function Um(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_1(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,je=null;return}}else if(n=E1(n,t,mt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ue===0&&(Ue=5)}function Hn(e,t,n){var r=ve,o=Lt.transition;try{Lt.transition=null,ve=1,P1(e,t,n,r)}finally{Lt.transition=o,ve=r}return null}function P1(e,t,n,r){do $r();while(Rn!==null);if(fe&6)throw Error(I(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(dy(e,l),e===Be&&(je=Be=null,Ke=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Vl||(Vl=!0,Bm(mi,function(){return $r(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=Lt.transition,Lt.transition=null;var i=ve;ve=1;var a=fe;fe|=4,kc.current=null,T1(e,n),$m(n,e),qy(Js),gi=!!Xs,Js=Xs=null,e.current=n,N1(n),ny(),fe=a,ve=i,Lt.transition=l}else e.current=n;if(Vl&&(Vl=!1,Rn=e,Oi=o),l=e.pendingLanes,l===0&&(Pn=null),ly(n.stateNode),ft(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ai)throw Ai=!1,e=Su,Su=null,e;return Oi&1&&e.tag!==0&&$r(),l=e.pendingLanes,l&1?e===wu?Io++:(Io=0,wu=e):Io=0,Fn(),null}function $r(){if(Rn!==null){var e=Sh(Oi),t=Lt.transition,n=ve;try{if(Lt.transition=null,ve=16>e?16:e,Rn===null)var r=!1;else{if(e=Rn,Rn=null,Oi=0,fe&6)throw Error(I(331));var o=fe;for(fe|=4,Q=e.current;Q!==null;){var l=Q,i=l.child;if(Q.flags&16){var a=l.deletions;if(a!==null){for(var s=0;s<a.length;s++){var u=a[s];for(Q=u;Q!==null;){var c=Q;switch(c.tag){case 0:case 11:case 15:Oo(8,c,l)}var d=c.child;if(d!==null)d.return=c,Q=d;else for(;Q!==null;){c=Q;var h=c.sibling,S=c.return;if(Pm(c),c===u){Q=null;break}if(h!==null){h.return=S,Q=h;break}Q=S}}}var y=l.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}Q=l}}if(l.subtreeFlags&2064&&i!==null)i.return=l,Q=i;else e:for(;Q!==null;){if(l=Q,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Oo(9,l,l.return)}var m=l.sibling;if(m!==null){m.return=l.return,Q=m;break e}Q=l.return}}var f=e.current;for(Q=f;Q!==null;){i=Q;var g=i.child;if(i.subtreeFlags&2064&&g!==null)g.return=i,Q=g;else e:for(i=f;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xi(9,a)}}catch(L){Oe(a,a.return,L)}if(a===i){Q=null;break e}var R=a.sibling;if(R!==null){R.return=a.return,Q=R;break e}Q=a.return}}if(fe=o,Fn(),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(Wi,e)}catch{}r=!0}return r}finally{ve=n,Lt.transition=t}}return!1}function Mf(e,t,n){t=zr(n,t),t=wm(e,t,1),e=bn(e,t,1),t=rt(),e!==null&&(al(e,1,t),ft(e,t))}function Oe(e,t,n){if(e.tag===3)Mf(e,e,n);else for(;t!==null;){if(t.tag===3){Mf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pn===null||!Pn.has(r))){e=zr(n,e),e=xm(t,e,1),t=bn(t,e,1),e=rt(),t!==null&&(al(t,1,e),ft(t,e));break}}t=t.return}}function A1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ke&n)===n&&(Ue===4||Ue===3&&(Ke&130023424)===Ke&&500>Me()-bc?Xn(e,0):Lc|=n),ft(e,t)}function Vm(e,t){t===0&&(e.mode&1?(t=Pl,Pl<<=1,!(Pl&130023424)&&(Pl=4194304)):t=1);var n=rt();e=cn(e,t),e!==null&&(al(e,t,n),ft(e,n))}function O1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Vm(e,n)}function $1(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(I(314))}r!==null&&r.delete(t),Vm(e,n)}var zm;zm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ct.current)st=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return st=!1,x1(e,t,n);st=!!(e.flags&131072)}else st=!1,Ne&&t.flags&1048576&&Hh(t,Ri,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ii(e,t),e=t.pendingProps;var o=Dr(t,Je.current);Or(t,n),o=_c(null,t,r,e,o,n);var l=Rc();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,dt(r)?(l=!0,Ei(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,yc(t),o.updater=Zi,t.stateNode=o,o._reactInternals=t,su(t,r,e,n),t=du(null,t,r,!0,l,n)):(t.tag=0,Ne&&l&&dc(t),tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ii(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=M1(r),e=It(r,e),o){case 0:t=cu(null,t,r,e,n);break e;case 1:t=Nf(null,t,r,e,n);break e;case 11:t=Rf(null,t,r,e,n);break e;case 14:t=Tf(null,t,r,It(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),cu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),Nf(e,t,r,o,n);case 3:e:{if(Tm(t),e===null)throw Error(I(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Yh(e,t),Ci(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=zr(Error(I(423)),t),t=Cf(e,t,r,n,o);break e}else if(r!==o){o=zr(Error(I(424)),t),t=Cf(e,t,r,n,o);break e}else for(vt=Ln(t.stateNode.containerInfo.firstChild),yt=t,Ne=!0,jt=null,n=Jh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fr(),r===o){t=dn(e,t,n);break e}tt(e,t,r,n)}t=t.child}return t;case 5:return em(t),e===null&&lu(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,eu(r,o)?i=null:l!==null&&eu(r,l)&&(t.flags|=32),Rm(e,t),tt(e,t,i,n),t.child;case 6:return e===null&&lu(t),null;case 13:return Nm(e,t,n);case 4:return Sc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ur(t,null,r,n):tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),Rf(e,t,r,o,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(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,we(Ti,r._currentValue),r._currentValue=i,l!==null)if(Vt(l.value,i)){if(l.children===o.children&&!ct.current){t=dn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){i=l.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=ln(-1,n&-n),s.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),iu(l.return,n,t),a.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(I(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),iu(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}tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Or(t,n),o=bt(o),r=r(o),t.flags|=1,tt(e,t,r,n),t.child;case 14:return r=t.type,o=It(r,t.pendingProps),o=It(r.type,o),Tf(e,t,r,o,n);case 15:return Em(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),ii(e,t),t.tag=1,dt(r)?(e=!0,Ei(t)):e=!1,Or(t,n),qh(t,r,o),su(t,r,o,n),du(null,t,r,!0,e,n);case 19:return Cm(e,t,n);case 22:return _m(e,t,n)}throw Error(I(156,t.tag))};function Bm(e,t){return mh(e,t)}function I1(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 kt(e,t,n,r){return new I1(e,t,n,r)}function $c(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M1(e){if(typeof e=="function")return $c(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ju)return 11;if(e===ec)return 14}return 2}function On(e,t){var n=e.alternate;return n===null?(n=kt(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 ui(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")$c(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case yr:return Jn(n.children,o,l,t);case Xu:i=8,o|=8;break;case As:return e=kt(12,n,t,o|2),e.elementType=As,e.lanes=l,e;case Os:return e=kt(13,n,t,o),e.elementType=Os,e.lanes=l,e;case $s:return e=kt(19,n,t,o),e.elementType=$s,e.lanes=l,e;case Xp:return ea(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zp:i=10;break e;case qp:i=9;break e;case Ju:i=11;break e;case ec:i=14;break e;case gn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=kt(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Jn(e,t,n,r){return e=kt(7,e,r,t),e.lanes=n,e}function ea(e,t,n,r){return e=kt(22,e,r,t),e.elementType=Xp,e.lanes=n,e.stateNode={isHidden:!1},e}function cs(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function ds(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function j1(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=Ha(0),this.expirationTimes=Ha(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ha(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ic(e,t,n,r,o,l,i,a,s){return e=new j1(e,t,n,a,s),t===1?(t=1,l===!0&&(t|=8)):t=0,l=kt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yc(l),e}function D1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Wm(e){if(!e)return In;e=e._reactInternals;e:{if(dr(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(dt(n))return Bh(e,n,t)}return t}function Hm(e,t,n,r,o,l,i,a,s){return e=Ic(n,r,!0,e,o,l,i,a,s),e.context=Wm(null),n=e.current,r=rt(),o=An(n),l=ln(r,o),l.callback=t??null,bn(n,l,o),e.current.lanes=o,al(e,o,r),ft(e,r),e}function ta(e,t,n,r){var o=t.current,l=rt(),i=An(o);return n=Wm(n),t.context===null?t.context=n:t.pendingContext=n,t=ln(l,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bn(o,t,i),e!==null&&(Ut(e,o,i,l),ri(e,o,i)),i}function Ii(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function jf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Mc(e,t){jf(e,t),(e=e.alternate)&&jf(e,t)}function F1(){return null}var Km=typeof reportError=="function"?reportError:function(e){console.error(e)};function jc(e){this._internalRoot=e}na.prototype.render=jc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));ta(e,t,null,null)};na.prototype.unmount=jc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ir(function(){ta(null,e,null,null)}),t[un]=null}};function na(e){this._internalRoot=e}na.prototype.unstable_scheduleHydration=function(e){if(e){var t=Eh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wn.length&&t!==0&&t<wn[n].priority;n++);wn.splice(n,0,e),n===0&&Rh(e)}};function Dc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ra(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Df(){}function U1(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var u=Ii(i);l.call(u)}}var i=Hm(t,r,e,0,null,!1,!1,"",Df);return e._reactRootContainer=i,e[un]=i.current,Yo(e.nodeType===8?e.parentNode:e),ir(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var u=Ii(s);a.call(u)}}var s=Ic(e,0,!1,null,null,!1,!1,"",Df);return e._reactRootContainer=s,e[un]=s.current,Yo(e.nodeType===8?e.parentNode:e),ir(function(){ta(t,s,n,r)}),s}function oa(e,t,n,r,o){var l=n._reactRootContainer;if(l){var i=l;if(typeof o=="function"){var a=o;o=function(){var s=Ii(i);a.call(s)}}ta(t,i,e,o)}else i=U1(n,t,e,o,r);return Ii(i)}wh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_o(t.pendingLanes);n!==0&&(rc(t,n|1),ft(t,Me()),!(fe&6)&&(Br=Me()+500,Fn()))}break;case 13:ir(function(){var r=cn(e,1);if(r!==null){var o=rt();Ut(r,e,1,o)}}),Mc(e,1)}};oc=function(e){if(e.tag===13){var t=cn(e,134217728);if(t!==null){var n=rt();Ut(t,e,134217728,n)}Mc(e,134217728)}};xh=function(e){if(e.tag===13){var t=An(e),n=cn(e,t);if(n!==null){var r=rt();Ut(n,e,t,r)}Mc(e,t)}};Eh=function(){return ve};_h=function(e,t){var n=ve;try{return ve=e,t()}finally{ve=n}};Ws=function(e,t,n){switch(t){case"input":if(js(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Qi(r);if(!o)throw Error(I(90));eh(r),js(r,o)}}}break;case"textarea":nh(e,n);break;case"select":t=n.value,t!=null&&Lr(e,!!n.multiple,t,!1)}};uh=Pc;ch=ir;var V1={usingClientEntryPoint:!1,Events:[ul,Er,Qi,ah,sh,Pc]},po={findFiberByHostInstance:Gn,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},z1={bundleType:po.bundleType,version:po.version,rendererPackageName:po.rendererPackageName,rendererConfig:po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ph(e),e===null?null:e.stateNode},findFiberByHostInstance:po.findFiberByHostInstance||F1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zl.isDisabled&&zl.supportsFiber)try{Wi=zl.inject(z1),Gt=zl}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V1;xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Dc(t))throw Error(I(200));return D1(e,t,null,n)};xt.createRoot=function(e,t){if(!Dc(e))throw Error(I(299));var n=!1,r="",o=Km;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Ic(e,1,!1,null,null,n,!1,r,o),e[un]=t.current,Yo(e.nodeType===8?e.parentNode:e),new jc(t)};xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=ph(t),e=e===null?null:e.stateNode,e};xt.flushSync=function(e){return ir(e)};xt.hydrate=function(e,t,n){if(!ra(t))throw Error(I(200));return oa(null,e,t,!0,n)};xt.hydrateRoot=function(e,t,n){if(!Dc(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",i=Km;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Hm(t,null,e,1,n??null,o,!1,l,i),e[un]=t.current,Yo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new na(t)};xt.render=function(e,t,n){if(!ra(t))throw Error(I(200));return oa(null,e,t,!1,n)};xt.unmountComponentAtNode=function(e){if(!ra(e))throw Error(I(40));return e._reactRootContainer?(ir(function(){oa(null,null,e,!1,function(){e._reactRootContainer=null,e[un]=null})}),!0):!1};xt.unstable_batchedUpdates=Pc;xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ra(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return oa(e,t,n,!1,r)};xt.version="18.2.0-next-9e3b772b8-20220608";function Gm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gm)}catch(e){console.error(e)}}Gm(),Hp.exports=xt;var la=Hp.exports;const B1=Wu(la);var Ff=la;bs.createRoot=Ff.createRoot,bs.hydrateRoot=Ff.hydrateRoot;var Uf=function(){throw new Error("Attempted to call useModal outside of modal context. Make sure your app is rendered inside ModalProvider.")},Fc=p.createContext({showModal:Uf,hideModal:Uf});Fc.displayName="ModalContext";var Mo=function(){return Mo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Mo.apply(this,arguments)};function W1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var H1=p.memo(function(e){var t=e.component,n=W1(e,["component"]);return t(n)}),K1=p.memo(function(e){var t=e.modals,n=e.container,r=e.component,o=r===void 0?p.Fragment:r,l=p.useState(void 0),i=l[0],a=l[1];return p.useEffect(function(){return a(n||document.body)}),i?la.createPortal(p.createElement(o,null,Object.keys(t).map(function(s){return p.createElement(H1,{key:s,component:t[s]})})),i):null}),G1=function(e){var t=e.container,n=e.rootComponent,r=e.children;if(t&&!(t instanceof HTMLElement))throw new Error(`Container must specify DOM element to mount modal root into.
|
|
33
|
+
*/var $y=v,Yt=AS;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Fy=new Set,ua={};function co(e,t){Go(e,t),Go(e+"Capture",t)}function Go(e,t){for(ua[e]=t,e=0;e<t.length;e++)Fy.add(t[e])}var Zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kd=Object.prototype.hasOwnProperty,CS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ng={},Dg={};function TS(e){return kd.call(Dg,e)?!0:kd.call(Ng,e)?!1:CS.test(e)?Dg[e]=!0:(Ng[e]=!0,!1)}function ES(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jS(e,t,n,r){if(t===null||typeof t>"u"||ES(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ct(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mt[e]=new Ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mt[t]=new Ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mt[e]=new Ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mt[e]=new Ct(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mt[e]=new Ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mt[e]=new Ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mt[e]=new Ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mt[e]=new Ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mt[e]=new Ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var lf=/[\-:]([a-z])/g;function sf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(lf,sf);mt[t]=new Ct(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(lf,sf);mt[t]=new Ct(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(lf,sf);mt[t]=new Ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!1,!1)});mt.xlinkHref=new Ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function uf(e,t,n,r){var o=mt.hasOwnProperty(t)?mt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jS(t,n,o,r)&&(n=null),r||o===null?TS(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Xn=$y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Il=Symbol.for("react.element"),bo=Symbol.for("react.portal"),xo=Symbol.for("react.fragment"),cf=Symbol.for("react.strict_mode"),zd=Symbol.for("react.profiler"),Hy=Symbol.for("react.provider"),Wy=Symbol.for("react.context"),df=Symbol.for("react.forward_ref"),Ud=Symbol.for("react.suspense"),Bd=Symbol.for("react.suspense_list"),pf=Symbol.for("react.memo"),tr=Symbol.for("react.lazy"),Gy=Symbol.for("react.offscreen"),Ag=Symbol.iterator;function Ii(e){return e===null||typeof e!="object"?null:(e=Ag&&e[Ag]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Object.assign,Ac;function Ui(e){if(Ac===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ac=t&&t[1]||""}return`
|
|
34
|
+
`+Ac+e}var Cc=!1;function Tc(e,t){if(!e||Cc)return"";Cc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||o[a]!==i[l]){var s=`
|
|
37
|
+
`+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{Cc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ui(e):""}function PS(e){switch(e.tag){case 5:return Ui(e.type);case 16:return Ui("Lazy");case 13:return Ui("Suspense");case 19:return Ui("SuspenseList");case 0:case 2:case 15:return e=Tc(e.type,!1),e;case 11:return e=Tc(e.type.render,!1),e;case 1:return e=Tc(e.type,!0),e;default:return""}}function _d(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xo:return"Fragment";case bo:return"Portal";case zd:return"Profiler";case cf:return"StrictMode";case Ud:return"Suspense";case Bd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wy:return(e.displayName||"Context")+".Consumer";case Hy:return(e._context.displayName||"Context")+".Provider";case df:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pf:return t=e.displayName||null,t!==null?t:_d(e.type)||"Memo";case tr:t=e._payload,e=e._init;try{return _d(e(t))}catch{}}return null}function LS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _d(t);case 8:return t===cf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Nr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RS(e){var t=Zy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ml(e){e._valueTracker||(e._valueTracker=RS(e))}function Vy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ps(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $d(e,t){var n=t.checked;return _e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Nr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yy(e,t){t=t.checked,t!=null&&uf(e,"checked",t,!1)}function Fd(e,t){Yy(e,t);var n=Nr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Hd(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hd(e,t.type,Nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Hd(e,t,n){(t!=="number"||ps(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bi=Array.isArray;function ko(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Nr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Wd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return _e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Eg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Bi(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Nr(n)}}function Qy(e,t){var n=Nr(t.value),r=Nr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function jg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Jy(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Jy(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wl,Xy=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wl=wl||document.createElement("div"),wl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ca(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},OS=["Webkit","ms","Moz","O"];Object.keys(Zi).forEach(function(e){OS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zi[t]=Zi[e]})});function qy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zi.hasOwnProperty(e)&&Zi[e]?(""+t).trim():t+"px"}function Ky(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=qy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var kS=_e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zd(e,t){if(t){if(kS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Vd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yd=null;function ff(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qd=null,zo=null,Uo=null;function Pg(e){if(e=Fa(e)){if(typeof Qd!="function")throw Error(H(280));var t=e.stateNode;t&&(t=du(t),Qd(e.stateNode,e.type,t))}}function eI(e){zo?Uo?Uo.push(e):Uo=[e]:zo=e}function tI(){if(zo){var e=zo,t=Uo;if(Uo=zo=null,Pg(e),t)for(e=0;e<t.length;e++)Pg(t[e])}}function nI(e,t){return e(t)}function rI(){}var Ec=!1;function oI(e,t,n){if(Ec)return e(t,n);Ec=!0;try{return nI(e,t,n)}finally{Ec=!1,(zo!==null||Uo!==null)&&(rI(),tI())}}function da(e,t){var n=e.stateNode;if(n===null)return null;var r=du(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var Jd=!1;if(Zn)try{var Mi={};Object.defineProperty(Mi,"passive",{get:function(){Jd=!0}}),window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{Jd=!1}function zS(e,t,n,r,o,i,a,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Vi=!1,fs=null,ms=!1,Xd=null,US={onError:function(e){Vi=!0,fs=e}};function BS(e,t,n,r,o,i,a,l,s){Vi=!1,fs=null,zS.apply(US,arguments)}function _S(e,t,n,r,o,i,a,l,s){if(BS.apply(this,arguments),Vi){if(Vi){var u=fs;Vi=!1,fs=null}else throw Error(H(198));ms||(ms=!0,Xd=u)}}function po(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function iI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lg(e){if(po(e)!==e)throw Error(H(188))}function $S(e){var t=e.alternate;if(!t){if(t=po(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Lg(o),e;if(i===r)return Lg(o),t;i=i.sibling}throw Error(H(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function aI(e){return e=$S(e),e!==null?lI(e):null}function lI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lI(e);if(t!==null)return t;e=e.sibling}return null}var sI=Yt.unstable_scheduleCallback,Rg=Yt.unstable_cancelCallback,FS=Yt.unstable_shouldYield,HS=Yt.unstable_requestPaint,Ze=Yt.unstable_now,WS=Yt.unstable_getCurrentPriorityLevel,mf=Yt.unstable_ImmediatePriority,uI=Yt.unstable_UserBlockingPriority,gs=Yt.unstable_NormalPriority,GS=Yt.unstable_LowPriority,cI=Yt.unstable_IdlePriority,lu=null,En=null;function ZS(e){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(lu,e,void 0,(e.current.flags&128)===128)}catch{}}var wn=Math.clz32?Math.clz32:QS,VS=Math.log,YS=Math.LN2;function QS(e){return e>>>=0,e===0?32:31-(VS(e)/YS|0)|0}var bl=64,xl=4194304;function _i(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;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:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=_i(l):(i&=a,i!==0&&(r=_i(i)))}else a=n&~o,a!==0?r=_i(a):i!==0&&(r=_i(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-wn(t),o=1<<n,r|=e[n],t&=~o;return r}function JS(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32: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:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function XS(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-wn(i),l=1<<a,s=o[a];s===-1?(!(l&n)||l&r)&&(o[a]=JS(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}}function qd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dI(){var e=bl;return bl<<=1,!(bl&4194240)&&(bl=64),e}function jc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _a(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wn(t),e[t]=n}function qS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-wn(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function gf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var xe=0;function pI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var fI,hf,mI,gI,hI,Kd=!1,Sl=[],fr=null,mr=null,gr=null,pa=new Map,fa=new Map,or=[],KS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Og(e,t){switch(e){case"focusin":case"focusout":fr=null;break;case"dragenter":case"dragleave":mr=null;break;case"mouseover":case"mouseout":gr=null;break;case"pointerover":case"pointerout":pa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(t.pointerId)}}function wi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Fa(t),t!==null&&hf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function eN(e,t,n,r,o){switch(t){case"focusin":return fr=wi(fr,e,t,n,r,o),!0;case"dragenter":return mr=wi(mr,e,t,n,r,o),!0;case"mouseover":return gr=wi(gr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return pa.set(i,wi(pa.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,fa.set(i,wi(fa.get(i)||null,e,t,n,r,o)),!0}return!1}function vI(e){var t=Wr(e.target);if(t!==null){var n=po(t);if(n!==null){if(t=n.tag,t===13){if(t=iI(n),t!==null){e.blockedOn=t,hI(e.priority,function(){mI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ql(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ep(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yd=r,n.target.dispatchEvent(r),Yd=null}else return t=Fa(n),t!==null&&hf(t),e.blockedOn=n,!1;t.shift()}return!0}function kg(e,t,n){ql(e)&&n.delete(t)}function tN(){Kd=!1,fr!==null&&ql(fr)&&(fr=null),mr!==null&&ql(mr)&&(mr=null),gr!==null&&ql(gr)&&(gr=null),pa.forEach(kg),fa.forEach(kg)}function bi(e,t){e.blockedOn===t&&(e.blockedOn=null,Kd||(Kd=!0,Yt.unstable_scheduleCallback(Yt.unstable_NormalPriority,tN)))}function ma(e){function t(o){return bi(o,e)}if(0<Sl.length){bi(Sl[0],e);for(var n=1;n<Sl.length;n++){var r=Sl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(fr!==null&&bi(fr,e),mr!==null&&bi(mr,e),gr!==null&&bi(gr,e),pa.forEach(t),fa.forEach(t),n=0;n<or.length;n++)r=or[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<or.length&&(n=or[0],n.blockedOn===null);)vI(n),n.blockedOn===null&&or.shift()}var Bo=Xn.ReactCurrentBatchConfig,vs=!0;function nN(e,t,n,r){var o=xe,i=Bo.transition;Bo.transition=null;try{xe=1,vf(e,t,n,r)}finally{xe=o,Bo.transition=i}}function rN(e,t,n,r){var o=xe,i=Bo.transition;Bo.transition=null;try{xe=4,vf(e,t,n,r)}finally{xe=o,Bo.transition=i}}function vf(e,t,n,r){if(vs){var o=ep(e,t,n,r);if(o===null)$c(e,t,r,ys,n),Og(e,r);else if(eN(o,e,t,n,r))r.stopPropagation();else if(Og(e,r),t&4&&-1<KS.indexOf(e)){for(;o!==null;){var i=Fa(o);if(i!==null&&fI(i),i=ep(e,t,n,r),i===null&&$c(e,t,r,ys,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else $c(e,t,r,null,n)}}var ys=null;function ep(e,t,n,r){if(ys=null,e=ff(r),e=Wr(e),e!==null)if(t=po(e),t===null)e=null;else if(n=t.tag,n===13){if(e=iI(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ys=e,null}function yI(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(WS()){case mf:return 1;case uI:return 4;case gs:case GS:return 16;case cI:return 536870912;default:return 16}default:return 16}}var ur=null,yf=null,Kl=null;function II(){if(Kl)return Kl;var e,t=yf,n=t.length,r,o="value"in ur?ur.value:ur.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return Kl=o.slice(e,1<r?1-r:void 0)}function es(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nl(){return!0}function zg(){return!1}function Jt(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Nl:zg,this.isPropagationStopped=zg,this}return _e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Nl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Nl)},persist:function(){},isPersistent:Nl}),t}var si={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=Jt(si),$a=_e({},si,{view:0,detail:0}),oN=Jt($a),Pc,Lc,xi,su=_e({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==xi&&(xi&&e.type==="mousemove"?(Pc=e.screenX-xi.screenX,Lc=e.screenY-xi.screenY):Lc=Pc=0,xi=e),Pc)},movementY:function(e){return"movementY"in e?e.movementY:Lc}}),Ug=Jt(su),iN=_e({},su,{dataTransfer:0}),aN=Jt(iN),lN=_e({},$a,{relatedTarget:0}),Rc=Jt(lN),sN=_e({},si,{animationName:0,elapsedTime:0,pseudoElement:0}),uN=Jt(sN),cN=_e({},si,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dN=Jt(cN),pN=_e({},si,{data:0}),Bg=Jt(pN),fN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gN[e])?!!t[e]:!1}function Mf(){return hN}var vN=_e({},$a,{key:function(e){if(e.key){var t=fN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mf,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yN=Jt(vN),IN=_e({},su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_g=Jt(IN),MN=_e({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mf}),wN=Jt(MN),bN=_e({},si,{propertyName:0,elapsedTime:0,pseudoElement:0}),xN=Jt(bN),SN=_e({},su,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),NN=Jt(SN),DN=[9,13,27,32],wf=Zn&&"CompositionEvent"in window,Yi=null;Zn&&"documentMode"in document&&(Yi=document.documentMode);var AN=Zn&&"TextEvent"in window&&!Yi,MI=Zn&&(!wf||Yi&&8<Yi&&11>=Yi),$g=String.fromCharCode(32),Fg=!1;function wI(e,t){switch(e){case"keyup":return DN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var So=!1;function CN(e,t){switch(e){case"compositionend":return bI(t);case"keypress":return t.which!==32?null:(Fg=!0,$g);case"textInput":return e=t.data,e===$g&&Fg?null:e;default:return null}}function TN(e,t){if(So)return e==="compositionend"||!wf&&wI(e,t)?(e=II(),Kl=yf=ur=null,So=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return MI&&t.locale!=="ko"?null:t.data;default:return null}}var EN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!EN[e.type]:t==="textarea"}function xI(e,t,n,r){eI(r),t=Is(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qi=null,ga=null;function jN(e){RI(e,0)}function uu(e){var t=Ao(e);if(Vy(t))return e}function PN(e,t){if(e==="change")return t}var SI=!1;if(Zn){var Oc;if(Zn){var kc="oninput"in document;if(!kc){var Wg=document.createElement("div");Wg.setAttribute("oninput","return;"),kc=typeof Wg.oninput=="function"}Oc=kc}else Oc=!1;SI=Oc&&(!document.documentMode||9<document.documentMode)}function Gg(){Qi&&(Qi.detachEvent("onpropertychange",NI),ga=Qi=null)}function NI(e){if(e.propertyName==="value"&&uu(ga)){var t=[];xI(t,ga,e,ff(e)),oI(jN,t)}}function LN(e,t,n){e==="focusin"?(Gg(),Qi=t,ga=n,Qi.attachEvent("onpropertychange",NI)):e==="focusout"&&Gg()}function RN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uu(ga)}function ON(e,t){if(e==="click")return uu(t)}function kN(e,t){if(e==="input"||e==="change")return uu(t)}function zN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:zN;function ha(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!kd.call(t,o)||!xn(e[o],t[o]))return!1}return!0}function Zg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vg(e,t){var n=Zg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zg(n)}}function DI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?DI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function AI(){for(var e=window,t=ps();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ps(e.document)}return t}function bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function UN(e){var t=AI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&DI(n.ownerDocument.documentElement,n)){if(r!==null&&bf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Vg(n,i);var a=Vg(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var BN=Zn&&"documentMode"in document&&11>=document.documentMode,No=null,tp=null,Ji=null,np=!1;function Yg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;np||No==null||No!==ps(r)||(r=No,"selectionStart"in r&&bf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ji&&ha(Ji,r)||(Ji=r,r=Is(tp,"onSelect"),0<r.length&&(t=new If("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=No)))}function Dl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Do={animationend:Dl("Animation","AnimationEnd"),animationiteration:Dl("Animation","AnimationIteration"),animationstart:Dl("Animation","AnimationStart"),transitionend:Dl("Transition","TransitionEnd")},zc={},CI={};Zn&&(CI=document.createElement("div").style,"AnimationEvent"in window||(delete Do.animationend.animation,delete Do.animationiteration.animation,delete Do.animationstart.animation),"TransitionEvent"in window||delete Do.transitionend.transition);function cu(e){if(zc[e])return zc[e];if(!Do[e])return e;var t=Do[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in CI)return zc[e]=t[n];return e}var TI=cu("animationend"),EI=cu("animationiteration"),jI=cu("animationstart"),PI=cu("transitionend"),LI=new Map,Qg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tr(e,t){LI.set(e,t),co(t,[e])}for(var Uc=0;Uc<Qg.length;Uc++){var Bc=Qg[Uc],_N=Bc.toLowerCase(),$N=Bc[0].toUpperCase()+Bc.slice(1);Tr(_N,"on"+$N)}Tr(TI,"onAnimationEnd");Tr(EI,"onAnimationIteration");Tr(jI,"onAnimationStart");Tr("dblclick","onDoubleClick");Tr("focusin","onFocus");Tr("focusout","onBlur");Tr(PI,"onTransitionEnd");Go("onMouseEnter",["mouseout","mouseover"]);Go("onMouseLeave",["mouseout","mouseover"]);Go("onPointerEnter",["pointerout","pointerover"]);Go("onPointerLeave",["pointerout","pointerover"]);co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));co("onBeforeInput",["compositionend","keypress","textInput","paste"]);co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $i="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),FN=new Set("cancel close invalid load scroll toggle".split(" ").concat($i));function Jg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_S(r,t,void 0,e),e.currentTarget=null}function RI(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;Jg(o,l,u),i=s}else for(a=0;a<r.length;a++){if(l=r[a],s=l.instance,u=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;Jg(o,l,u),i=s}}}if(ms)throw e=Xd,ms=!1,Xd=null,e}function Ee(e,t){var n=t[lp];n===void 0&&(n=t[lp]=new Set);var r=e+"__bubble";n.has(r)||(OI(t,e,2,!1),n.add(r))}function _c(e,t,n){var r=0;t&&(r|=4),OI(n,e,r,t)}var Al="_reactListening"+Math.random().toString(36).slice(2);function va(e){if(!e[Al]){e[Al]=!0,Fy.forEach(function(n){n!=="selectionchange"&&(FN.has(n)||_c(n,!1,e),_c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Al]||(t[Al]=!0,_c("selectionchange",!1,t))}}function OI(e,t,n,r){switch(yI(t)){case 1:var o=nN;break;case 4:o=rN;break;default:o=vf}n=o.bind(null,t,n,e),o=void 0,!Jd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function $c(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;a=a.return}for(;l!==null;){if(a=Wr(l),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}l=l.parentNode}}r=r.return}oI(function(){var u=i,c=ff(n),d=[];e:{var p=LI.get(e);if(p!==void 0){var f=If,g=e;switch(e){case"keypress":if(es(n)===0)break e;case"keydown":case"keyup":f=yN;break;case"focusin":g="focus",f=Rc;break;case"focusout":g="blur",f=Rc;break;case"beforeblur":case"afterblur":f=Rc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=aN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=wN;break;case TI:case EI:case jI:f=uN;break;case PI:f=xN;break;case"scroll":f=oN;break;case"wheel":f=NN;break;case"copy":case"cut":case"paste":f=dN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=_g}var I=(t&4)!==0,w=!I&&e==="scroll",y=I?p!==null?p+"Capture":null:p;I=[];for(var h=u,M;h!==null;){M=h;var b=M.stateNode;if(M.tag===5&&b!==null&&(M=b,y!==null&&(b=da(h,y),b!=null&&I.push(ya(h,b,M)))),w)break;h=h.return}0<I.length&&(p=new f(p,g,null,n,c),d.push({event:p,listeners:I}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&n!==Yd&&(g=n.relatedTarget||n.fromElement)&&(Wr(g)||g[Vn]))break e;if((f||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,f?(g=n.relatedTarget||n.toElement,f=u,g=g?Wr(g):null,g!==null&&(w=po(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(f=null,g=u),f!==g)){if(I=Ug,b="onMouseLeave",y="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(I=_g,b="onPointerLeave",y="onPointerEnter",h="pointer"),w=f==null?p:Ao(f),M=g==null?p:Ao(g),p=new I(b,h+"leave",f,n,c),p.target=w,p.relatedTarget=M,b=null,Wr(c)===u&&(I=new I(y,h+"enter",g,n,c),I.target=M,I.relatedTarget=w,b=I),w=b,f&&g)t:{for(I=f,y=g,h=0,M=I;M;M=Io(M))h++;for(M=0,b=y;b;b=Io(b))M++;for(;0<h-M;)I=Io(I),h--;for(;0<M-h;)y=Io(y),M--;for(;h--;){if(I===y||y!==null&&I===y.alternate)break t;I=Io(I),y=Io(y)}I=null}else I=null;f!==null&&Xg(d,p,f,I,!1),g!==null&&w!==null&&Xg(d,w,g,I,!0)}}e:{if(p=u?Ao(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var N=PN;else if(Hg(p))if(SI)N=kN;else{N=RN;var x=LN}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(N=ON);if(N&&(N=N(e,u))){xI(d,N,n,c);break e}x&&x(e,p,u),e==="focusout"&&(x=p._wrapperState)&&x.controlled&&p.type==="number"&&Hd(p,"number",p.value)}switch(x=u?Ao(u):window,e){case"focusin":(Hg(x)||x.contentEditable==="true")&&(No=x,tp=u,Ji=null);break;case"focusout":Ji=tp=No=null;break;case"mousedown":np=!0;break;case"contextmenu":case"mouseup":case"dragend":np=!1,Yg(d,n,c);break;case"selectionchange":if(BN)break;case"keydown":case"keyup":Yg(d,n,c)}var D;if(wf)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else So?wI(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(MI&&n.locale!=="ko"&&(So||j!=="onCompositionStart"?j==="onCompositionEnd"&&So&&(D=II()):(ur=c,yf="value"in ur?ur.value:ur.textContent,So=!0)),x=Is(u,j),0<x.length&&(j=new Bg(j,e,null,n,c),d.push({event:j,listeners:x}),D?j.data=D:(D=bI(n),D!==null&&(j.data=D)))),(D=AN?CN(e,n):TN(e,n))&&(u=Is(u,"onBeforeInput"),0<u.length&&(c=new Bg("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=D))}RI(d,t)})}function ya(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Is(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=da(e,n),i!=null&&r.unshift(ya(e,i,o)),i=da(e,t),i!=null&&r.push(ya(e,i,o))),e=e.return}return r}function Io(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Xg(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(s!==null&&s===r)break;l.tag===5&&u!==null&&(l=u,o?(s=da(n,i),s!=null&&a.unshift(ya(n,s,l))):o||(s=da(n,i),s!=null&&a.push(ya(n,s,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var HN=/\r\n?/g,WN=/\u0000|\uFFFD/g;function qg(e){return(typeof e=="string"?e:""+e).replace(HN,`
|
|
38
|
+
`).replace(WN,"")}function Cl(e,t,n){if(t=qg(t),qg(e)!==t&&n)throw Error(H(425))}function Ms(){}var rp=null,op=null;function ip(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ap=typeof setTimeout=="function"?setTimeout:void 0,GN=typeof clearTimeout=="function"?clearTimeout:void 0,Kg=typeof Promise=="function"?Promise:void 0,ZN=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(e){return Kg.resolve(null).then(e).catch(VN)}:ap;function VN(e){setTimeout(function(){throw e})}function Fc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ma(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ma(t)}function hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function eh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),Cn="__reactFiber$"+ui,Ia="__reactProps$"+ui,Vn="__reactContainer$"+ui,lp="__reactEvents$"+ui,YN="__reactListeners$"+ui,QN="__reactHandles$"+ui;function Wr(e){var t=e[Cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vn]||n[Cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=eh(e);e!==null;){if(n=e[Cn])return n;e=eh(e)}return t}e=n,n=e.parentNode}return null}function Fa(e){return e=e[Cn]||e[Vn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ao(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function du(e){return e[Ia]||null}var sp=[],Co=-1;function Er(e){return{current:e}}function Pe(e){0>Co||(e.current=sp[Co],sp[Co]=null,Co--)}function Te(e,t){Co++,sp[Co]=e.current,e.current=t}var Dr={},Mt=Er(Dr),Rt=Er(!1),eo=Dr;function Zo(e,t){var n=e.type.contextTypes;if(!n)return Dr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ot(e){return e=e.childContextTypes,e!=null}function ws(){Pe(Rt),Pe(Mt)}function th(e,t,n){if(Mt.current!==Dr)throw Error(H(168));Te(Mt,t),Te(Rt,n)}function kI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(H(108,LS(e)||"Unknown",o));return _e({},n,r)}function bs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dr,eo=Mt.current,Te(Mt,e),Te(Rt,Rt.current),!0}function nh(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=kI(e,t,eo),r.__reactInternalMemoizedMergedChildContext=e,Pe(Rt),Pe(Mt),Te(Mt,e)):Pe(Rt),Te(Rt,n)}var Bn=null,pu=!1,Hc=!1;function zI(e){Bn===null?Bn=[e]:Bn.push(e)}function JN(e){pu=!0,zI(e)}function jr(){if(!Hc&&Bn!==null){Hc=!0;var e=0,t=xe;try{var n=Bn;for(xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bn=null,pu=!1}catch(o){throw Bn!==null&&(Bn=Bn.slice(e+1)),sI(mf,jr),o}finally{xe=t,Hc=!1}}return null}var To=[],Eo=0,xs=null,Ss=0,on=[],an=0,to=null,$n=1,Fn="";function _r(e,t){To[Eo++]=Ss,To[Eo++]=xs,xs=e,Ss=t}function UI(e,t,n){on[an++]=$n,on[an++]=Fn,on[an++]=to,to=e;var r=$n;e=Fn;var o=32-wn(r)-1;r&=~(1<<o),n+=1;var i=32-wn(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,$n=1<<32-wn(t)+o|n<<o|r,Fn=i+e}else $n=1<<i|n<<o|r,Fn=e}function xf(e){e.return!==null&&(_r(e,1),UI(e,1,0))}function Sf(e){for(;e===xs;)xs=To[--Eo],To[Eo]=null,Ss=To[--Eo],To[Eo]=null;for(;e===to;)to=on[--an],on[an]=null,Fn=on[--an],on[an]=null,$n=on[--an],on[an]=null}var Wt=null,$t=null,Oe=!1,yn=null;function BI(e,t){var n=ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function rh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,$t=hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,$t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=to!==null?{id:$n,overflow:Fn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,$t=null,!0):!1;default:return!1}}function up(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cp(e){if(Oe){var t=$t;if(t){var n=t;if(!rh(e,t)){if(up(e))throw Error(H(418));t=hr(n.nextSibling);var r=Wt;t&&rh(e,t)?BI(r,n):(e.flags=e.flags&-4097|2,Oe=!1,Wt=e)}}else{if(up(e))throw Error(H(418));e.flags=e.flags&-4097|2,Oe=!1,Wt=e}}}function oh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Tl(e){if(e!==Wt)return!1;if(!Oe)return oh(e),Oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ip(e.type,e.memoizedProps)),t&&(t=$t)){if(up(e))throw _I(),Error(H(418));for(;t;)BI(e,t),t=hr(t.nextSibling)}if(oh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$t=hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$t=null}}else $t=Wt?hr(e.stateNode.nextSibling):null;return!0}function _I(){for(var e=$t;e;)e=hr(e.nextSibling)}function Vo(){$t=Wt=null,Oe=!1}function Nf(e){yn===null?yn=[e]:yn.push(e)}var XN=Xn.ReactCurrentBatchConfig;function hn(e,t){if(e&&e.defaultProps){t=_e({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ns=Er(null),Ds=null,jo=null,Df=null;function Af(){Df=jo=Ds=null}function Cf(e){var t=Ns.current;Pe(Ns),e._currentValue=t}function dp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _o(e,t){Ds=e,Df=jo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function dn(e){var t=e._currentValue;if(Df!==e)if(e={context:e,memoizedValue:t,next:null},jo===null){if(Ds===null)throw Error(H(308));jo=e,Ds.dependencies={lanes:0,firstContext:e}}else jo=jo.next=e;return t}var Gr=null;function Tf(e){Gr===null?Gr=[e]:Gr.push(e)}function $I(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Tf(t)):(n.next=o.next,o.next=n),t.interleaved=n,Yn(e,r)}function Yn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var nr=!1;function Ef(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FI(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,we&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Yn(e,n)}return o=r.interleaved,o===null?(t.next=t,Tf(r)):(t.next=o.next,o.next=t),r.interleaved=t,Yn(e,n)}function ts(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gf(e,n)}}function ih(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function As(e,t,n,r){var o=e.updateQueue;nr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?i=u:a.next=u,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==a&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(i!==null){var d=o.baseState;a=0,c=u=s=null,l=i;do{var p=l.lane,f=l.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,I=l;switch(p=t,f=n,I.tag){case 1:if(g=I.payload,typeof g=="function"){d=g.call(f,d,p);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=I.payload,p=typeof g=="function"?g.call(f,d,p):g,p==null)break e;d=_e({},d,p);break e;case 2:nr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=f,s=d):c=c.next=f,a|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(1);if(c===null&&(s=d),o.baseState=s,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);ro|=a,e.lanes=a,e.memoizedState=d}}function ah(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(H(191,o));o.call(r)}}}var HI=new $y.Component().refs;function pp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:_e({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fu={isMounted:function(e){return(e=e._reactInternals)?po(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dt(),o=Ir(e),i=Wn(r,o);i.payload=t,n!=null&&(i.callback=n),t=vr(e,i,o),t!==null&&(bn(t,e,o,r),ts(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dt(),o=Ir(e),i=Wn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=vr(e,i,o),t!==null&&(bn(t,e,o,r),ts(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),r=Ir(e),o=Wn(n,r);o.tag=2,t!=null&&(o.callback=t),t=vr(e,o,r),t!==null&&(bn(t,e,r,n),ts(t,e,r))}};function lh(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!ha(n,r)||!ha(o,i):!0}function WI(e,t,n){var r=!1,o=Dr,i=t.contextType;return typeof i=="object"&&i!==null?i=dn(i):(o=Ot(t)?eo:Mt.current,r=t.contextTypes,i=(r=r!=null)?Zo(e,o):Dr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function sh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fu.enqueueReplaceState(t,t.state,null)}function fp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=HI,Ef(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=dn(i):(i=Ot(t)?eo:Mt.current,o.context=Zo(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(pp(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&fu.enqueueReplaceState(o,o.state,null),As(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Si(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var l=o.refs;l===HI&&(l=o.refs={}),a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function El(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uh(e){var t=e._init;return t(e._payload)}function GI(e){function t(y,h){if(e){var M=y.deletions;M===null?(y.deletions=[h],y.flags|=16):M.push(h)}}function n(y,h){if(!e)return null;for(;h!==null;)t(y,h),h=h.sibling;return null}function r(y,h){for(y=new Map;h!==null;)h.key!==null?y.set(h.key,h):y.set(h.index,h),h=h.sibling;return y}function o(y,h){return y=Mr(y,h),y.index=0,y.sibling=null,y}function i(y,h,M){return y.index=M,e?(M=y.alternate,M!==null?(M=M.index,M<h?(y.flags|=2,h):M):(y.flags|=2,h)):(y.flags|=1048576,h)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,h,M,b){return h===null||h.tag!==6?(h=Jc(M,y.mode,b),h.return=y,h):(h=o(h,M),h.return=y,h)}function s(y,h,M,b){var N=M.type;return N===xo?c(y,h,M.props.children,b,M.key):h!==null&&(h.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===tr&&uh(N)===h.type)?(b=o(h,M.props),b.ref=Si(y,h,M),b.return=y,b):(b=ls(M.type,M.key,M.props,null,y.mode,b),b.ref=Si(y,h,M),b.return=y,b)}function u(y,h,M,b){return h===null||h.tag!==4||h.stateNode.containerInfo!==M.containerInfo||h.stateNode.implementation!==M.implementation?(h=Xc(M,y.mode,b),h.return=y,h):(h=o(h,M.children||[]),h.return=y,h)}function c(y,h,M,b,N){return h===null||h.tag!==7?(h=qr(M,y.mode,b,N),h.return=y,h):(h=o(h,M),h.return=y,h)}function d(y,h,M){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Jc(""+h,y.mode,M),h.return=y,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Il:return M=ls(h.type,h.key,h.props,null,y.mode,M),M.ref=Si(y,null,h),M.return=y,M;case bo:return h=Xc(h,y.mode,M),h.return=y,h;case tr:var b=h._init;return d(y,b(h._payload),M)}if(Bi(h)||Ii(h))return h=qr(h,y.mode,M,null),h.return=y,h;El(y,h)}return null}function p(y,h,M,b){var N=h!==null?h.key:null;if(typeof M=="string"&&M!==""||typeof M=="number")return N!==null?null:l(y,h,""+M,b);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Il:return M.key===N?s(y,h,M,b):null;case bo:return M.key===N?u(y,h,M,b):null;case tr:return N=M._init,p(y,h,N(M._payload),b)}if(Bi(M)||Ii(M))return N!==null?null:c(y,h,M,b,null);El(y,M)}return null}function f(y,h,M,b,N){if(typeof b=="string"&&b!==""||typeof b=="number")return y=y.get(M)||null,l(h,y,""+b,N);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Il:return y=y.get(b.key===null?M:b.key)||null,s(h,y,b,N);case bo:return y=y.get(b.key===null?M:b.key)||null,u(h,y,b,N);case tr:var x=b._init;return f(y,h,M,x(b._payload),N)}if(Bi(b)||Ii(b))return y=y.get(M)||null,c(h,y,b,N,null);El(h,b)}return null}function g(y,h,M,b){for(var N=null,x=null,D=h,j=h=0,L=null;D!==null&&j<M.length;j++){D.index>j?(L=D,D=null):L=D.sibling;var R=p(y,D,M[j],b);if(R===null){D===null&&(D=L);break}e&&D&&R.alternate===null&&t(y,D),h=i(R,h,j),x===null?N=R:x.sibling=R,x=R,D=L}if(j===M.length)return n(y,D),Oe&&_r(y,j),N;if(D===null){for(;j<M.length;j++)D=d(y,M[j],b),D!==null&&(h=i(D,h,j),x===null?N=D:x.sibling=D,x=D);return Oe&&_r(y,j),N}for(D=r(y,D);j<M.length;j++)L=f(D,y,j,M[j],b),L!==null&&(e&&L.alternate!==null&&D.delete(L.key===null?j:L.key),h=i(L,h,j),x===null?N=L:x.sibling=L,x=L);return e&&D.forEach(function(U){return t(y,U)}),Oe&&_r(y,j),N}function I(y,h,M,b){var N=Ii(M);if(typeof N!="function")throw Error(H(150));if(M=N.call(M),M==null)throw Error(H(151));for(var x=N=null,D=h,j=h=0,L=null,R=M.next();D!==null&&!R.done;j++,R=M.next()){D.index>j?(L=D,D=null):L=D.sibling;var U=p(y,D,R.value,b);if(U===null){D===null&&(D=L);break}e&&D&&U.alternate===null&&t(y,D),h=i(U,h,j),x===null?N=U:x.sibling=U,x=U,D=L}if(R.done)return n(y,D),Oe&&_r(y,j),N;if(D===null){for(;!R.done;j++,R=M.next())R=d(y,R.value,b),R!==null&&(h=i(R,h,j),x===null?N=R:x.sibling=R,x=R);return Oe&&_r(y,j),N}for(D=r(y,D);!R.done;j++,R=M.next())R=f(D,y,j,R.value,b),R!==null&&(e&&R.alternate!==null&&D.delete(R.key===null?j:R.key),h=i(R,h,j),x===null?N=R:x.sibling=R,x=R);return e&&D.forEach(function(ee){return t(y,ee)}),Oe&&_r(y,j),N}function w(y,h,M,b){if(typeof M=="object"&&M!==null&&M.type===xo&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case Il:e:{for(var N=M.key,x=h;x!==null;){if(x.key===N){if(N=M.type,N===xo){if(x.tag===7){n(y,x.sibling),h=o(x,M.props.children),h.return=y,y=h;break e}}else if(x.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===tr&&uh(N)===x.type){n(y,x.sibling),h=o(x,M.props),h.ref=Si(y,x,M),h.return=y,y=h;break e}n(y,x);break}else t(y,x);x=x.sibling}M.type===xo?(h=qr(M.props.children,y.mode,b,M.key),h.return=y,y=h):(b=ls(M.type,M.key,M.props,null,y.mode,b),b.ref=Si(y,h,M),b.return=y,y=b)}return a(y);case bo:e:{for(x=M.key;h!==null;){if(h.key===x)if(h.tag===4&&h.stateNode.containerInfo===M.containerInfo&&h.stateNode.implementation===M.implementation){n(y,h.sibling),h=o(h,M.children||[]),h.return=y,y=h;break e}else{n(y,h);break}else t(y,h);h=h.sibling}h=Xc(M,y.mode,b),h.return=y,y=h}return a(y);case tr:return x=M._init,w(y,h,x(M._payload),b)}if(Bi(M))return g(y,h,M,b);if(Ii(M))return I(y,h,M,b);El(y,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,h!==null&&h.tag===6?(n(y,h.sibling),h=o(h,M),h.return=y,y=h):(n(y,h),h=Jc(M,y.mode,b),h.return=y,y=h),a(y)):n(y,h)}return w}var Yo=GI(!0),ZI=GI(!1),Ha={},jn=Er(Ha),Ma=Er(Ha),wa=Er(Ha);function Zr(e){if(e===Ha)throw Error(H(174));return e}function jf(e,t){switch(Te(wa,t),Te(Ma,e),Te(jn,Ha),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gd(t,e)}Pe(jn),Te(jn,t)}function Qo(){Pe(jn),Pe(Ma),Pe(wa)}function VI(e){Zr(wa.current);var t=Zr(jn.current),n=Gd(t,e.type);t!==n&&(Te(Ma,e),Te(jn,n))}function Pf(e){Ma.current===e&&(Pe(jn),Pe(Ma))}var ze=Er(0);function Cs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wc=[];function Lf(){for(var e=0;e<Wc.length;e++)Wc[e]._workInProgressVersionPrimary=null;Wc.length=0}var ns=Xn.ReactCurrentDispatcher,Gc=Xn.ReactCurrentBatchConfig,no=0,Be=null,Ke=null,rt=null,Ts=!1,Xi=!1,ba=0,qN=0;function gt(){throw Error(H(321))}function Rf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function Of(e,t,n,r,o,i){if(no=i,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ns.current=e===null||e.memoizedState===null?nD:rD,e=n(r,o),Xi){i=0;do{if(Xi=!1,ba=0,25<=i)throw Error(H(301));i+=1,rt=Ke=null,t.updateQueue=null,ns.current=oD,e=n(r,o)}while(Xi)}if(ns.current=Es,t=Ke!==null&&Ke.next!==null,no=0,rt=Ke=Be=null,Ts=!1,t)throw Error(H(300));return e}function kf(){var e=ba!==0;return ba=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?Be.memoizedState=rt=e:rt=rt.next=e,rt}function pn(){if(Ke===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=rt===null?Be.memoizedState:rt.next;if(t!==null)rt=t,Ke=e;else{if(e===null)throw Error(H(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},rt===null?Be.memoizedState=rt=e:rt=rt.next=e}return rt}function xa(e,t){return typeof t=="function"?t(e):t}function Zc(e){var t=pn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=Ke,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=a=null,s=null,u=i;do{var c=u.lane;if((no&c)===c)s!==null&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};s===null?(l=s=d,a=r):s=s.next=d,Be.lanes|=c,ro|=c}u=u.next}while(u!==null&&u!==i);s===null?a=r:s.next=l,xn(r,t.memoizedState)||(Pt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Be.lanes|=i,ro|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vc(e){var t=pn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);xn(i,t.memoizedState)||(Pt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function YI(){}function QI(e,t){var n=Be,r=pn(),o=t(),i=!xn(r.memoizedState,o);if(i&&(r.memoizedState=o,Pt=!0),r=r.queue,zf(qI.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||rt!==null&&rt.memoizedState.tag&1){if(n.flags|=2048,Sa(9,XI.bind(null,n,r,o,t),void 0,null),ot===null)throw Error(H(349));no&30||JI(n,t,o)}return o}function JI(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function XI(e,t,n,r){t.value=n,t.getSnapshot=r,KI(t)&&e0(e)}function qI(e,t,n){return n(function(){KI(t)&&e0(e)})}function KI(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function e0(e){var t=Yn(e,1);t!==null&&bn(t,e,1,-1)}function ch(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=tD.bind(null,Be,e),[t.memoizedState,e]}function Sa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function t0(){return pn().memoizedState}function rs(e,t,n,r){var o=Dn();Be.flags|=e,o.memoizedState=Sa(1|t,n,void 0,r===void 0?null:r)}function mu(e,t,n,r){var o=pn();r=r===void 0?null:r;var i=void 0;if(Ke!==null){var a=Ke.memoizedState;if(i=a.destroy,r!==null&&Rf(r,a.deps)){o.memoizedState=Sa(t,n,i,r);return}}Be.flags|=e,o.memoizedState=Sa(1|t,n,i,r)}function dh(e,t){return rs(8390656,8,e,t)}function zf(e,t){return mu(2048,8,e,t)}function n0(e,t){return mu(4,2,e,t)}function r0(e,t){return mu(4,4,e,t)}function o0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function i0(e,t,n){return n=n!=null?n.concat([e]):null,mu(4,4,o0.bind(null,t,e),n)}function Uf(){}function a0(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function l0(e,t){var n=pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function s0(e,t,n){return no&21?(xn(n,t)||(n=dI(),Be.lanes|=n,ro|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function KN(e,t){var n=xe;xe=n!==0&&4>n?n:4,e(!0);var r=Gc.transition;Gc.transition={};try{e(!1),t()}finally{xe=n,Gc.transition=r}}function u0(){return pn().memoizedState}function eD(e,t,n){var r=Ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},c0(e))d0(t,n);else if(n=$I(e,t,n,r),n!==null){var o=Dt();bn(n,e,r,o),p0(n,t,r)}}function tD(e,t,n){var r=Ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(c0(e))d0(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,xn(l,a)){var s=t.interleaved;s===null?(o.next=o,Tf(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=$I(e,t,o,r),n!==null&&(o=Dt(),bn(n,e,r,o),p0(n,t,r))}}function c0(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function d0(e,t){Xi=Ts=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function p0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gf(e,n)}}var Es={readContext:dn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},nD={readContext:dn,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:dn,useEffect:dh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rs(4194308,4,o0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){return rs(4,2,e,t)},useMemo:function(e,t){var n=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=eD.bind(null,Be,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:ch,useDebugValue:Uf,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=ch(!1),t=e[0];return e=KN.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Be,o=Dn();if(Oe){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),ot===null)throw Error(H(349));no&30||JI(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,dh(qI.bind(null,r,i,e),[e]),r.flags|=2048,Sa(9,XI.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Dn(),t=ot.identifierPrefix;if(Oe){var n=Fn,r=$n;n=(r&~(1<<32-wn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ba++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=qN++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rD={readContext:dn,useCallback:a0,useContext:dn,useEffect:zf,useImperativeHandle:i0,useInsertionEffect:n0,useLayoutEffect:r0,useMemo:l0,useReducer:Zc,useRef:t0,useState:function(){return Zc(xa)},useDebugValue:Uf,useDeferredValue:function(e){var t=pn();return s0(t,Ke.memoizedState,e)},useTransition:function(){var e=Zc(xa)[0],t=pn().memoizedState;return[e,t]},useMutableSource:YI,useSyncExternalStore:QI,useId:u0,unstable_isNewReconciler:!1},oD={readContext:dn,useCallback:a0,useContext:dn,useEffect:zf,useImperativeHandle:i0,useInsertionEffect:n0,useLayoutEffect:r0,useMemo:l0,useReducer:Vc,useRef:t0,useState:function(){return Vc(xa)},useDebugValue:Uf,useDeferredValue:function(e){var t=pn();return Ke===null?t.memoizedState=e:s0(t,Ke.memoizedState,e)},useTransition:function(){var e=Vc(xa)[0],t=pn().memoizedState;return[e,t]},useMutableSource:YI,useSyncExternalStore:QI,useId:u0,unstable_isNewReconciler:!1};function Jo(e,t){try{var n="",r=t;do n+=PS(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Yc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function mp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var iD=typeof WeakMap=="function"?WeakMap:Map;function f0(e,t,n){n=Wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ps||(Ps=!0,Sp=r),mp(e,t)},n}function m0(e,t,n){n=Wn(-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(){mp(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){mp(e,t),typeof r!="function"&&(yr===null?yr=new Set([this]):yr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function ph(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new iD;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=ID.bind(null,e,t,n),t.then(e,e))}function fh(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 mh(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=Wn(-1,1),t.tag=2,vr(n,t,1))),n.lanes|=1),e)}var aD=Xn.ReactCurrentOwner,Pt=!1;function St(e,t,n,r){t.child=e===null?ZI(t,null,n,r):Yo(t,e.child,n,r)}function gh(e,t,n,r,o){n=n.render;var i=t.ref;return _o(t,o),r=Of(e,t,n,r,i,o),n=kf(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qn(e,t,o)):(Oe&&n&&xf(t),t.flags|=1,St(e,t,r,o),t.child)}function hh(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Zf(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,g0(e,t,i,r,o)):(e=ls(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:ha,n(a,r)&&e.ref===t.ref)return Qn(e,t,o)}return t.flags|=1,e=Mr(i,r),e.ref=t.ref,e.return=t,t.child=e}function g0(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ha(i,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,Qn(e,t,o)}return gp(e,t,n,r,o)}function h0(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(Lo,Bt),Bt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Te(Lo,Bt),Bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Te(Lo,Bt),Bt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Te(Lo,Bt),Bt|=r;return St(e,t,o,n),t.child}function v0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gp(e,t,n,r,o){var i=Ot(n)?eo:Mt.current;return i=Zo(t,i),_o(t,o),n=Of(e,t,n,r,i,o),r=kf(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qn(e,t,o)):(Oe&&r&&xf(t),t.flags|=1,St(e,t,n,o),t.child)}function vh(e,t,n,r,o){if(Ot(n)){var i=!0;bs(t)}else i=!1;if(_o(t,o),t.stateNode===null)os(e,t),WI(t,n,r),fp(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=dn(u):(u=Ot(n)?eo:Mt.current,u=Zo(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==u)&&sh(t,a,r,u),nr=!1;var p=t.memoizedState;a.state=p,As(t,r,a,o),s=t.memoizedState,l!==r||p!==s||Rt.current||nr?(typeof c=="function"&&(pp(t,n,c,r),s=t.memoizedState),(l=nr||lh(t,n,l,r,p,s,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,FI(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:hn(t.type,l),a.props=u,d=t.pendingProps,p=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=dn(s):(s=Ot(n)?eo:Mt.current,s=Zo(t,s));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||p!==s)&&sh(t,a,r,s),nr=!1,p=t.memoizedState,a.state=p,As(t,r,a,o);var g=t.memoizedState;l!==d||p!==g||Rt.current||nr?(typeof f=="function"&&(pp(t,n,f,r),g=t.memoizedState),(u=nr||lh(t,n,u,r,p,g,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=s,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return hp(e,t,n,r,i,o)}function hp(e,t,n,r,o,i){v0(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&nh(t,n,!1),Qn(e,t,i);r=t.stateNode,aD.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Yo(t,e.child,null,i),t.child=Yo(t,null,l,i)):St(e,t,l,i),t.memoizedState=r.state,o&&nh(t,n,!0),t.child}function y0(e){var t=e.stateNode;t.pendingContext?th(e,t.pendingContext,t.pendingContext!==t.context):t.context&&th(e,t.context,!1),jf(e,t.containerInfo)}function yh(e,t,n,r,o){return Vo(),Nf(o),t.flags|=256,St(e,t,n,r),t.child}var vp={dehydrated:null,treeContext:null,retryLane:0};function yp(e){return{baseLanes:e,cachePool:null,transitions:null}}function I0(e,t,n){var r=t.pendingProps,o=ze.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Te(ze,o&1),e===null)return cp(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):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=vu(a,r,0,null),e=qr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=yp(n),t.memoizedState=vp,e):Bf(t,a));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return lD(e,t,a,r,l,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,l=o.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Mr(o,s),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=Mr(l,i):(i=qr(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?yp(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=vp,r}return i=e.child,e=i.sibling,r=Mr(i,{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 Bf(e,t){return t=vu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jl(e,t,n,r){return r!==null&&Nf(r),Yo(t,e.child,null,n),e=Bf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lD(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Yc(Error(H(422))),jl(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=vu({mode:"visible",children:r.children},o,0,null),i=qr(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Yo(t,e.child,null,a),t.child.memoizedState=yp(a),t.memoizedState=vp,i);if(!(t.mode&1))return jl(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(H(419)),r=Yc(i,r,void 0),jl(e,t,a,r)}if(l=(a&e.childLanes)!==0,Pt||l){if(r=ot,r!==null){switch(a&-a){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|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Yn(e,o),bn(r,e,o,-1))}return Gf(),r=Yc(Error(H(421))),jl(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=MD.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,$t=hr(o.nextSibling),Wt=t,Oe=!0,yn=null,e!==null&&(on[an++]=$n,on[an++]=Fn,on[an++]=to,$n=e.id,Fn=e.overflow,to=t),t=Bf(t,r.children),t.flags|=4096,t)}function Ih(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dp(e.return,t,n)}function Qc(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function M0(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(St(e,t,r.children,n),r=ze.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&&Ih(e,n,t);else if(e.tag===19)Ih(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(Te(ze,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&&Cs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Qc(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Cs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Qc(t,!0,n,null,i);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function os(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ro|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Mr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sD(e,t,n){switch(t.tag){case 3:y0(t),Vo();break;case 5:VI(t);break;case 1:Ot(t.type)&&bs(t);break;case 4:jf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Te(Ns,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Te(ze,ze.current&1),t.flags|=128,null):n&t.child.childLanes?I0(e,t,n):(Te(ze,ze.current&1),e=Qn(e,t,n),e!==null?e.sibling:null);Te(ze,ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return M0(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Te(ze,ze.current),r)break;return null;case 22:case 23:return t.lanes=0,h0(e,t,n)}return Qn(e,t,n)}var w0,Ip,b0,x0;w0=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}};Ip=function(){};b0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Zr(jn.current);var i=null;switch(n){case"input":o=$d(e,o),r=$d(e,r),i=[];break;case"select":o=_e({},o,{value:void 0}),r=_e({},r,{value:void 0}),i=[];break;case"textarea":o=Wd(e,o),r=Wd(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ms)}Zd(n,r);var a;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ua.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var s=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&s!==l&&(s!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&l[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(i=i||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ua.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Ee("scroll",e),i||l===s||(i=[])):(i=i||[]).push(u,s))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};x0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ni(e,t){if(!Oe)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 ht(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 uD(e,t,n){var r=t.pendingProps;switch(Sf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return Ot(t.type)&&ws(),ht(t),null;case 3:return r=t.stateNode,Qo(),Pe(Rt),Pe(Mt),Lf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yn!==null&&(Ap(yn),yn=null))),Ip(e,t),ht(t),null;case 5:Pf(t);var o=Zr(wa.current);if(n=t.type,e!==null&&t.stateNode!=null)b0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return ht(t),null}if(e=Zr(jn.current),Tl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Cn]=t,r[Ia]=i,e=(t.mode&1)!==0,n){case"dialog":Ee("cancel",r),Ee("close",r);break;case"iframe":case"object":case"embed":Ee("load",r);break;case"video":case"audio":for(o=0;o<$i.length;o++)Ee($i[o],r);break;case"source":Ee("error",r);break;case"img":case"image":case"link":Ee("error",r),Ee("load",r);break;case"details":Ee("toggle",r);break;case"input":Cg(r,i),Ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",r);break;case"textarea":Eg(r,i),Ee("invalid",r)}Zd(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Cl(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Cl(r.textContent,l,e),o=["children",""+l]):ua.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Ee("scroll",r)}switch(n){case"input":Ml(r),Tg(r,i,!0);break;case"textarea":Ml(r),jg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ms)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Jy(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Cn]=t,e[Ia]=r,w0(e,t,!1,!1),t.stateNode=e;e:{switch(a=Vd(n,r),n){case"dialog":Ee("cancel",e),Ee("close",e),o=r;break;case"iframe":case"object":case"embed":Ee("load",e),o=r;break;case"video":case"audio":for(o=0;o<$i.length;o++)Ee($i[o],e);o=r;break;case"source":Ee("error",e),o=r;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),o=r;break;case"details":Ee("toggle",e),o=r;break;case"input":Cg(e,r),o=$d(e,r),Ee("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=_e({},r,{value:void 0}),Ee("invalid",e);break;case"textarea":Eg(e,r),o=Wd(e,r),Ee("invalid",e);break;default:o=r}Zd(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var s=l[i];i==="style"?Ky(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Xy(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&ca(e,s):typeof s=="number"&&ca(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ua.hasOwnProperty(i)?s!=null&&i==="onScroll"&&Ee("scroll",e):s!=null&&uf(e,i,s,a))}switch(n){case"input":Ml(e),Tg(e,r,!1);break;case"textarea":Ml(e),jg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ko(e,!!r.multiple,i,!1):r.defaultValue!=null&&ko(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ms)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ht(t),null;case 6:if(e&&t.stateNode!=null)x0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=Zr(wa.current),Zr(jn.current),Tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Cn]=t,(i=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:Cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cl(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Cn]=t,t.stateNode=r}return ht(t),null;case 13:if(Pe(ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Oe&&$t!==null&&t.mode&1&&!(t.flags&128))_I(),Vo(),t.flags|=98560,i=!1;else if(i=Tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[Cn]=t}else Vo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ht(t),i=!1}else yn!==null&&(Ap(yn),yn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ze.current&1?et===0&&(et=3):Gf())),t.updateQueue!==null&&(t.flags|=4),ht(t),null);case 4:return Qo(),Ip(e,t),e===null&&va(t.stateNode.containerInfo),ht(t),null;case 10:return Cf(t.type._context),ht(t),null;case 17:return Ot(t.type)&&ws(),ht(t),null;case 19:if(Pe(ze),i=t.memoizedState,i===null)return ht(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Ni(i,!1);else{if(et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Cs(e),a!==null){for(t.flags|=128,Ni(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Te(ze,ze.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ze()>Xo&&(t.flags|=128,r=!0,Ni(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ni(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Oe)return ht(t),null}else 2*Ze()-i.renderingStartTime>Xo&&n!==1073741824&&(t.flags|=128,r=!0,Ni(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,n=ze.current,Te(ze,r?n&1|2:n&1),t):(ht(t),null);case 22:case 23:return Wf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bt&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function cD(e,t){switch(Sf(t),t.tag){case 1:return Ot(t.type)&&ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qo(),Pe(Rt),Pe(Mt),Lf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pf(t),null;case 13:if(Pe(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(ze),null;case 4:return Qo(),null;case 10:return Cf(t.type._context),null;case 22:case 23:return Wf(),null;case 24:return null;default:return null}}var Pl=!1,yt=!1,dD=typeof WeakSet=="function"?WeakSet:Set,K=null;function Po(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function Mp(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var Mh=!1;function pD(e,t){if(rp=vs,e=AI(),bf(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,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,s=-1,u=0,c=0,d=e,p=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(l=a+o),d!==i||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(f=d.firstChild)!==null;)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++c===r&&(s=a),(f=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=f}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(op={focusedElem:e,selectionRange:n},vs=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var I=g.memoizedProps,w=g.memoizedState,y=t.stateNode,h=y.getSnapshotBeforeUpdate(t.elementType===t.type?I:hn(t.type,I),w);y.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var M=t.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(b){Fe(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return g=Mh,Mh=!1,g}function qi(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 i=o.destroy;o.destroy=void 0,i!==void 0&&Mp(t,n,i)}o=o.next}while(o!==r)}}function gu(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 wp(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 S0(e){var t=e.alternate;t!==null&&(e.alternate=null,S0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cn],delete t[Ia],delete t[lp],delete t[YN],delete t[QN])),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 N0(e){return e.tag===5||e.tag===3||e.tag===4}function wh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||N0(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 bp(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=Ms));else if(r!==4&&(e=e.child,e!==null))for(bp(e,t,n),e=e.sibling;e!==null;)bp(e,t,n),e=e.sibling}function xp(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(xp(e,t,n),e=e.sibling;e!==null;)xp(e,t,n),e=e.sibling}var dt=null,vn=!1;function Kn(e,t,n){for(n=n.child;n!==null;)D0(e,t,n),n=n.sibling}function D0(e,t,n){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(lu,n)}catch{}switch(n.tag){case 5:yt||Po(n,t);case 6:var r=dt,o=vn;dt=null,Kn(e,t,n),dt=r,vn=o,dt!==null&&(vn?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(vn?(e=dt,n=n.stateNode,e.nodeType===8?Fc(e.parentNode,n):e.nodeType===1&&Fc(e,n),ma(e)):Fc(dt,n.stateNode));break;case 4:r=dt,o=vn,dt=n.stateNode.containerInfo,vn=!0,Kn(e,t,n),dt=r,vn=o;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Mp(n,t,a),o=o.next}while(o!==r)}Kn(e,t,n);break;case 1:if(!yt&&(Po(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Fe(n,t,l)}Kn(e,t,n);break;case 21:Kn(e,t,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Kn(e,t,n),yt=r):Kn(e,t,n);break;default:Kn(e,t,n)}}function bh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dD),t.forEach(function(r){var o=wD.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:dt=l.stateNode,vn=!1;break e;case 3:dt=l.stateNode.containerInfo,vn=!0;break e;case 4:dt=l.stateNode.containerInfo,vn=!0;break e}l=l.return}if(dt===null)throw Error(H(160));D0(i,a,o),dt=null,vn=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(u){Fe(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)A0(t,e),t=t.sibling}function A0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mn(t,e),Nn(e),r&4){try{qi(3,e,e.return),gu(3,e)}catch(I){Fe(e,e.return,I)}try{qi(5,e,e.return)}catch(I){Fe(e,e.return,I)}}break;case 1:mn(t,e),Nn(e),r&512&&n!==null&&Po(n,n.return);break;case 5:if(mn(t,e),Nn(e),r&512&&n!==null&&Po(n,n.return),e.flags&32){var o=e.stateNode;try{ca(o,"")}catch(I){Fe(e,e.return,I)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&Yy(o,i),Vd(l,a);var u=Vd(l,i);for(a=0;a<s.length;a+=2){var c=s[a],d=s[a+1];c==="style"?Ky(o,d):c==="dangerouslySetInnerHTML"?Xy(o,d):c==="children"?ca(o,d):uf(o,c,d,u)}switch(l){case"input":Fd(o,i);break;case"textarea":Qy(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ko(o,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?ko(o,!!i.multiple,i.defaultValue,!0):ko(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ia]=i}catch(I){Fe(e,e.return,I)}}break;case 6:if(mn(t,e),Nn(e),r&4){if(e.stateNode===null)throw Error(H(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(I){Fe(e,e.return,I)}}break;case 3:if(mn(t,e),Nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(I){Fe(e,e.return,I)}break;case 4:mn(t,e),Nn(e);break;case 13:mn(t,e),Nn(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Ff=Ze())),r&4&&bh(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(yt=(u=yt)||c,mn(t,e),yt=u):mn(t,e),Nn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(K=e,c=e.child;c!==null;){for(d=K=c;K!==null;){switch(p=K,f=p.child,p.tag){case 0:case 11:case 14:case 15:qi(4,p,p.return);break;case 1:Po(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(I){Fe(r,n,I)}}break;case 5:Po(p,p.return);break;case 22:if(p.memoizedState!==null){Sh(d);continue}}f!==null?(f.return=p,K=f):Sh(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=d.stateNode,s=d.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=qy("display",a))}catch(I){Fe(e,e.return,I)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(I){Fe(e,e.return,I)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:mn(t,e),Nn(e),r&4&&bh(e);break;case 21:break;default:mn(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(N0(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ca(o,""),r.flags&=-33);var i=wh(e);xp(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,l=wh(e);bp(e,l,a);break;default:throw Error(H(161))}}catch(s){Fe(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fD(e,t,n){K=e,C0(e)}function C0(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var o=K,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Pl;if(!a){var l=o.alternate,s=l!==null&&l.memoizedState!==null||yt;l=Pl;var u=yt;if(Pl=a,(yt=s)&&!u)for(K=o;K!==null;)a=K,s=a.child,a.tag===22&&a.memoizedState!==null?Nh(o):s!==null?(s.return=a,K=s):Nh(o);for(;i!==null;)K=i,C0(i),i=i.sibling;K=o,Pl=l,yt=u}xh(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,K=i):xh(e)}}function xh(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:yt||gu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!yt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:hn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&ah(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ah(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ma(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}yt||t.flags&512&&wp(t)}catch(p){Fe(t,t.return,p)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function Sh(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function Nh(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gu(4,t)}catch(s){Fe(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){Fe(t,o,s)}}var i=t.return;try{wp(t)}catch(s){Fe(t,i,s)}break;case 5:var a=t.return;try{wp(t)}catch(s){Fe(t,a,s)}}}catch(s){Fe(t,t.return,s)}if(t===e){K=null;break}var l=t.sibling;if(l!==null){l.return=t.return,K=l;break}K=t.return}}var mD=Math.ceil,js=Xn.ReactCurrentDispatcher,_f=Xn.ReactCurrentOwner,un=Xn.ReactCurrentBatchConfig,we=0,ot=null,Qe=null,ft=0,Bt=0,Lo=Er(0),et=0,Na=null,ro=0,hu=0,$f=0,Ki=null,jt=null,Ff=0,Xo=1/0,Un=null,Ps=!1,Sp=null,yr=null,Ll=!1,cr=null,Ls=0,ea=0,Np=null,is=-1,as=0;function Dt(){return we&6?Ze():is!==-1?is:is=Ze()}function Ir(e){return e.mode&1?we&2&&ft!==0?ft&-ft:XN.transition!==null?(as===0&&(as=dI()),as):(e=xe,e!==0||(e=window.event,e=e===void 0?16:yI(e.type)),e):1}function bn(e,t,n,r){if(50<ea)throw ea=0,Np=null,Error(H(185));_a(e,n,r),(!(we&2)||e!==ot)&&(e===ot&&(!(we&2)&&(hu|=n),et===4&&ir(e,ft)),kt(e,r),n===1&&we===0&&!(t.mode&1)&&(Xo=Ze()+500,pu&&jr()))}function kt(e,t){var n=e.callbackNode;XS(e,t);var r=hs(e,e===ot?ft:0);if(r===0)n!==null&&Rg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Rg(n),t===1)e.tag===0?JN(Dh.bind(null,e)):zI(Dh.bind(null,e)),ZN(function(){!(we&6)&&jr()}),n=null;else{switch(pI(r)){case 1:n=mf;break;case 4:n=uI;break;case 16:n=gs;break;case 536870912:n=cI;break;default:n=gs}n=k0(n,T0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function T0(e,t){if(is=-1,as=0,we&6)throw Error(H(327));var n=e.callbackNode;if($o()&&e.callbackNode!==n)return null;var r=hs(e,e===ot?ft:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Rs(e,r);else{t=r;var o=we;we|=2;var i=j0();(ot!==e||ft!==t)&&(Un=null,Xo=Ze()+500,Xr(e,t));do try{vD();break}catch(l){E0(e,l)}while(1);Af(),js.current=i,we=o,Qe!==null?t=0:(ot=null,ft=0,t=et)}if(t!==0){if(t===2&&(o=qd(e),o!==0&&(r=o,t=Dp(e,o))),t===1)throw n=Na,Xr(e,0),ir(e,r),kt(e,Ze()),n;if(t===6)ir(e,r);else{if(o=e.current.alternate,!(r&30)&&!gD(o)&&(t=Rs(e,r),t===2&&(i=qd(e),i!==0&&(r=i,t=Dp(e,i))),t===1))throw n=Na,Xr(e,0),ir(e,r),kt(e,Ze()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:$r(e,jt,Un);break;case 3:if(ir(e,r),(r&130023424)===r&&(t=Ff+500-Ze(),10<t)){if(hs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Dt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ap($r.bind(null,e,jt,Un),t);break}$r(e,jt,Un);break;case 4:if(ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-wn(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=Ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*mD(r/1960))-r,10<r){e.timeoutHandle=ap($r.bind(null,e,jt,Un),r);break}$r(e,jt,Un);break;case 5:$r(e,jt,Un);break;default:throw Error(H(329))}}}return kt(e,Ze()),e.callbackNode===n?T0.bind(null,e):null}function Dp(e,t){var n=Ki;return e.current.memoizedState.isDehydrated&&(Xr(e,t).flags|=256),e=Rs(e,t),e!==2&&(t=jt,jt=n,t!==null&&Ap(t)),e}function Ap(e){jt===null?jt=e:jt.push.apply(jt,e)}function gD(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!xn(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ir(e,t){for(t&=~$f,t&=~hu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wn(t),r=1<<n;e[n]=-1,t&=~r}}function Dh(e){if(we&6)throw Error(H(327));$o();var t=hs(e,0);if(!(t&1))return kt(e,Ze()),null;var n=Rs(e,t);if(e.tag!==0&&n===2){var r=qd(e);r!==0&&(t=r,n=Dp(e,r))}if(n===1)throw n=Na,Xr(e,0),ir(e,t),kt(e,Ze()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$r(e,jt,Un),kt(e,Ze()),null}function Hf(e,t){var n=we;we|=1;try{return e(t)}finally{we=n,we===0&&(Xo=Ze()+500,pu&&jr())}}function oo(e){cr!==null&&cr.tag===0&&!(we&6)&&$o();var t=we;we|=1;var n=un.transition,r=xe;try{if(un.transition=null,xe=1,e)return e()}finally{xe=r,un.transition=n,we=t,!(we&6)&&jr()}}function Wf(){Bt=Lo.current,Pe(Lo)}function Xr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,GN(n)),Qe!==null)for(n=Qe.return;n!==null;){var r=n;switch(Sf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ws();break;case 3:Qo(),Pe(Rt),Pe(Mt),Lf();break;case 5:Pf(r);break;case 4:Qo();break;case 13:Pe(ze);break;case 19:Pe(ze);break;case 10:Cf(r.type._context);break;case 22:case 23:Wf()}n=n.return}if(ot=e,Qe=e=Mr(e.current,null),ft=Bt=t,et=0,Na=null,$f=hu=ro=0,jt=Ki=null,Gr!==null){for(t=0;t<Gr.length;t++)if(n=Gr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}Gr=null}return e}function E0(e,t){do{var n=Qe;try{if(Af(),ns.current=Es,Ts){for(var r=Be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ts=!1}if(no=0,rt=Ke=Be=null,Xi=!1,ba=0,_f.current=null,n===null||n.return===null){et=1,Na=t,Qe=null;break}e:{var i=e,a=n.return,l=n,s=t;if(t=ft,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var u=s,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=fh(a);if(f!==null){f.flags&=-257,mh(f,a,l,i,t),f.mode&1&&ph(i,u,t),t=f,s=u;var g=t.updateQueue;if(g===null){var I=new Set;I.add(s),t.updateQueue=I}else g.add(s);break e}else{if(!(t&1)){ph(i,u,t),Gf();break e}s=Error(H(426))}}else if(Oe&&l.mode&1){var w=fh(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),mh(w,a,l,i,t),Nf(Jo(s,l));break e}}i=s=Jo(s,l),et!==4&&(et=2),Ki===null?Ki=[i]:Ki.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=f0(i,s,t);ih(i,y);break e;case 1:l=s;var h=i.type,M=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(yr===null||!yr.has(M)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=m0(i,l,t);ih(i,b);break e}}i=i.return}while(i!==null)}L0(n)}catch(N){t=N,Qe===n&&n!==null&&(Qe=n=n.return);continue}break}while(1)}function j0(){var e=js.current;return js.current=Es,e===null?Es:e}function Gf(){(et===0||et===3||et===2)&&(et=4),ot===null||!(ro&268435455)&&!(hu&268435455)||ir(ot,ft)}function Rs(e,t){var n=we;we|=2;var r=j0();(ot!==e||ft!==t)&&(Un=null,Xr(e,t));do try{hD();break}catch(o){E0(e,o)}while(1);if(Af(),we=n,js.current=r,Qe!==null)throw Error(H(261));return ot=null,ft=0,et}function hD(){for(;Qe!==null;)P0(Qe)}function vD(){for(;Qe!==null&&!FS();)P0(Qe)}function P0(e){var t=O0(e.alternate,e,Bt);e.memoizedProps=e.pendingProps,t===null?L0(e):Qe=t,_f.current=null}function L0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=cD(n,t),n!==null){n.flags&=32767,Qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{et=6,Qe=null;return}}else if(n=uD(n,t,Bt),n!==null){Qe=n;return}if(t=t.sibling,t!==null){Qe=t;return}Qe=t=e}while(t!==null);et===0&&(et=5)}function $r(e,t,n){var r=xe,o=un.transition;try{un.transition=null,xe=1,yD(e,t,n,r)}finally{un.transition=o,xe=r}return null}function yD(e,t,n,r){do $o();while(cr!==null);if(we&6)throw Error(H(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(qS(e,i),e===ot&&(Qe=ot=null,ft=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ll||(Ll=!0,k0(gs,function(){return $o(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=un.transition,un.transition=null;var a=xe;xe=1;var l=we;we|=4,_f.current=null,pD(e,n),A0(n,e),UN(op),vs=!!rp,op=rp=null,e.current=n,fD(n),HS(),we=l,xe=a,un.transition=i}else e.current=n;if(Ll&&(Ll=!1,cr=e,Ls=o),i=e.pendingLanes,i===0&&(yr=null),ZS(n.stateNode),kt(e,Ze()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ps)throw Ps=!1,e=Sp,Sp=null,e;return Ls&1&&e.tag!==0&&$o(),i=e.pendingLanes,i&1?e===Np?ea++:(ea=0,Np=e):ea=0,jr(),null}function $o(){if(cr!==null){var e=pI(Ls),t=un.transition,n=xe;try{if(un.transition=null,xe=16>e?16:e,cr===null)var r=!1;else{if(e=cr,cr=null,Ls=0,we&6)throw Error(H(331));var o=we;for(we|=4,K=e.current;K!==null;){var i=K,a=i.child;if(K.flags&16){var l=i.deletions;if(l!==null){for(var s=0;s<l.length;s++){var u=l[s];for(K=u;K!==null;){var c=K;switch(c.tag){case 0:case 11:case 15:qi(8,c,i)}var d=c.child;if(d!==null)d.return=c,K=d;else for(;K!==null;){c=K;var p=c.sibling,f=c.return;if(S0(c),c===u){K=null;break}if(p!==null){p.return=f,K=p;break}K=f}}}var g=i.alternate;if(g!==null){var I=g.child;if(I!==null){g.child=null;do{var w=I.sibling;I.sibling=null,I=w}while(I!==null)}}K=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,K=a;else e:for(;K!==null;){if(i=K,i.flags&2048)switch(i.tag){case 0:case 11:case 15:qi(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,K=y;break e}K=i.return}}var h=e.current;for(K=h;K!==null;){a=K;var M=a.child;if(a.subtreeFlags&2064&&M!==null)M.return=a,K=M;else e:for(a=h;K!==null;){if(l=K,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:gu(9,l)}}catch(N){Fe(l,l.return,N)}if(l===a){K=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,K=b;break e}K=l.return}}if(we=o,jr(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(lu,e)}catch{}r=!0}return r}finally{xe=n,un.transition=t}}return!1}function Ah(e,t,n){t=Jo(n,t),t=f0(e,t,1),e=vr(e,t,1),t=Dt(),e!==null&&(_a(e,1,t),kt(e,t))}function Fe(e,t,n){if(e.tag===3)Ah(e,e,n);else for(;t!==null;){if(t.tag===3){Ah(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yr===null||!yr.has(r))){e=Jo(n,e),e=m0(t,e,1),t=vr(t,e,1),e=Dt(),t!==null&&(_a(t,1,e),kt(t,e));break}}t=t.return}}function ID(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dt(),e.pingedLanes|=e.suspendedLanes&n,ot===e&&(ft&n)===n&&(et===4||et===3&&(ft&130023424)===ft&&500>Ze()-Ff?Xr(e,0):$f|=n),kt(e,t)}function R0(e,t){t===0&&(e.mode&1?(t=xl,xl<<=1,!(xl&130023424)&&(xl=4194304)):t=1);var n=Dt();e=Yn(e,t),e!==null&&(_a(e,t,n),kt(e,n))}function MD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),R0(e,n)}function wD(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(H(314))}r!==null&&r.delete(t),R0(e,n)}var O0;O0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Rt.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,sD(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Oe&&t.flags&1048576&&UI(t,Ss,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;os(e,t),e=t.pendingProps;var o=Zo(t,Mt.current);_o(t,n),o=Of(null,t,r,e,o,n);var i=kf();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,Ot(r)?(i=!0,bs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ef(t),o.updater=fu,t.stateNode=o,o._reactInternals=t,fp(t,r,e,n),t=hp(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&xf(t),St(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(os(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xD(r),e=hn(r,e),o){case 0:t=gp(null,t,r,e,n);break e;case 1:t=vh(null,t,r,e,n);break e;case 11:t=gh(null,t,r,e,n);break e;case 14:t=hh(null,t,r,hn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:hn(r,o),gp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:hn(r,o),vh(e,t,r,o,n);case 3:e:{if(y0(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,FI(e,t),As(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Jo(Error(H(423)),t),t=yh(e,t,r,n,o);break e}else if(r!==o){o=Jo(Error(H(424)),t),t=yh(e,t,r,n,o);break e}else for($t=hr(t.stateNode.containerInfo.firstChild),Wt=t,Oe=!0,yn=null,n=ZI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vo(),r===o){t=Qn(e,t,n);break e}St(e,t,r,n)}t=t.child}return t;case 5:return VI(t),e===null&&cp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,ip(r,o)?a=null:i!==null&&ip(r,i)&&(t.flags|=32),v0(e,t),St(e,t,a,n),t.child;case 6:return e===null&&cp(t),null;case 13:return I0(e,t,n);case 4:return jf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yo(t,null,r,n):St(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:hn(r,o),gh(e,t,r,o,n);case 7:return St(e,t,t.pendingProps,n),t.child;case 8:return St(e,t,t.pendingProps.children,n),t.child;case 12:return St(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Te(Ns,r._currentValue),r._currentValue=a,i!==null)if(xn(i.value,a)){if(i.children===o.children&&!Rt.current){t=Qn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Wn(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),dp(i.return,n,t),l.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(H(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),dp(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}St(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_o(t,n),o=dn(o),r=r(o),t.flags|=1,St(e,t,r,n),t.child;case 14:return r=t.type,o=hn(r,t.pendingProps),o=hn(r.type,o),hh(e,t,r,o,n);case 15:return g0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:hn(r,o),os(e,t),t.tag=1,Ot(r)?(e=!0,bs(t)):e=!1,_o(t,n),WI(t,r,o),fp(t,r,o,n),hp(null,t,r,!0,e,n);case 19:return M0(e,t,n);case 22:return h0(e,t,n)}throw Error(H(156,t.tag))};function k0(e,t){return sI(e,t)}function bD(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 ln(e,t,n,r){return new bD(e,t,n,r)}function Zf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xD(e){if(typeof e=="function")return Zf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===df)return 11;if(e===pf)return 14}return 2}function Mr(e,t){var n=e.alternate;return n===null?(n=ln(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 ls(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Zf(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case xo:return qr(n.children,o,i,t);case cf:a=8,o|=8;break;case zd:return e=ln(12,n,t,o|2),e.elementType=zd,e.lanes=i,e;case Ud:return e=ln(13,n,t,o),e.elementType=Ud,e.lanes=i,e;case Bd:return e=ln(19,n,t,o),e.elementType=Bd,e.lanes=i,e;case Gy:return vu(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hy:a=10;break e;case Wy:a=9;break e;case df:a=11;break e;case pf:a=14;break e;case tr:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=ln(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function qr(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function vu(e,t,n,r){return e=ln(22,e,r,t),e.elementType=Gy,e.lanes=n,e.stateNode={isHidden:!1},e}function Jc(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Xc(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SD(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=jc(0),this.expirationTimes=jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vf(e,t,n,r,o,i,a,l,s){return e=new SD(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ln(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ef(i),e}function ND(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function z0(e){if(!e)return Dr;e=e._reactInternals;e:{if(po(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Ot(n))return kI(e,n,t)}return t}function U0(e,t,n,r,o,i,a,l,s){return e=Vf(n,r,!0,e,o,i,a,l,s),e.context=z0(null),n=e.current,r=Dt(),o=Ir(n),i=Wn(r,o),i.callback=t??null,vr(n,i,o),e.current.lanes=o,_a(e,o,r),kt(e,r),e}function yu(e,t,n,r){var o=t.current,i=Dt(),a=Ir(o);return n=z0(n),t.context===null?t.context=n:t.pendingContext=n,t=Wn(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=vr(o,t,a),e!==null&&(bn(e,o,a,i),ts(e,o,a)),a}function Os(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ch(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yf(e,t){Ch(e,t),(e=e.alternate)&&Ch(e,t)}function DD(){return null}var B0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qf(e){this._internalRoot=e}Iu.prototype.render=Qf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));yu(e,t,null,null)};Iu.prototype.unmount=Qf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;oo(function(){yu(null,e,null,null)}),t[Vn]=null}};function Iu(e){this._internalRoot=e}Iu.prototype.unstable_scheduleHydration=function(e){if(e){var t=gI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<or.length&&t!==0&&t<or[n].priority;n++);or.splice(n,0,e),n===0&&vI(e)}};function Jf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Th(){}function AD(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Os(a);i.call(u)}}var a=U0(t,r,e,0,null,!1,!1,"",Th);return e._reactRootContainer=a,e[Vn]=a.current,va(e.nodeType===8?e.parentNode:e),oo(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=Os(s);l.call(u)}}var s=Vf(e,0,!1,null,null,!1,!1,"",Th);return e._reactRootContainer=s,e[Vn]=s.current,va(e.nodeType===8?e.parentNode:e),oo(function(){yu(t,s,n,r)}),s}function wu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var l=o;o=function(){var s=Os(a);l.call(s)}}yu(t,a,e,o)}else a=AD(n,t,e,o,r);return Os(a)}fI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_i(t.pendingLanes);n!==0&&(gf(t,n|1),kt(t,Ze()),!(we&6)&&(Xo=Ze()+500,jr()))}break;case 13:oo(function(){var r=Yn(e,1);if(r!==null){var o=Dt();bn(r,e,1,o)}}),Yf(e,1)}};hf=function(e){if(e.tag===13){var t=Yn(e,134217728);if(t!==null){var n=Dt();bn(t,e,134217728,n)}Yf(e,134217728)}};mI=function(e){if(e.tag===13){var t=Ir(e),n=Yn(e,t);if(n!==null){var r=Dt();bn(n,e,t,r)}Yf(e,t)}};gI=function(){return xe};hI=function(e,t){var n=xe;try{return xe=e,t()}finally{xe=n}};Qd=function(e,t,n){switch(t){case"input":if(Fd(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=du(r);if(!o)throw Error(H(90));Vy(r),Fd(r,o)}}}break;case"textarea":Qy(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};nI=Hf;rI=oo;var CD={usingClientEntryPoint:!1,Events:[Fa,Ao,du,eI,tI,Hf]},Di={findFiberByHostInstance:Wr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},TD={bundleType:Di.bundleType,version:Di.version,rendererPackageName:Di.rendererPackageName,rendererConfig:Di.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=aI(e),e===null?null:e.stateNode},findFiberByHostInstance:Di.findFiberByHostInstance||DD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{lu=Rl.inject(TD),En=Rl}catch{}}Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CD;Qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jf(t))throw Error(H(200));return ND(e,t,null,n)};Qt.createRoot=function(e,t){if(!Jf(e))throw Error(H(299));var n=!1,r="",o=B0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Vf(e,1,!1,null,null,n,!1,r,o),e[Vn]=t.current,va(e.nodeType===8?e.parentNode:e),new Qf(t)};Qt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=aI(t),e=e===null?null:e.stateNode,e};Qt.flushSync=function(e){return oo(e)};Qt.hydrate=function(e,t,n){if(!Mu(t))throw Error(H(200));return wu(null,e,t,!0,n)};Qt.hydrateRoot=function(e,t,n){if(!Jf(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=B0;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=U0(t,null,e,1,n??null,o,!1,i,a),e[Vn]=t.current,va(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Iu(t)};Qt.render=function(e,t,n){if(!Mu(t))throw Error(H(200));return wu(null,e,t,!1,n)};Qt.unmountComponentAtNode=function(e){if(!Mu(e))throw Error(H(40));return e._reactRootContainer?(oo(function(){wu(null,null,e,!1,function(){e._reactRootContainer=null,e[Vn]=null})}),!0):!1};Qt.unstable_batchedUpdates=Hf;Qt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Mu(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return wu(e,t,n,!1,r)};Qt.version="18.2.0-next-9e3b772b8-20220608";function _0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_0)}catch(e){console.error(e)}}_0(),Uy.exports=Qt;var Wa=Uy.exports;const $0=Ua(Wa);var Eh=Wa;Od.createRoot=Eh.createRoot,Od.hydrateRoot=Eh.hydrateRoot;var jh=function(){throw new Error("Attempted to call useModal outside of modal context. Make sure your app is rendered inside ModalProvider.")},Xf=v.createContext({showModal:jh,hideModal:jh});Xf.displayName="ModalContext";var ta=function(){return ta=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ta.apply(this,arguments)};function ED(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var jD=v.memo(function(e){var t=e.component,n=ED(e,["component"]);return t(n)}),PD=v.memo(function(e){var t=e.modals,n=e.container,r=e.component,o=r===void 0?v.Fragment:r,i=v.useState(void 0),a=i[0],l=i[1];return v.useEffect(function(){return l(n||document.body)}),a?Wa.createPortal(v.createElement(o,null,Object.keys(t).map(function(s){return v.createElement(jD,{key:s,component:t[s]})})),a):null}),LD=function(e){var t=e.container,n=e.rootComponent,r=e.children;if(t&&!(t instanceof HTMLElement))throw new Error(`Container must specify DOM element to mount modal root into.
|
|
41
41
|
|
|
42
42
|
This behavior has changed in 3.0.0. Please use \`rootComponent\` prop instead.
|
|
43
|
-
See: https://github.com/mpontus/react-modal-hook/issues/18`);var o=p.useState({}),l=o[0],i=o[1],a=p.useCallback(function(c,d){return i(function(h){var S;return Mo(Mo({},h),(S={},S[c]=d,S))})},[]),s=p.useCallback(function(c){return i(function(d){if(!d[c])return d;var h=Mo({},d);return delete h[c],h})},[]),u=p.useMemo(function(){return{showModal:a,hideModal:s}},[]);return p.createElement(Fc.Provider,{value:u},p.createElement(p.Fragment,null,r,p.createElement(K1,{modals:l,component:n,container:t})))},Q1=function(){var e=0;return function(){return"".concat(++e)}}(),Y1=function(e){var t=e.prototype;return!t||!t.isReactComponent},Vf=function(e,t){if(t===void 0&&(t=[]),!Y1(e))throw new Error("Only stateless components can be used as an argument to useModal. You have probably passed a class component where a function was expected.");var n=p.useMemo(Q1,[]),r=p.useMemo(function(){return e},t),o=p.useContext(Fc),l=p.useState(!1),i=l[0],a=l[1],s=p.useCallback(function(){return a(!0)},[]),u=p.useCallback(function(){return a(!1)},[]);return p.useEffect(function(){return i?o.showModal(n,r):o.hideModal(n),function(){return o.hideModal(n)}},[r,i]),[s,u]};function Z1(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))}const q1=p.forwardRef(Z1),Qm=q1;function X1(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))}const J1=p.forwardRef(X1),Uc=J1;function eS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))}const tS=p.forwardRef(eS),nS=tS;function rS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))}const oS=p.forwardRef(rS),lS=oS;function iS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const aS=p.forwardRef(iS),sS=aS;function uS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const cS=p.forwardRef(uS),dS=cS;function fS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"}))}const pS=p.forwardRef(fS),hS=pS;function mS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))}const vS=p.forwardRef(mS),gS=vS;function yS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5"}))}const SS=p.forwardRef(yS),wS=SS;function xS(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const ES=p.forwardRef(xS),Ym=ES;function _S(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const RS=p.forwardRef(_S),Zm=RS;var TS=Object.defineProperty,NS=(e,t,n)=>t in e?TS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fs=(e,t,n)=>(NS(e,typeof t!="symbol"?t+"":t,n),n);let CS=class{constructor(){fs(this,"current",this.detect()),fs(this,"handoffState","pending"),fs(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},an=new CS,De=(e,t)=>{an.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function St(e){let t=p.useRef(e);return De(()=>{t.current=e},[e]),t}function qm(e,t){let[n,r]=p.useState(e),o=St(e);return De(()=>r(o.current),[o,r,...t]),n}function ia(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zt(){let e=[],t={addEventListener(n,r,o,l){return n.addEventListener(r,o,l),t.add(()=>n.removeEventListener(r,o,l))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return ia(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let l=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:l})})},group(n){let r=Zt();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function ar(){let[e]=p.useState(Zt);return p.useEffect(()=>()=>e.dispose(),[e]),e}let Z=function(e){let t=St(e);return F.useCallback((...n)=>t.current(...n),[t])};function kS(){let e=typeof document>"u";return"useSyncExternalStore"in Mr?(t=>t.useSyncExternalStore)(Mr)(()=>()=>{},()=>!1,()=>!e):!1}function Xr(){let e=kS(),[t,n]=p.useState(an.isHandoffComplete);return t&&an.isHandoffComplete===!1&&n(!1),p.useEffect(()=>{t!==!0&&n(!0)},[t]),p.useEffect(()=>an.handoff(),[]),e?!1:t}var zf;let Xe=(zf=F.useId)!=null?zf:function(){let e=Xr(),[t,n]=F.useState(e?()=>an.nextId():null);return De(()=>{t===null&&n(an.nextId())},[t]),t!=null?""+t:void 0};function me(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,me),r}function aa(e){return an.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let _u=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var nt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(nt||{}),ol=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ol||{}),LS=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(LS||{});function sa(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(_u)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var ua=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ua||{});function Vc(e,t=0){var n;return e===((n=aa(e))==null?void 0:n.body)?!1:me(t,{0(){return e.matches(_u)},1(){let r=e;for(;r!==null;){if(r.matches(_u))return!0;r=r.parentElement}return!1}})}var bS=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(bS||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function er(e){e==null||e.focus({preventScroll:!0})}let PS=["textarea","input"].join(",");function AS(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,PS))!=null?n:!1}function Xm(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),l=t(r);if(o===null||l===null)return 0;let i=o.compareDocumentPosition(l);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Dt(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?n?Xm(e):e:sa(e);o.length>0&&i.length>1&&(i=i.filter(S=>!o.includes(S))),r=r??l.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,d=i.length,h;do{if(c>=d||c+d<=0)return 0;let S=s+c;if(t&16)S=(S+d)%d;else{if(S<0)return 3;if(S>=d)return 1}h=i[S],h==null||h.focus(u),c+=a}while(h!==l.activeElement);return t&6&&AS(h)&&h.select(),2}function Bl(e,t,n){let r=St(t);p.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function Jm(e,t,n){let r=St(t);p.useEffect(()=>{function o(l){r.current(l)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function zc(e,t,n=!0){let r=p.useRef(!1);p.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(i,a){if(!r.current||i.defaultPrevented)return;let s=a(i);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(s)||i.composed&&i.composedPath().includes(d))return}return!Vc(s,ua.Loose)&&s.tabIndex!==-1&&i.preventDefault(),t(i,s)}let l=p.useRef(null);Bl("pointerdown",i=>{var a,s;r.current&&(l.current=((s=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:s[0])||i.target)},!0),Bl("mousedown",i=>{var a,s;r.current&&(l.current=((s=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:s[0])||i.target)},!0),Bl("click",i=>{l.current&&(o(i,()=>l.current),l.current=null)},!0),Bl("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Jm("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Bf(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function ev(e,t){let[n,r]=p.useState(()=>Bf(e));return De(()=>{r(Bf(e))},[e.type,e.as]),De(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let tv=Symbol();function nv(e,t=!0){return Object.assign(e,{[tv]:t})}function $e(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let n=Z(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[tv]))?void 0:n}function OS(e){throw new Error("Unexpected object: "+e)}var ut=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ut||{});function $S(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1,l=(()=>{switch(e.focus){case 0:return n.findIndex(i=>!t.resolveDisabled(i));case 1:{let i=n.slice().reverse().findIndex((a,s,u)=>o!==-1&&u.length-s-1>=o?!1:!t.resolveDisabled(a));return i===-1?i:n.length-1-i}case 2:return n.findIndex((i,a)=>a<=o?!1:!t.resolveDisabled(i));case 3:{let i=n.slice().reverse().findIndex(a=>!t.resolveDisabled(a));return i===-1?i:n.length-1-i}case 4:return n.findIndex(i=>t.resolveId(i)===e.id);case 5:return null;default:OS(e)}})();return l===-1?r:l}function Mi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var qt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qt||{}),Tn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Tn||{});function Ie({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:l=!0,name:i}){let a=rv(t,e);if(l)return Wl(a,n,r,i);let s=o??0;if(s&2){let{static:u=!1,...c}=a;if(u)return Wl(c,n,r,i)}if(s&1){let{unmount:u=!0,...c}=a;return me(u?0:1,{0(){return null},1(){return Wl({...c,hidden:!0,style:{display:"none"}},n,r,i)}})}return Wl(a,n,r,i)}function Wl(e,t={},n,r){let{as:o=n,children:l,refName:i="ref",...a}=ps(e,["unmount","static"]),s=e.ref!==void 0?{[i]:e.ref}:{},u=typeof l=="function"?l(t):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t));let c={};if(t){let d=!1,h=[];for(let[S,y]of Object.entries(t))typeof y=="boolean"&&(d=!0),y===!0&&h.push(S);d&&(c["data-headlessui-state"]=h.join(" "))}if(o===p.Fragment&&Object.keys(Ru(a)).length>0){if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(y=>` - ${y}`).join(`
|
|
44
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(
|
|
43
|
+
See: https://github.com/mpontus/react-modal-hook/issues/18`);var o=v.useState({}),i=o[0],a=o[1],l=v.useCallback(function(c,d){return a(function(p){var f;return ta(ta({},p),(f={},f[c]=d,f))})},[]),s=v.useCallback(function(c){return a(function(d){if(!d[c])return d;var p=ta({},d);return delete p[c],p})},[]),u=v.useMemo(function(){return{showModal:l,hideModal:s}},[]);return v.createElement(Xf.Provider,{value:u},v.createElement(v.Fragment,null,r,v.createElement(PD,{modals:i,component:n,container:t})))},RD=function(){var e=0;return function(){return"".concat(++e)}}(),OD=function(e){var t=e.prototype;return!t||!t.isReactComponent},Da=function(e,t){if(t===void 0&&(t=[]),!OD(e))throw new Error("Only stateless components can be used as an argument to useModal. You have probably passed a class component where a function was expected.");var n=v.useMemo(RD,[]),r=v.useMemo(function(){return e},t),o=v.useContext(Xf),i=v.useState(!1),a=i[0],l=i[1],s=v.useCallback(function(){return l(!0)},[]),u=v.useCallback(function(){return l(!1)},[]);return v.useEffect(function(){return a?o.showModal(n,r):o.hideModal(n),function(){return o.hideModal(n)}},[r,a]),[s,u]};function kD(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"}))}const zD=v.forwardRef(kD),UD=zD;function BD(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))}const _D=v.forwardRef(BD),F0=_D;function $D(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))}const FD=v.forwardRef($D),bu=FD;function HD(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const WD=v.forwardRef(HD),GD=WD;function ZD(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))}const VD=v.forwardRef(ZD),YD=VD;function QD(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))}const JD=v.forwardRef(QD),XD=JD;function qD(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const KD=v.forwardRef(qD),qc=KD;function eA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const tA=v.forwardRef(eA),nA=tA;function rA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const oA=v.forwardRef(rA),iA=oA;function aA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const lA=v.forwardRef(aA),sA=lA;function uA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const cA=v.forwardRef(uA),dA=cA;function pA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"}))}const fA=v.forwardRef(pA),mA=fA;function gA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))}const hA=v.forwardRef(gA),H0=hA;function vA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5"}))}const yA=v.forwardRef(vA),IA=yA;function MA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const wA=v.forwardRef(MA),W0=wA;function bA(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const xA=v.forwardRef(bA),G0=xA;var SA=Object.defineProperty,NA=(e,t,n)=>t in e?SA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kc=(e,t,n)=>(NA(e,typeof t!="symbol"?t+"":t,n),n);let DA=class{constructor(){Kc(this,"current",this.detect()),Kc(this,"handoffState","pending"),Kc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Gn=new DA,Je=(e,t)=>{Gn.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function Gt(e){let t=v.useRef(e);return Je(()=>{t.current=e},[e]),t}function Z0(e,t){let[n,r]=v.useState(e),o=Gt(e);return Je(()=>r(o.current),[o,r,...t]),n}function xu(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Rn(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return xu(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Rn();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function io(){let[e]=v.useState(Rn);return v.useEffect(()=>()=>e.dispose(),[e]),e}let re=function(e){let t=Gt(e);return O.useCallback((...n)=>t.current(...n),[t])};function AA(){let e=typeof document>"u";return"useSyncExternalStore"in Wo?(t=>t.useSyncExternalStore)(Wo)(()=>()=>{},()=>!1,()=>!e):!1}function ci(){let e=AA(),[t,n]=v.useState(Gn.isHandoffComplete);return t&&Gn.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>Gn.handoff(),[]),e?!1:t}var Ph;let It=(Ph=O.useId)!=null?Ph:function(){let e=ci(),[t,n]=O.useState(e?()=>Gn.nextId():null);return Je(()=>{t===null&&n(Gn.nextId())},[t]),t!=null?""+t:void 0};function be(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,be),r}function Su(e){return Gn.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Cp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Nt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Nt||{}),Aa=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Aa||{}),CA=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(CA||{});function Nu(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Cp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Du=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Du||{});function qf(e,t=0){var n;return e===((n=Su(e))==null?void 0:n.body)?!1:be(t,{0(){return e.matches(Cp)},1(){let r=e;for(;r!==null;){if(r.matches(Cp))return!0;r=r.parentElement}return!1}})}var TA=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(TA||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Kr(e){e==null||e.focus({preventScroll:!0})}let EA=["textarea","input"].join(",");function jA(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,EA))!=null?n:!1}function V0(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let a=o.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function In(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?V0(e):e:Nu(e);o.length>0&&a.length>1&&(a=a.filter(f=>!o.includes(f))),r=r??i.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,d=a.length,p;do{if(c>=d||c+d<=0)return 0;let f=s+c;if(t&16)f=(f+d)%d;else{if(f<0)return 3;if(f>=d)return 1}p=a[f],p==null||p.focus(u),c+=l}while(p!==i.activeElement);return t&6&&jA(p)&&p.select(),2}function Ol(e,t,n){let r=Gt(t);v.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function Y0(e,t,n){let r=Gt(t);v.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function Kf(e,t,n=!0){let r=v.useRef(!1);v.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(a,l){if(!r.current||a.defaultPrevented)return;let s=l(a);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(s)||a.composed&&a.composedPath().includes(d))return}return!qf(s,Du.Loose)&&s.tabIndex!==-1&&a.preventDefault(),t(a,s)}let i=v.useRef(null);Ol("pointerdown",a=>{var l,s;r.current&&(i.current=((s=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:s[0])||a.target)},!0),Ol("mousedown",a=>{var l,s;r.current&&(i.current=((s=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:s[0])||a.target)},!0),Ol("click",a=>{i.current&&(o(a,()=>i.current),i.current=null)},!0),Ol("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Y0("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Lh(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Q0(e,t){let[n,r]=v.useState(()=>Lh(e));return Je(()=>{r(Lh(e))},[e.type,e.as]),Je(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let J0=Symbol();function X0(e,t=!0){return Object.assign(e,{[J0]:t})}function He(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=re(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[J0]))?void 0:n}function PA(e){throw new Error("Unexpected object: "+e)}var Lt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Lt||{});function LA(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1,i=(()=>{switch(e.focus){case 0:return n.findIndex(a=>!t.resolveDisabled(a));case 1:{let a=n.slice().reverse().findIndex((l,s,u)=>o!==-1&&u.length-s-1>=o?!1:!t.resolveDisabled(l));return a===-1?a:n.length-1-a}case 2:return n.findIndex((a,l)=>l<=o?!1:!t.resolveDisabled(a));case 3:{let a=n.slice().reverse().findIndex(l=>!t.resolveDisabled(l));return a===-1?a:n.length-1-a}case 4:return n.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:PA(e)}})();return i===-1?r:i}function ks(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var On=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(On||{}),dr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(dr||{});function We({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a}){let l=q0(t,e);if(i)return kl(l,n,r,a);let s=o??0;if(s&2){let{static:u=!1,...c}=l;if(u)return kl(c,n,r,a)}if(s&1){let{unmount:u=!0,...c}=l;return be(u?0:1,{0(){return null},1(){return kl({...c,hidden:!0,style:{display:"none"}},n,r,a)}})}return kl(l,n,r,a)}function kl(e,t={},n,r){let{as:o=n,children:i,refName:a="ref",...l}=ed(e,["unmount","static"]),s=e.ref!==void 0?{[a]:e.ref}:{},u=typeof i=="function"?i(t):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let c={};if(t){let d=!1,p=[];for(let[f,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&p.push(f);d&&(c["data-headlessui-state"]=p.join(" "))}if(o===v.Fragment&&Object.keys(Tp(l)).length>0){if(!v.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(g=>` - ${g}`).join(`
|
|
44
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
|
|
45
45
|
`)].join(`
|
|
46
|
-
`));let d=u.props,h=typeof(d==null?void 0:d.className)=="function"?(...y)=>Mi(d==null?void 0:d.className(...y),a.className):Mi(d==null?void 0:d.className,a.className),S=h?{className:h}:{};return p.cloneElement(u,Object.assign({},rv(u.props,Ru(ps(a,["ref"]))),c,s,IS(u.ref,s.ref),S))}return p.createElement(o,Object.assign({},ps(a,["ref"]),o!==p.Fragment&&s,o!==p.Fragment&&c),u)}function IS(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function rv(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...l){let i=n[r];for(let a of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...l)}}});return t}function Ae(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ru(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ps(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function ca(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&MS(n)?!1:r}function MS(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function ov(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))iv(n,lv(t,r),o);return n}function lv(e,t){return e?e+"["+t+"]":t}function iv(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())iv(e,lv(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):ov(n,t,e)}let jS="div";var fn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(fn||{});function DS(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Ie({ourProps:o,theirProps:r,slot:{},defaultTag:jS,name:"Hidden"})}let Mn=Ae(DS),Bc=p.createContext(null);Bc.displayName="OpenClosedContext";var Le=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Le||{});function Jr(){return p.useContext(Bc)}function Wc({value:e,children:t}){return F.createElement(Bc.Provider,{value:e},t)}var Se=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Se||{});function FS(e,t,n){let[r,o]=p.useState(n),l=e!==void 0,i=p.useRef(l),a=p.useRef(!1),s=p.useRef(!1);return l&&!i.current&&!a.current?(a.current=!0,i.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!l&&i.current&&!s.current&&(s.current=!0,i.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[l?e:r,Z(u=>(l||o(u),t==null?void 0:t(u)))]}function Hc(e,t){let n=p.useRef([]),r=Z(e);p.useEffect(()=>{let o=[...n.current];for(let[l,i]of t.entries())if(n.current[l]!==i){let a=r(t,o);return n.current=t,a}},[r,...t])}function Wf(e){return[e.screenX,e.screenY]}function US(){let e=p.useRef([-1,-1]);return{wasMoved(t){let n=Wf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Wf(t)}}}function VS(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Un(...e){return p.useMemo(()=>aa(...e),[...e])}var gt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(gt||{});function Kc(){let e=p.useRef(0);return Jm("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function dl(){let e=p.useRef(!1);return De(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Gc(e,t,n,r){let o=St(n);p.useEffect(()=>{e=e??window;function l(i){o.current(i)}return e.addEventListener(t,l,r),()=>e.removeEventListener(t,l,r)},[e,t,r])}function zS(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function av(e){let t=Z(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,ia(()=>{n.current&&t()})}),[t])}function sv(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let BS="div";var uv=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(uv||{});function WS(e,t){let n=p.useRef(null),r=$e(n,t),{initialFocus:o,containers:l,features:i=30,...a}=e;Xr()||(i=1);let s=Un(n);GS({ownerDocument:s},!!(i&16));let u=QS({ownerDocument:s,container:n,initialFocus:o},!!(i&2));YS({ownerDocument:s,container:n,containers:l,previousActiveElement:u},!!(i&8));let c=Kc(),d=Z(w=>{let x=n.current;x&&(m=>m())(()=>{me(c.current,{[gt.Forwards]:()=>{Dt(x,nt.First,{skipElements:[w.relatedTarget]})},[gt.Backwards]:()=>{Dt(x,nt.Last,{skipElements:[w.relatedTarget]})}})})}),h=ar(),S=p.useRef(!1),y={ref:r,onKeyDown(w){w.key=="Tab"&&(S.current=!0,h.requestAnimationFrame(()=>{S.current=!1}))},onBlur(w){let x=sv(l);n.current instanceof HTMLElement&&x.add(n.current);let m=w.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(cv(x,m)||(S.current?Dt(n.current,me(c.current,{[gt.Forwards]:()=>nt.Next,[gt.Backwards]:()=>nt.Previous})|nt.WrapAround,{relativeTo:w.target}):w.target instanceof HTMLElement&&er(w.target)))}};return F.createElement(F.Fragment,null,!!(i&4)&&F.createElement(Mn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:fn.Focusable}),Ie({ourProps:y,theirProps:a,defaultTag:BS,name:"FocusTrap"}),!!(i&4)&&F.createElement(Mn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:fn.Focusable}))}let HS=Ae(WS),ho=Object.assign(HS,{features:uv}),En=[];zS(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&En[0]!==t.target&&(En.unshift(t.target),En=En.filter(n=>n!=null&&n.isConnected),En.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function KS(e=!0){let t=p.useRef(En.slice());return Hc(([n],[r])=>{r===!0&&n===!1&&ia(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=En.slice())},[e,En,t]),Z(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function GS({ownerDocument:e},t){let n=KS(t);Hc(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&er(n())},[t]),av(()=>{t&&er(n())})}function QS({ownerDocument:e,container:t,initialFocus:n},r){let o=p.useRef(null),l=dl();return Hc(()=>{if(!r)return;let i=t.current;i&&ia(()=>{if(!l.current)return;let a=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===a){o.current=a;return}}else if(i.contains(a)){o.current=a;return}n!=null&&n.current?er(n.current):Dt(i,nt.First)===ol.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function YS({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let l=dl();Gc(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let a=sv(n);t.current instanceof HTMLElement&&a.add(t.current);let s=r.current;if(!s)return;let u=i.target;u&&u instanceof HTMLElement?cv(a,u)?(r.current=u,er(u)):(i.preventDefault(),i.stopPropagation(),er(s)):er(r.current)},!0)}function cv(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let dv=p.createContext(!1);function ZS(){return p.useContext(dv)}function Tu(e){return F.createElement(dv.Provider,{value:e.force},e.children)}function qS(e){let t=ZS(),n=p.useContext(fv),r=Un(e),[o,l]=p.useState(()=>{if(!t&&n!==null||an.isServer)return null;let i=r==null?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(r===null)return null;let a=r.createElement("div");return a.setAttribute("id","headlessui-portal-root"),r.body.appendChild(a)});return p.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),p.useEffect(()=>{t||n!==null&&l(n.current)},[n,l,t]),o}let XS=p.Fragment;function JS(e,t){let n=e,r=p.useRef(null),o=$e(nv(c=>{r.current=c}),t),l=Un(r),i=qS(r),[a]=p.useState(()=>{var c;return an.isServer?null:(c=l==null?void 0:l.createElement("div"))!=null?c:null}),s=p.useContext(Nu),u=Xr();return De(()=>{!i||!a||i.contains(a)||(a.setAttribute("data-headlessui-portal",""),i.appendChild(a))},[i,a]),De(()=>{if(a&&s)return s.register(a)},[s,a]),av(()=>{var c;!i||!a||(a instanceof Node&&i.contains(a)&&i.removeChild(a),i.childNodes.length<=0&&((c=i.parentElement)==null||c.removeChild(i)))}),u?!i||!a?null:la.createPortal(Ie({ourProps:{ref:o},theirProps:n,defaultTag:XS,name:"Portal"}),a):null}let ew=p.Fragment,fv=p.createContext(null);function tw(e,t){let{target:n,...r}=e,o={ref:$e(t)};return F.createElement(fv.Provider,{value:n},Ie({ourProps:o,theirProps:r,defaultTag:ew,name:"Popover.Group"}))}let Nu=p.createContext(null);function pv(){let e=p.useContext(Nu),t=p.useRef([]),n=Z(l=>(t.current.push(l),e&&e.register(l),()=>r(l))),r=Z(l=>{let i=t.current.indexOf(l);i!==-1&&t.current.splice(i,1),e&&e.unregister(l)}),o=p.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,p.useMemo(()=>function({children:l}){return F.createElement(Nu.Provider,{value:o},l)},[o])]}let nw=Ae(JS),rw=Ae(tw),Cu=Object.assign(nw,{Group:rw}),hv=p.createContext(null);function mv(){let e=p.useContext(hv);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,mv),t}return e}function ow(){let[e,t]=p.useState([]);return[e.length>0?e.join(" "):void 0,p.useMemo(()=>function(n){let r=Z(l=>(t(i=>[...i,l]),()=>t(i=>{let a=i.slice(),s=a.indexOf(l);return s!==-1&&a.splice(s,1),a}))),o=p.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return F.createElement(hv.Provider,{value:o},n.children)},[t])]}let lw="p";function iw(e,t){let n=Xe(),{id:r=`headlessui-description-${n}`,...o}=e,l=mv(),i=$e(t);De(()=>l.register(r),[r,l.register]);let a={ref:i,...l.props,id:r};return Ie({ourProps:a,theirProps:o,slot:l.slot||{},defaultTag:lw,name:l.name||"Description"})}let aw=Ae(iw),sw=Object.assign(aw,{}),Qc=p.createContext(()=>{});Qc.displayName="StackContext";var ku=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(ku||{});function uw(){return p.useContext(Qc)}function cw({children:e,onUpdate:t,type:n,element:r,enabled:o}){let l=uw(),i=Z((...a)=>{t==null||t(...a),l(...a)});return De(()=>{let a=o===void 0||o===!0;return a&&i(0,n,r),()=>{a&&i(1,n,r)}},[i,n,r,o]),F.createElement(Qc.Provider,{value:i},e)}function dw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const fw=typeof Object.is=="function"?Object.is:dw,{useState:pw,useEffect:hw,useLayoutEffect:mw,useDebugValue:vw}=Mr;function gw(e,t,n){const r=t(),[{inst:o},l]=pw({inst:{value:r,getSnapshot:t}});return mw(()=>{o.value=r,o.getSnapshot=t,hs(o)&&l({inst:o})},[e,r,t]),hw(()=>(hs(o)&&l({inst:o}),e(()=>{hs(o)&&l({inst:o})})),[e]),vw(r),r}function hs(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!fw(n,r)}catch{return!0}}function yw(e,t,n){return t()}const Sw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ww=!Sw,xw=ww?yw:gw,Ew="useSyncExternalStore"in Mr?(e=>e.useSyncExternalStore)(Mr):xw;function _w(e){return Ew(e.subscribe,e.getSnapshot,e.getSnapshot)}function Rw(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=t[o].call(n,...l);i&&(n=i,r.forEach(a=>a()))}}}function Tw(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;n.style(r,"paddingRight",`${l}px`)}}}function Nw(){if(!VS())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(l){return r.containers.flatMap(i=>i()).some(i=>i.contains(l))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let i=Zt();i.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>i.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let l=null;n.addEventListener(t,"click",i=>{if(i.target instanceof HTMLElement)try{let a=i.target.closest("a");if(!a)return;let{hash:s}=new URL(a.href),u=t.querySelector(s);u&&!o(u)&&(l=u)}catch{}},!0),n.addEventListener(t,"touchmove",i=>{i.target instanceof HTMLElement&&!o(i.target)&&i.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}}function Cw(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function kw(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Zn=Rw(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Zt(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:kw(n)},o=[Nw(),Tw(),Cw()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Zn.subscribe(()=>{let e=Zn.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Zn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Zn.dispatch("TEARDOWN",n)}});function Lw(e,t,n){let r=_w(Zn),o=e?r.get(e):void 0,l=o?o.count>0:!1;return De(()=>{if(!(!e||!t))return Zn.dispatch("PUSH",e,n),()=>Zn.dispatch("POP",e,n)},[t,e]),l}let ms=new Map,mo=new Map;function Hf(e,t=!0){De(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var i;if(!r)return;let a=(i=mo.get(r))!=null?i:1;if(a===1?mo.delete(r):mo.set(r,a-1),a!==1)return;let s=ms.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,ms.delete(r))}let l=(n=mo.get(r))!=null?n:0;return mo.set(r,l+1),l!==0||(ms.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function vv({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=p.useRef((r=n==null?void 0:n.current)!=null?r:null),l=Un(o),i=Z(()=>{var a;let s=[];for(let u of e)u!==null&&(u instanceof HTMLElement?s.push(u):"current"in u&&u.current instanceof HTMLElement&&s.push(u.current));if(t!=null&&t.current)for(let u of t.current)s.push(u);for(let u of(a=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?a:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(u.contains(o.current)||s.some(c=>u.contains(c))||s.push(u));return s});return{resolveContainers:i,contains:Z(a=>i().some(s=>s.contains(a))),mainTreeNodeRef:o,MainTreeNode:p.useMemo(()=>function(){return n!=null?null:F.createElement(Mn,{features:fn.Hidden,ref:o})},[o,n])}}function bw(){let e=p.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:p.useMemo(()=>function(){return F.createElement(Mn,{features:fn.Hidden,ref:e})},[e])}}var Pw=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Pw||{}),Aw=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Aw||{});let Ow={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},ji=p.createContext(null);ji.displayName="DialogContext";function fl(e){let t=p.useContext(ji);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,fl),n}return t}function $w(e,t,n=()=>[document.body]){Lw(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function Iw(e,t){return me(t.type,Ow,e,t)}let Mw="div",jw=qt.RenderStrategy|qt.Static;function Dw(e,t){var n;let r=Xe(),{id:o=`headlessui-dialog-${r}`,open:l,onClose:i,initialFocus:a,__demoMode:s=!1,...u}=e,[c,d]=p.useState(0),h=Jr();l===void 0&&h!==null&&(l=(h&Le.Open)===Le.Open);let S=p.useRef(null),y=$e(S,t),w=Un(S),x=e.hasOwnProperty("open")||h!==null,m=e.hasOwnProperty("onClose");if(!x&&!m)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!x)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!m)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof l!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${l}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let f=l?0:1,[g,R]=p.useReducer(Iw,{titleId:null,descriptionId:null,panelRef:p.createRef()}),L=Z(()=>i(!1)),N=Z(H=>R({type:0,id:H})),k=Xr()?s?!1:f===0:!1,A=c>1,K=p.useContext(ji)!==null,[B,G]=pv(),{resolveContainers:te,mainTreeNodeRef:W,MainTreeNode:le}=vv({portals:B,defaultContainers:[(n=g.panelRef.current)!=null?n:S.current]}),ge=A?"parent":"leaf",z=h!==null?(h&Le.Closing)===Le.Closing:!1,q=(()=>K||z?!1:k)(),b=p.useCallback(()=>{var H,ce;return(ce=Array.from((H=w==null?void 0:w.querySelectorAll("body > *"))!=null?H:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(W.current)&&he instanceof HTMLElement))!=null?ce:null},[W]);Hf(b,q);let O=(()=>A?!0:k)(),D=p.useCallback(()=>{var H,ce;return(ce=Array.from((H=w==null?void 0:w.querySelectorAll("[data-headlessui-portal]"))!=null?H:[]).find(he=>he.contains(W.current)&&he instanceof HTMLElement))!=null?ce:null},[W]);Hf(D,O);let re=(()=>!(!k||A))();zc(te,L,re);let _=(()=>!(A||f!==0))();Gc(w==null?void 0:w.defaultView,"keydown",H=>{_&&(H.defaultPrevented||H.key===Se.Escape&&(H.preventDefault(),H.stopPropagation(),L()))});let P=(()=>!(z||f!==0||K))();$w(w,P,te),p.useEffect(()=>{if(f!==0||!S.current)return;let H=new ResizeObserver(ce=>{for(let he of ce){let de=he.target.getBoundingClientRect();de.x===0&&de.y===0&&de.width===0&&de.height===0&&L()}});return H.observe(S.current),()=>H.disconnect()},[f,S,L]);let[C,j]=ow(),M=p.useMemo(()=>[{dialogState:f,close:L,setTitleId:N},g],[f,g,L,N]),X=p.useMemo(()=>({open:f===0}),[f]),oe={ref:y,id:o,role:"dialog","aria-modal":f===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":C};return F.createElement(cw,{type:"Dialog",enabled:f===0,element:S,onUpdate:Z((H,ce)=>{ce==="Dialog"&&me(H,{[ku.Add]:()=>d(he=>he+1),[ku.Remove]:()=>d(he=>he-1)})})},F.createElement(Tu,{force:!0},F.createElement(Cu,null,F.createElement(ji.Provider,{value:M},F.createElement(Cu.Group,{target:S},F.createElement(Tu,{force:!1},F.createElement(j,{slot:X,name:"Dialog.Description"},F.createElement(ho,{initialFocus:a,containers:te,features:k?me(ge,{parent:ho.features.RestoreFocus,leaf:ho.features.All&~ho.features.FocusLock}):ho.features.None},F.createElement(G,null,Ie({ourProps:oe,theirProps:u,slot:X,defaultTag:Mw,features:jw,visible:f===0,name:"Dialog"}))))))))),F.createElement(le,null))}let Fw="div";function Uw(e,t){let n=Xe(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:l,close:i}]=fl("Dialog.Overlay"),a=$e(t),s=Z(c=>{if(c.target===c.currentTarget){if(ca(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),i()}}),u=p.useMemo(()=>({open:l===0}),[l]);return Ie({ourProps:{ref:a,id:r,"aria-hidden":!0,onClick:s},theirProps:o,slot:u,defaultTag:Fw,name:"Dialog.Overlay"})}let Vw="div";function zw(e,t){let n=Xe(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:l},i]=fl("Dialog.Backdrop"),a=$e(t);p.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[i.panelRef]);let s=p.useMemo(()=>({open:l===0}),[l]);return F.createElement(Tu,{force:!0},F.createElement(Cu,null,Ie({ourProps:{ref:a,id:r,"aria-hidden":!0},theirProps:o,slot:s,defaultTag:Vw,name:"Dialog.Backdrop"})))}let Bw="div";function Ww(e,t){let n=Xe(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:l},i]=fl("Dialog.Panel"),a=$e(t,i.panelRef),s=p.useMemo(()=>({open:l===0}),[l]),u=Z(c=>{c.stopPropagation()});return Ie({ourProps:{ref:a,id:r,onClick:u},theirProps:o,slot:s,defaultTag:Bw,name:"Dialog.Panel"})}let Hw="h2";function Kw(e,t){let n=Xe(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:l,setTitleId:i}]=fl("Dialog.Title"),a=$e(t);p.useEffect(()=>(i(r),()=>i(null)),[r,i]);let s=p.useMemo(()=>({open:l===0}),[l]);return Ie({ourProps:{ref:a,id:r},theirProps:o,slot:s,defaultTag:Hw,name:"Dialog.Title"})}let Gw=Ae(Dw),Qw=Ae(zw),Yw=Ae(Ww),Zw=Ae(Uw),qw=Ae(Kw),Lu=Object.assign(Gw,{Backdrop:Qw,Panel:Yw,Overlay:Zw,Title:qw,Description:sw}),Kf=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Gf(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let l=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),l=!0;let i=l?(n=o.innerText)!=null?n:"":r;return Kf.test(i)&&(i=i.replace(Kf,"")),i}function Xw(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():Gf(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Gf(e).trim()}function Jw(e){let t=p.useRef(""),n=p.useRef("");return Z(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let l=Xw(r).trim().toLowerCase();return t.current=o,n.current=l,l})}var ex=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ex||{}),tx=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(tx||{}),nx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(nx||{}),rx=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(rx||{});function vs(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Xm(t(e.options.slice()),l=>l.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let ox={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(o=>n(o.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=vs(e),o=$S(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:l=>l.id,resolveDisabled:l=>l.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:o,activationTrigger:(n=t.trigger)!=null?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(i=>{var a;return!i.dataRef.current.disabled&&((a=i.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),l=o?e.options.indexOf(o):-1;return l===-1||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=vs(e,o=>[...o,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=vs(e,r=>{let o=r.findIndex(l=>l.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},Yc=p.createContext(null);Yc.displayName="ListboxActionsContext";function pl(e){let t=p.useContext(Yc);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,pl),n}return t}let Zc=p.createContext(null);Zc.displayName="ListboxDataContext";function hl(e){let t=p.useContext(Zc);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hl),n}return t}function lx(e,t){return me(t.type,ox,e,t)}let ix=p.Fragment;function ax(e,t){let{value:n,defaultValue:r,form:o,name:l,onChange:i,by:a=(C,j)=>C===j,disabled:s=!1,horizontal:u=!1,multiple:c=!1,...d}=e;const h=u?"horizontal":"vertical";let S=$e(t),[y=c?[]:void 0,w]=FS(n,i,r),[x,m]=p.useReducer(lx,{dataRef:p.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),f=p.useRef({static:!1,hold:!1}),g=p.useRef(null),R=p.useRef(null),L=p.useRef(null),N=Z(typeof a=="string"?(C,j)=>{let M=a;return(C==null?void 0:C[M])===(j==null?void 0:j[M])}:a),k=p.useCallback(C=>me(A.mode,{1:()=>y.some(j=>N(j,C)),0:()=>N(y,C)}),[y]),A=p.useMemo(()=>({...x,value:y,disabled:s,mode:c?1:0,orientation:h,compare:N,isSelected:k,optionsPropsRef:f,labelRef:g,buttonRef:R,optionsRef:L}),[y,s,c,x]);De(()=>{x.dataRef.current=A},[A]),zc([A.buttonRef,A.optionsRef],(C,j)=>{var M;m({type:1}),Vc(j,ua.Loose)||(C.preventDefault(),(M=A.buttonRef.current)==null||M.focus())},A.listboxState===0);let K=p.useMemo(()=>({open:A.listboxState===0,disabled:s,value:y}),[A,s,y]),B=Z(C=>{let j=A.options.find(M=>M.id===C);j&&q(j.dataRef.current.value)}),G=Z(()=>{if(A.activeOptionIndex!==null){let{dataRef:C,id:j}=A.options[A.activeOptionIndex];q(C.current.value),m({type:2,focus:ut.Specific,id:j})}}),te=Z(()=>m({type:0})),W=Z(()=>m({type:1})),le=Z((C,j,M)=>C===ut.Specific?m({type:2,focus:ut.Specific,id:j,trigger:M}):m({type:2,focus:C,trigger:M})),ge=Z((C,j)=>(m({type:5,id:C,dataRef:j}),()=>m({type:6,id:C}))),z=Z(C=>(m({type:7,id:C}),()=>m({type:7,id:null}))),q=Z(C=>me(A.mode,{0(){return w==null?void 0:w(C)},1(){let j=A.value.slice(),M=j.findIndex(X=>N(X,C));return M===-1?j.push(C):j.splice(M,1),w==null?void 0:w(j)}})),b=Z(C=>m({type:3,value:C})),O=Z(()=>m({type:4})),D=p.useMemo(()=>({onChange:q,registerOption:ge,registerLabel:z,goToOption:le,closeListbox:W,openListbox:te,selectActiveOption:G,selectOption:B,search:b,clearSearch:O}),[]),re={ref:S},_=p.useRef(null),P=ar();return p.useEffect(()=>{_.current&&r!==void 0&&P.addEventListener(_.current,"reset",()=>{w==null||w(r)})},[_,w]),F.createElement(Yc.Provider,{value:D},F.createElement(Zc.Provider,{value:A},F.createElement(Wc,{value:me(A.listboxState,{0:Le.Open,1:Le.Closed})},l!=null&&y!=null&&ov({[l]:y}).map(([C,j],M)=>F.createElement(Mn,{features:fn.Hidden,ref:M===0?X=>{var oe;_.current=(oe=X==null?void 0:X.closest("form"))!=null?oe:null}:void 0,...Ru({key:C,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:o,name:C,value:j})})),Ie({ourProps:re,theirProps:d,slot:K,defaultTag:ix,name:"Listbox"}))))}let sx="button";function ux(e,t){var n;let r=Xe(),{id:o=`headlessui-listbox-button-${r}`,...l}=e,i=hl("Listbox.Button"),a=pl("Listbox.Button"),s=$e(i.buttonRef,t),u=ar(),c=Z(x=>{switch(x.key){case Se.Space:case Se.Enter:case Se.ArrowDown:x.preventDefault(),a.openListbox(),u.nextFrame(()=>{i.value||a.goToOption(ut.First)});break;case Se.ArrowUp:x.preventDefault(),a.openListbox(),u.nextFrame(()=>{i.value||a.goToOption(ut.Last)});break}}),d=Z(x=>{switch(x.key){case Se.Space:x.preventDefault();break}}),h=Z(x=>{if(ca(x.currentTarget))return x.preventDefault();i.listboxState===0?(a.closeListbox(),u.nextFrame(()=>{var m;return(m=i.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})})):(x.preventDefault(),a.openListbox())}),S=qm(()=>{if(i.labelId)return[i.labelId,o].join(" ")},[i.labelId,o]),y=p.useMemo(()=>({open:i.listboxState===0,disabled:i.disabled,value:i.value}),[i]),w={ref:s,id:o,type:ev(e,i.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=i.optionsRef.current)==null?void 0:n.id,"aria-expanded":i.listboxState===0,"aria-labelledby":S,disabled:i.disabled,onKeyDown:c,onKeyUp:d,onClick:h};return Ie({ourProps:w,theirProps:l,slot:y,defaultTag:sx,name:"Listbox.Button"})}let cx="label";function dx(e,t){let n=Xe(),{id:r=`headlessui-listbox-label-${n}`,...o}=e,l=hl("Listbox.Label"),i=pl("Listbox.Label"),a=$e(l.labelRef,t);De(()=>i.registerLabel(r),[r]);let s=Z(()=>{var c;return(c=l.buttonRef.current)==null?void 0:c.focus({preventScroll:!0})}),u=p.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled}),[l]);return Ie({ourProps:{ref:a,id:r,onClick:s},theirProps:o,slot:u,defaultTag:cx,name:"Listbox.Label"})}let fx="ul",px=qt.RenderStrategy|qt.Static;function hx(e,t){var n;let r=Xe(),{id:o=`headlessui-listbox-options-${r}`,...l}=e,i=hl("Listbox.Options"),a=pl("Listbox.Options"),s=$e(i.optionsRef,t),u=ar(),c=ar(),d=Jr(),h=(()=>d!==null?(d&Le.Open)===Le.Open:i.listboxState===0)();p.useEffect(()=>{var m;let f=i.optionsRef.current;f&&i.listboxState===0&&f!==((m=aa(f))==null?void 0:m.activeElement)&&f.focus({preventScroll:!0})},[i.listboxState,i.optionsRef]);let S=Z(m=>{switch(c.dispose(),m.key){case Se.Space:if(i.searchQuery!=="")return m.preventDefault(),m.stopPropagation(),a.search(m.key);case Se.Enter:if(m.preventDefault(),m.stopPropagation(),i.activeOptionIndex!==null){let{dataRef:f}=i.options[i.activeOptionIndex];a.onChange(f.current.value)}i.mode===0&&(a.closeListbox(),Zt().nextFrame(()=>{var f;return(f=i.buttonRef.current)==null?void 0:f.focus({preventScroll:!0})}));break;case me(i.orientation,{vertical:Se.ArrowDown,horizontal:Se.ArrowRight}):return m.preventDefault(),m.stopPropagation(),a.goToOption(ut.Next);case me(i.orientation,{vertical:Se.ArrowUp,horizontal:Se.ArrowLeft}):return m.preventDefault(),m.stopPropagation(),a.goToOption(ut.Previous);case Se.Home:case Se.PageUp:return m.preventDefault(),m.stopPropagation(),a.goToOption(ut.First);case Se.End:case Se.PageDown:return m.preventDefault(),m.stopPropagation(),a.goToOption(ut.Last);case Se.Escape:return m.preventDefault(),m.stopPropagation(),a.closeListbox(),u.nextFrame(()=>{var f;return(f=i.buttonRef.current)==null?void 0:f.focus({preventScroll:!0})});case Se.Tab:m.preventDefault(),m.stopPropagation();break;default:m.key.length===1&&(a.search(m.key),c.setTimeout(()=>a.clearSearch(),350));break}}),y=qm(()=>{var m,f,g;return(g=(m=i.labelRef.current)==null?void 0:m.id)!=null?g:(f=i.buttonRef.current)==null?void 0:f.id},[i.labelRef.current,i.buttonRef.current]),w=p.useMemo(()=>({open:i.listboxState===0}),[i]),x={"aria-activedescendant":i.activeOptionIndex===null||(n=i.options[i.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":i.mode===1?!0:void 0,"aria-labelledby":y,"aria-orientation":i.orientation,id:o,onKeyDown:S,role:"listbox",tabIndex:0,ref:s};return Ie({ourProps:x,theirProps:l,slot:w,defaultTag:fx,features:px,visible:h,name:"Listbox.Options"})}let mx="li";function vx(e,t){let n=Xe(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:l,...i}=e,a=hl("Listbox.Option"),s=pl("Listbox.Option"),u=a.activeOptionIndex!==null?a.options[a.activeOptionIndex].id===r:!1,c=a.isSelected(l),d=p.useRef(null),h=Jw(d),S=St({disabled:o,value:l,domRef:d,get textValue(){return h()}}),y=$e(t,d);De(()=>{if(a.listboxState!==0||!u||a.activationTrigger===0)return;let N=Zt();return N.requestAnimationFrame(()=>{var k,A;(A=(k=d.current)==null?void 0:k.scrollIntoView)==null||A.call(k,{block:"nearest"})}),N.dispose},[d,u,a.listboxState,a.activationTrigger,a.activeOptionIndex]),De(()=>s.registerOption(r,S),[S,r]);let w=Z(N=>{if(o)return N.preventDefault();s.onChange(l),a.mode===0&&(s.closeListbox(),Zt().nextFrame(()=>{var k;return(k=a.buttonRef.current)==null?void 0:k.focus({preventScroll:!0})}))}),x=Z(()=>{if(o)return s.goToOption(ut.Nothing);s.goToOption(ut.Specific,r)}),m=US(),f=Z(N=>m.update(N)),g=Z(N=>{m.wasMoved(N)&&(o||u||s.goToOption(ut.Specific,r,0))}),R=Z(N=>{m.wasMoved(N)&&(o||u&&s.goToOption(ut.Nothing))}),L=p.useMemo(()=>({active:u,selected:c,disabled:o}),[u,c,o]);return Ie({ourProps:{id:r,ref:y,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:f,onMouseEnter:f,onPointerMove:g,onMouseMove:g,onPointerLeave:R,onMouseLeave:R},theirProps:i,slot:L,defaultTag:mx,name:"Listbox.Option"})}let gx=Ae(ax),yx=Ae(ux),Sx=Ae(dx),wx=Ae(hx),xx=Ae(vx),Kt=Object.assign(gx,{Button:yx,Label:Sx,Options:wx,Option:xx});var Ex=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ex||{}),_x=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(_x||{});let Rx={0:e=>{let t={...e,popoverState:me(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},qc=p.createContext(null);qc.displayName="PopoverContext";function da(e){let t=p.useContext(qc);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,da),n}return t}let Xc=p.createContext(null);Xc.displayName="PopoverAPIContext";function Jc(e){let t=p.useContext(Xc);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Jc),n}return t}let ed=p.createContext(null);ed.displayName="PopoverGroupContext";function gv(){return p.useContext(ed)}let fa=p.createContext(null);fa.displayName="PopoverPanelContext";function Tx(){return p.useContext(fa)}function Nx(e,t){return me(t.type,Rx,e,t)}let Cx="div";function kx(e,t){var n;let{__demoMode:r=!1,...o}=e,l=p.useRef(null),i=$e(t,nv(z=>{l.current=z})),a=p.useRef([]),s=p.useReducer(Nx,{__demoMode:r,popoverState:r?0:1,buttons:a,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:p.createRef(),afterPanelSentinel:p.createRef()}),[{popoverState:u,button:c,buttonId:d,panel:h,panelId:S,beforePanelSentinel:y,afterPanelSentinel:w},x]=s,m=Un((n=l.current)!=null?n:c),f=p.useMemo(()=>{if(!c||!h)return!1;for(let _ of document.querySelectorAll("body > *"))if(Number(_==null?void 0:_.contains(c))^Number(_==null?void 0:_.contains(h)))return!0;let z=sa(),q=z.indexOf(c),b=(q+z.length-1)%z.length,O=(q+1)%z.length,D=z[b],re=z[O];return!h.contains(D)&&!h.contains(re)},[c,h]),g=St(d),R=St(S),L=p.useMemo(()=>({buttonId:g,panelId:R,close:()=>x({type:1})}),[g,R,x]),N=gv(),k=N==null?void 0:N.registerPopover,A=Z(()=>{var z;return(z=N==null?void 0:N.isFocusWithinPopoverGroup())!=null?z:(m==null?void 0:m.activeElement)&&((c==null?void 0:c.contains(m.activeElement))||(h==null?void 0:h.contains(m.activeElement)))});p.useEffect(()=>k==null?void 0:k(L),[k,L]);let[K,B]=pv(),G=vv({mainTreeNodeRef:N==null?void 0:N.mainTreeNodeRef,portals:K,defaultContainers:[c,h]});Gc(m==null?void 0:m.defaultView,"focus",z=>{var q,b,O,D;z.target!==window&&z.target instanceof HTMLElement&&u===0&&(A()||c&&h&&(G.contains(z.target)||(b=(q=y.current)==null?void 0:q.contains)!=null&&b.call(q,z.target)||(D=(O=w.current)==null?void 0:O.contains)!=null&&D.call(O,z.target)||x({type:1})))},!0),zc(G.resolveContainers,(z,q)=>{x({type:1}),Vc(q,ua.Loose)||(z.preventDefault(),c==null||c.focus())},u===0);let te=Z(z=>{x({type:1});let q=(()=>z?z instanceof HTMLElement?z:"current"in z&&z.current instanceof HTMLElement?z.current:c:c)();q==null||q.focus()}),W=p.useMemo(()=>({close:te,isPortalled:f}),[te,f]),le=p.useMemo(()=>({open:u===0,close:te}),[u,te]),ge={ref:i};return F.createElement(fa.Provider,{value:null},F.createElement(qc.Provider,{value:s},F.createElement(Xc.Provider,{value:W},F.createElement(Wc,{value:me(u,{0:Le.Open,1:Le.Closed})},F.createElement(B,null,Ie({ourProps:ge,theirProps:o,slot:le,defaultTag:Cx,name:"Popover"}),F.createElement(G.MainTreeNode,null))))))}let Lx="button";function bx(e,t){let n=Xe(),{id:r=`headlessui-popover-button-${n}`,...o}=e,[l,i]=da("Popover.Button"),{isPortalled:a}=Jc("Popover.Button"),s=p.useRef(null),u=`headlessui-focus-sentinel-${Xe()}`,c=gv(),d=c==null?void 0:c.closeOthers,h=Tx()!==null;p.useEffect(()=>{if(!h)return i({type:3,buttonId:r}),()=>{i({type:3,buttonId:null})}},[h,r,i]);let[S]=p.useState(()=>Symbol()),y=$e(s,t,h?null:G=>{if(G)l.buttons.current.push(S);else{let te=l.buttons.current.indexOf(S);te!==-1&&l.buttons.current.splice(te,1)}l.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),G&&i({type:2,button:G})}),w=$e(s,t),x=Un(s),m=Z(G=>{var te,W,le;if(h){if(l.popoverState===1)return;switch(G.key){case Se.Space:case Se.Enter:G.preventDefault(),(W=(te=G.target).click)==null||W.call(te),i({type:1}),(le=l.button)==null||le.focus();break}}else switch(G.key){case Se.Space:case Se.Enter:G.preventDefault(),G.stopPropagation(),l.popoverState===1&&(d==null||d(l.buttonId)),i({type:0});break;case Se.Escape:if(l.popoverState!==0)return d==null?void 0:d(l.buttonId);if(!s.current||x!=null&&x.activeElement&&!s.current.contains(x.activeElement))return;G.preventDefault(),G.stopPropagation(),i({type:1});break}}),f=Z(G=>{h||G.key===Se.Space&&G.preventDefault()}),g=Z(G=>{var te,W;ca(G.currentTarget)||e.disabled||(h?(i({type:1}),(te=l.button)==null||te.focus()):(G.preventDefault(),G.stopPropagation(),l.popoverState===1&&(d==null||d(l.buttonId)),i({type:0}),(W=l.button)==null||W.focus()))}),R=Z(G=>{G.preventDefault(),G.stopPropagation()}),L=l.popoverState===0,N=p.useMemo(()=>({open:L}),[L]),k=ev(e,s),A=h?{ref:w,type:k,onKeyDown:m,onClick:g}:{ref:y,id:l.buttonId,type:k,"aria-expanded":l.popoverState===0,"aria-controls":l.panel?l.panelId:void 0,onKeyDown:m,onKeyUp:f,onClick:g,onMouseDown:R},K=Kc(),B=Z(()=>{let G=l.panel;if(!G)return;function te(){me(K.current,{[gt.Forwards]:()=>Dt(G,nt.First),[gt.Backwards]:()=>Dt(G,nt.Last)})===ol.Error&&Dt(sa().filter(W=>W.dataset.headlessuiFocusGuard!=="true"),me(K.current,{[gt.Forwards]:nt.Next,[gt.Backwards]:nt.Previous}),{relativeTo:l.button})}te()});return F.createElement(F.Fragment,null,Ie({ourProps:A,theirProps:o,slot:N,defaultTag:Lx,name:"Popover.Button"}),L&&!h&&a&&F.createElement(Mn,{id:u,features:fn.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:B}))}let Px="div",Ax=qt.RenderStrategy|qt.Static;function Ox(e,t){let n=Xe(),{id:r=`headlessui-popover-overlay-${n}`,...o}=e,[{popoverState:l},i]=da("Popover.Overlay"),a=$e(t),s=Jr(),u=(()=>s!==null?(s&Le.Open)===Le.Open:l===0)(),c=Z(h=>{if(ca(h.currentTarget))return h.preventDefault();i({type:1})}),d=p.useMemo(()=>({open:l===0}),[l]);return Ie({ourProps:{ref:a,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:d,defaultTag:Px,features:Ax,visible:u,name:"Popover.Overlay"})}let $x="div",Ix=qt.RenderStrategy|qt.Static;function Mx(e,t){let n=Xe(),{id:r=`headlessui-popover-panel-${n}`,focus:o=!1,...l}=e,[i,a]=da("Popover.Panel"),{close:s,isPortalled:u}=Jc("Popover.Panel"),c=`headlessui-focus-sentinel-before-${Xe()}`,d=`headlessui-focus-sentinel-after-${Xe()}`,h=p.useRef(null),S=$e(h,t,k=>{a({type:4,panel:k})}),y=Un(h);De(()=>(a({type:5,panelId:r}),()=>{a({type:5,panelId:null})}),[r,a]);let w=Jr(),x=(()=>w!==null?(w&Le.Open)===Le.Open:i.popoverState===0)(),m=Z(k=>{var A;switch(k.key){case Se.Escape:if(i.popoverState!==0||!h.current||y!=null&&y.activeElement&&!h.current.contains(y.activeElement))return;k.preventDefault(),k.stopPropagation(),a({type:1}),(A=i.button)==null||A.focus();break}});p.useEffect(()=>{var k;e.static||i.popoverState===1&&((k=e.unmount)==null||k)&&a({type:4,panel:null})},[i.popoverState,e.unmount,e.static,a]),p.useEffect(()=>{if(i.__demoMode||!o||i.popoverState!==0||!h.current)return;let k=y==null?void 0:y.activeElement;h.current.contains(k)||Dt(h.current,nt.First)},[i.__demoMode,o,h,i.popoverState]);let f=p.useMemo(()=>({open:i.popoverState===0,close:s}),[i,s]),g={ref:S,id:r,onKeyDown:m,onBlur:o&&i.popoverState===0?k=>{var A,K,B,G,te;let W=k.relatedTarget;W&&h.current&&((A=h.current)!=null&&A.contains(W)||(a({type:1}),((B=(K=i.beforePanelSentinel.current)==null?void 0:K.contains)!=null&&B.call(K,W)||(te=(G=i.afterPanelSentinel.current)==null?void 0:G.contains)!=null&&te.call(G,W))&&W.focus({preventScroll:!0})))}:void 0,tabIndex:-1},R=Kc(),L=Z(()=>{let k=h.current;if(!k)return;function A(){me(R.current,{[gt.Forwards]:()=>{var K;Dt(k,nt.First)===ol.Error&&((K=i.afterPanelSentinel.current)==null||K.focus())},[gt.Backwards]:()=>{var K;(K=i.button)==null||K.focus({preventScroll:!0})}})}A()}),N=Z(()=>{let k=h.current;if(!k)return;function A(){me(R.current,{[gt.Forwards]:()=>{var K;if(!i.button)return;let B=sa(),G=B.indexOf(i.button),te=B.slice(0,G+1),W=[...B.slice(G+1),...te];for(let le of W.slice())if(le.dataset.headlessuiFocusGuard==="true"||(K=i.panel)!=null&&K.contains(le)){let ge=W.indexOf(le);ge!==-1&&W.splice(ge,1)}Dt(W,nt.First,{sorted:!1})},[gt.Backwards]:()=>{var K;Dt(k,nt.Previous)===ol.Error&&((K=i.button)==null||K.focus())}})}A()});return F.createElement(fa.Provider,{value:r},x&&u&&F.createElement(Mn,{id:c,ref:i.beforePanelSentinel,features:fn.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:L}),Ie({ourProps:g,theirProps:l,slot:f,defaultTag:$x,features:Ix,visible:x,name:"Popover.Panel"}),x&&u&&F.createElement(Mn,{id:d,ref:i.afterPanelSentinel,features:fn.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N}))}let jx="div";function Dx(e,t){let n=p.useRef(null),r=$e(n,t),[o,l]=p.useState([]),i=bw(),a=Z(w=>{l(x=>{let m=x.indexOf(w);if(m!==-1){let f=x.slice();return f.splice(m,1),f}return x})}),s=Z(w=>(l(x=>[...x,w]),()=>a(w))),u=Z(()=>{var w;let x=aa(n);if(!x)return!1;let m=x.activeElement;return(w=n.current)!=null&&w.contains(m)?!0:o.some(f=>{var g,R;return((g=x.getElementById(f.buttonId.current))==null?void 0:g.contains(m))||((R=x.getElementById(f.panelId.current))==null?void 0:R.contains(m))})}),c=Z(w=>{for(let x of o)x.buttonId.current!==w&&x.close()}),d=p.useMemo(()=>({registerPopover:s,unregisterPopover:a,isFocusWithinPopoverGroup:u,closeOthers:c,mainTreeNodeRef:i.mainTreeNodeRef}),[s,a,u,c,i.mainTreeNodeRef]),h=p.useMemo(()=>({}),[]),S=e,y={ref:r};return F.createElement(ed.Provider,{value:d},Ie({ourProps:y,theirProps:S,slot:h,defaultTag:jx,name:"Popover.Group"}),F.createElement(i.MainTreeNode,null))}let Fx=Ae(kx),Ux=Ae(bx),Vx=Ae(Ox),zx=Ae(Mx),Bx=Ae(Dx),gs=Object.assign(Fx,{Button:Ux,Overlay:Vx,Panel:zx,Group:Bx});function Wx(e=0){let[t,n]=p.useState(e),r=dl(),o=p.useCallback(s=>{r.current&&n(u=>u|s)},[t,r]),l=p.useCallback(s=>!!(t&s),[t]),i=p.useCallback(s=>{r.current&&n(u=>u&~s)},[n,r]),a=p.useCallback(s=>{r.current&&n(u=>u^s)},[n]);return{flags:t,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:a}}function Hx(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ys(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ss(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Kx(e,t){let n=Zt();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(s=>{let[u=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return u}),a=l+i;if(a!==0){n.group(u=>{u.setTimeout(()=>{t(),u.dispose()},a),u.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&u.dispose()})});let s=n.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function Gx(e,t,n,r){let o=n?"enter":"leave",l=Zt(),i=r!==void 0?Hx(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=me(o,{enter:()=>t.enter,leave:()=>t.leave}),s=me(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),u=me(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ss(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),ys(e,...t.base,...a,...u),l.nextFrame(()=>{Ss(e,...t.base,...a,...u),ys(e,...t.base,...a,...s),Kx(e,()=>(Ss(e,...t.base,...a),ys(e,...t.base,...t.entered),i()))}),l.dispose}function Qx({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:l}){let i=dl(),a=ar(),s=St(n);De(()=>{e&&(s.current="enter")},[e]),De(()=>{let u=Zt();a.add(u.dispose);let c=t.current;if(c&&s.current!=="idle"&&i.current)return u.dispose(),o.current(s.current),u.add(Gx(c,r.current,s.current==="enter",()=>{u.dispose(),l.current(s.current)})),u.dispose},[n])}function vn(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let pa=p.createContext(null);pa.displayName="TransitionContext";var Yx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Yx||{});function Zx(){let e=p.useContext(pa);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function qx(){let e=p.useContext(ha);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ha=p.createContext(null);ha.displayName="NestingContext";function ma(e){return"children"in e?ma(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function yv(e,t){let n=St(e),r=p.useRef([]),o=dl(),l=ar(),i=Z((S,y=Tn.Hidden)=>{let w=r.current.findIndex(({el:x})=>x===S);w!==-1&&(me(y,{[Tn.Unmount](){r.current.splice(w,1)},[Tn.Hidden](){r.current[w].state="hidden"}}),l.microTask(()=>{var x;!ma(r)&&o.current&&((x=n.current)==null||x.call(n))}))}),a=Z(S=>{let y=r.current.find(({el:w})=>w===S);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:S,state:"visible"}),()=>i(S,Tn.Unmount)}),s=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[],idle:[]}),d=Z((S,y,w)=>{s.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([x])=>x!==S)),t==null||t.chains.current[y].push([S,new Promise(x=>{s.current.push(x)})]),t==null||t.chains.current[y].push([S,new Promise(x=>{Promise.all(c.current[y].map(([m,f])=>f)).then(()=>x())})]),y==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>w(y)):w(y)}),h=Z((S,y,w)=>{Promise.all(c.current[y].splice(0).map(([x,m])=>m)).then(()=>{var x;(x=s.current.shift())==null||x()}).then(()=>w(y))});return p.useMemo(()=>({children:r,register:a,unregister:i,onStart:d,onStop:h,wait:u,chains:c}),[a,i,r,d,h,c,u])}function Xx(){}let Jx=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qf(e){var t;let n={};for(let r of Jx)n[r]=(t=e[r])!=null?t:Xx;return n}function eE(e){let t=p.useRef(Qf(e));return p.useEffect(()=>{t.current=Qf(e)},[e]),t}let tE="div",Sv=qt.RenderStrategy;function nE(e,t){var n,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:a,enter:s,enterFrom:u,enterTo:c,entered:d,leave:h,leaveFrom:S,leaveTo:y,...w}=e,x=p.useRef(null),m=$e(x,t),f=(n=w.unmount)==null||n?Tn.Unmount:Tn.Hidden,{show:g,appear:R,initial:L}=Zx(),[N,k]=p.useState(g?"visible":"hidden"),A=qx(),{register:K,unregister:B}=A;p.useEffect(()=>K(x),[K,x]),p.useEffect(()=>{if(f===Tn.Hidden&&x.current){if(g&&N!=="visible"){k("visible");return}return me(N,{hidden:()=>B(x),visible:()=>K(x)})}},[N,x,K,B,g,f]);let G=St({base:vn(w.className),enter:vn(s),enterFrom:vn(u),enterTo:vn(c),entered:vn(d),leave:vn(h),leaveFrom:vn(S),leaveTo:vn(y)}),te=eE({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:a}),W=Xr();p.useEffect(()=>{if(W&&N==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,N,W]);let le=L&&!R,ge=R&&g&&L,z=(()=>!W||le?"idle":g?"enter":"leave")(),q=Wx(0),b=Z(P=>me(P,{enter:()=>{q.addFlag(Le.Opening),te.current.beforeEnter()},leave:()=>{q.addFlag(Le.Closing),te.current.beforeLeave()},idle:()=>{}})),O=Z(P=>me(P,{enter:()=>{q.removeFlag(Le.Opening),te.current.afterEnter()},leave:()=>{q.removeFlag(Le.Closing),te.current.afterLeave()},idle:()=>{}})),D=yv(()=>{k("hidden"),B(x)},A);Qx({immediate:ge,container:x,classes:G,direction:z,onStart:St(P=>{D.onStart(x,P,b)}),onStop:St(P=>{D.onStop(x,P,O),P==="leave"&&!ma(D)&&(k("hidden"),B(x))})});let re=w,_={ref:m};return ge?re={...re,className:Mi(w.className,...G.current.enter,...G.current.enterFrom)}:(re.className=Mi(w.className,(r=x.current)==null?void 0:r.className),re.className===""&&delete re.className),F.createElement(ha.Provider,{value:D},F.createElement(Wc,{value:me(N,{visible:Le.Open,hidden:Le.Closed})|q.flags},Ie({ourProps:_,theirProps:re,defaultTag:tE,features:Sv,visible:N==="visible",name:"Transition.Child"})))}function rE(e,t){let{show:n,appear:r=!1,unmount:o=!0,...l}=e,i=p.useRef(null),a=$e(i,t);Xr();let s=Jr();if(n===void 0&&s!==null&&(n=(s&Le.Open)===Le.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=p.useState(n?"visible":"hidden"),d=yv(()=>{c("hidden")}),[h,S]=p.useState(!0),y=p.useRef([n]);De(()=>{h!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),S(!1))},[y,n]);let w=p.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);p.useEffect(()=>{if(n)c("visible");else if(!ma(d))c("hidden");else{let g=i.current;if(!g)return;let R=g.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&c("hidden")}},[n,d]);let x={unmount:o},m=Z(()=>{var g;h&&S(!1),(g=e.beforeEnter)==null||g.call(e)}),f=Z(()=>{var g;h&&S(!1),(g=e.beforeLeave)==null||g.call(e)});return F.createElement(ha.Provider,{value:d},F.createElement(pa.Provider,{value:w},Ie({ourProps:{...x,as:p.Fragment,children:F.createElement(wv,{ref:a,...x,...l,beforeEnter:m,beforeLeave:f})},theirProps:{},defaultTag:p.Fragment,features:Sv,visible:u==="visible",name:"Transition"})))}function oE(e,t){let n=p.useContext(pa)!==null,r=Jr()!==null;return F.createElement(F.Fragment,null,!n&&r?F.createElement(bu,{ref:t,...e}):F.createElement(wv,{ref:t,...e}))}let bu=Ae(rE),wv=Ae(nE),lE=Ae(oE),tr=Object.assign(bu,{Child:lE,Root:bu});const iE=({children:e,onClose:t,isOpen:n,maxWidth:r="max-w-lg",background:o="bg-white"})=>v.jsx(tr.Root,{show:n,appear:!0,as:"div",children:v.jsx(Lu,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>{t(!1)},children:v.jsxs("div",{className:"flex items-end justify-center min-h-screen max-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[v.jsx(tr.Child,{as:"div",enter:"ease-out duration-400",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:v.jsx(Lu.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),v.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),v.jsx(tr.Child,{as:p.Fragment,enter:"ease-out duration-400",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:v.jsxs("div",{className:`inline-block align-bottom ${o} rounded-lg px-4 pt-5 pb-4 text-left shadow-xl transform transition-all sm:my-8 sm:align-middle ${r} sm:w-full sm:p-6 max-h-screen`,children:[v.jsx("div",{className:"hidden sm:block absolute top-0 right-0 pt-4 pr-4",children:v.jsxs("button",{type:"button",className:`${o} rounded-md text-gray-400 hover:text-gray-500`,onClick:()=>t(!1),children:[v.jsx("span",{className:"sr-only",children:"Close"}),v.jsx(Zm,{className:"h-6 w-6","aria-hidden":"true"})]})}),e]})})]})})}),aE={CAUTION:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:v.jsx(sS,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})},COMING_SOON:{backgroundColor:"bg-pink-500",defaultTitle:"Coming soon",disabledColor:"disabled:bg-pink-300",focusColor:"focus:ring-pink-500",hoverColor:"hover:bg-pink-600",icon:v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-gray-100 sm:mx-0 sm:h-10 sm:w-10",children:v.jsx(lS,{className:"h-6 w-6 text-gray-600","aria-hidden":"true"})})},DELETE:{backgroundColor:"bg-red-500",defaultTitle:"Delete?",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:v.jsx(Ym,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},ERROR:{backgroundColor:"bg-red-500",defaultTitle:"Ups, we found an error",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:v.jsx(wS,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},REMOVE:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:v.jsx(dS,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})}},sE=({alertType:e,bodyElement:t,isOpen:n,onPrimaryButtonClick:r,onSecondaryButtonClick:o,primaryButtonContent:l,primaryButtonDisabled:i=!1,secondaryButtonDisabled:a=!1,secondaryButtonContent:s,primaryButtonTestID:u="alert-modal-primary-button",secondaryButtonTestID:c="alert-modal-secondary-button",setIsOpen:d,title:h})=>{const{backgroundColor:S,focusColor:y,hoverColor:w,defaultTitle:x,icon:m,disabledColor:f}=aE[e];return v.jsx(v.Fragment,{children:v.jsxs(iE,{isOpen:n,onClose:d,children:[v.jsxs("div",{className:"sm:flex sm:items-start",children:[m,v.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[v.jsx(Lu.Title,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900",children:h??x}),v.jsx("div",{className:"mt-2",children:t})]})]}),v.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[v.jsx("button",{disabled:i,type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 ${S} text-base font-medium text-white ${w} focus:outline-none focus:ring-2 focus:ring-offset-2 ${y} sm:ml-3 sm:w-auto sm:text-sm ${f}`,onClick:r,"data-test":u,children:l}),v.jsx("button",{disabled:a,type:"button",className:"disabled:bg-gray-200 mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:o,"data-test":c,children:s})]})]})})},Yf=({alertType:e,bodyText:t,hideModal:n,onPrimaryButtonClick:r,onSecondaryButtonClick:o,primaryButtonText:l,secondaryButtonText:i,primaryButtonTestID:a="text-alert-modal-primary-button",secondaryButtonTestID:s="text-alert-modal-secondary-button",title:u})=>{const c=v.jsx("div",{className:"whitespace-pre-line",children:t});return v.jsx(sE,{alertType:e,bodyElement:c,isOpen:!0,onPrimaryButtonClick:r,onSecondaryButtonClick:o,primaryButtonContent:l,secondaryButtonContent:i,primaryButtonTestID:a,secondaryButtonTestID:s,setIsOpen:n,title:u})};var xv={exports:{}};/*!
|
|
46
|
+
`));let d=u.props,p=typeof(d==null?void 0:d.className)=="function"?(...g)=>ks(d==null?void 0:d.className(...g),l.className):ks(d==null?void 0:d.className,l.className),f=p?{className:p}:{};return v.cloneElement(u,Object.assign({},q0(u.props,Tp(ed(l,["ref"]))),c,s,RA(u.ref,s.ref),f))}return v.createElement(o,Object.assign({},ed(l,["ref"]),o!==v.Fragment&&s,o!==v.Fragment&&c),u)}function RA(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function q0(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let a=n[r];for(let l of a){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;l(o,...i)}}});return t}function $e(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Tp(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ed(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Au(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&OA(n)?!1:r}function OA(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function K0(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))tM(n,eM(t,r),o);return n}function eM(e,t){return e?e+"["+t+"]":t}function tM(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())tM(e,eM(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):K0(n,t,e)}let kA="div";var Jn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Jn||{});function zA(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return We({ourProps:o,theirProps:r,slot:{},defaultTag:kA,name:"Hidden"})}let Ar=$e(zA),em=v.createContext(null);em.displayName="OpenClosedContext";var Ue=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ue||{});function di(){return v.useContext(em)}function tm({value:e,children:t}){return O.createElement(em.Provider,{value:e},t)}var Ce=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ce||{});function UA(e,t,n){let[r,o]=v.useState(n),i=e!==void 0,a=v.useRef(i),l=v.useRef(!1),s=v.useRef(!1);return i&&!a.current&&!l.current?(l.current=!0,a.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&a.current&&!s.current&&(s.current=!0,a.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,re(u=>(i||o(u),t==null?void 0:t(u)))]}function nm(e,t){let n=v.useRef([]),r=re(e);v.useEffect(()=>{let o=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let l=r(t,o);return n.current=t,l}},[r,...t])}function Rh(e){return[e.screenX,e.screenY]}function BA(){let e=v.useRef([-1,-1]);return{wasMoved(t){let n=Rh(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Rh(t)}}}function _A(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Pr(...e){return v.useMemo(()=>Su(...e),[...e])}var Ft=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ft||{});function rm(){let e=v.useRef(0);return Y0("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Ga(){let e=v.useRef(!1);return Je(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function om(e,t,n,r){let o=Gt(n);v.useEffect(()=>{e=e??window;function i(a){o.current(a)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function $A(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function nM(e){let t=re(e),n=v.useRef(!1);v.useEffect(()=>(n.current=!1,()=>{n.current=!0,xu(()=>{n.current&&t()})}),[t])}function rM(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let FA="div";var oM=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(oM||{});function HA(e,t){let n=v.useRef(null),r=He(n,t),{initialFocus:o,containers:i,features:a=30,...l}=e;ci()||(a=1);let s=Pr(n);ZA({ownerDocument:s},!!(a&16));let u=VA({ownerDocument:s,container:n,initialFocus:o},!!(a&2));YA({ownerDocument:s,container:n,containers:i,previousActiveElement:u},!!(a&8));let c=rm(),d=re(I=>{let w=n.current;w&&(y=>y())(()=>{be(c.current,{[Ft.Forwards]:()=>{In(w,Nt.First,{skipElements:[I.relatedTarget]})},[Ft.Backwards]:()=>{In(w,Nt.Last,{skipElements:[I.relatedTarget]})}})})}),p=io(),f=v.useRef(!1),g={ref:r,onKeyDown(I){I.key=="Tab"&&(f.current=!0,p.requestAnimationFrame(()=>{f.current=!1}))},onBlur(I){let w=rM(i);n.current instanceof HTMLElement&&w.add(n.current);let y=I.relatedTarget;y instanceof HTMLElement&&y.dataset.headlessuiFocusGuard!=="true"&&(iM(w,y)||(f.current?In(n.current,be(c.current,{[Ft.Forwards]:()=>Nt.Next,[Ft.Backwards]:()=>Nt.Previous})|Nt.WrapAround,{relativeTo:I.target}):I.target instanceof HTMLElement&&Kr(I.target)))}};return O.createElement(O.Fragment,null,!!(a&4)&&O.createElement(Ar,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:Jn.Focusable}),We({ourProps:g,theirProps:l,defaultTag:FA,name:"FocusTrap"}),!!(a&4)&&O.createElement(Ar,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:Jn.Focusable}))}let WA=$e(HA),Ai=Object.assign(WA,{features:oM}),ar=[];$A(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&ar[0]!==t.target&&(ar.unshift(t.target),ar=ar.filter(n=>n!=null&&n.isConnected),ar.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function GA(e=!0){let t=v.useRef(ar.slice());return nm(([n],[r])=>{r===!0&&n===!1&&xu(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=ar.slice())},[e,ar,t]),re(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function ZA({ownerDocument:e},t){let n=GA(t);nm(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Kr(n())},[t]),nM(()=>{t&&Kr(n())})}function VA({ownerDocument:e,container:t,initialFocus:n},r){let o=v.useRef(null),i=Ga();return nm(()=>{if(!r)return;let a=t.current;a&&xu(()=>{if(!i.current)return;let l=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===l){o.current=l;return}}else if(a.contains(l)){o.current=l;return}n!=null&&n.current?Kr(n.current):In(a,Nt.First)===Aa.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function YA({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=Ga();om(e==null?void 0:e.defaultView,"focus",a=>{if(!o||!i.current)return;let l=rM(n);t.current instanceof HTMLElement&&l.add(t.current);let s=r.current;if(!s)return;let u=a.target;u&&u instanceof HTMLElement?iM(l,u)?(r.current=u,Kr(u)):(a.preventDefault(),a.stopPropagation(),Kr(s)):Kr(r.current)},!0)}function iM(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let aM=v.createContext(!1);function QA(){return v.useContext(aM)}function Ep(e){return O.createElement(aM.Provider,{value:e.force},e.children)}function JA(e){let t=QA(),n=v.useContext(lM),r=Pr(e),[o,i]=v.useState(()=>{if(!t&&n!==null||Gn.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)});return v.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),v.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let XA=v.Fragment;function qA(e,t){let n=e,r=v.useRef(null),o=He(X0(c=>{r.current=c}),t),i=Pr(r),a=JA(r),[l]=v.useState(()=>{var c;return Gn.isServer?null:(c=i==null?void 0:i.createElement("div"))!=null?c:null}),s=v.useContext(jp),u=ci();return Je(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),Je(()=>{if(l&&s)return s.register(l)},[s,l]),nM(()=>{var c;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((c=a.parentElement)==null||c.removeChild(a)))}),u?!a||!l?null:Wa.createPortal(We({ourProps:{ref:o},theirProps:n,defaultTag:XA,name:"Portal"}),l):null}let KA=v.Fragment,lM=v.createContext(null);function eC(e,t){let{target:n,...r}=e,o={ref:He(t)};return O.createElement(lM.Provider,{value:n},We({ourProps:o,theirProps:r,defaultTag:KA,name:"Popover.Group"}))}let jp=v.createContext(null);function sM(){let e=v.useContext(jp),t=v.useRef([]),n=re(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=re(i=>{let a=t.current.indexOf(i);a!==-1&&t.current.splice(a,1),e&&e.unregister(i)}),o=v.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,v.useMemo(()=>function({children:i}){return O.createElement(jp.Provider,{value:o},i)},[o])]}let tC=$e(qA),nC=$e(eC),Pp=Object.assign(tC,{Group:nC}),uM=v.createContext(null);function cM(){let e=v.useContext(uM);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,cM),t}return e}function rC(){let[e,t]=v.useState([]);return[e.length>0?e.join(" "):void 0,v.useMemo(()=>function(n){let r=re(i=>(t(a=>[...a,i]),()=>t(a=>{let l=a.slice(),s=l.indexOf(i);return s!==-1&&l.splice(s,1),l}))),o=v.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return O.createElement(uM.Provider,{value:o},n.children)},[t])]}let oC="p";function iC(e,t){let n=It(),{id:r=`headlessui-description-${n}`,...o}=e,i=cM(),a=He(t);Je(()=>i.register(r),[r,i.register]);let l={ref:a,...i.props,id:r};return We({ourProps:l,theirProps:o,slot:i.slot||{},defaultTag:oC,name:i.name||"Description"})}let aC=$e(iC),lC=Object.assign(aC,{}),im=v.createContext(()=>{});im.displayName="StackContext";var Lp=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Lp||{});function sC(){return v.useContext(im)}function uC({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=sC(),a=re((...l)=>{t==null||t(...l),i(...l)});return Je(()=>{let l=o===void 0||o===!0;return l&&a(0,n,r),()=>{l&&a(1,n,r)}},[a,n,r,o]),O.createElement(im.Provider,{value:a},e)}function cC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const dC=typeof Object.is=="function"?Object.is:cC,{useState:pC,useEffect:fC,useLayoutEffect:mC,useDebugValue:gC}=Wo;function hC(e,t,n){const r=t(),[{inst:o},i]=pC({inst:{value:r,getSnapshot:t}});return mC(()=>{o.value=r,o.getSnapshot=t,td(o)&&i({inst:o})},[e,r,t]),fC(()=>(td(o)&&i({inst:o}),e(()=>{td(o)&&i({inst:o})})),[e]),gC(r),r}function td(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!dC(n,r)}catch{return!0}}function vC(e,t,n){return t()}const yC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IC=!yC,MC=IC?vC:hC,wC="useSyncExternalStore"in Wo?(e=>e.useSyncExternalStore)(Wo):MC;function bC(e){return wC(e.subscribe,e.getSnapshot,e.getSnapshot)}function xC(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let a=t[o].call(n,...i);a&&(n=a,r.forEach(l=>l()))}}}function SC(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function NC(){if(!_A())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(a=>a()).some(a=>a.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let a=Rn();a.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>a.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:s}=new URL(l.href),u=t.querySelector(s);u&&!o(u)&&(i=u)}catch{}},!0),n.addEventListener(t,"touchmove",a=>{a.target instanceof HTMLElement&&!o(a.target)&&a.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function DC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function AC(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Vr=xC(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Rn(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:AC(n)},o=[NC(),SC(),DC()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Vr.subscribe(()=>{let e=Vr.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Vr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Vr.dispatch("TEARDOWN",n)}});function CC(e,t,n){let r=bC(Vr),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Je(()=>{if(!(!e||!t))return Vr.dispatch("PUSH",e,n),()=>Vr.dispatch("POP",e,n)},[t,e]),i}let nd=new Map,Ci=new Map;function Oh(e,t=!0){Je(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var a;if(!r)return;let l=(a=Ci.get(r))!=null?a:1;if(l===1?Ci.delete(r):Ci.set(r,l-1),l!==1)return;let s=nd.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,nd.delete(r))}let i=(n=Ci.get(r))!=null?n:0;return Ci.set(r,i+1),i!==0||(nd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function dM({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=v.useRef((r=n==null?void 0:n.current)!=null?r:null),i=Pr(o),a=re(()=>{var l;let s=[];for(let u of e)u!==null&&(u instanceof HTMLElement?s.push(u):"current"in u&&u.current instanceof HTMLElement&&s.push(u.current));if(t!=null&&t.current)for(let u of t.current)s.push(u);for(let u of(l=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?l:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(u.contains(o.current)||s.some(c=>u.contains(c))||s.push(u));return s});return{resolveContainers:a,contains:re(l=>a().some(s=>s.contains(l))),mainTreeNodeRef:o,MainTreeNode:v.useMemo(()=>function(){return n!=null?null:O.createElement(Ar,{features:Jn.Hidden,ref:o})},[o,n])}}function TC(){let e=v.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:v.useMemo(()=>function(){return O.createElement(Ar,{features:Jn.Hidden,ref:e})},[e])}}var EC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(EC||{}),jC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jC||{});let PC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},zs=v.createContext(null);zs.displayName="DialogContext";function Za(e){let t=v.useContext(zs);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Za),n}return t}function LC(e,t,n=()=>[document.body]){CC(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function RC(e,t){return be(t.type,PC,e,t)}let OC="div",kC=On.RenderStrategy|On.Static;function zC(e,t){var n;let r=It(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:l,__demoMode:s=!1,...u}=e,[c,d]=v.useState(0),p=di();i===void 0&&p!==null&&(i=(p&Ue.Open)===Ue.Open);let f=v.useRef(null),g=He(f,t),I=Pr(f),w=e.hasOwnProperty("open")||p!==null,y=e.hasOwnProperty("onClose");if(!w&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!w)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof a!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let h=i?0:1,[M,b]=v.useReducer(RC,{titleId:null,descriptionId:null,panelRef:v.createRef()}),N=re(()=>a(!1)),x=re(Q=>b({type:0,id:Q})),D=ci()?s?!1:h===0:!1,j=c>1,L=v.useContext(zs)!==null,[R,U]=sM(),{resolveContainers:ee,mainTreeNodeRef:W,MainTreeNode:q}=dM({portals:R,defaultContainers:[(n=M.panelRef.current)!=null?n:f.current]}),Y=j?"parent":"leaf",F=p!==null?(p&Ue.Closing)===Ue.Closing:!1,ne=(()=>L||F?!1:D)(),P=v.useCallback(()=>{var Q,me;return(me=Array.from((Q=I==null?void 0:I.querySelectorAll("body > *"))!=null?Q:[]).find(Ie=>Ie.id==="headlessui-portal-root"?!1:Ie.contains(W.current)&&Ie instanceof HTMLElement))!=null?me:null},[W]);Oh(P,ne);let z=(()=>j?!0:D)(),_=v.useCallback(()=>{var Q,me;return(me=Array.from((Q=I==null?void 0:I.querySelectorAll("[data-headlessui-portal]"))!=null?Q:[]).find(Ie=>Ie.contains(W.current)&&Ie instanceof HTMLElement))!=null?me:null},[W]);Oh(_,z);let G=(()=>!(!D||j))();Kf(ee,N,G);let S=(()=>!(j||h!==0))();om(I==null?void 0:I.defaultView,"keydown",Q=>{S&&(Q.defaultPrevented||Q.key===Ce.Escape&&(Q.preventDefault(),Q.stopPropagation(),N()))});let C=(()=>!(F||h!==0||L))();LC(I,C,ee),v.useEffect(()=>{if(h!==0||!f.current)return;let Q=new ResizeObserver(me=>{for(let Ie of me){let ve=Ie.target.getBoundingClientRect();ve.x===0&&ve.y===0&&ve.width===0&&ve.height===0&&N()}});return Q.observe(f.current),()=>Q.disconnect()},[h,f,N]);let[T,k]=rC(),B=v.useMemo(()=>[{dialogState:h,close:N,setTitleId:x},M],[h,M,N,x]),oe=v.useMemo(()=>({open:h===0}),[h]),se={ref:g,id:o,role:"dialog","aria-modal":h===0?!0:void 0,"aria-labelledby":M.titleId,"aria-describedby":T};return O.createElement(uC,{type:"Dialog",enabled:h===0,element:f,onUpdate:re((Q,me)=>{me==="Dialog"&&be(Q,{[Lp.Add]:()=>d(Ie=>Ie+1),[Lp.Remove]:()=>d(Ie=>Ie-1)})})},O.createElement(Ep,{force:!0},O.createElement(Pp,null,O.createElement(zs.Provider,{value:B},O.createElement(Pp.Group,{target:f},O.createElement(Ep,{force:!1},O.createElement(k,{slot:oe,name:"Dialog.Description"},O.createElement(Ai,{initialFocus:l,containers:ee,features:D?be(Y,{parent:Ai.features.RestoreFocus,leaf:Ai.features.All&~Ai.features.FocusLock}):Ai.features.None},O.createElement(U,null,We({ourProps:se,theirProps:u,slot:oe,defaultTag:OC,features:kC,visible:h===0,name:"Dialog"}))))))))),O.createElement(q,null))}let UC="div";function BC(e,t){let n=It(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:a}]=Za("Dialog.Overlay"),l=He(t),s=re(c=>{if(c.target===c.currentTarget){if(Au(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),a()}}),u=v.useMemo(()=>({open:i===0}),[i]);return We({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:s},theirProps:o,slot:u,defaultTag:UC,name:"Dialog.Overlay"})}let _C="div";function $C(e,t){let n=It(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},a]=Za("Dialog.Backdrop"),l=He(t);v.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let s=v.useMemo(()=>({open:i===0}),[i]);return O.createElement(Ep,{force:!0},O.createElement(Pp,null,We({ourProps:{ref:l,id:r,"aria-hidden":!0},theirProps:o,slot:s,defaultTag:_C,name:"Dialog.Backdrop"})))}let FC="div";function HC(e,t){let n=It(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},a]=Za("Dialog.Panel"),l=He(t,a.panelRef),s=v.useMemo(()=>({open:i===0}),[i]),u=re(c=>{c.stopPropagation()});return We({ourProps:{ref:l,id:r,onClick:u},theirProps:o,slot:s,defaultTag:FC,name:"Dialog.Panel"})}let WC="h2";function GC(e,t){let n=It(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:a}]=Za("Dialog.Title"),l=He(t);v.useEffect(()=>(a(r),()=>a(null)),[r,a]);let s=v.useMemo(()=>({open:i===0}),[i]);return We({ourProps:{ref:l,id:r},theirProps:o,slot:s,defaultTag:WC,name:"Dialog.Title"})}let ZC=$e(zC),VC=$e($C),YC=$e(HC),QC=$e(BC),JC=$e(GC),Us=Object.assign(ZC,{Backdrop:VC,Panel:YC,Overlay:QC,Title:JC,Description:lC}),kh=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function zh(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let l of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let a=i?(n=o.innerText)!=null?n:"":r;return kh.test(a)&&(a=a.replace(kh,"")),a}function XC(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let a=i.getAttribute("aria-label");return typeof a=="string"?a.trim():zh(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return zh(e).trim()}function qC(e){let t=v.useRef(""),n=v.useRef("");return re(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=XC(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var KC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(KC||{}),eT=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(eT||{}),tT=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(tT||{}),nT=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(nT||{});function rd(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=V0(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let rT={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(o=>n(o.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=rd(e),o=LA(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:o,activationTrigger:(n=t.trigger)!=null?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(a=>{var l;return!a.dataRef.current.disabled&&((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=rd(e,o=>[...o,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=rd(e,r=>{let o=r.findIndex(i=>i.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},am=v.createContext(null);am.displayName="ListboxActionsContext";function Va(e){let t=v.useContext(am);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Va),n}return t}let lm=v.createContext(null);lm.displayName="ListboxDataContext";function Ya(e){let t=v.useContext(lm);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ya),n}return t}function oT(e,t){return be(t.type,rT,e,t)}let iT=v.Fragment;function aT(e,t){let{value:n,defaultValue:r,form:o,name:i,onChange:a,by:l=(T,k)=>T===k,disabled:s=!1,horizontal:u=!1,multiple:c=!1,...d}=e;const p=u?"horizontal":"vertical";let f=He(t),[g=c?[]:void 0,I]=UA(n,a,r),[w,y]=v.useReducer(oT,{dataRef:v.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),h=v.useRef({static:!1,hold:!1}),M=v.useRef(null),b=v.useRef(null),N=v.useRef(null),x=re(typeof l=="string"?(T,k)=>{let B=l;return(T==null?void 0:T[B])===(k==null?void 0:k[B])}:l),D=v.useCallback(T=>be(j.mode,{1:()=>g.some(k=>x(k,T)),0:()=>x(g,T)}),[g]),j=v.useMemo(()=>({...w,value:g,disabled:s,mode:c?1:0,orientation:p,compare:x,isSelected:D,optionsPropsRef:h,labelRef:M,buttonRef:b,optionsRef:N}),[g,s,c,w]);Je(()=>{w.dataRef.current=j},[j]),Kf([j.buttonRef,j.optionsRef],(T,k)=>{var B;y({type:1}),qf(k,Du.Loose)||(T.preventDefault(),(B=j.buttonRef.current)==null||B.focus())},j.listboxState===0);let L=v.useMemo(()=>({open:j.listboxState===0,disabled:s,value:g}),[j,s,g]),R=re(T=>{let k=j.options.find(B=>B.id===T);k&&ne(k.dataRef.current.value)}),U=re(()=>{if(j.activeOptionIndex!==null){let{dataRef:T,id:k}=j.options[j.activeOptionIndex];ne(T.current.value),y({type:2,focus:Lt.Specific,id:k})}}),ee=re(()=>y({type:0})),W=re(()=>y({type:1})),q=re((T,k,B)=>T===Lt.Specific?y({type:2,focus:Lt.Specific,id:k,trigger:B}):y({type:2,focus:T,trigger:B})),Y=re((T,k)=>(y({type:5,id:T,dataRef:k}),()=>y({type:6,id:T}))),F=re(T=>(y({type:7,id:T}),()=>y({type:7,id:null}))),ne=re(T=>be(j.mode,{0(){return I==null?void 0:I(T)},1(){let k=j.value.slice(),B=k.findIndex(oe=>x(oe,T));return B===-1?k.push(T):k.splice(B,1),I==null?void 0:I(k)}})),P=re(T=>y({type:3,value:T})),z=re(()=>y({type:4})),_=v.useMemo(()=>({onChange:ne,registerOption:Y,registerLabel:F,goToOption:q,closeListbox:W,openListbox:ee,selectActiveOption:U,selectOption:R,search:P,clearSearch:z}),[]),G={ref:f},S=v.useRef(null),C=io();return v.useEffect(()=>{S.current&&r!==void 0&&C.addEventListener(S.current,"reset",()=>{I==null||I(r)})},[S,I]),O.createElement(am.Provider,{value:_},O.createElement(lm.Provider,{value:j},O.createElement(tm,{value:be(j.listboxState,{0:Ue.Open,1:Ue.Closed})},i!=null&&g!=null&&K0({[i]:g}).map(([T,k],B)=>O.createElement(Ar,{features:Jn.Hidden,ref:B===0?oe=>{var se;S.current=(se=oe==null?void 0:oe.closest("form"))!=null?se:null}:void 0,...Tp({key:T,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:o,name:T,value:k})})),We({ourProps:G,theirProps:d,slot:L,defaultTag:iT,name:"Listbox"}))))}let lT="button";function sT(e,t){var n;let r=It(),{id:o=`headlessui-listbox-button-${r}`,...i}=e,a=Ya("Listbox.Button"),l=Va("Listbox.Button"),s=He(a.buttonRef,t),u=io(),c=re(w=>{switch(w.key){case Ce.Space:case Ce.Enter:case Ce.ArrowDown:w.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption(Lt.First)});break;case Ce.ArrowUp:w.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption(Lt.Last)});break}}),d=re(w=>{switch(w.key){case Ce.Space:w.preventDefault();break}}),p=re(w=>{if(Au(w.currentTarget))return w.preventDefault();a.listboxState===0?(l.closeListbox(),u.nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})})):(w.preventDefault(),l.openListbox())}),f=Z0(()=>{if(a.labelId)return[a.labelId,o].join(" ")},[a.labelId,o]),g=v.useMemo(()=>({open:a.listboxState===0,disabled:a.disabled,value:a.value}),[a]),I={ref:s,id:o,type:Q0(e,a.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=a.optionsRef.current)==null?void 0:n.id,"aria-expanded":a.listboxState===0,"aria-labelledby":f,disabled:a.disabled,onKeyDown:c,onKeyUp:d,onClick:p};return We({ourProps:I,theirProps:i,slot:g,defaultTag:lT,name:"Listbox.Button"})}let uT="label";function cT(e,t){let n=It(),{id:r=`headlessui-listbox-label-${n}`,...o}=e,i=Ya("Listbox.Label"),a=Va("Listbox.Label"),l=He(i.labelRef,t);Je(()=>a.registerLabel(r),[r]);let s=re(()=>{var c;return(c=i.buttonRef.current)==null?void 0:c.focus({preventScroll:!0})}),u=v.useMemo(()=>({open:i.listboxState===0,disabled:i.disabled}),[i]);return We({ourProps:{ref:l,id:r,onClick:s},theirProps:o,slot:u,defaultTag:uT,name:"Listbox.Label"})}let dT="ul",pT=On.RenderStrategy|On.Static;function fT(e,t){var n;let r=It(),{id:o=`headlessui-listbox-options-${r}`,...i}=e,a=Ya("Listbox.Options"),l=Va("Listbox.Options"),s=He(a.optionsRef,t),u=io(),c=io(),d=di(),p=(()=>d!==null?(d&Ue.Open)===Ue.Open:a.listboxState===0)();v.useEffect(()=>{var y;let h=a.optionsRef.current;h&&a.listboxState===0&&h!==((y=Su(h))==null?void 0:y.activeElement)&&h.focus({preventScroll:!0})},[a.listboxState,a.optionsRef]);let f=re(y=>{switch(c.dispose(),y.key){case Ce.Space:if(a.searchQuery!=="")return y.preventDefault(),y.stopPropagation(),l.search(y.key);case Ce.Enter:if(y.preventDefault(),y.stopPropagation(),a.activeOptionIndex!==null){let{dataRef:h}=a.options[a.activeOptionIndex];l.onChange(h.current.value)}a.mode===0&&(l.closeListbox(),Rn().nextFrame(()=>{var h;return(h=a.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}));break;case be(a.orientation,{vertical:Ce.ArrowDown,horizontal:Ce.ArrowRight}):return y.preventDefault(),y.stopPropagation(),l.goToOption(Lt.Next);case be(a.orientation,{vertical:Ce.ArrowUp,horizontal:Ce.ArrowLeft}):return y.preventDefault(),y.stopPropagation(),l.goToOption(Lt.Previous);case Ce.Home:case Ce.PageUp:return y.preventDefault(),y.stopPropagation(),l.goToOption(Lt.First);case Ce.End:case Ce.PageDown:return y.preventDefault(),y.stopPropagation(),l.goToOption(Lt.Last);case Ce.Escape:return y.preventDefault(),y.stopPropagation(),l.closeListbox(),u.nextFrame(()=>{var h;return(h=a.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})});case Ce.Tab:y.preventDefault(),y.stopPropagation();break;default:y.key.length===1&&(l.search(y.key),c.setTimeout(()=>l.clearSearch(),350));break}}),g=Z0(()=>{var y,h,M;return(M=(y=a.labelRef.current)==null?void 0:y.id)!=null?M:(h=a.buttonRef.current)==null?void 0:h.id},[a.labelRef.current,a.buttonRef.current]),I=v.useMemo(()=>({open:a.listboxState===0}),[a]),w={"aria-activedescendant":a.activeOptionIndex===null||(n=a.options[a.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":a.mode===1?!0:void 0,"aria-labelledby":g,"aria-orientation":a.orientation,id:o,onKeyDown:f,role:"listbox",tabIndex:0,ref:s};return We({ourProps:w,theirProps:i,slot:I,defaultTag:dT,features:pT,visible:p,name:"Listbox.Options"})}let mT="li";function gT(e,t){let n=It(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...a}=e,l=Ya("Listbox.Option"),s=Va("Listbox.Option"),u=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,c=l.isSelected(i),d=v.useRef(null),p=qC(d),f=Gt({disabled:o,value:i,domRef:d,get textValue(){return p()}}),g=He(t,d);Je(()=>{if(l.listboxState!==0||!u||l.activationTrigger===0)return;let x=Rn();return x.requestAnimationFrame(()=>{var D,j;(j=(D=d.current)==null?void 0:D.scrollIntoView)==null||j.call(D,{block:"nearest"})}),x.dispose},[d,u,l.listboxState,l.activationTrigger,l.activeOptionIndex]),Je(()=>s.registerOption(r,f),[f,r]);let I=re(x=>{if(o)return x.preventDefault();s.onChange(i),l.mode===0&&(s.closeListbox(),Rn().nextFrame(()=>{var D;return(D=l.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),w=re(()=>{if(o)return s.goToOption(Lt.Nothing);s.goToOption(Lt.Specific,r)}),y=BA(),h=re(x=>y.update(x)),M=re(x=>{y.wasMoved(x)&&(o||u||s.goToOption(Lt.Specific,r,0))}),b=re(x=>{y.wasMoved(x)&&(o||u&&s.goToOption(Lt.Nothing))}),N=v.useMemo(()=>({active:u,selected:c,disabled:o}),[u,c,o]);return We({ourProps:{id:r,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:I,onFocus:w,onPointerEnter:h,onMouseEnter:h,onPointerMove:M,onMouseMove:M,onPointerLeave:b,onMouseLeave:b},theirProps:a,slot:N,defaultTag:mT,name:"Listbox.Option"})}let hT=$e(aT),vT=$e(sT),yT=$e(cT),IT=$e(fT),MT=$e(gT),Tn=Object.assign(hT,{Button:vT,Label:yT,Options:IT,Option:MT});var wT=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(wT||{}),bT=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(bT||{});let xT={0:e=>{let t={...e,popoverState:be(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},sm=v.createContext(null);sm.displayName="PopoverContext";function Cu(e){let t=v.useContext(sm);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Cu),n}return t}let um=v.createContext(null);um.displayName="PopoverAPIContext";function cm(e){let t=v.useContext(um);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,cm),n}return t}let dm=v.createContext(null);dm.displayName="PopoverGroupContext";function pM(){return v.useContext(dm)}let Tu=v.createContext(null);Tu.displayName="PopoverPanelContext";function ST(){return v.useContext(Tu)}function NT(e,t){return be(t.type,xT,e,t)}let DT="div";function AT(e,t){var n;let{__demoMode:r=!1,...o}=e,i=v.useRef(null),a=He(t,X0(F=>{i.current=F})),l=v.useRef([]),s=v.useReducer(NT,{__demoMode:r,popoverState:r?0:1,buttons:l,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:v.createRef(),afterPanelSentinel:v.createRef()}),[{popoverState:u,button:c,buttonId:d,panel:p,panelId:f,beforePanelSentinel:g,afterPanelSentinel:I},w]=s,y=Pr((n=i.current)!=null?n:c),h=v.useMemo(()=>{if(!c||!p)return!1;for(let S of document.querySelectorAll("body > *"))if(Number(S==null?void 0:S.contains(c))^Number(S==null?void 0:S.contains(p)))return!0;let F=Nu(),ne=F.indexOf(c),P=(ne+F.length-1)%F.length,z=(ne+1)%F.length,_=F[P],G=F[z];return!p.contains(_)&&!p.contains(G)},[c,p]),M=Gt(d),b=Gt(f),N=v.useMemo(()=>({buttonId:M,panelId:b,close:()=>w({type:1})}),[M,b,w]),x=pM(),D=x==null?void 0:x.registerPopover,j=re(()=>{var F;return(F=x==null?void 0:x.isFocusWithinPopoverGroup())!=null?F:(y==null?void 0:y.activeElement)&&((c==null?void 0:c.contains(y.activeElement))||(p==null?void 0:p.contains(y.activeElement)))});v.useEffect(()=>D==null?void 0:D(N),[D,N]);let[L,R]=sM(),U=dM({mainTreeNodeRef:x==null?void 0:x.mainTreeNodeRef,portals:L,defaultContainers:[c,p]});om(y==null?void 0:y.defaultView,"focus",F=>{var ne,P,z,_;F.target!==window&&F.target instanceof HTMLElement&&u===0&&(j()||c&&p&&(U.contains(F.target)||(P=(ne=g.current)==null?void 0:ne.contains)!=null&&P.call(ne,F.target)||(_=(z=I.current)==null?void 0:z.contains)!=null&&_.call(z,F.target)||w({type:1})))},!0),Kf(U.resolveContainers,(F,ne)=>{w({type:1}),qf(ne,Du.Loose)||(F.preventDefault(),c==null||c.focus())},u===0);let ee=re(F=>{w({type:1});let ne=(()=>F?F instanceof HTMLElement?F:"current"in F&&F.current instanceof HTMLElement?F.current:c:c)();ne==null||ne.focus()}),W=v.useMemo(()=>({close:ee,isPortalled:h}),[ee,h]),q=v.useMemo(()=>({open:u===0,close:ee}),[u,ee]),Y={ref:a};return O.createElement(Tu.Provider,{value:null},O.createElement(sm.Provider,{value:s},O.createElement(um.Provider,{value:W},O.createElement(tm,{value:be(u,{0:Ue.Open,1:Ue.Closed})},O.createElement(R,null,We({ourProps:Y,theirProps:o,slot:q,defaultTag:DT,name:"Popover"}),O.createElement(U.MainTreeNode,null))))))}let CT="button";function TT(e,t){let n=It(),{id:r=`headlessui-popover-button-${n}`,...o}=e,[i,a]=Cu("Popover.Button"),{isPortalled:l}=cm("Popover.Button"),s=v.useRef(null),u=`headlessui-focus-sentinel-${It()}`,c=pM(),d=c==null?void 0:c.closeOthers,p=ST()!==null;v.useEffect(()=>{if(!p)return a({type:3,buttonId:r}),()=>{a({type:3,buttonId:null})}},[p,r,a]);let[f]=v.useState(()=>Symbol()),g=He(s,t,p?null:U=>{if(U)i.buttons.current.push(f);else{let ee=i.buttons.current.indexOf(f);ee!==-1&&i.buttons.current.splice(ee,1)}i.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),U&&a({type:2,button:U})}),I=He(s,t),w=Pr(s),y=re(U=>{var ee,W,q;if(p){if(i.popoverState===1)return;switch(U.key){case Ce.Space:case Ce.Enter:U.preventDefault(),(W=(ee=U.target).click)==null||W.call(ee),a({type:1}),(q=i.button)==null||q.focus();break}}else switch(U.key){case Ce.Space:case Ce.Enter:U.preventDefault(),U.stopPropagation(),i.popoverState===1&&(d==null||d(i.buttonId)),a({type:0});break;case Ce.Escape:if(i.popoverState!==0)return d==null?void 0:d(i.buttonId);if(!s.current||w!=null&&w.activeElement&&!s.current.contains(w.activeElement))return;U.preventDefault(),U.stopPropagation(),a({type:1});break}}),h=re(U=>{p||U.key===Ce.Space&&U.preventDefault()}),M=re(U=>{var ee,W;Au(U.currentTarget)||e.disabled||(p?(a({type:1}),(ee=i.button)==null||ee.focus()):(U.preventDefault(),U.stopPropagation(),i.popoverState===1&&(d==null||d(i.buttonId)),a({type:0}),(W=i.button)==null||W.focus()))}),b=re(U=>{U.preventDefault(),U.stopPropagation()}),N=i.popoverState===0,x=v.useMemo(()=>({open:N}),[N]),D=Q0(e,s),j=p?{ref:I,type:D,onKeyDown:y,onClick:M}:{ref:g,id:i.buttonId,type:D,"aria-expanded":i.popoverState===0,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:y,onKeyUp:h,onClick:M,onMouseDown:b},L=rm(),R=re(()=>{let U=i.panel;if(!U)return;function ee(){be(L.current,{[Ft.Forwards]:()=>In(U,Nt.First),[Ft.Backwards]:()=>In(U,Nt.Last)})===Aa.Error&&In(Nu().filter(W=>W.dataset.headlessuiFocusGuard!=="true"),be(L.current,{[Ft.Forwards]:Nt.Next,[Ft.Backwards]:Nt.Previous}),{relativeTo:i.button})}ee()});return O.createElement(O.Fragment,null,We({ourProps:j,theirProps:o,slot:x,defaultTag:CT,name:"Popover.Button"}),N&&!p&&l&&O.createElement(Ar,{id:u,features:Jn.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:R}))}let ET="div",jT=On.RenderStrategy|On.Static;function PT(e,t){let n=It(),{id:r=`headlessui-popover-overlay-${n}`,...o}=e,[{popoverState:i},a]=Cu("Popover.Overlay"),l=He(t),s=di(),u=(()=>s!==null?(s&Ue.Open)===Ue.Open:i===0)(),c=re(p=>{if(Au(p.currentTarget))return p.preventDefault();a({type:1})}),d=v.useMemo(()=>({open:i===0}),[i]);return We({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:d,defaultTag:ET,features:jT,visible:u,name:"Popover.Overlay"})}let LT="div",RT=On.RenderStrategy|On.Static;function OT(e,t){let n=It(),{id:r=`headlessui-popover-panel-${n}`,focus:o=!1,...i}=e,[a,l]=Cu("Popover.Panel"),{close:s,isPortalled:u}=cm("Popover.Panel"),c=`headlessui-focus-sentinel-before-${It()}`,d=`headlessui-focus-sentinel-after-${It()}`,p=v.useRef(null),f=He(p,t,D=>{l({type:4,panel:D})}),g=Pr(p);Je(()=>(l({type:5,panelId:r}),()=>{l({type:5,panelId:null})}),[r,l]);let I=di(),w=(()=>I!==null?(I&Ue.Open)===Ue.Open:a.popoverState===0)(),y=re(D=>{var j;switch(D.key){case Ce.Escape:if(a.popoverState!==0||!p.current||g!=null&&g.activeElement&&!p.current.contains(g.activeElement))return;D.preventDefault(),D.stopPropagation(),l({type:1}),(j=a.button)==null||j.focus();break}});v.useEffect(()=>{var D;e.static||a.popoverState===1&&((D=e.unmount)==null||D)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),v.useEffect(()=>{if(a.__demoMode||!o||a.popoverState!==0||!p.current)return;let D=g==null?void 0:g.activeElement;p.current.contains(D)||In(p.current,Nt.First)},[a.__demoMode,o,p,a.popoverState]);let h=v.useMemo(()=>({open:a.popoverState===0,close:s}),[a,s]),M={ref:f,id:r,onKeyDown:y,onBlur:o&&a.popoverState===0?D=>{var j,L,R,U,ee;let W=D.relatedTarget;W&&p.current&&((j=p.current)!=null&&j.contains(W)||(l({type:1}),((R=(L=a.beforePanelSentinel.current)==null?void 0:L.contains)!=null&&R.call(L,W)||(ee=(U=a.afterPanelSentinel.current)==null?void 0:U.contains)!=null&&ee.call(U,W))&&W.focus({preventScroll:!0})))}:void 0,tabIndex:-1},b=rm(),N=re(()=>{let D=p.current;if(!D)return;function j(){be(b.current,{[Ft.Forwards]:()=>{var L;In(D,Nt.First)===Aa.Error&&((L=a.afterPanelSentinel.current)==null||L.focus())},[Ft.Backwards]:()=>{var L;(L=a.button)==null||L.focus({preventScroll:!0})}})}j()}),x=re(()=>{let D=p.current;if(!D)return;function j(){be(b.current,{[Ft.Forwards]:()=>{var L;if(!a.button)return;let R=Nu(),U=R.indexOf(a.button),ee=R.slice(0,U+1),W=[...R.slice(U+1),...ee];for(let q of W.slice())if(q.dataset.headlessuiFocusGuard==="true"||(L=a.panel)!=null&&L.contains(q)){let Y=W.indexOf(q);Y!==-1&&W.splice(Y,1)}In(W,Nt.First,{sorted:!1})},[Ft.Backwards]:()=>{var L;In(D,Nt.Previous)===Aa.Error&&((L=a.button)==null||L.focus())}})}j()});return O.createElement(Tu.Provider,{value:r},w&&u&&O.createElement(Ar,{id:c,ref:a.beforePanelSentinel,features:Jn.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N}),We({ourProps:M,theirProps:i,slot:h,defaultTag:LT,features:RT,visible:w,name:"Popover.Panel"}),w&&u&&O.createElement(Ar,{id:d,ref:a.afterPanelSentinel,features:Jn.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:x}))}let kT="div";function zT(e,t){let n=v.useRef(null),r=He(n,t),[o,i]=v.useState([]),a=TC(),l=re(I=>{i(w=>{let y=w.indexOf(I);if(y!==-1){let h=w.slice();return h.splice(y,1),h}return w})}),s=re(I=>(i(w=>[...w,I]),()=>l(I))),u=re(()=>{var I;let w=Su(n);if(!w)return!1;let y=w.activeElement;return(I=n.current)!=null&&I.contains(y)?!0:o.some(h=>{var M,b;return((M=w.getElementById(h.buttonId.current))==null?void 0:M.contains(y))||((b=w.getElementById(h.panelId.current))==null?void 0:b.contains(y))})}),c=re(I=>{for(let w of o)w.buttonId.current!==I&&w.close()}),d=v.useMemo(()=>({registerPopover:s,unregisterPopover:l,isFocusWithinPopoverGroup:u,closeOthers:c,mainTreeNodeRef:a.mainTreeNodeRef}),[s,l,u,c,a.mainTreeNodeRef]),p=v.useMemo(()=>({}),[]),f=e,g={ref:r};return O.createElement(dm.Provider,{value:d},We({ourProps:g,theirProps:f,slot:p,defaultTag:kT,name:"Popover.Group"}),O.createElement(a.MainTreeNode,null))}let UT=$e(AT),BT=$e(TT),_T=$e(PT),$T=$e(OT),FT=$e(zT),od=Object.assign(UT,{Button:BT,Overlay:_T,Panel:$T,Group:FT});function HT(e=0){let[t,n]=v.useState(e),r=Ga(),o=v.useCallback(s=>{r.current&&n(u=>u|s)},[t,r]),i=v.useCallback(s=>!!(t&s),[t]),a=v.useCallback(s=>{r.current&&n(u=>u&~s)},[n,r]),l=v.useCallback(s=>{r.current&&n(u=>u^s)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:l}}function WT(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function id(e,...t){e&&t.length>0&&e.classList.add(...t)}function ad(e,...t){e&&t.length>0&&e.classList.remove(...t)}function GT(e,t){let n=Rn();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].map(s=>{let[u=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return u}),l=i+a;if(l!==0){n.group(u=>{u.setTimeout(()=>{t(),u.dispose()},l),u.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&u.dispose()})});let s=n.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function ZT(e,t,n,r){let o=n?"enter":"leave",i=Rn(),a=r!==void 0?WT(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let l=be(o,{enter:()=>t.enter,leave:()=>t.leave}),s=be(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),u=be(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ad(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),id(e,...t.base,...l,...u),i.nextFrame(()=>{ad(e,...t.base,...l,...u),id(e,...t.base,...l,...s),GT(e,()=>(ad(e,...t.base,...l),id(e,...t.base,...t.entered),a()))}),i.dispose}function VT({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=Ga(),l=io(),s=Gt(n);Je(()=>{e&&(s.current="enter")},[e]),Je(()=>{let u=Rn();l.add(u.dispose);let c=t.current;if(c&&s.current!=="idle"&&a.current)return u.dispose(),o.current(s.current),u.add(ZT(c,r.current,s.current==="enter",()=>{u.dispose(),i.current(s.current)})),u.dispose},[n])}function er(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Eu=v.createContext(null);Eu.displayName="TransitionContext";var YT=(e=>(e.Visible="visible",e.Hidden="hidden",e))(YT||{});function QT(){let e=v.useContext(Eu);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function JT(){let e=v.useContext(ju);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ju=v.createContext(null);ju.displayName="NestingContext";function Pu(e){return"children"in e?Pu(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function fM(e,t){let n=Gt(e),r=v.useRef([]),o=Ga(),i=io(),a=re((f,g=dr.Hidden)=>{let I=r.current.findIndex(({el:w})=>w===f);I!==-1&&(be(g,{[dr.Unmount](){r.current.splice(I,1)},[dr.Hidden](){r.current[I].state="hidden"}}),i.microTask(()=>{var w;!Pu(r)&&o.current&&((w=n.current)==null||w.call(n))}))}),l=re(f=>{let g=r.current.find(({el:I})=>I===f);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:f,state:"visible"}),()=>a(f,dr.Unmount)}),s=v.useRef([]),u=v.useRef(Promise.resolve()),c=v.useRef({enter:[],leave:[],idle:[]}),d=re((f,g,I)=>{s.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([w])=>w!==f)),t==null||t.chains.current[g].push([f,new Promise(w=>{s.current.push(w)})]),t==null||t.chains.current[g].push([f,new Promise(w=>{Promise.all(c.current[g].map(([y,h])=>h)).then(()=>w())})]),g==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>I(g)):I(g)}),p=re((f,g,I)=>{Promise.all(c.current[g].splice(0).map(([w,y])=>y)).then(()=>{var w;(w=s.current.shift())==null||w()}).then(()=>I(g))});return v.useMemo(()=>({children:r,register:l,unregister:a,onStart:d,onStop:p,wait:u,chains:c}),[l,a,r,d,p,c,u])}function XT(){}let qT=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Uh(e){var t;let n={};for(let r of qT)n[r]=(t=e[r])!=null?t:XT;return n}function KT(e){let t=v.useRef(Uh(e));return v.useEffect(()=>{t.current=Uh(e)},[e]),t}let eE="div",mM=On.RenderStrategy;function tE(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:l,enter:s,enterFrom:u,enterTo:c,entered:d,leave:p,leaveFrom:f,leaveTo:g,...I}=e,w=v.useRef(null),y=He(w,t),h=(n=I.unmount)==null||n?dr.Unmount:dr.Hidden,{show:M,appear:b,initial:N}=QT(),[x,D]=v.useState(M?"visible":"hidden"),j=JT(),{register:L,unregister:R}=j;v.useEffect(()=>L(w),[L,w]),v.useEffect(()=>{if(h===dr.Hidden&&w.current){if(M&&x!=="visible"){D("visible");return}return be(x,{hidden:()=>R(w),visible:()=>L(w)})}},[x,w,L,R,M,h]);let U=Gt({base:er(I.className),enter:er(s),enterFrom:er(u),enterTo:er(c),entered:er(d),leave:er(p),leaveFrom:er(f),leaveTo:er(g)}),ee=KT({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:l}),W=ci();v.useEffect(()=>{if(W&&x==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,x,W]);let q=N&&!b,Y=b&&M&&N,F=(()=>!W||q?"idle":M?"enter":"leave")(),ne=HT(0),P=re(C=>be(C,{enter:()=>{ne.addFlag(Ue.Opening),ee.current.beforeEnter()},leave:()=>{ne.addFlag(Ue.Closing),ee.current.beforeLeave()},idle:()=>{}})),z=re(C=>be(C,{enter:()=>{ne.removeFlag(Ue.Opening),ee.current.afterEnter()},leave:()=>{ne.removeFlag(Ue.Closing),ee.current.afterLeave()},idle:()=>{}})),_=fM(()=>{D("hidden"),R(w)},j);VT({immediate:Y,container:w,classes:U,direction:F,onStart:Gt(C=>{_.onStart(w,C,P)}),onStop:Gt(C=>{_.onStop(w,C,z),C==="leave"&&!Pu(_)&&(D("hidden"),R(w))})});let G=I,S={ref:y};return Y?G={...G,className:ks(I.className,...U.current.enter,...U.current.enterFrom)}:(G.className=ks(I.className,(r=w.current)==null?void 0:r.className),G.className===""&&delete G.className),O.createElement(ju.Provider,{value:_},O.createElement(tm,{value:be(x,{visible:Ue.Open,hidden:Ue.Closed})|ne.flags},We({ourProps:S,theirProps:G,defaultTag:eE,features:mM,visible:x==="visible",name:"Transition.Child"})))}function nE(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,a=v.useRef(null),l=He(a,t);ci();let s=di();if(n===void 0&&s!==null&&(n=(s&Ue.Open)===Ue.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=v.useState(n?"visible":"hidden"),d=fM(()=>{c("hidden")}),[p,f]=v.useState(!0),g=v.useRef([n]);Je(()=>{p!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),f(!1))},[g,n]);let I=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);v.useEffect(()=>{if(n)c("visible");else if(!Pu(d))c("hidden");else{let M=a.current;if(!M)return;let b=M.getBoundingClientRect();b.x===0&&b.y===0&&b.width===0&&b.height===0&&c("hidden")}},[n,d]);let w={unmount:o},y=re(()=>{var M;p&&f(!1),(M=e.beforeEnter)==null||M.call(e)}),h=re(()=>{var M;p&&f(!1),(M=e.beforeLeave)==null||M.call(e)});return O.createElement(ju.Provider,{value:d},O.createElement(Eu.Provider,{value:I},We({ourProps:{...w,as:v.Fragment,children:O.createElement(gM,{ref:l,...w,...i,beforeEnter:y,beforeLeave:h})},theirProps:{},defaultTag:v.Fragment,features:mM,visible:u==="visible",name:"Transition"})))}function rE(e,t){let n=v.useContext(Eu)!==null,r=di()!==null;return O.createElement(O.Fragment,null,!n&&r?O.createElement(Rp,{ref:t,...e}):O.createElement(gM,{ref:t,...e}))}let Rp=$e(nE),gM=$e(tE),oE=$e(rE),Pn=Object.assign(Rp,{Child:oE,Root:Rp});const iE=({children:e,onClose:t,isOpen:n,maxWidth:r="max-w-lg",background:o="bg-white"})=>m.jsx(Pn.Root,{show:n,appear:!0,as:"div",children:m.jsx(Us,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>{t(!1)},children:m.jsxs("div",{className:"flex items-end justify-center min-h-screen max-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[m.jsx(Pn.Child,{as:"div",enter:"ease-out duration-400",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(Us.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),m.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),m.jsx(Pn.Child,{as:v.Fragment,enter:"ease-out duration-400",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs("div",{className:`inline-block align-bottom ${o} rounded-lg px-4 pt-5 pb-4 text-left shadow-xl transform transition-all sm:my-8 sm:align-middle ${r} sm:w-full sm:p-6 max-h-screen`,children:[m.jsx("div",{className:"hidden sm:block absolute top-0 right-0 pt-4 pr-4",children:m.jsxs("button",{type:"button",className:`${o} rounded-md text-gray-400 hover:text-gray-500`,onClick:()=>t(!1),children:[m.jsx("span",{className:"sr-only",children:"Close"}),m.jsx(G0,{className:"h-6 w-6","aria-hidden":"true"})]})}),e]})})]})})}),ao={CAUTION:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(nA,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})},COMING_SOON:{backgroundColor:"bg-pink-500",defaultTitle:"Coming soon",disabledColor:"disabled:bg-pink-300",focusColor:"focus:ring-pink-500",hoverColor:"hover:bg-pink-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-gray-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(XD,{className:"h-6 w-6 text-gray-600","aria-hidden":"true"})})},DELETE:{backgroundColor:"bg-red-500",defaultTitle:"Delete?",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(W0,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},ERROR:{backgroundColor:"bg-red-500",defaultTitle:"Ups, we found an error",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(IA,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},REMOVE:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(iA,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})}},aE=({alertType:e,bodyElement:t,isOpen:n,onPrimaryButtonClick:r,onSecondaryButtonClick:o,primaryButtonContent:i,primaryButtonDisabled:a=!1,secondaryButtonDisabled:l=!1,secondaryButtonContent:s,primaryButtonTestID:u="alert-modal-primary-button",secondaryButtonTestID:c="alert-modal-secondary-button",setIsOpen:d,title:p})=>{const{backgroundColor:f,focusColor:g,hoverColor:I,defaultTitle:w,icon:y,disabledColor:h}=ao[e];return m.jsx(m.Fragment,{children:m.jsxs(iE,{isOpen:n,onClose:d,children:[m.jsxs("div",{className:"sm:flex sm:items-start",children:[y,m.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[m.jsx(Us.Title,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900",children:p??w}),m.jsx("div",{className:"mt-2",children:t})]})]}),m.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[m.jsx("button",{disabled:a,type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 ${f} text-base font-medium text-white ${I} focus:outline-none focus:ring-2 focus:ring-offset-2 ${g} sm:ml-3 sm:w-auto sm:text-sm ${h}`,onClick:r,"data-test":u,children:i}),m.jsx("button",{disabled:l,type:"button",className:"disabled:bg-gray-200 mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:o,"data-test":c,children:s})]})]})})},Op=({alertType:e,bodyText:t,hideModal:n,onPrimaryButtonClick:r,onSecondaryButtonClick:o,primaryButtonText:i,secondaryButtonText:a,primaryButtonTestID:l="text-alert-modal-primary-button",secondaryButtonTestID:s="text-alert-modal-secondary-button",title:u})=>{const c=m.jsx("div",{className:"whitespace-pre-line",children:t});return m.jsx(aE,{alertType:e,bodyElement:c,isOpen:!0,onPrimaryButtonClick:r,onSecondaryButtonClick:o,primaryButtonContent:i,secondaryButtonContent:a,primaryButtonTestID:l,secondaryButtonTestID:s,setIsOpen:n,title:u})};var hM={exports:{}};/*!
|
|
47
47
|
Copyright (c) 2018 Jed Watson.
|
|
48
48
|
Licensed under the MIT License (MIT), see
|
|
49
49
|
http://jedwatson.github.io/classnames
|
|
50
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var l=arguments[o];if(l){var i=typeof l;if(i==="string"||i==="number")r.push(l);else if(Array.isArray(l)){if(l.length){var a=n.apply(null,l);a&&r.push(a)}}else if(i==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){r.push(l.toString());continue}for(var s in l)t.call(l,s)&&l[s]&&r.push(s)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xv);var uE=xv.exports;const pe=Wu(uE),Ev=({checked:e,onChange:t,className:n,containerClassName:r,labelClassName:o,labelContainerClassName:l,secondaryLabelClassName:i,id:a,name:s,ariaDescribeBy:u,text:c,secondaryText:d,testId:h})=>{const S=()=>{t(!e)},y=w=>{t(!e)};return v.jsxs("div",{className:pe("relative flex items-start",r),children:[v.jsx("div",{className:"flex flex-row items-center h-5",children:v.jsx("input",{id:a,checked:e,"data-test":h,"aria-describedby":u,name:s,type:"checkbox",className:pe("focus:ring-zuplo-pink-2 h-4 w-4 text-zuplo-pink-2 border-gray-300 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",n),onChange:w=>{y()}})}),c?v.jsxs("div",{className:pe("ml-1.5 text-sm cursor-pointer",l),onClick:S,children:[v.jsx("label",{htmlFor:s,className:pe("font-medium text-gray-700 cursor-pointer",o),children:c}),v.jsx("p",{className:pe("text-gray-500",i),children:d})]}):null]})};function cE({className:e,activeFilters:t,options:n,filterName:r,isDisabled:o=!1,onFilterChange:l,filterPrefixClassName:i}){const a=d=>t.includes(d)?l(t.filter(S=>S!==d)):l(t.concat(d)),s=(d,h)=>(d.preventDefault(),d.stopPropagation(),l([h])),u=()=>{l([])},c=t.length>0;return v.jsx(gs,{className:"relative",children:()=>v.jsxs(v.Fragment,{children:[v.jsxs(gs.Button,{className:pe(c?" border-zuplo-pink-2 text-zuplo-pink-2":" text-gray-700","group border border-gray-300 shadow-sm py-2 pl-3 pr-2 inline-flex items-center rounded-md bg-white disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",e),title:o?"You can add tags in the 'tags' array property on your Open API Spec":void 0,disabled:o,children:[v.jsx("span",{className:pe("mr-1",i),children:"Filter: "}),v.jsx("span",{className:"block truncate mr-8",children:`${c?t.length:""} ${r}`}),v.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:v.jsx(Uc,{className:pe(c?"text-zuplo-pink-2":" text-gray-400","ml-2 h-5 w-5 "),"aria-hidden":"true"})})]}),v.jsx(tr,{as:p.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:v.jsx(gs.Panel,{className:"absolute z-10 mt-3 w-xs transform",children:v.jsx("div",{className:"overflow-hidden min-w-[250px] rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 text-sm",children:v.jsxs("div",{className:"relative grid bg-white",children:[n.map(({label:d,value:h,shouldSupportOnly:S})=>v.jsxs("div",{onClick:()=>a(h),className:"flex w-full px-3 py-3 rounded-md cursor-pointer transition duration-150 ease-in-out hover:bg-gray-50",children:[v.jsx(Ev,{containerClassName:"mr-3",className:"cursor-pointer",checked:t.includes(h),onChange:()=>a(h)}),v.jsx("p",{className:"text-sm flex-grow font-medium text-gray-900",children:d}),S?v.jsx("div",{className:"pl-2 pr-1 h-fit text-zuplo-pink cursor-pointer hover:underline text-sm font-medium",onClick:y=>s(y,h),children:"only"}):null]},d)),v.jsx("div",{className:"flex justify-end",children:v.jsx("div",{onClick:u,className:"pr-4 py-2 text-zuplo-pink cursor-pointer hover:underline",children:"clear"})})]})})})})]})})}function dE(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const fE=p.forwardRef(dE),pE=fE;function hE(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"}))}const mE=p.forwardRef(hE),vE=mE;function gE(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}const yE=p.forwardRef(gE),SE=yE,td=({borderPositionAndSize:e,className:t,colorAndColorWeight:n})=>v.jsx("div",{style:{borderTopColor:"transparent"},className:pe({"border-4":!e,[`${e}`]:e,"border-zuplo-pink":!n,[`${n}`]:n},"border-solid rounded-full animate-spin",t)}),Vn=({selected:e,onChange:t,options:n,listLabel:r,className:o,classNameOptions:l,testId:i,placeholder:a,matchWidth:s=!0,selectorElement:u,disabled:c,labelPrefixElement:d=null,isLoadingData:h=!1})=>v.jsxs(Kt,{value:e,onChange:t,disabled:c,children:[r&&v.jsx(Kt.Label,{className:"block text-sm font-medium text-gray-700",children:r}),v.jsxs("div",{className:pe({relative:s},o),children:[v.jsxs(Kt.Button,{"data-test":i,className:pe("relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 text-sm",c?"bg-gray-200":"bg-white",o),children:[e!==null&&e.icon&&v.jsx("span",{className:"absolute pr-10",children:h?v.jsx(td,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}):v.jsx(v.Fragment,{children:e.icon})}),v.jsxs("span",{className:pe("block truncate",{"ml-7 mt-0.5":e!==null&&e.icon}),children:[d,(e==null?void 0:e.label)||a]}),v.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:u??v.jsx(SE,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),v.jsx(tr,{as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:v.jsx(Kt.Options,{className:pe("absolute z-20 mt-1 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",l),children:n.map((S,y)=>v.jsx(Kt.Option,{"data-test":`${i}-${y}`,className:({active:w})=>pe(w?"bg-gray-50":"",S.disabled?"cursor-not-allowed":"cursor-pointer","text-gray-900 select-none relative py-2 px-3"),value:S,disabled:S.disabled??!1,children:v.jsx(v.Fragment,{children:S.description?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"font-semibold block text-sm leading-7",children:S.label}),v.jsx("span",{className:"text-xs",children:S.description})]}):v.jsxs("div",{className:"flex flex-row font-normal",children:[S.icon&&v.jsx("div",{children:S.icon})," ",v.jsx("div",{className:pe(S.icon?"mt-0.5":""),children:S.label}),S.icon&&e&&e.value.toString()===S.value.toString()&&v.jsx("div",{className:"absolute right-0",children:v.jsx(Qm,{className:"mr-3 h-5 w-5"})})]})})},`${y}-${S.value}`))})})]})]}),wE=({label:e,isDisabled:t=!1,onClick:n,classNames:r,dataTestId:o,buttonType:l="primary",iconAlignment:i="right",icon:a=null,type:s="button"})=>l==="white"?v.jsxs("button",{type:s,className:pe("flex items-center align-middle py-2 px-3 space-x-2 bg-white relative border border-gray-300 rounded-md shadow-sm text-left focus:outline-none focus:ring-1 focus:ring-pink-300 focus:border-pink-300 sm:text-sm enabled:cursor-pointer",t?"opacity-50 bg-slate-100 disabled disabled:cursor-not-allowed":"bg-white hover:bg-slate-100",r),"data-test":o,onClick:n,disabled:t,children:[i==="left"&&a,e?v.jsx("span",{children:e}):null,i==="right"&&a]}):l==="primary"?v.jsxs("button",{type:s,className:pe("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500",t?"bg-pink-300 disabled cursor-not-allowed":"bg-zuplo-pink hover:bg-zuplo-pink-hover",{"justify-center":!a},r),"data-test":o,onClick:n,disabled:t,children:[i==="left"&&a,e?v.jsx("span",{children:e}):null,i==="right"&&a]}):l==="gray"?v.jsxs("button",{type:s,className:pe("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-gray-400 border-1 font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",t?"bg-gray-100 disabled cursor-not-allowed":"bg-gray-200 hover:bg-gray-300",r),"data-test":o,onClick:n,disabled:t,children:[i==="left"&&a,e?v.jsx("span",{children:e}):null,i==="right"&&a]}):null,xE=({addRoute:e})=>{const t=()=>{var n;(n=window.open("https://www.zuplo.com/docs/overview","_blank"))==null||n.focus()};return v.jsxs("div",{className:"flex flex-col space-y-6 mt-10 text-gray-600 mx-auto px-10 flex-wrap",children:[v.jsx("div",{className:"font-extrabold text-2xl text-gray-600",children:"You don't have any operations"}),v.jsx("div",{className:"whitespace-pre-wrap",children:"Your Open API file is the heart of your gateway - it tells us how to handle incoming requests. To get started, add your first route, or import your Open API file."}),v.jsxs("div",{children:[v.jsx("span",{children:"Why not try to our "}),v.jsx("button",{type:"button",className:"underline text-zuplo-pink hover:text-zuplo-pink-hover cursor-pointer",onClick:t,children:"Getting started guide?"})]}),v.jsx("div",{className:"flex w-full justify-center gap-x-4",children:v.jsx(wE,{type:"button",dataTestId:"add-route-btn",onClick:e,label:"Add Route",isDisabled:!1})})]})};var _v=(e=>(e.get="bg-blue-400",e.head="bg-pink-400",e.post="bg-green-400",e.put="bg-yellow-400",e.delete="bg-red-400",e.connect="bg-orange-400",e.options="bg-teal-400",e.trace="bg-fuchsia-400",e.patch="bg-orange-400",e))(_v||{});const EE=({method:e})=>{if(e.includes(","))return v.jsx("div",{className:`
|
|
50
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var l=n.apply(null,i);l&&r.push(l)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&r.push(s)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(hM);var lE=hM.exports;const fe=Ua(lE),vM=({checked:e,onChange:t,className:n,containerClassName:r,labelClassName:o,labelContainerClassName:i,secondaryLabelClassName:a,id:l,name:s,ariaDescribeBy:u,text:c,secondaryText:d,testId:p})=>{const f=()=>{t(!e)},g=I=>{t(!e)};return m.jsxs("div",{className:fe("relative flex items-start",r),children:[m.jsx("div",{className:"flex flex-row items-center h-5",children:m.jsx("input",{id:l,checked:e,"data-test":p,"aria-describedby":u,name:s,type:"checkbox",className:fe("focus:ring-zuplo-pink-2 h-4 w-4 text-zuplo-pink-2 border-gray-300 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",n),onChange:I=>{g()}})}),c?m.jsxs("div",{className:fe("ml-1.5 text-sm cursor-pointer",i),onClick:f,children:[m.jsx("label",{htmlFor:s,className:fe("font-medium text-gray-700 cursor-pointer",o),children:c}),m.jsx("p",{className:fe("text-gray-500",a),children:d})]}):null]})};function sE({className:e,activeFilters:t,options:n,filterName:r,isDisabled:o=!1,onFilterChange:i,filterPrefixClassName:a}){const l=d=>t.includes(d)?i(t.filter(f=>f!==d)):i(t.concat(d)),s=(d,p)=>(d.preventDefault(),d.stopPropagation(),i([p])),u=()=>{i([])},c=t.length>0;return m.jsx(od,{className:"relative",children:()=>m.jsxs(m.Fragment,{children:[m.jsxs(od.Button,{className:fe(c?" border-zuplo-pink-2 text-zuplo-pink-2":" text-gray-700","group border border-gray-300 shadow-sm py-2 pl-3 pr-2 inline-flex items-center rounded-md bg-white disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",e),title:o?"You can add tags in the 'tags' array property on your Open API Spec":void 0,disabled:o,children:[m.jsx("span",{className:fe("mr-1",a),children:"Filter: "}),m.jsx("span",{className:"block truncate mr-8",children:`${c?t.length:""} ${r}`}),m.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:m.jsx(bu,{className:fe(c?"text-zuplo-pink-2":" text-gray-400","ml-2 h-5 w-5 "),"aria-hidden":"true"})})]}),m.jsx(Pn,{as:v.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:m.jsx(od.Panel,{className:"absolute z-10 mt-3 w-xs transform",children:m.jsx("div",{className:"overflow-hidden min-w-[250px] rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 text-sm",children:m.jsxs("div",{className:"relative grid bg-white",children:[n.map(({label:d,value:p,shouldSupportOnly:f})=>m.jsxs("div",{onClick:()=>l(p),className:"flex w-full px-3 py-3 rounded-md cursor-pointer transition duration-150 ease-in-out hover:bg-gray-50",children:[m.jsx(vM,{containerClassName:"mr-3",className:"cursor-pointer",checked:t.includes(p),onChange:()=>l(p)}),m.jsx("p",{className:"text-sm flex-grow font-medium text-gray-900",children:d}),f?m.jsx("div",{className:"pl-2 pr-1 h-fit text-zuplo-pink cursor-pointer hover:underline text-sm font-medium",onClick:g=>s(g,p),children:"only"}):null]},d)),m.jsx("div",{className:"flex justify-end",children:m.jsx("div",{onClick:u,className:"pr-4 py-2 text-zuplo-pink cursor-pointer hover:underline",children:"clear"})})]})})})})]})})}function uE(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const cE=v.forwardRef(uE),dE=cE;function pE(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}const fE=v.forwardRef(pE),mE=fE;function gE(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}const hE=v.forwardRef(gE),vE=hE,Lu=({borderPositionAndSize:e,className:t,colorAndColorWeight:n})=>m.jsx("div",{style:{borderTopColor:"transparent"},className:fe({"border-4":!e,[`${e}`]:e,"border-zuplo-pink":!n,[`${n}`]:n},"border-solid rounded-full animate-spin",t)}),Lr=({selected:e,onChange:t,options:n,listLabel:r,className:o,classNameOptions:i,testId:a,placeholder:l,matchWidth:s=!0,selectorElement:u,disabled:c,labelPrefixElement:d=null,isLoadingData:p=!1})=>m.jsxs(Tn,{value:e,onChange:t,disabled:c,children:[r&&m.jsx(Tn.Label,{className:"block text-sm font-medium text-gray-700",children:r}),m.jsxs("div",{className:fe({relative:s},o),children:[m.jsxs(Tn.Button,{"data-test":a,className:fe("relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 text-sm",c?"bg-gray-200":"bg-white",o),children:[e!==null&&e.icon&&m.jsx("span",{className:"absolute pr-10",children:p?m.jsx(Lu,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}):m.jsx(m.Fragment,{children:e.icon})}),m.jsxs("span",{className:fe("block truncate",{"ml-7 mt-0.5":e!==null&&e.icon}),children:[d,(e==null?void 0:e.label)||l]}),m.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:u??m.jsx(vE,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),m.jsx(Pn,{as:v.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(Tn.Options,{className:fe("absolute z-20 mt-1 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",i),children:n.map((f,g)=>m.jsx(Tn.Option,{"data-test":`${a}-${g}`,className:({active:I})=>fe(I?"bg-gray-50":"",f.disabled?"cursor-not-allowed":"cursor-pointer","text-gray-900 select-none relative py-2 px-3"),value:f,disabled:f.disabled??!1,children:m.jsx(m.Fragment,{children:f.description?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-semibold block text-sm leading-7",children:f.label}),m.jsx("span",{className:"text-xs",children:f.description})]}):m.jsxs("div",{className:"flex flex-row font-normal",children:[f.icon&&m.jsx("div",{children:f.icon})," ",m.jsx("div",{className:fe(f.icon?"mt-0.5":""),children:f.label}),f.icon&&e&&e.value.toString()===f.value.toString()&&m.jsx("div",{className:"absolute right-0",children:m.jsx(F0,{className:"mr-3 h-5 w-5"})})]})})},`${g}-${f.value}`))})})]})]});var qo=(e=>(e.PRIMARY="primary",e.WHITE="white",e.GRAY="gray",e))(qo||{});const Hn=({label:e,isDisabled:t=!1,onClick:n,classNames:r,dataTestId:o,buttonType:i="primary",iconAlignment:a="right",icon:l=null,type:s="button"})=>i==="white"?m.jsxs("button",{type:s,className:fe("flex items-center align-middle py-2 px-3 space-x-2 bg-white relative border border-gray-300 rounded-md shadow-sm text-left focus:outline-none focus:ring-1 focus:ring-pink-300 focus:border-pink-300 sm:text-sm enabled:cursor-pointer",t?"opacity-50 bg-slate-100 disabled disabled:cursor-not-allowed":"bg-white hover:bg-slate-100",r),"data-test":o,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):i==="primary"?m.jsxs("button",{type:s,className:fe("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500",t?"bg-pink-300 disabled cursor-not-allowed":"bg-zuplo-pink hover:bg-zuplo-pink-hover",{"justify-center":!l},r),"data-test":o,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):i==="gray"?m.jsxs("button",{type:s,className:fe("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-gray-400 border-1 font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",t?"bg-gray-100 disabled cursor-not-allowed":"bg-gray-200 hover:bg-gray-300",r),"data-test":o,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):null,yE=({addRoute:e})=>{const t=()=>{var n;(n=window.open("https://www.zuplo.com/docs/overview","_blank"))==null||n.focus()};return m.jsxs("div",{className:"flex flex-col space-y-6 mt-10 text-gray-600 mx-auto px-10 flex-wrap",children:[m.jsx("div",{className:"font-extrabold text-2xl text-gray-600",children:"You don't have any operations"}),m.jsx("div",{className:"whitespace-pre-wrap",children:"Your Open API file is the heart of your gateway - it tells us how to handle incoming requests. To get started, add your first route, or import your Open API file."}),m.jsxs("div",{children:[m.jsx("span",{children:"Why not try to our "}),m.jsx("button",{type:"button",className:"underline text-zuplo-pink hover:text-zuplo-pink-hover cursor-pointer",onClick:t,children:"Getting started guide?"})]}),m.jsx("div",{className:"flex w-full justify-center gap-x-4",children:m.jsx(Hn,{type:"button",dataTestId:"add-route-btn",onClick:e,label:"Add Route",isDisabled:!1})})]})};var yM=(e=>(e.get="bg-blue-400",e.head="bg-pink-400",e.post="bg-green-400",e.put="bg-yellow-400",e.delete="bg-red-400",e.connect="bg-orange-400",e.options="bg-teal-400",e.trace="bg-fuchsia-400",e.patch="bg-orange-400",e))(yM||{});const IE=({method:e})=>{if(e.includes(","))return m.jsx("div",{className:`
|
|
51
51
|
px-2 rounded-sm w-full text-center bg-black
|
|
52
|
-
`,children:v.jsx("p",{className:"text-2xs text-white",children:"MULTI"})});const t=e;return v.jsx("div",{className:pe("px-2 rounded-sm w-full text-center",_v[t]),children:v.jsx("p",{className:"text-2xs text-white",children:e.toUpperCase()})})};function _E({path:e,method:t,summary:n,operationId:r,isSelected:o,onOperationSelected:l,onDelete:i}){const a=p.useRef(null),s=()=>{var c,d;(c=a.current)==null||c.classList.remove("hidden"),(d=a.current)==null||d.classList.add("inline-flex")},u=()=>{var c,d;(c=a.current)==null||c.classList.add("hidden"),(d=a.current)==null||d.classList.remove("inline-flex")};return v.jsxs("div",{"data-test":`route-card-${n}`,id:r,className:pe("py-2.5 px-5 rounded flex mb-2 cursor-pointer w-full",o?"bg-gray-200":"hover:bg-gray-100 bg-white"),onClick:()=>{l(r)},onMouseEnter:s,onMouseLeave:u,children:[v.jsxs("div",{className:"grow truncate pr-3",children:[v.jsx("p",{title:n??"Unnamed Operation",className:"font-semibold text-sm antialiased text-editor font-sans text-ellipsis overflow-hidden mb-2",children:n??"Unnamed Operation"}),v.jsxs("div",{className:"flex",children:[v.jsx("div",{className:"flex items-end w-14 shrink-0 mr-2",children:v.jsx(EE,{method:t})}),v.jsx("p",{title:e,className:"text-xs font-light text-neutral-800 font-mono text-ellipsis overflow-hidden",children:e})]})]}),v.jsx("span",{ref:a,className:"shadow rounded-md -space-x-px h-6 right-3 hidden absolute",children:v.jsx("button",{type:"button","data-test":"delete-route-btn",onClick:c=>{c.stopPropagation(),i(e,t,r)},className:"relative rounded-md inline-flex items-center p-2 border border-gray-300 bg-white text-sm font-medium text-gray-400 hover:bg-gray-100",children:v.jsx(Ym,{className:"h-4 w-4","aria-hidden":"true"})})})]})}function RE({onSearch:e}){const t=p.useRef(null),[n,r]=p.useState(!1),o=i=>{r(i.target.value.trim().length>0),e(i.target.value.trim())},l=i=>{t.current&&(t.current.value="",e()),r(!1)};return v.jsxs("div",{className:"relative w-full",children:[v.jsx("div",{className:"z-50 flex absolute inset-y-0 right-0 items-center pr-1.5 pointer-events-none"}),v.jsx("input",{type:"text",ref:t,placeholder:"Search",onChange:o,className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm border-gray-300 rounded-md placeholder-gray-400 w-full pr-7"}),v.jsx("div",{className:"absolute top-0 right-0 p-2.5",children:n?v.jsx("button",{type:"button",onClick:l,children:v.jsx(Zm,{className:"w-4 h-4"})}):v.jsx(gS,{className:"w-4 h-4 text-gray-400"})})]})}const ml=({classNames:e,label:t,fieldName:n,labelPlacement:r="left",children:o})=>{const l=v.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 text-right whitespace-nowrap",children:t});return v.jsx(v.Fragment,{children:v.jsxs("div",{className:pe("flex items-center gap-x-2",e),children:[r==="left"&&l,v.jsx("div",{className:"w-full flex flex-row items-center",children:o}),r==="right"&&l]})})};function TE({selectedOption:e,disabled:t=!1,options:n,onSelectionChanged:r,testId:o,label:l}){const i=a=>{r==null||r(a)};return v.jsx(Kt,{disabled:t,value:e,onChange:i,children:({open:a})=>v.jsxs(v.Fragment,{children:[v.jsx(Kt.Label,{className:"sr-only hidden",children:l}),v.jsxs("div",{className:"max-w-full relative",children:[v.jsx("div",{className:"flex w-full",children:v.jsxs("div",{className:"max-w-full relative z-0 flex shadow-sm rounded-md divide-x divide-gray-300 border border-gray-300",children:[v.jsx("div",{className:pe(t?"bg-gray-100":"bg-white","flex grow min-w-0 w-full max-w-full items-center py-2 pl-3 pr-4 rounded-l-md shadow-sm "),children:v.jsx("p",{className:"text-sm whitespace-pre truncate",children:e==null?void 0:e.name})}),v.jsxs(Kt.Button,{"data-test":o,className:"w-fit relative flex items-center p-1 rounded-l-none rounded hover:bg-gray-300 focus:outline-none focus:z-10 focus:ring-2 focus:ring-offset-0 border-r-1 border-gray-900 focus:ring-offset-gray-200 focus:ring-gray-300",children:[v.jsx("span",{className:"sr-only",children:l}),v.jsx(Uc,{className:"h-5 w-5 text-black","aria-hidden":"true"})]})]})}),v.jsx(tr,{show:a,as:p.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:v.jsx(Kt.Options,{static:!0,className:"origin-top-right absolute z-20 right-0 mt-2 w-72 rounded-md shadow-lg overflow-hidden bg-white divide-y divide-gray-200 ring-1 ring-black ring-opacity-5 focus:outline-none",children:n.map((s,u)=>v.jsx(Kt.Option,{"data-test":`${o}-${u}`,className:({active:c})=>pe(c?"bg-gray-200":"text-gray-900","cursor-default select-none relative p-4 text-sm"),value:s,children:({active:c})=>v.jsxs("div",{className:"flex flex-col",children:[v.jsxs("div",{className:"flex justify-between",children:[v.jsx("p",{className:pe("whitespace-pre",(e==null?void 0:e.key)===s.key?"font-bold":"font-normal",c?"text-gray-900":"text-gray-700"),children:s.name}),(e==null?void 0:e.key)===s.key?v.jsx("span",{className:"text-zuplo-pink",children:v.jsx(Qm,{className:"h-5 w-5","aria-hidden":"true"})}):null]}),v.jsx("p",{className:pe(c?"text-gray-900":"text-gray-500","mt-2"),children:s.description})]})},s.name))})})]})]})})}const Rv=[{key:"anything-goes",name:"⚠️ Anything Goes",description:"This route will allow any cross origin requests. IMPORTANT - this can have security implication for your API and users."},{key:"none",name:"No CORS",description:"No CORS support, this route will disallow any cross-origin requests"}],NE=Rv[1];function CE({testId:e,onSelectionChanged:t,corsPolicies:n,selectedCorsPolicy:r}){const l=[...n?n.map(a=>({key:a.name,name:a.name,description:`Allow origins: ${a.allowedOrigins.join(", ")}`})):[],...Rv],i=l.find(a=>a.key===(r??NE));return v.jsx(TE,{selectedOption:i??{key:"INVALID SELECTION",name:"INVALID SELECTION",description:"Selection is not one of the available options"},testId:e,options:l,onSelectionChanged:a=>{t(a.key)}})}const kE=({selectedCorsPolicy:e,span:t,corsPolicies:n,onCORSSelectionChanged:r})=>v.jsx(ml,{label:"CORS",fieldName:"cors",span:t,children:v.jsx(CE,{testId:"operation-cors-picker",selectedCorsPolicy:e,corsPolicies:n,onSelectionChanged:r})}),LE=({shouldExcludeFromDocs:e,span:t,onSelectionChanged:n})=>v.jsx(ml,{label:"Exclude From Docs",fieldName:"docs-inclusion",span:t,labelPlacement:"right",children:v.jsx(Ev,{testId:"operation-docs-inclusion-checkbox",id:"docs-inclusion",checked:e,onChange:n})});var Wt={};(function(e){e.__esModule=!0,e.OpenAPIV2=e.OpenAPIV3=void 0,function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch",n.TRACE="trace"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV3||(e.OpenAPIV3={})),function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV2||(e.OpenAPIV2={}))})(Wt);const Zf=[{label:"GET",value:Wt.OpenAPIV3.HttpMethods.GET},{label:"HEAD",value:Wt.OpenAPIV3.HttpMethods.HEAD},{label:"POST",value:Wt.OpenAPIV3.HttpMethods.POST},{label:"PUT",value:Wt.OpenAPIV3.HttpMethods.PUT},{label:"DELETE",value:Wt.OpenAPIV3.HttpMethods.DELETE},{label:"OPTIONS",value:Wt.OpenAPIV3.HttpMethods.OPTIONS},{label:"TRACE",value:Wt.OpenAPIV3.HttpMethods.TRACE},{label:"PATCH",value:Wt.OpenAPIV3.HttpMethods.PATCH}],bE={label:"Multiple (edit in JSON View)",value:"Multiple",disabled:!0},PE=({selectedMethod:e,span:t,onSelectionChanged:n})=>{const r=e.includes(",");return v.jsx(ml,{label:"Method",fieldName:"method",span:t,children:v.jsx(Vn,{testId:"operation-method-picker",matchWidth:!1,selected:{label:r?"Multiple":e.toUpperCase(),value:e},onChange:n,options:r?Zf.concat(bE):Zf})})},nd=p.createContext({setPath:()=>{},setSummary:()=>{}}),qf="open-api",Hl={"open-api":"OpenAPI","url-pattern":"URL Pattern"},Xf={"open-api":"Standard Open API format e.g. /pizza/size/{size}","url-pattern":"Use the more powerful URL Pattern format"},AE=({initialPath:e,span:t,pathMode:n,hasError:r,onPathChange:o,onPathModeChange:l,onFieldModified:i})=>{const{setPath:a}=p.useContext(nd),[s,u]=p.useState(!1),[c,d]=p.useState(e),h=n?{value:n,label:Hl[n]}:{value:qf,label:Hl[qf]};p.useEffect(()=>{d(e),a(e)},[e]);const S=x=>{s||(u(!0),i()),d(x.target.value),a(x.target.value)},y=()=>{if(s){let x=c;c.startsWith("/")||(x=`/${c}`,d(x)),o(x),u(!1)}},w=x=>{l(x.value)};return v.jsxs(ml,{span:t,label:"Path",fieldName:"operation-path",children:[v.jsx("input",{type:"text",id:"operation-path-input",name:"path",className:pe(r?"border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500","rounded-l-md","shadow-sm block w-full text-sm rounded-none font-mono"),value:c,onChange:S,onBlur:y,"data-test":"operation-path-input"}),v.jsx(Vn,{className:"w-40 border-l-0 rounded-l-none",classNameOptions:"w-52",selected:h,onChange:w,options:[{value:"open-api",label:Hl["open-api"],description:Xf["open-api"]},{value:"url-pattern",label:Hl["url-pattern"],description:Xf["url-pattern"]}]}),v.jsxs("button",{type:"button",className:"text-sm flex flex-row items-center ml-2 p-2 pr-4 border rounded-md shadow-md hover:bg-zuplo-pink hover:text-white",children:[v.jsx(vE,{className:"w-4 h-auto text-zuplo-highlight"}),"Test"]})]})},OE=({initialSummary:e,span:t,onSummaryChange:n,onFieldModified:r})=>{const o=p.useRef(null),[l,i]=p.useState(!1),{setSummary:a}=p.useContext(nd);p.useEffect(()=>{o.current&&(o.current.value=e??"",a(e))},[e]);const s=c=>{l||(i(!0),r()),a(c.target.value)},u=c=>{l&&(n(c.target.value),i(!1))};return v.jsx(ml,{label:"Summary",fieldName:"operation-summary",span:t,children:v.jsx("input",{ref:o,"data-test":"operation-summary-input",id:"summary",type:"text",name:"summary",className:pe("shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full text-sm border-gray-300 rounded-md"),onChange:s,onBlur:u})})},Tv="tooltip-toggle",ci=({hasError:e=!1,tooltip:t,onChange:n,value:r,errorMessage:o,label:l})=>{const[i,a]=p.useState(!1),s=c=>{n(c)},u=c=>{var h;if(((h=c.relatedTarget)==null?void 0:h.id)!==Tv){a(!1);return}const d=c.currentTarget.selectionEnd;c.currentTarget.focus(),c.currentTarget.setSelectionRange(d,d)};return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[l?v.jsx("span",{className:"col-span-1 text-gray-600 text-sm text-right",children:l}):null,v.jsxs("div",{className:pe({"col-span-4":!!l,"col-span-5":!l}),children:[i&&t?t:null,v.jsx("input",{type:"text",id:"route-handler",name:"route-handler",className:pe("shadow-sm block w-full text-sm rounded-md font-mono",{"border-2 border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":e,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!e,"col-span-4":!!l,"col-span-5":!l}),"data-test":"route-handler-input",value:r,onChange:s,onFocus:()=>a(!0),onBlur:u,"aria-invalid":e})]}),e?v.jsxs(v.Fragment,{children:[l?v.jsx("span",{className:"col-span-1"}):null,v.jsx("p",{"data-test":"route-handler-input-error",className:pe("mt-2 text-sm text-red-500 col-span-4",{"col-span-4":!!l,"col-span-5":!l}),children:o})]}):null]})})};let jo;const $E={get(e,t,n){return typeof t=="symbol"?()=>"superProxy.toString()":jo}};jo=new Proxy({},$E);const IE=e=>e.includes("undefined")||e.includes("[object"),ME=e=>{try{return new URL(e),!0}catch{return!1}},jE=e=>{if(e==="")return{errorType:"Error",message:"Invalid Rewrite URL provided"};const t={url:new URL("https://www.zuplo.com"),host:"",hostname:"",origin:"",port:"",protocol:"",headers:new Headers({}),params:{},pathname:"",method:"",query:{},search:"",env:jo,request:jo,e:encodeURIComponent,context:jo},n=(l,i={})=>new Function("vars",["const tagged = ( "+Object.keys(i).join(", ")+" ) =>","`"+l+"`","return tagged(...Object.values(vars))"].join(`
|
|
53
|
-
`))(i);let r=null;try{r=n(e,t)}catch(l){return l instanceof ReferenceError||l instanceof TypeError?{errorType:"Error",message:l.message}:{errorType:"Error",message:`${e} is not a valid pattern`}}return r?e.includes("env.")||e.includes("params.")||e.includes("{pathname")||e.includes("{method")||e.includes("query.")||e.includes("{headers")||e.includes("request")||e.includes("{context")?{errorType:"Warning",message:"Tip: Use the API Test Console to test the behavior of request properties and environment variables."}:IE(r)?{errorType:"Error",message:`Failed to parse component(s), rewrite result: ${r}`}:ME(r)?{errorType:null,message:null}:{errorType:"Error",message:`${r} is not a valid URL`}:{errorType:"Error",message:"Its null"}},DE=[{example:'"application/json"',token:'${headers.get("content-type")}'},{example:'"example.com:8080"',token:"${host}"},{example:'"example.com"',token:"${hostname}"},{example:'"GET"',token:"${method}"},{example:'"https://example.com"',token:"${origin}"},{example:'":productId"',token:"${params.productId}"},{example:'"/v1/products/:productId"',token:"${pathname}"},{example:'"8080"',token:"${port}"},{example:'"https:"',token:"${protocol}"},{example:'"cars"',token:"${query.category}"},{example:'"?category=cars"',token:"${search}"},{example:'"https://baseurl.com"',token:"${env.BASE_URL}"},{example:'"https://example.com:8080/v1/products/:productId?category=cars"',token:"${url}"},{example:'${request.user.sub} = "user284787985473"',token:"${request}"},{example:'${context.route.custom} - "my-value"',token:"${context}"}],Nv=({url:e,onUrlChange:t})=>{const[n,r]=p.useState(!0),o=()=>{r(!n)},l=c=>{const d=c.currentTarget.value;t(d)},{errorType:i,message:a}=jE(e),s=i==="Error",u=v.jsx("div",{className:"relative",children:v.jsxs("div",{className:"absolute inset-x-0 bottom-0.5 flex flex-col bg-gray-200 z-20 rounded-md px-3 py-1 border-gray-300 border-2",children:[v.jsxs("div",{className:"flex justify-between h-full items-center",children:[v.jsx("p",{className:"font-bold text-md ",children:"URL Cheat Sheet"}),v.jsx("button",{title:n?"Collapse Cheat Sheet":"Expand Cheat Sheet",id:Tv,onClick:o,children:n?v.jsx(Uc,{className:"w-5 h-5"}):v.jsx(nS,{className:"w-5 h-5"})})]}),n?v.jsxs("div",{className:"mt-2",children:[DE.map(c=>v.jsxs("p",{className:"text-gray-600 text-xs font-mono break-words",children:[v.jsx("span",{className:"text-pink-600",children:c.token})," - ",c.example]},c.token)),i==="Warning"?v.jsx("div",{className:"hidden xl:flex mt-2 pb-1 text-xs font-mono text-pink-600",children:a}):null]}):null]})});return v.jsx(ci,{hasError:s,tooltip:u,onChange:l,value:e,errorMessage:a})},FE=({routeHandler:e,onOptionsChange:t})=>{var r;const n=o=>{t({...e.options,baseUrl:o})};return v.jsx("div",{className:"space-y-2",children:v.jsx("fieldset",{className:"space-y-2",children:v.jsx(Nv,{onUrlChange:n,url:((r=e.options)==null?void 0:r.baseUrl)??""})})})},Cv="x-zuplo",Jf="x-internal",kv=`${Cv}-path`,To=`${Cv}-route`;var vl=(e=>(e.modified="modified",e.new="new",e.saving="saving",e.unmodified="unmodified",e.removing="removing",e.error="error",e))(vl||{}),Lv=(e=>(e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink",e))(Lv||{});const ep=(e,t)=>Object.entries(t??{}).flatMap(([n,r])=>r?Object.entries(r).filter(([o])=>o.includes("get")||o.includes("put")||o.includes("post")||o.includes("delete")||o.includes("options")||o.includes("head")||o.includes("patch")||o.includes("trace")).map(([o,l])=>({...l,additionalOperationContext:{oasFilePath:e,method:o,path:n,pathZuploConfig:r[kv]}})):[]),tp=e=>!Object.keys(e).some(t=>t.includes("get")||t.includes("put")||t.includes("post")||t.includes("delete")||t.includes("options")||t.includes("head")||t.includes("patch")||t.includes("trace"));class UE{constructor(t,n){Tt(this,"updateActiveFile");Tt(this,"getOpenApiDataEnforced",()=>{if(!this.openApiData)throw new Error("Invalid State - OpenApiManagerInstance.openApiData was undefined");return this.openApiData});Tt(this,"openApiFileModel");Tt(this,"openApiData");Tt(this,"parseError");Tt(this,"operationArray");Tt(this,"updateOpenApiData",t=>{const n={...this.openApiFileModel,content:JSON.stringify(t,null,2)};this.openApiData=t,this.operationArray=ep(this.openApiFileModel.path,t.paths),this.updateActiveFile(n)});Tt(this,"updatePathItem",(t,n)=>{const r=this.getOpenApiDataEnforced();let o=r.paths;o||(o={}),o[t]=n;const l={...r,paths:o};this.updateOpenApiData(l)});Tt(this,"addOperation",(t,n,r)=>{const o=this.getOpenApiDataEnforced(),l=n;let i=o.paths;i||(i={});let a=i[t];if(a||(a={"x-zuplo-path":{pathMode:"open-api"}}),a[l])throw new Error(`Cannot add operation ${n}-${t}, operation already exists`);a[l]=r,i[t]=a;const s={...o,paths:i};this.updateOpenApiData(s)});Tt(this,"deleteOperation",(t,n)=>{const r=this.getOpenApiDataEnforced(),o=r.paths;if(!o)throw new Error("Cannot delete operation when paths is undefined");const l=o[t];if(!l)throw new Error("Cannot delete operation when pathItem is undefined");delete l[n],tp(l)?delete o[t]:o[t]=l;const i={...r,paths:o};this.updateOpenApiData(i)});Tt(this,"updateOperation",t=>{var d,h,S;const n=this.getOpenApiDataEnforced(),{path:r,newPath:o,newOperationObject:l}=t,i=t.method,a=t.newMethod,s=n.paths;if(!s)throw new Error("Cannot update operation when paths is undefined");const u=s[r];if(!u)throw new Error("Cannot update operation when pathItem is undefined");if(o&&a&&((d=s[o])!=null&&d[a]))throw new Error(`Operation with path: '${o}' and method: '${a.toUpperCase()}' already exists`);if(o&&!a&&((h=s[o])!=null&&h[i]))throw new Error(`Cannot change path to '${o}', operation already exists`);if(a&&u[a])throw new Error(`Cannot change method to '${a.toUpperCase()}', operation already exists`);if(o){delete u[i];const y=(S=s[r])==null?void 0:S["x-zuplo-path"];tp(u)?delete s[r]:s[r]=u;const w=s[o]??{"x-zuplo-path":{pathMode:"open-api",...y}};w[a??i]=l,s[o]=w}else a?(delete u[i],u[a]=l,s[r]=u):(u[i]=l,s[r]=u);const c={...n,paths:s};this.updateOpenApiData(c)});var r;this.openApiFileModel=t;try{this.openApiData=JSON.parse(t.content??""),this.operationArray=ep(t.path,(r=this.openApiData)==null?void 0:r.paths)}catch(o){this.parseError=o}this.updateActiveFile=n}}function VE(){return[]}const zE=({routeHandler:e,onOptionsChange:t})=>{var s;const n=VE(),r=n.map(u=>({label:`.${u.path}`,value:`.${u.path}`})),o=(s=e.options)==null?void 0:s.openApiFilePath,l=u=>{t({...e.options,openApiFilePath:u.value})},i=BE(o,n),{isValid:a}=i;return v.jsx("fieldset",{className:"space-y-2 w-full",children:v.jsx(Vn,{matchWidth:!0,className:pe("w-full",a?"":"border-red-500 text-red-500"),classNameOptions:"w-full",selected:o?{label:a?o:i.error,value:o}:{label:"Select a file",value:""},options:r,onChange:l})})},BE=(e,t)=>e?e.startsWith("./")?e.startsWith("./config")?e.endsWith(".oas.json")?t.some(n=>`.${n.path}`===e)?{isValid:!0}:{isValid:!1,error:`OpenAPI file '${e}' does not exist`}:{isValid:!1,error:"OpenAPI file path must point to a file ending in '.oas.json'"}:{isValid:!1,error:"OpenAPI file path must point to a file in your /config directory"}:{isValid:!1,error:"OpenAPI file path must start with './'"}:{isValid:!1,error:"OpenAPI file path is required"},WE=({routeHandler:e,onOptionsChange:t})=>{var a;const n=s=>{const u=s.currentTarget.value;t({...e.options,location:u})},r=s=>{const u=parseInt(s.value);t({...e.options,status:u})},o={label:"Other (customize in routes.json)",value:"other",disabled:!0},l=[{label:"302 - Temporary",value:"302"},{label:"301 - Permanent",value:"301"},o],i=l.find(s=>{var u,c;return s.value===((c=(u=e.options)==null?void 0:u.status)==null?void 0:c.toString())})??o;return v.jsxs("div",{className:"flex flex-col text-sm space-y-2",children:[v.jsx("input",{className:"rounded-md border-gray-300 shadow-sm font-mono text-sm",type:"text",value:(a=e.options)==null?void 0:a.location,onChange:n}),v.jsx(Vn,{selected:i,options:l,onChange:r})]})},rd="$import(@zuplo/runtime)",bv="https://welcome.zuplo.io/",Di="https://echo.zuplo.io",np="rewritePattern",rp=({routeHandler:e,onOptionsChange:t})=>{var o;const n=((o=e.options)==null?void 0:o[np])??bv,r=l=>{t({...e.options,[np]:l})};return v.jsx("fieldset",{className:"space-y-2",children:v.jsx(Nv,{onUrlChange:r,url:n})})},op=["us-east-2","us-east-1","us-west-1","us-west-2","af-south-1","ap-east-1","ap-southeast-3","ap-south-1","ap-northeast-3","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ca-central-1","cn-north-1","cn-northwest-1","eu-central-1","eu-west-2","eu-south-1","eu-west-3","eu-north-1","me-south-1"],HE=e=>{var n;if(e.length<1)return"The name of a function cannot be empty";if(e.length>140)return"The length of the name must be shorter (maximum 140 characters)";const t=/(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?/;return!e.match(t)||e!==((n=e.match(t))==null?void 0:n[0])?"Invalid AWS lambda function name":null},KE=e=>e.length<1?"The secret key of the handler cannot be empty":null,GE=e=>e.length<1?"The access key of the handler cannot be empty":null,QE=({routeHandler:e,onOptionsChange:t})=>{var w,x,m,f,g,R,L;const[n,r]=p.useState(null),[o,l]=p.useState(null),[i,a]=p.useState(null),s=p.useRef(!0),u={},c="$env(AWS_SECURE_ACCESS_KEY)",d="$env(AWS_ACCESS_KEY_ID)",h=(N,k)=>{t({...e.options,[N]:k}),S({...e.options,[N]:k})};p.useEffect(()=>{(!e.options||Object.keys(e.options).length===0)&&t({accessKeyId:d,functionName:"",region:op[0],secretAccessKey:c}),s.current&&(s.current=!1),e.options&&Object.keys(e.options).length!==0&&S(e.options)},[u]);const S=N=>{r(HE(N.functionName)),l(KE(N.secretAccessKey)),a(GE(N.accessKeyId))},y=v.jsx("div",{className:"relative",children:v.jsxs("div",{className:"absolute inset-x-0 top-10 flex flex-col bg-gray-200 z-20 rounded-md px-3 pt-1 pb-2 border-gray-300 border-2",children:[v.jsx("p",{className:"font-bold text-black text-md mb-2",children:"Use environment variables"}),v.jsx("span",{className:"text-sm text-gray-400 mb-2",children:"You can reference your environment variables in these configuration options, e.g."}),v.jsxs("span",{className:"text-sm text-zuplo-pink-hover flex flex-col space-y-1",children:[v.jsx("code",{children:c}),v.jsx("code",{children:d})]})]})});return v.jsxs("div",{className:"space-y-2",children:[v.jsx(ci,{label:"Function Name",hasError:!!n,errorMessage:n,onChange:N=>{h("functionName",N.target.value)},value:((w=e.options)==null?void 0:w.functionName)??""}),v.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[v.jsx("span",{className:"col-span-1 text-right text-sm",children:"AWS Region"}),v.jsx(Vn,{options:op.map(N=>({label:N,value:N})),onChange:N=>{h("region",N.value)},selected:{label:(x=e.options)==null?void 0:x.region,value:(m=e.options)==null?void 0:m.region},className:"col-span-4 w-full",classNameOptions:"w-full",testId:"filter-analytics",selectorElement:v.jsx("div",{className:"border-l-2 pl-1",children:v.jsx(pE,{className:"h-5 w-5 text-black","aria-hidden":"true"})})})]}),v.jsx(ci,{label:"Access Key ID",hasError:!!i,onChange:N=>{h("accessKeyId",N.target.value)},value:((f=e.options)==null?void 0:f.accessKeyId)===""?d:(g=e.options)==null?void 0:g.accessKeyId,tooltip:y,errorMessage:i}),v.jsx(ci,{label:"Secure Access Key",hasError:!!o,onChange:N=>{h("secretAccessKey",N.target.value)},tooltip:y,value:((R=e.options)==null?void 0:R.secretAccessKey)===""?c:(L=e.options)==null?void 0:L.secretAccessKey,errorMessage:o})]})},YE={export:"urlRewriteHandler",module:rd,options:{rewritePattern:bv}},ZE={export:"awsLambdaHandler",module:rd},qE={export:"redirectHandler",module:rd,options:{location:"https://zuplo.com",status:302}},XE={export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:Di}},JE={export:"openApiSpecHandler",module:"$import(@zuplo/runtime)",options:{openApiFilePath:"./config/routes.oas.json"}},lp={export:"default",module:"$import(./modules/hello-world)"},e_=()=>({urlForward:{component:FE,displayName:"URL Forward",handlerID:"urlForward",routeHandler:{...XE},documentationUrl:"https://zuplo.com/docs/handlers/url-forward"},urlRewrite:{component:rp,displayName:"URL Rewrite",handlerID:"urlRewrite",routeHandler:{...YE},documentationUrl:"https://zuplo.com/docs/handlers/url-rewrite"},function:{component:rp,displayName:"Function",handlerID:"function",documentationUrl:"https://zuplo.com/docs/handlers/custom-handler"},awsLambda:{component:QE,displayName:"AWS Lambda",handlerID:"awsLambda",routeHandler:{...ZE},documentationUrl:"https://zuplo.com/docs/handlers/aws-lambda"},redirect:{component:WE,displayName:"Redirect",handlerID:"redirect",routeHandler:{...qE},documentationUrl:"https://zuplo.com/docs/handlers/redirect"},openApi:{component:zE,displayName:"OpenAPI Spec",handlerID:"openApi",routeHandler:{...JE,options:{openApiFilePath:`.${new URL(window.location.href).searchParams.get("path")}`}},documentationUrl:"https://zuplo.com/docs/handlers/openapi",isOpenApiExclusive:!0}}),t_=(e,t)=>{const n=Object.values(t).find(r=>{var o;return((o=r.routeHandler)==null?void 0:o.module)===e.module&&r.routeHandler.export===e.export});return n||t.function},n_=({routeHandler:e,onRequestHandlerChange:t,isOpenApi:n})=>{const r=e_(),o=t_(e,r),[l,i]=p.useState({[o.handlerID]:e}),a=Object.values(r).filter(c=>c.isOpenApiExclusive?n:!0).map(c=>({label:c.displayName,value:c.handlerID})),s=c=>{var x,m,f;i({...l,[o.handlerID]:e});const d=r[c.value],h=l[d.handlerID],S=(h==null?void 0:h.export)??((x=d.routeHandler)==null?void 0:x.export)??lp.export,y=(h==null?void 0:h.module)??((m=d.routeHandler)==null?void 0:m.module)??lp.module,w=(h==null?void 0:h.options)??((f=d.routeHandler)==null?void 0:f.options)??{};t({export:S,module:y,options:w})},u=c=>{t({...e,options:c})};return v.jsxs("div",{className:"w-full bg-request-handler-gray flex flex-col px-4 py-3 -mt-1 rounded",children:[v.jsx("p",{className:"text-gray-500 text-md",children:"Request Handler"}),v.jsxs("div",{className:"flex flex-row mt-2",children:[v.jsx("label",{htmlFor:"handler",className:"col-span-1 block text-sm font-medium text-gray-700 text-right mr-3 pt-2",children:"Handler"}),v.jsxs("div",{className:"flex flex-row w-full self-center",children:[v.jsxs("div",{className:"flex flex-col col-span-4 rounded-md mr-3",children:[v.jsx(Vn,{matchWidth:!1,className:"w-xl text-sm",options:a,testId:"request-handler-picker",selected:{label:o.displayName,value:o.handlerID},onChange:s}),v.jsxs("a",{href:o.documentationUrl,className:"text-sm text-blue-500 hover:underline mt-2 ml-1",target:"_blank",rel:"noreferrer",children:[o.displayName," docs"]})]}),v.jsx("div",{className:" w-full",children:v.jsx(o.component,{routeHandler:e,onOptionsChange:u,onRequestHandlerChange:t})})]})]})]})};function r_(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var o_=r_,ae=o_;function l_(e){return!!e&&typeof e.then=="function"}var Ee=l_;function i_(e,t){if(e!=null)return e;throw ae(t??"Got unexpected null or undefined")}var Ce=i_;function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class va{getValue(){throw ae("BaseLoadable")}toPromise(){throw ae("BaseLoadable")}valueMaybe(){throw ae("BaseLoadable")}valueOrThrow(){throw ae(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ae("BaseLoadable")}promiseOrThrow(){throw ae(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ae("BaseLoadable")}errorOrThrow(){throw ae(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ae("BaseLoadable")}}class a_ extends va{constructor(t){super(),ie(this,"state","hasValue"),ie(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 Ee(n)?sr(n):Wr(n)?n:gl(n)}catch(n){return Ee(n)?sr(n.next(()=>this.map(t))):ga(n)}}}class s_ extends va{constructor(t){super(),ie(this,"state","hasError"),ie(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 Pv extends va{constructor(t){super(),ie(this,"state","loading"),ie(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 sr(this.contents.then(n=>{const r=t(n);if(Wr(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(Ee(n))return n.then(()=>this.map(t).contents);throw n}))}}function gl(e){return Object.freeze(new a_(e))}function ga(e){return Object.freeze(new s_(e))}function sr(e){return Object.freeze(new Pv(e))}function Av(){return Object.freeze(new Pv(new Promise(()=>{})))}function u_(e){return e.every(t=>t.state==="hasValue")?gl(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?ga(Ce(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):sr(Promise.all(e.map(t=>t.contents)))}function Ov(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>Wr(o)?o:Ee(o)?sr(o):gl(o)),r=u_(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((l,i,a)=>({...l,[i]:o[a]}),{}))}function Wr(e){return e instanceof va}const c_={of:e=>Ee(e)?sr(e):Wr(e)?e:gl(e),error:e=>ga(e),loading:()=>Av(),all:Ov,isLoadable:Wr};var fr={loadableWithValue:gl,loadableWithError:ga,loadableWithPromise:sr,loadableLoading:Av,loadableAll:Ov,isLoadable:Wr,RecoilLoadable:c_},d_=fr.loadableWithValue,f_=fr.loadableWithError,p_=fr.loadableWithPromise,h_=fr.loadableLoading,m_=fr.loadableAll,v_=fr.isLoadable,g_=fr.RecoilLoadable,yl=Object.freeze({__proto__:null,loadableWithValue:d_,loadableWithError:f_,loadableWithPromise:p_,loadableLoading:h_,loadableAll:m_,isLoadable:v_,RecoilLoadable:g_});const Pu={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 y_(e,t){var n,r;const o=(n=process.env[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 ae(`({}).${e} value must be 'true', 'false', or empty: ${o}`);t(o==="true")}function S_(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function w_(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(y_("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{Pu.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),S_("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{Pu.RECOIL_GKS_ENABLED.add(n)})}))}w_();var eo=Pu;function ya(e){return eo.RECOIL_GKS_ENABLED.has(e)}ya.setPass=e=>{eo.RECOIL_GKS_ENABLED.add(e)};ya.setFail=e=>{eo.RECOIL_GKS_ENABLED.delete(e)};ya.clear=()=>{eo.RECOIL_GKS_ENABLED.clear()};var ye=ya;function x_(e,t,{error:n}={}){return null}var E_=x_,od=E_,ws,xs,Es;const __=(ws=F.createMutableSource)!==null&&ws!==void 0?ws:F.unstable_createMutableSource,$v=(xs=F.useMutableSource)!==null&&xs!==void 0?xs:F.unstable_useMutableSource,Iv=(Es=F.useSyncExternalStore)!==null&&Es!==void 0?Es:F.unstable_useSyncExternalStore;function R_(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=F.__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 T_(){return ye("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:ye("recoil_sync_external_store")&&Iv!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:ye("recoil_mutable_source")&&$v!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?ye("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:ye("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function N_(){return!1}var Sl={createMutableSource:__,useMutableSource:$v,useSyncExternalStore:Iv,currentRendererSupportsUseSyncExternalStore:R_,reactMode:T_,isFastRefreshEnabled:N_};class ld{constructor(t){ie(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class Mv extends ld{}class jv extends ld{}function C_(e){return e instanceof Mv||e instanceof jv}var Sa={AbstractRecoilValue:ld,RecoilState:Mv,RecoilValueReadOnly:jv,isRecoilValue:C_},k_=Sa.AbstractRecoilValue,L_=Sa.RecoilState,b_=Sa.RecoilValueReadOnly,P_=Sa.isRecoilValue,Hr=Object.freeze({__proto__:null,AbstractRecoilValue:k_,RecoilState:L_,RecoilValueReadOnly:b_,isRecoilValue:P_});function A_(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var wa=A_;class Dv{}const O_=new Dv,ur=new Map,id=new Map;function $_(e){return wa(e,t=>Ce(id.get(t)))}function I_(e){if(ur.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in
|
|
52
|
+
`,children:m.jsx("p",{className:"text-2xs text-white",children:"MULTI"})});const t=e;return m.jsx("div",{className:fe("px-2 rounded-sm w-full text-center",yM[t]),children:m.jsx("p",{className:"text-2xs text-white",children:e.toUpperCase()})})};function ME({path:e,method:t,summary:n,operationId:r,isSelected:o,onOperationSelected:i,onDelete:a}){const l=v.useRef(null),s=()=>{var c,d;(c=l.current)==null||c.classList.remove("hidden"),(d=l.current)==null||d.classList.add("inline-flex")},u=()=>{var c,d;(c=l.current)==null||c.classList.add("hidden"),(d=l.current)==null||d.classList.remove("inline-flex")};return m.jsxs("div",{"data-test":`route-card-${n}`,id:r,className:fe("py-2.5 px-5 rounded flex mb-2 cursor-pointer w-full",o?"bg-gray-200":"hover:bg-gray-100 bg-white"),onClick:()=>{i(r)},onMouseEnter:s,onMouseLeave:u,children:[m.jsxs("div",{className:"grow truncate pr-3",children:[m.jsx("p",{title:n??"Unnamed Operation",className:"font-semibold text-sm antialiased text-editor font-sans text-ellipsis overflow-hidden mb-2",children:n??"Unnamed Operation"}),m.jsxs("div",{className:"flex",children:[m.jsx("div",{className:"flex items-end w-14 shrink-0 mr-2",children:m.jsx(IE,{method:t})}),m.jsx("p",{title:e,className:"text-xs font-light text-neutral-800 font-mono text-ellipsis overflow-hidden",children:e})]})]}),m.jsx("span",{ref:l,className:"shadow rounded-md -space-x-px h-6 right-3 hidden absolute",children:m.jsx("button",{type:"button","data-test":"delete-route-btn",onClick:c=>{c.stopPropagation(),a(e,t,r)},className:"relative rounded-md inline-flex items-center p-2 border border-gray-300 bg-white text-sm font-medium text-gray-400 hover:bg-gray-100",children:m.jsx(W0,{className:"h-4 w-4","aria-hidden":"true"})})})]})}function wE({onSearch:e}){const t=v.useRef(null),[n,r]=v.useState(!1),o=a=>{r(a.target.value.trim().length>0),e(a.target.value.trim())},i=a=>{t.current&&(t.current.value="",e()),r(!1)};return m.jsxs("div",{className:"relative w-full",children:[m.jsx("div",{className:"z-50 flex absolute inset-y-0 right-0 items-center pr-1.5 pointer-events-none"}),m.jsx("input",{type:"text",ref:t,placeholder:"Search",onChange:o,className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm border-gray-300 rounded-md placeholder-gray-400 w-full pr-7"}),m.jsx("div",{className:"absolute top-0 right-0 p-2.5",children:n?m.jsx("button",{type:"button",onClick:i,children:m.jsx(G0,{className:"w-4 h-4"})}):m.jsx(H0,{className:"w-4 h-4 text-gray-400"})})]})}const Qa=({classNames:e,label:t,fieldName:n,labelPlacement:r="left",children:o})=>{const i=m.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 text-right whitespace-nowrap",children:t});return m.jsx(m.Fragment,{children:m.jsxs("div",{className:fe("flex items-center gap-x-2",e),children:[r==="left"&&i,m.jsx("div",{className:"w-full flex flex-row items-center",children:o}),r==="right"&&i]})})};function bE({selectedOption:e,disabled:t=!1,options:n,onSelectionChanged:r,testId:o,label:i}){const a=l=>{r==null||r(l)};return m.jsx(Tn,{disabled:t,value:e,onChange:a,children:({open:l})=>m.jsxs(m.Fragment,{children:[m.jsx(Tn.Label,{className:"sr-only hidden",children:i}),m.jsxs("div",{className:"max-w-full relative",children:[m.jsx("div",{className:"flex w-full",children:m.jsxs("div",{className:"max-w-full relative z-0 flex shadow-sm rounded-md divide-x divide-gray-300 border border-gray-300",children:[m.jsx("div",{className:fe(t?"bg-gray-100":"bg-white","flex grow min-w-0 w-full max-w-full items-center py-2 pl-3 pr-4 rounded-l-md shadow-sm "),children:m.jsx("p",{className:"text-sm whitespace-pre truncate",children:e==null?void 0:e.name})}),m.jsxs(Tn.Button,{"data-test":o,className:"w-fit relative flex items-center p-1 rounded-l-none rounded hover:bg-gray-300 focus:outline-none focus:z-10 focus:ring-2 focus:ring-offset-0 border-r-1 border-gray-900 focus:ring-offset-gray-200 focus:ring-gray-300",children:[m.jsx("span",{className:"sr-only",children:i}),m.jsx(bu,{className:"h-5 w-5 text-black","aria-hidden":"true"})]})]})}),m.jsx(Pn,{show:l,as:v.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(Tn.Options,{static:!0,className:"origin-top-right absolute z-20 right-0 mt-2 w-72 rounded-md shadow-lg overflow-hidden bg-white divide-y divide-gray-200 ring-1 ring-black ring-opacity-5 focus:outline-none",children:n.map((s,u)=>m.jsx(Tn.Option,{"data-test":`${o}-${u}`,className:({active:c})=>fe(c?"bg-gray-200":"text-gray-900","cursor-default select-none relative p-4 text-sm"),value:s,children:({active:c})=>m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:fe("whitespace-pre",(e==null?void 0:e.key)===s.key?"font-bold":"font-normal",c?"text-gray-900":"text-gray-700"),children:s.name}),(e==null?void 0:e.key)===s.key?m.jsx("span",{className:"text-zuplo-pink",children:m.jsx(F0,{className:"h-5 w-5","aria-hidden":"true"})}):null]}),m.jsx("p",{className:fe(c?"text-gray-900":"text-gray-500","mt-2"),children:s.description})]})},s.name))})})]})]})})}const IM=[{key:"anything-goes",name:"⚠️ Anything Goes",description:"This route will allow any cross origin requests. IMPORTANT - this can have security implication for your API and users."},{key:"none",name:"No CORS",description:"No CORS support, this route will disallow any cross-origin requests"}],xE=IM[1];function SE({testId:e,onSelectionChanged:t,corsPolicies:n,selectedCorsPolicy:r}){const i=[...n?n.map(l=>({key:l.name,name:l.name,description:`Allow origins: ${Array.isArray(l.allowedOrigins)?l.allowedOrigins.join(", "):l.allowedOrigins}`})):[],...IM],a=i.find(l=>l.key===(r??xE));return m.jsx(bE,{selectedOption:a??{key:"INVALID SELECTION",name:"INVALID SELECTION",description:"Selection is not one of the available options"},testId:e,options:i,onSelectionChanged:l=>{t(l.key)}})}const NE=({selectedCorsPolicy:e,span:t,corsPolicies:n,onCORSSelectionChanged:r})=>m.jsx(Qa,{label:"CORS",fieldName:"cors",span:t,children:m.jsx(SE,{testId:"operation-cors-picker",selectedCorsPolicy:e,corsPolicies:n,onSelectionChanged:r})}),DE=({shouldExcludeFromDocs:e,span:t,onSelectionChanged:n})=>m.jsx(Qa,{label:"Exclude From Docs",fieldName:"docs-inclusion",span:t,labelPlacement:"right",children:m.jsx(vM,{testId:"operation-docs-inclusion-checkbox",id:"docs-inclusion",checked:e,onChange:n})});var An={};(function(e){e.__esModule=!0,e.OpenAPIV2=e.OpenAPIV3=void 0,function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch",n.TRACE="trace"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV3||(e.OpenAPIV3={})),function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV2||(e.OpenAPIV2={}))})(An);const Bh=[{label:"GET",value:An.OpenAPIV3.HttpMethods.GET},{label:"HEAD",value:An.OpenAPIV3.HttpMethods.HEAD},{label:"POST",value:An.OpenAPIV3.HttpMethods.POST},{label:"PUT",value:An.OpenAPIV3.HttpMethods.PUT},{label:"DELETE",value:An.OpenAPIV3.HttpMethods.DELETE},{label:"OPTIONS",value:An.OpenAPIV3.HttpMethods.OPTIONS},{label:"TRACE",value:An.OpenAPIV3.HttpMethods.TRACE},{label:"PATCH",value:An.OpenAPIV3.HttpMethods.PATCH}],AE={label:"Multiple (edit in JSON View)",value:"Multiple",disabled:!0},CE=({selectedMethod:e,span:t,onSelectionChanged:n})=>{const r=e.includes(",");return m.jsx(Qa,{label:"Method",fieldName:"method",span:t,children:m.jsx(Lr,{testId:"operation-method-picker",matchWidth:!1,selected:{label:r?"Multiple":e.toUpperCase(),value:e},onChange:n,options:r?Bh.concat(AE):Bh})})},pm=v.createContext({setPath:()=>{},setSummary:()=>{}}),_h="open-api",zl={"open-api":"OpenAPI","url-pattern":"URL Pattern"},$h={"open-api":"Standard Open API format e.g. /pizza/size/{size}","url-pattern":"Use the more powerful URL Pattern format"},TE=({initialPath:e,span:t,pathMode:n,hasError:r,onPathChange:o,onPathModeChange:i,onFieldModified:a})=>{const{setPath:l}=v.useContext(pm),[s,u]=v.useState(!1),[c,d]=v.useState(e),p=n?{value:n,label:zl[n]}:{value:_h,label:zl[_h]};v.useEffect(()=>{d(e),l(e)},[e]);const f=w=>{s||(u(!0),a()),d(w.target.value),l(w.target.value)},g=()=>{if(s){let w=c;c.startsWith("/")||(w=`/${c}`,d(w)),o(w),u(!1)}},I=w=>{i(w.value)};return m.jsxs(Qa,{span:t,label:"Path",fieldName:"operation-path",children:[m.jsx("input",{type:"text",id:"operation-path-input",name:"path",className:fe(r?"border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500","rounded-l-md","shadow-sm block w-full text-sm rounded-none font-mono"),value:c,onChange:f,onBlur:g,"data-test":"operation-path-input"}),m.jsx(Lr,{className:"w-56 border-l-0 rounded-l-none",classNameOptions:"w-52",selected:p,onChange:I,options:[{value:"open-api",label:zl["open-api"],description:$h["open-api"]},{value:"url-pattern",label:zl["url-pattern"],description:$h["url-pattern"]}]})]})},EE=({initialSummary:e,span:t,onSummaryChange:n,onFieldModified:r})=>{const o=v.useRef(null),[i,a]=v.useState(!1),{setSummary:l}=v.useContext(pm);v.useEffect(()=>{o.current&&(o.current.value=e??"",l(e))},[e]);const s=c=>{i||(a(!0),r()),l(c.target.value)},u=c=>{i&&(n(c.target.value),a(!1))};return m.jsx(Qa,{label:"Summary",fieldName:"operation-summary",span:t,children:m.jsx("input",{ref:o,"data-test":"operation-summary-input",id:"summary",type:"text",name:"summary",className:fe("shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full text-sm border-gray-300 rounded-md"),onChange:s,onBlur:u})})},MM="tooltip-toggle",ss=({hasError:e=!1,tooltip:t,onChange:n,value:r,errorMessage:o,label:i})=>{const[a,l]=v.useState(!1),s=c=>{n(c)},u=c=>{var p;if(((p=c.relatedTarget)==null?void 0:p.id)!==MM){l(!1);return}const d=c.currentTarget.selectionEnd;c.currentTarget.focus(),c.currentTarget.setSelectionRange(d,d)};return m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[i?m.jsx("span",{className:"col-span-1 text-gray-600 text-sm text-right",children:i}):null,m.jsxs("div",{className:fe({"col-span-4":!!i,"col-span-5":!i}),children:[a&&t?t:null,m.jsx("input",{type:"text",id:"route-handler",name:"route-handler",className:fe("shadow-sm block w-full text-sm rounded-md font-mono",{"border-2 border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":e,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!e,"col-span-4":!!i,"col-span-5":!i}),"data-test":"route-handler-input",value:r,onChange:s,onFocus:()=>l(!0),onBlur:u,"aria-invalid":e})]}),e?m.jsxs(m.Fragment,{children:[i?m.jsx("span",{className:"col-span-1"}):null,m.jsx("p",{"data-test":"route-handler-input-error",className:fe("mt-2 text-sm text-red-500 col-span-4",{"col-span-4":!!i,"col-span-5":!i}),children:o})]}):null]})})};let na;const jE={get(e,t,n){return typeof t=="symbol"?()=>"superProxy.toString()":na}};na=new Proxy({},jE);const PE=e=>e.includes("undefined")||e.includes("[object"),LE=e=>{try{return new URL(e),!0}catch{return!1}},RE=e=>{if(e==="")return{errorType:"Error",message:"Invalid Rewrite URL provided"};const t={url:new URL("https://www.zuplo.com"),host:"",hostname:"",origin:"",port:"",protocol:"",headers:new Headers({}),params:{},pathname:"",method:"",query:{},search:"",env:na,request:na,e:encodeURIComponent,context:na},n=(i,a={})=>new Function("vars",["const tagged = ( "+Object.keys(a).join(", ")+" ) =>","`"+i+"`","return tagged(...Object.values(vars))"].join(`
|
|
53
|
+
`))(a);let r=null;try{r=n(e,t)}catch(i){return i instanceof ReferenceError||i instanceof TypeError?{errorType:"Error",message:i.message}:{errorType:"Error",message:`${e} is not a valid pattern`}}return r?e.includes("env.")||e.includes("params.")||e.includes("{pathname")||e.includes("{method")||e.includes("query.")||e.includes("{headers")||e.includes("request")||e.includes("{context")?{errorType:"Warning",message:"Tip: Use the API Test Console to test the behavior of request properties and environment variables."}:PE(r)?{errorType:"Error",message:`Failed to parse component(s), rewrite result: ${r}`}:LE(r)?{errorType:null,message:null}:{errorType:"Error",message:`${r} is not a valid URL`}:{errorType:"Error",message:"Its null"}},OE=[{example:'"application/json"',token:'${headers.get("content-type")}'},{example:'"example.com:8080"',token:"${host}"},{example:'"example.com"',token:"${hostname}"},{example:'"GET"',token:"${method}"},{example:'"https://example.com"',token:"${origin}"},{example:'":productId"',token:"${params.productId}"},{example:'"/v1/products/:productId"',token:"${pathname}"},{example:'"8080"',token:"${port}"},{example:'"https:"',token:"${protocol}"},{example:'"cars"',token:"${query.category}"},{example:'"?category=cars"',token:"${search}"},{example:'"https://baseurl.com"',token:"${env.BASE_URL}"},{example:'"https://example.com:8080/v1/products/:productId?category=cars"',token:"${url}"},{example:'${request.user.sub} = "user284787985473"',token:"${request}"},{example:'${context.route.custom} - "my-value"',token:"${context}"}],wM=({url:e,onUrlChange:t})=>{const[n,r]=v.useState(!0),o=()=>{r(!n)},i=c=>{const d=c.currentTarget.value;t(d)},{errorType:a,message:l}=RE(e),s=a==="Error",u=m.jsx("div",{className:"relative",children:m.jsxs("div",{className:"absolute inset-x-0 bottom-0.5 flex flex-col bg-gray-200 z-20 rounded-md px-3 py-1 border-gray-300 border-2",children:[m.jsxs("div",{className:"flex justify-between h-full items-center",children:[m.jsx("p",{className:"font-bold text-md ",children:"URL Cheat Sheet"}),m.jsx("button",{title:n?"Collapse Cheat Sheet":"Expand Cheat Sheet",id:MM,onClick:o,children:n?m.jsx(bu,{className:"w-5 h-5"}):m.jsx(YD,{className:"w-5 h-5"})})]}),n?m.jsxs("div",{className:"mt-2",children:[OE.map(c=>m.jsxs("p",{className:"text-gray-600 text-xs font-mono break-words",children:[m.jsx("span",{className:"text-pink-600",children:c.token})," - ",c.example]},c.token)),a==="Warning"?m.jsx("div",{className:"hidden xl:flex mt-2 pb-1 text-xs font-mono text-pink-600",children:l}):null]}):null]})});return m.jsx(ss,{hasError:s,tooltip:u,onChange:i,value:e,errorMessage:l})},kE=({routeHandler:e,onOptionsChange:t})=>{var r;const n=o=>{t({...e.options,baseUrl:o})};return m.jsx("div",{className:"space-y-2",children:m.jsx("fieldset",{className:"space-y-2",children:m.jsx(wM,{onUrlChange:n,url:((r=e.options)==null?void 0:r.baseUrl)??""})})})},bM="x-zuplo",Fh="x-internal",xM=`${bM}-path`,pr=`${bM}-route`;var Ja=(e=>(e.modified="modified",e.new="new",e.saving="saving",e.unmodified="unmodified",e.removing="removing",e.error="error",e))(Ja||{}),kp=(e=>(e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink",e))(kp||{});const Bs=(e,t)=>Object.entries(t??{}).flatMap(([n,r])=>r?Object.entries(r).filter(([o])=>o.includes("get")||o.includes("put")||o.includes("post")||o.includes("delete")||o.includes("options")||o.includes("head")||o.includes("patch")||o.includes("trace")).map(([o,i])=>({...i,additionalOperationContext:{oasFilePath:e,method:o,path:n,pathZuploConfig:r[xM]}})):[]),Hh=e=>!Object.keys(e).some(t=>t.includes("get")||t.includes("put")||t.includes("post")||t.includes("delete")||t.includes("options")||t.includes("head")||t.includes("patch")||t.includes("trace"));class zE{constructor(t,n){le(this,"updateActiveFile");le(this,"getOpenApiDataEnforced",()=>{if(!this.openApiData)throw new Error("Invalid State - OpenApiManagerInstance.openApiData was undefined");return this.openApiData});le(this,"openApiFileModel");le(this,"openApiData");le(this,"parseError");le(this,"operationArray");le(this,"updateOpenApiData",t=>{const n={...this.openApiFileModel,content:JSON.stringify(t,null,2)};this.openApiData=t,this.operationArray=Bs(this.openApiFileModel.path,t.paths),this.updateActiveFile(n)});le(this,"updatePathItem",(t,n)=>{const r=this.getOpenApiDataEnforced();let o=r.paths;o||(o={}),o[t]=n;const i={...r,paths:o};this.updateOpenApiData(i)});le(this,"addOperation",(t,n,r)=>{const o=this.getOpenApiDataEnforced(),i=n;let a=o.paths;a||(a={});let l=a[t];if(l||(l={"x-zuplo-path":{pathMode:"open-api"}}),l[i])throw new Error(`Cannot add operation ${n}-${t}, operation already exists`);l[i]=r,a[t]=l;const s={...o,paths:a};this.updateOpenApiData(s)});le(this,"deleteOperation",(t,n)=>{const r=this.getOpenApiDataEnforced(),o=r.paths;if(!o)throw new Error("Cannot delete operation when paths is undefined");const i=o[t];if(!i)throw new Error("Cannot delete operation when pathItem is undefined");delete i[n],Hh(i)?delete o[t]:o[t]=i;const a={...r,paths:o};this.updateOpenApiData(a)});le(this,"updateOperation",t=>{var d,p,f;const n=this.getOpenApiDataEnforced(),{path:r,newPath:o,newOperationObject:i}=t,a=t.method,l=t.newMethod,s=n.paths;if(!s)throw new Error("Cannot update operation when paths is undefined");const u=s[r];if(!u)throw new Error("Cannot update operation when pathItem is undefined");if(o&&l&&((d=s[o])!=null&&d[l]))throw new Error(`Operation with path: '${o}' and method: '${l.toUpperCase()}' already exists`);if(o&&!l&&((p=s[o])!=null&&p[a]))throw new Error(`Cannot change path to '${o}', operation already exists`);if(l&&u[l])throw new Error(`Cannot change method to '${l.toUpperCase()}', operation already exists`);if(o){delete u[a];const g=(f=s[r])==null?void 0:f["x-zuplo-path"];Hh(u)?delete s[r]:s[r]=u;const I=s[o]??{"x-zuplo-path":{pathMode:"open-api",...g}};I[l??a]=i,s[o]=I}else l?(delete u[a],u[l]=i,s[r]=u):(u[a]=i,s[r]=u);const c={...n,paths:s};this.updateOpenApiData(c)});var r;this.openApiFileModel=t;try{this.openApiData=JSON.parse(t.content??""),this.operationArray=Bs(t.path,(r=this.openApiData)==null?void 0:r.paths)}catch(o){this.parseError=o}this.updateActiveFile=n}}function UE(){return[]}const BE=({routeHandler:e,onOptionsChange:t})=>{var s;const n=UE(),r=n.map(u=>({label:`.${u.path}`,value:`.${u.path}`})),o=(s=e.options)==null?void 0:s.openApiFilePath,i=u=>{t({...e.options,openApiFilePath:u.value})},a=_E(o,n),{isValid:l}=a;return m.jsx("fieldset",{className:"space-y-2 w-full",children:m.jsx(Lr,{matchWidth:!0,className:fe("w-full",l?"":"border-red-500 text-red-500"),classNameOptions:"w-full",selected:o?{label:l?o:a.error,value:o}:{label:"Select a file",value:""},options:r,onChange:i})})},_E=(e,t)=>e?e.startsWith("./")?e.startsWith("./config")?e.endsWith(".oas.json")?t.some(n=>`.${n.path}`===e)?{isValid:!0}:{isValid:!1,error:`OpenAPI file '${e}' does not exist`}:{isValid:!1,error:"OpenAPI file path must point to a file ending in '.oas.json'"}:{isValid:!1,error:"OpenAPI file path must point to a file in your /config directory"}:{isValid:!1,error:"OpenAPI file path must start with './'"}:{isValid:!1,error:"OpenAPI file path is required"},$E=({routeHandler:e,onOptionsChange:t})=>{var l;const n=s=>{const u=s.currentTarget.value;t({...e.options,location:u})},r=s=>{const u=parseInt(s.value);t({...e.options,status:u})},o={label:"Other (customize in routes.json)",value:"other",disabled:!0},i=[{label:"302 - Temporary",value:"302"},{label:"301 - Permanent",value:"301"},o],a=i.find(s=>{var u,c;return s.value===((c=(u=e.options)==null?void 0:u.status)==null?void 0:c.toString())})??o;return m.jsxs("div",{className:"flex flex-col text-sm space-y-2",children:[m.jsx("input",{className:"rounded-md border-gray-300 shadow-sm font-mono text-sm",type:"text",value:(l=e.options)==null?void 0:l.location,onChange:n}),m.jsx(Lr,{selected:a,options:i,onChange:r})]})},fm="$import(@zuplo/runtime)",SM="https://welcome.zuplo.io/",Ca="https://echo.zuplo.io",Wh="rewritePattern",NM=2,Gh=({routeHandler:e,onOptionsChange:t})=>{var o;const n=((o=e.options)==null?void 0:o[Wh])??SM,r=i=>{t({...e.options,[Wh]:i})};return m.jsx("fieldset",{className:"space-y-2",children:m.jsx(wM,{onUrlChange:r,url:n})})},Zh=["us-east-2","us-east-1","us-west-1","us-west-2","af-south-1","ap-east-1","ap-southeast-3","ap-south-1","ap-northeast-3","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ca-central-1","cn-north-1","cn-northwest-1","eu-central-1","eu-west-2","eu-south-1","eu-west-3","eu-north-1","me-south-1"],FE=e=>{var n;if(e.length<1)return"The name of a function cannot be empty";if(e.length>140)return"The length of the name must be shorter (maximum 140 characters)";const t=/(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?/;return!e.match(t)||e!==((n=e.match(t))==null?void 0:n[0])?"Invalid AWS lambda function name":null},HE=e=>e.length<1?"The secret key of the handler cannot be empty":null,WE=e=>e.length<1?"The access key of the handler cannot be empty":null,GE=({routeHandler:e,onOptionsChange:t})=>{var I,w,y,h,M,b,N;const[n,r]=v.useState(null),[o,i]=v.useState(null),[a,l]=v.useState(null),s=v.useRef(!0),u={},c="$env(AWS_SECURE_ACCESS_KEY)",d="$env(AWS_ACCESS_KEY_ID)",p=(x,D)=>{t({...e.options,[x]:D}),f({...e.options,[x]:D})};v.useEffect(()=>{(!e.options||Object.keys(e.options).length===0)&&t({accessKeyId:d,functionName:"",region:Zh[0],secretAccessKey:c}),s.current&&(s.current=!1),e.options&&Object.keys(e.options).length!==0&&f(e.options)},[u]);const f=x=>{r(FE(x.functionName)),i(HE(x.secretAccessKey)),l(WE(x.accessKeyId))},g=m.jsx("div",{className:"relative",children:m.jsxs("div",{className:"absolute inset-x-0 top-10 flex flex-col bg-gray-200 z-20 rounded-md px-3 pt-1 pb-2 border-gray-300 border-2",children:[m.jsx("p",{className:"font-bold text-black text-md mb-2",children:"Use environment variables"}),m.jsx("span",{className:"text-sm text-gray-400 mb-2",children:"You can reference your environment variables in these configuration options, e.g."}),m.jsxs("span",{className:"text-sm text-zuplo-pink-hover flex flex-col space-y-1",children:[m.jsx("code",{children:c}),m.jsx("code",{children:d})]})]})});return m.jsxs("div",{className:"space-y-2",children:[m.jsx(ss,{label:"Function Name",hasError:!!n,errorMessage:n,onChange:x=>{p("functionName",x.target.value)},value:((I=e.options)==null?void 0:I.functionName)??""}),m.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[m.jsx("span",{className:"col-span-1 text-right text-sm",children:"AWS Region"}),m.jsx(Lr,{options:Zh.map(x=>({label:x,value:x})),onChange:x=>{p("region",x.value)},selected:{label:(w=e.options)==null?void 0:w.region,value:(y=e.options)==null?void 0:y.region},className:"col-span-4 w-full",classNameOptions:"w-full",testId:"filter-analytics",selectorElement:m.jsx("div",{className:"border-l-2 pl-1",children:m.jsx(dE,{className:"h-5 w-5 text-black","aria-hidden":"true"})})})]}),m.jsx(ss,{label:"Access Key ID",hasError:!!a,onChange:x=>{p("accessKeyId",x.target.value)},value:((h=e.options)==null?void 0:h.accessKeyId)===""?d:(M=e.options)==null?void 0:M.accessKeyId,tooltip:g,errorMessage:a}),m.jsx(ss,{label:"Secure Access Key",hasError:!!o,onChange:x=>{p("secretAccessKey",x.target.value)},tooltip:g,value:((b=e.options)==null?void 0:b.secretAccessKey)===""?c:(N=e.options)==null?void 0:N.secretAccessKey,errorMessage:o})]})},ZE={export:"urlRewriteHandler",module:fm,options:{rewritePattern:SM}},VE={export:"awsLambdaHandler",module:fm},YE={export:"redirectHandler",module:fm,options:{location:"https://zuplo.com",status:302}},QE={export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:Ca}},JE={export:"openApiSpecHandler",module:"$import(@zuplo/runtime)",options:{openApiFilePath:"./config/routes.oas.json"}},Vh={export:"default",module:"$import(./modules/hello-world)"},XE=()=>({urlForward:{component:kE,displayName:"URL Forward",handlerID:"urlForward",routeHandler:{...QE},documentationUrl:"https://zuplo.com/docs/handlers/url-forward"},urlRewrite:{component:Gh,displayName:"URL Rewrite",handlerID:"urlRewrite",routeHandler:{...ZE},documentationUrl:"https://zuplo.com/docs/handlers/url-rewrite"},function:{component:Gh,displayName:"Function",handlerID:"function",documentationUrl:"https://zuplo.com/docs/handlers/custom-handler"},awsLambda:{component:GE,displayName:"AWS Lambda",handlerID:"awsLambda",routeHandler:{...VE},documentationUrl:"https://zuplo.com/docs/handlers/aws-lambda"},redirect:{component:$E,displayName:"Redirect",handlerID:"redirect",routeHandler:{...YE},documentationUrl:"https://zuplo.com/docs/handlers/redirect"},openApi:{component:BE,displayName:"OpenAPI Spec",handlerID:"openApi",routeHandler:{...JE,options:{openApiFilePath:`.${new URL(window.location.href).searchParams.get("path")}`}},documentationUrl:"https://zuplo.com/docs/handlers/openapi",isOpenApiExclusive:!0}}),qE=(e,t)=>{const n=Object.values(t).find(r=>{var o;return((o=r.routeHandler)==null?void 0:o.module)===e.module&&r.routeHandler.export===e.export});return n||t.function},KE=({routeHandler:e,onRequestHandlerChange:t,isOpenApi:n})=>{const r=XE(),o=qE(e,r),[i,a]=v.useState({[o.handlerID]:e}),l=Object.values(r).filter(c=>c.isOpenApiExclusive?n:!0).map(c=>({label:c.displayName,value:c.handlerID})),s=c=>{var w,y,h;a({...i,[o.handlerID]:e});const d=r[c.value],p=i[d.handlerID],f=(p==null?void 0:p.export)??((w=d.routeHandler)==null?void 0:w.export)??Vh.export,g=(p==null?void 0:p.module)??((y=d.routeHandler)==null?void 0:y.module)??Vh.module,I=(p==null?void 0:p.options)??((h=d.routeHandler)==null?void 0:h.options)??{};t({export:f,module:g,options:I})},u=c=>{t({...e,options:c})};return m.jsxs("div",{className:"w-full bg-request-handler-gray flex flex-col px-4 py-3 -mt-1 rounded",children:[m.jsx("p",{className:"text-gray-500 text-md",children:"Request Handler"}),m.jsxs("div",{className:"flex flex-row mt-2",children:[m.jsx("label",{htmlFor:"handler",className:"col-span-1 block text-sm font-medium text-gray-700 text-right mr-3 pt-2",children:"Handler"}),m.jsxs("div",{className:"flex flex-row w-full self-center",children:[m.jsxs("div",{className:"flex flex-col col-span-4 rounded-md mr-3",children:[m.jsx(Lr,{matchWidth:!1,className:"w-xl text-sm",options:l,testId:"request-handler-picker",selected:{label:o.displayName,value:o.handlerID},onChange:s}),m.jsxs("a",{href:o.documentationUrl,className:"text-sm text-blue-500 hover:underline mt-2 ml-1",target:"_blank",rel:"noreferrer",children:[o.displayName," docs"]})]}),m.jsx("div",{className:" w-full",children:m.jsx(o.component,{routeHandler:e,onOptionsChange:u,onRequestHandlerChange:t})})]})]})]})};function e1(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var t1=e1,ge=t1;function n1(e){return!!e&&typeof e.then=="function"}var je=n1;function r1(e,t){if(e!=null)return e;throw ge(t??"Got unexpected null or undefined")}var ke=r1;function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ru{getValue(){throw ge("BaseLoadable")}toPromise(){throw ge("BaseLoadable")}valueMaybe(){throw ge("BaseLoadable")}valueOrThrow(){throw ge(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ge("BaseLoadable")}promiseOrThrow(){throw ge(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ge("BaseLoadable")}errorOrThrow(){throw ge(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ge("BaseLoadable")}}class o1 extends Ru{constructor(t){super(),pe(this,"state","hasValue"),pe(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 je(n)?lo(n):Ko(n)?n:Xa(n)}catch(n){return je(n)?lo(n.next(()=>this.map(t))):Ou(n)}}}class i1 extends Ru{constructor(t){super(),pe(this,"state","hasError"),pe(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 DM extends Ru{constructor(t){super(),pe(this,"state","loading"),pe(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 lo(this.contents.then(n=>{const r=t(n);if(Ko(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(je(n))return n.then(()=>this.map(t).contents);throw n}))}}function Xa(e){return Object.freeze(new o1(e))}function Ou(e){return Object.freeze(new i1(e))}function lo(e){return Object.freeze(new DM(e))}function AM(){return Object.freeze(new DM(new Promise(()=>{})))}function a1(e){return e.every(t=>t.state==="hasValue")?Xa(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?Ou(ke(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):lo(Promise.all(e.map(t=>t.contents)))}function CM(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>Ko(o)?o:je(o)?lo(o):Xa(o)),r=a1(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((i,a,l)=>({...i,[a]:o[l]}),{}))}function Ko(e){return e instanceof Ru}const l1={of:e=>je(e)?lo(e):Ko(e)?e:Xa(e),error:e=>Ou(e),loading:()=>AM(),all:CM,isLoadable:Ko};var fo={loadableWithValue:Xa,loadableWithError:Ou,loadableWithPromise:lo,loadableLoading:AM,loadableAll:CM,isLoadable:Ko,RecoilLoadable:l1},s1=fo.loadableWithValue,u1=fo.loadableWithError,c1=fo.loadableWithPromise,d1=fo.loadableLoading,p1=fo.loadableAll,f1=fo.isLoadable,m1=fo.RecoilLoadable,qa=Object.freeze({__proto__:null,loadableWithValue:s1,loadableWithError:u1,loadableWithPromise:c1,loadableLoading:d1,loadableAll:p1,isLoadable:f1,RecoilLoadable:m1});const zp={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 g1(e,t){var n,r;const o=(n=process.env[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 ge(`({}).${e} value must be 'true', 'false', or empty: ${o}`);t(o==="true")}function h1(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function v1(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(g1("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{zp.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),h1("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{zp.RECOIL_GKS_ENABLED.add(n)})}))}v1();var pi=zp;function ku(e){return pi.RECOIL_GKS_ENABLED.has(e)}ku.setPass=e=>{pi.RECOIL_GKS_ENABLED.add(e)};ku.setFail=e=>{pi.RECOIL_GKS_ENABLED.delete(e)};ku.clear=()=>{pi.RECOIL_GKS_ENABLED.clear()};var De=ku;function y1(e,t,{error:n}={}){return null}var I1=y1,mm=I1,ld,sd,ud;const M1=(ld=O.createMutableSource)!==null&&ld!==void 0?ld:O.unstable_createMutableSource,TM=(sd=O.useMutableSource)!==null&&sd!==void 0?sd:O.unstable_useMutableSource,EM=(ud=O.useSyncExternalStore)!==null&&ud!==void 0?ud:O.unstable_useSyncExternalStore;function w1(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=O.__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 b1(){return De("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:De("recoil_sync_external_store")&&EM!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:De("recoil_mutable_source")&&TM!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?De("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:De("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function x1(){return!1}var Ka={createMutableSource:M1,useMutableSource:TM,useSyncExternalStore:EM,currentRendererSupportsUseSyncExternalStore:w1,reactMode:b1,isFastRefreshEnabled:x1};class gm{constructor(t){pe(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class jM extends gm{}class PM extends gm{}function S1(e){return e instanceof jM||e instanceof PM}var zu={AbstractRecoilValue:gm,RecoilState:jM,RecoilValueReadOnly:PM,isRecoilValue:S1},N1=zu.AbstractRecoilValue,D1=zu.RecoilState,A1=zu.RecoilValueReadOnly,C1=zu.isRecoilValue,ei=Object.freeze({__proto__:null,AbstractRecoilValue:N1,RecoilState:D1,RecoilValueReadOnly:A1,isRecoilValue:C1});function T1(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var Uu=T1;class LM{}const E1=new LM,so=new Map,hm=new Map;function j1(e){return Uu(e,t=>ke(hm.get(t)))}function P1(e){if(so.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in
|
|
54
54
|
production. But it is safe to ignore this warning if it occurred because of
|
|
55
|
-
hot module replacement.`;console.warn(t)}}function M_(e){eo.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&I_(e.key),ur.set(e.key,e);const t=e.set==null?new Hr.RecoilValueReadOnly(e.key):new Hr.RecoilState(e.key);return id.set(e.key,t),t}class Fv extends Error{}function j_(e){const t=ur.get(e);if(t==null)throw new Fv(`Missing definition for RecoilValue: "${e}""`);return t}function D_(e){return ur.get(e)}const Fi=new Map;function F_(e){var t;if(!ye("recoil_memory_managament_2020"))return;const n=ur.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;ur.delete(e),(r=Uv(e))===null||r===void 0||r(),Fi.delete(e)}}function U_(e,t){ye("recoil_memory_managament_2020")&&(t===void 0?Fi.delete(e):Fi.set(e,t))}function Uv(e){return Fi.get(e)}var ht={nodes:ur,recoilValues:id,registerNode:M_,getNode:j_,getNodeMaybe:D_,deleteNodeConfigIfPossible:F_,setConfigDeletionHandler:U_,getConfigDeletionHandler:Uv,recoilValuesForKeys:$_,NodeMissingError:Fv,DefaultValue:Dv,DEFAULT_VALUE:O_};function V_(e,t){t()}var z_={enqueueExecution:V_};function B_(e,t){return t={exports:{}},e(t,t.exports),t.exports}var W_=B_(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},n={},r=5,o=Math.pow(2,r),l=o-1,i=o/2,a=o/4,s={},u=function(E){return function(){return E}},c=n.hash=function(T){var E=typeof T>"u"?"undefined":t(T);if(E==="number")return T;E!=="string"&&(T+="");for(var $=0,U=0,V=T.length;U<V;++U){var Y=T.charCodeAt(U);$=($<<5)-$+Y|0}return $},d=function(E){return E-=E>>1&1431655765,E=(E&858993459)+(E>>2&858993459),E=E+(E>>4)&252645135,E+=E>>8,E+=E>>16,E&127},h=function(E,$){return $>>>E&l},S=function(E){return 1<<E},y=function(E,$){return d(E&$-1)},w=function(E,$,U,V){var Y=V;if(!E){var ne=V.length;Y=new Array(ne);for(var J=0;J<ne;++J)Y[J]=V[J]}return Y[$]=U,Y},x=function(E,$,U){var V=U.length-1,Y=0,ne=0,J=U;if(E)Y=ne=$;else for(J=new Array(V);Y<$;)J[ne++]=U[Y++];for(++Y;Y<=V;)J[ne++]=U[Y++];return E&&(J.length=V),J},m=function(E,$,U,V){var Y=V.length;if(E){for(var ne=Y;ne>=$;)V[ne--]=V[ne];return V[$]=U,V}for(var J=0,ee=0,se=new Array(Y+1);J<$;)se[ee++]=V[J++];for(se[$]=U;J<Y;)se[++ee]=V[J++];return se},f=1,g=2,R=3,L=4,N={__hamt_isEmpty:!0},k=function(E){return E===N||E&&E.__hamt_isEmpty},A=function(E,$,U,V){return{type:f,edit:E,hash:$,key:U,value:V,_modify:b}},K=function(E,$,U){return{type:g,edit:E,hash:$,children:U,_modify:O}},B=function(E,$,U){return{type:R,edit:E,mask:$,children:U,_modify:D}},G=function(E,$,U){return{type:L,edit:E,size:$,children:U,_modify:re}},te=function(E){return E===N||E.type===f||E.type===g},W=function(E,$,U,V,Y){for(var ne=[],J=V,ee=0,se=0;J;++se)J&1&&(ne[se]=Y[ee++]),J>>>=1;return ne[$]=U,G(E,ee+1,ne)},le=function(E,$,U,V){for(var Y=new Array($-1),ne=0,J=0,ee=0,se=V.length;ee<se;++ee)if(ee!==U){var Te=V[ee];Te&&!k(Te)&&(Y[ne++]=Te,J|=1<<ee)}return B(E,J,Y)},ge=function T(E,$,U,V,Y,ne){if(U===Y)return K(E,U,[ne,V]);var J=h($,U),ee=h($,Y);return B(E,S(J)|S(ee),J===ee?[T(E,$+r,U,V,Y,ne)]:J<ee?[V,ne]:[ne,V])},z=function(E,$,U,V,Y,ne,J,ee){for(var se=Y.length,Te=0;Te<se;++Te){var it=Y[Te];if(U(J,it.key)){var Ve=it.value,Rt=ne(Ve);return Rt===Ve?Y:Rt===s?(--ee.value,x(E,Te,Y)):w(E,Te,A($,V,J,Rt),Y)}}var At=ne();return At===s?Y:(++ee.value,w(E,se,A($,V,J,At),Y))},q=function(E,$){return E===$.edit},b=function(E,$,U,V,Y,ne,J){if($(ne,this.key)){var ee=V(this.value);return ee===this.value?this:ee===s?(--J.value,N):q(E,this)?(this.value=ee,this):A(E,Y,ne,ee)}var se=V();return se===s?this:(++J.value,ge(E,U,this.hash,this,Y,A(E,Y,ne,se)))},O=function(E,$,U,V,Y,ne,J){if(Y===this.hash){var ee=q(E,this),se=z(ee,E,$,this.hash,this.children,V,ne,J);return se===this.children?this:se.length>1?K(E,this.hash,se):se[0]}var Te=V();return Te===s?this:(++J.value,ge(E,U,this.hash,this,Y,A(E,Y,ne,Te)))},D=function(E,$,U,V,Y,ne,J){var ee=this.mask,se=this.children,Te=h(U,Y),it=S(Te),Ve=y(ee,it),Rt=ee&it,At=Rt?se[Ve]:N,hr=At._modify(E,$,U+r,V,Y,ne,J);if(At===hr)return this;var Tl=q(E,this),ro=ee,oo=void 0;if(Rt&&k(hr)){if(ro&=~it,!ro)return N;if(se.length<=2&&te(se[Ve^1]))return se[Ve^1];oo=x(Tl,Ve,se)}else if(!Rt&&!k(hr)){if(se.length>=i)return W(E,Te,hr,ee,se);ro|=it,oo=m(Tl,Ve,hr,se)}else oo=w(Tl,Ve,hr,se);return Tl?(this.mask=ro,this.children=oo,this):B(E,ro,oo)},re=function(E,$,U,V,Y,ne,J){var ee=this.size,se=this.children,Te=h(U,Y),it=se[Te],Ve=(it||N)._modify(E,$,U+r,V,Y,ne,J);if(it===Ve)return this;var Rt=q(E,this),At=void 0;if(k(it)&&!k(Ve))++ee,At=w(Rt,Te,Ve,se);else if(!k(it)&&k(Ve)){if(--ee,ee<=a)return le(E,ee,Te,se);At=w(Rt,Te,N,se)}else At=w(Rt,Te,Ve,se);return Rt?(this.size=ee,this.children=At,this):G(E,ee,At)};N._modify=function(T,E,$,U,V,Y,ne){var J=U();return J===s?N:(++ne.value,A(T,V,Y,J))};function _(T,E,$,U,V){this._editable=T,this._edit=E,this._config=$,this._root=U,this._size=V}_.prototype.setTree=function(T,E){return this._editable?(this._root=T,this._size=E,this):T===this._root?this:new _(this._editable,this._edit,this._config,T,E)};var P=n.tryGetHash=function(T,E,$,U){for(var V=U._root,Y=0,ne=U._config.keyEq;;)switch(V.type){case f:return ne($,V.key)?V.value:T;case g:{if(E===V.hash)for(var J=V.children,ee=0,se=J.length;ee<se;++ee){var Te=J[ee];if(ne($,Te.key))return Te.value}return T}case R:{var it=h(Y,E),Ve=S(it);if(V.mask&Ve){V=V.children[y(V.mask,Ve)],Y+=r;break}return T}case L:{if(V=V.children[h(Y,E)],V){Y+=r;break}return T}default:return T}};_.prototype.tryGetHash=function(T,E,$){return P(T,E,$,this)};var C=n.tryGet=function(T,E,$){return P(T,$._config.hash(E),E,$)};_.prototype.tryGet=function(T,E){return C(T,E,this)};var j=n.getHash=function(T,E,$){return P(void 0,T,E,$)};_.prototype.getHash=function(T,E){return j(T,E,this)},n.get=function(T,E){return P(void 0,E._config.hash(T),T,E)},_.prototype.get=function(T,E){return C(E,T,this)};var M=n.has=function(T,E,$){return P(s,T,E,$)!==s};_.prototype.hasHash=function(T,E){return M(T,E,this)};var X=n.has=function(T,E){return M(E._config.hash(T),T,E)};_.prototype.has=function(T){return X(T,this)};var oe=function(E,$){return E===$};n.make=function(T){return new _(0,0,{keyEq:T&&T.keyEq||oe,hash:T&&T.hash||c},N,0)},n.empty=n.make();var H=n.isEmpty=function(T){return T&&!!k(T._root)};_.prototype.isEmpty=function(){return H(this)};var ce=n.modifyHash=function(T,E,$,U){var V={value:U._size},Y=U._root._modify(U._editable?U._edit:NaN,U._config.keyEq,0,T,E,$,V);return U.setTree(Y,V.value)};_.prototype.modifyHash=function(T,E,$){return ce($,T,E,this)};var he=n.modify=function(T,E,$){return ce(T,$._config.hash(E),E,$)};_.prototype.modify=function(T,E){return he(E,T,this)};var de=n.setHash=function(T,E,$,U){return ce(u($),T,E,U)};_.prototype.setHash=function(T,E,$){return de(T,E,$,this)};var Re=n.set=function(T,E,$){return de($._config.hash(T),T,E,$)};_.prototype.set=function(T,E){return Re(T,E,this)};var _t=u(s),en=n.removeHash=function(T,E,$){return ce(_t,T,E,$)};_.prototype.removeHash=_.prototype.deleteHash=function(T,E){return en(T,E,this)};var et=n.remove=function(T,E){return en(E._config.hash(T),T,E)};_.prototype.remove=_.prototype.delete=function(T){return et(T,this)};var Qe=n.beginMutation=function(T){return new _(T._editable+1,T._edit+1,T._config,T._root,T._size)};_.prototype.beginMutation=function(){return Qe(this)};var Rl=n.endMutation=function(T){return T._editable=T._editable&&T._editable-1,T};_.prototype.endMutation=function(){return Rl(this)};var ig=n.mutate=function(T,E){var $=Qe(E);return T($),Rl($)};_.prototype.mutate=function(T){return ig(T,this)};var ja=function(E){return E&&Cd(E[0],E[1],E[2],E[3],E[4])},Cd=function(E,$,U,V,Y){for(;U<E;){var ne=$[U++];if(ne&&!k(ne))return kd(ne,V,[E,$,U,V,Y])}return ja(Y)},kd=function(E,$,U){switch(E.type){case f:return{value:$(E),rest:U};case g:case L:case R:var V=E.children;return Cd(V.length,V,0,$,U);default:return ja(U)}},ag={done:!0};function Da(T){this.v=T}Da.prototype.next=function(){if(!this.v)return ag;var T=this.v;return this.v=ja(T.rest),T},Da.prototype[Symbol.iterator]=function(){return this};var Fa=function(E,$){return new Da(kd(E._root,$))},sg=function(E){return[E.key,E.value]},ug=n.entries=function(T){return Fa(T,sg)};_.prototype.entries=_.prototype[Symbol.iterator]=function(){return ug(this)};var cg=function(E){return E.key},dg=n.keys=function(T){return Fa(T,cg)};_.prototype.keys=function(){return dg(this)};var fg=function(E){return E.value},pg=n.values=_.prototype.values=function(T){return Fa(T,fg)};_.prototype.values=function(){return pg(this)};var Ld=n.fold=function(T,E,$){var U=$._root;if(U.type===f)return T(E,U.value,U.key);for(var V=[U.children],Y=void 0;Y=V.pop();)for(var ne=0,J=Y.length;ne<J;){var ee=Y[ne++];ee&&ee.type&&(ee.type===f?E=T(E,ee.value,ee.key):V.push(ee.children))}return E};_.prototype.fold=function(T,E){return Ld(T,E,this)};var hg=n.forEach=function(T,E){return Ld(function($,U,V){return T(U,V,E)},null,E)};_.prototype.forEach=function(T){return hg(T,this)};var mg=n.count=function(T){return T._size};_.prototype.count=function(){return mg(this)},Object.defineProperty(_.prototype,"size",{get:_.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n});class H_{constructor(t){ie(this,"_map",void 0),this._map=new Map(t==null?void 0:t.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(t){return this._map.get(t)}has(t){return this._map.has(t)}set(t,n){return this._map.set(t,n),this}delete(t){return this._map.delete(t),this}clone(){return sd(this)}toMap(){return new Map(this._map)}}class ad{constructor(t){if(ie(this,"_hamt",W_.empty.beginMutation()),t instanceof ad){const n=t._hamt.endMutation();t._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(t)for(const[n,r]of t.entries())this._hamt.set(n,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(t){return this._hamt.get(t)}has(t){return this._hamt.has(t)}set(t,n){return this._hamt.set(t,n),this}delete(t){return this._hamt.delete(t),this}clone(){return sd(this)}toMap(){return new Map(this._hamt)}}function sd(e){return ye("recoil_hamt_2020")?new ad(e):new H_(e)}var K_={persistentMap:sd},G_=K_.persistentMap,Q_=Object.freeze({__proto__:null,persistentMap:G_});function Y_(e,...t){const n=new Set;e:for(const r of e){for(const o of t)if(o.has(r))continue e;n.add(r)}return n}var Do=Y_;function Z_(e,t){const n=new Map;return e.forEach((r,o)=>{n.set(o,t(r,o))}),n}var Ui=Z_;function q_(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function X_(e){return{nodeDeps:Ui(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Ui(e.nodeToNodeSubscriptions,t=>new Set(t))}}function _s(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 a=i==null?t:Do(t,i);for(const s of a)l.has(s)||l.set(s,new Set),Ce(l.get(s)).add(e);if(i){const s=Do(i,t);for(const u of s){if(!l.has(u))return;const c=Ce(l.get(u));c.delete(e),c.size===0&&l.delete(u)}}}function J_(e,t,n,r){var o,l,i,a;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 u=n.getGraph(r);if(_s(e,t,u),r===((i=s.previousTree)===null||i===void 0?void 0:i.version)){const d=n.getGraph(s.currentTree.version);_s(e,t,d,u)}if(r===((a=s.previousTree)===null||a===void 0?void 0:a.version)||r===s.currentTree.version){var c;const d=(c=s.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const h=n.getGraph(d);_s(e,t,h,u)}}}var wl={cloneGraph:X_,graph:q_,saveDepsToStore:J_};let eR=0;const tR=()=>eR++;let nR=0;const rR=()=>nR++;let oR=0;const lR=()=>oR++;var xa={getNextTreeStateVersion:tR,getNextStoreID:rR,getNextComponentID:lR};const{persistentMap:ip}=Q_,{graph:iR}=wl,{getNextTreeStateVersion:Vv}=xa;function zv(){const e=Vv();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:ip(),nonvalidatedAtoms:ip()}}function aR(){const e=zv();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,iR()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var Bv={makeEmptyTreeState:zv,makeEmptyStoreState:aR,getNextTreeStateVersion:Vv};class Wv{}function sR(){return new Wv}var Ea={RetentionZone:Wv,retentionZone:sR};function uR(e,t){const n=new Set(e);return n.add(t),n}function cR(e,t){const n=new Set(e);return n.delete(t),n}function dR(e,t,n){const r=new Map(e);return r.set(t,n),r}function fR(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function pR(e,t){const n=new Map(e);return n.delete(t),n}function hR(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var Hv={setByAddingToSet:uR,setByDeletingFromSet:cR,mapBySettingInMap:dR,mapByUpdatingInMap:fR,mapByDeletingFromMap:pR,mapByDeletingMultipleFromMap:hR};function*mR(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var ud=mR;function vR(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 Kv=vR;const{getNode:xl,getNodeMaybe:gR,recoilValuesForKeys:ap}=ht,{RetentionZone:sp}=Ea,{setByAddingToSet:yR}=Hv,SR=Object.freeze(new Set);class wR extends Error{}function xR(e,t,n){if(!ye("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 sp)o(n);else if(Array.isArray(n))for(const l of n)o(l);return()=>{if(!ye("recoil_memory_managament_2020"))return;const{retention:l}=e.getState();function i(a){const s=l.nodesRetainedByZone.get(a);s==null||s.delete(t),s&&s.size===0&&l.nodesRetainedByZone.delete(a)}if(n instanceof sp)i(n);else if(Array.isArray(n))for(const a of n)i(a)}}function cd(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const l=xl(n),i=xR(e,n,l.retainedBy),a=l.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{a(),i()})}function ER(e,t,n){cd(e,e.getState().currentTree,t,n)}function _R(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function RR(e,t,n){return cd(e,t,n,"get"),xl(n).get(e,t)}function Gv(e,t,n){return xl(n).peek(e,t)}function TR(e,t,n){var r;const o=gR(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:yR(e.dirtyAtoms,t)}}function NR(e,t,n,r){const o=xl(n);if(o.set==null)throw new wR(`Attempt to set read-only RecoilValue: ${n}`);const l=o.set;return cd(e,t,n,"set"),l(e,t,r)}function CR(e,t,n){const r=e.getState(),o=e.getGraph(t.version),l=xl(n).nodeType;return Kv({type:l},{loadable:()=>Gv(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 ap((i=o.nodeDeps.get(n))!==null&&i!==void 0?i:[])},subscribers:()=>{var i,a;return{nodes:ap(ud(Qv(e,t,new Set([n])),s=>s!==n)),components:wa((i=(a=r.nodeToComponentSubscriptions.get(n))===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],([s])=>({name:s}))}}})}function Qv(e,t,n){const r=new Set,o=Array.from(n),l=e.getGraph(t.version);for(let a=o.pop();a;a=o.pop()){var i;r.add(a);const s=(i=l.nodeToNodeSubscriptions.get(a))!==null&&i!==void 0?i:SR;for(const u of s)r.has(u)||o.push(u)}return r}var zn={getNodeLoadable:RR,peekNodeLoadable:Gv,setNodeValue:NR,initializeNode:ER,cleanUpNode:_R,setUnvalidatedAtomValue_DEPRECATED:TR,peekNodeInfo:CR,getDownstreamNodes:Qv};let Yv=null;function kR(e){Yv=e}function LR(){var e;(e=Yv)===null||e===void 0||e()}var Zv={setInvalidateMemoizedSnapshot:kR,invalidateMemoizedSnapshot:LR};const{getDownstreamNodes:bR,getNodeLoadable:qv,setNodeValue:PR}=zn,{getNextComponentID:AR}=xa,{getNode:OR,getNodeMaybe:Xv}=ht,{DefaultValue:dd}=ht,{reactMode:$R}=Sl,{AbstractRecoilValue:IR,RecoilState:MR,RecoilValueReadOnly:jR,isRecoilValue:DR}=Hr,{invalidateMemoizedSnapshot:FR}=Zv;function UR(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=qv(e,n,t);return i.state==="loading"&&i.contents.catch(()=>{}),i}function VR(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof dd?n.delete(o):n.set(o,r)}),n}function zR(e,t,{key:n},r){if(typeof r=="function"){const o=qv(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 ae(l)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function BR(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:l}=n,i=zR(e,t,o,l),a=PR(e,t,o.key,i);for(const[s,u]of a.entries())Au(t,s,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:l}=n;Au(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=Xv(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 od(`Unknown action ${n.type}`)}function Au(e,t,n){n.state==="hasValue"&&n.contents instanceof dd?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function Jv(e,t){e.replaceState(n=>{const r=e0(n);for(const o of t)BR(e,r,o);return t0(e,r),FR(),r})}function _a(e,t){if(Fo.length){const n=Fo[Fo.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else Jv(e,[t])}const Fo=[];function WR(){const e=new Map;return Fo.push(e),()=>{for(const[t,n]of e)Jv(t,n);Fo.pop()}}function e0(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function t0(e,t){const n=bR(e,t,t.dirtyAtoms);for(const l of n){var r,o;(r=Xv(l))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function n0(e,t,n){_a(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function HR(e,t,n){if(n instanceof dd)return n0(e,t,n);_a(e,{type:"setLoadable",recoilValue:t,loadable:n})}function KR(e,t){_a(e,{type:"markModified",recoilValue:t})}function GR(e,t,n){_a(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function QR(e,{key:t},n,r=null){const o=AR(),l=e.getState();l.nodeToComponentSubscriptions.has(t)||l.nodeToComponentSubscriptions.set(t,new Map),Ce(l.nodeToComponentSubscriptions.get(t)).set(o,[r??"<not captured>",n]);const i=$R();if(i.early&&(i.mode==="LEGACY"||i.mode==="MUTABLE_SOURCE")){const a=e.getState().nextTree;a&&a.dirtyAtoms.has(t)&&n(a)}return{release:()=>{const a=e.getState(),s=a.nodeToComponentSubscriptions.get(t);s===void 0||!s.has(o)||(s.delete(o),s.size===0&&a.nodeToComponentSubscriptions.delete(t))}}}function YR(e,t){var n;const{currentTree:r}=e.getState(),o=OR(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var Xt={RecoilValueReadOnly:jR,AbstractRecoilValue:IR,RecoilState:MR,getRecoilValueAsLoadable:UR,setRecoilValue:n0,setRecoilValueLoadable:HR,markRecoilValueModified:KR,setUnvalidatedRecoilValue:GR,subscribeToRecoilValue:QR,isRecoilValue:DR,applyAtomValueWrites:VR,batchStart:WR,writeLoadableToTreeState:Au,invalidateDownstreams:t0,copyTreeState:e0,refreshRecoilValue:YR};function ZR(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 qR=ZR;const{cleanUpNode:XR}=zn,{deleteNodeConfigIfPossible:JR,getNode:r0}=ht,{RetentionZone:o0}=Ea,eT=12e4,l0=new Set;function i0(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 o0)for(const a of oT(n,i))o.add(a);else o.add(i);const l=tT(e,o);for(const i of l)rT(e,r,i)}function tT(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),l=new Set,i=new Set;return a(t),l;function a(s){const u=new Set,c=nT(e,r,s,l,i);for(const y of c){var d;if(r0(y).retainedBy==="recoilRoot"){i.add(y);continue}if(((d=n.retention.referenceCounts.get(y))!==null&&d!==void 0?d:0)>0){i.add(y);continue}if(a0(y).some(x=>n.retention.referenceCounts.get(x))){i.add(y);continue}const w=o.nodeToNodeSubscriptions.get(y);if(w&&qR(w,x=>i.has(x))){i.add(y);continue}l.add(y),u.add(y)}const h=new Set;for(const y of u)for(const w of(S=o.nodeDeps.get(y))!==null&&S!==void 0?S:l0){var S;l.has(w)||h.add(w)}h.size&&a(h)}}function nT(e,t,n,r,o){const l=e.getGraph(t.version),i=[],a=new Set;for(;n.size>0;)s(Ce(n.values().next().value));return i;function s(u){if(r.has(u)||o.has(u)){n.delete(u);return}if(a.has(u))return;const c=l.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)s(d);a.add(u),n.delete(u),i.push(u)}}function rT(e,t,n){if(!ye("recoil_memory_managament_2020"))return;XR(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=a0(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 u of s){var a;(a=i.nodeToNodeSubscriptions.get(u))===null||a===void 0||a.delete(n)}}i.nodeToNodeSubscriptions.delete(n)}JR(n)}function oT(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:l0}function a0(e){const t=r0(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof o0?[t]:t}function lT(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):i0(e,new Set([t]))}function iT(e,t,n){var r;if(!ye("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?s0(e,t):o.set(t,l)}function s0(e,t){if(!ye("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),lT(e,t)}function aT(e){if(!ye("recoil_memory_managament_2020"))return;const t=e.getState();i0(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function sT(e){return e===void 0?"recoilRoot":e}var pr={SUSPENSE_TIMEOUT_MS:eT,updateRetainCount:iT,updateRetainCountToZero:s0,releaseScheduledRetainablesNow:aT,retainedByOptionWithDefault:sT};const{unstable_batchedUpdates:uT}=B1;var cT={unstable_batchedUpdates:uT};const{unstable_batchedUpdates:dT}=cT;var fT={unstable_batchedUpdates:dT};const{batchStart:pT}=Xt,{unstable_batchedUpdates:hT}=fT;let fd=hT||(e=>e());const mT=e=>{fd=e},vT=()=>fd,gT=e=>{fd(()=>{let t=()=>{};try{t=pT(),e()}finally{t()}})};var Ra={getBatcher:vT,setBatcher:mT,batchUpdates:gT};function*yT(e){for(const t of e)for(const n of t)yield n}var u0=yT;const c0=typeof Window>"u"||typeof window>"u",ST=e=>!c0&&(e===window||e instanceof Window),wT=typeof navigator<"u"&&navigator.product==="ReactNative";var Ta={isSSR:c0,isReactNative:wT,isWindow:ST};function xT(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 ET(e,t){let n,r;return(...o)=>{const l=t(...o);return n===l||(n=l,r=e(...o)),r}}function _T(e,t){let n,r;return[(...i)=>{const a=t(...i);return n===a||(n=a,r=e(...i)),r},()=>{n=null}]}var RT={memoizeWithArgsHash:xT,memoizeOneWithArgsHash:ET,memoizeOneWithArgsHashAndInvalidation:_T};const{batchUpdates:Ou}=Ra,{initializeNode:TT,peekNodeInfo:NT}=zn,{graph:CT}=wl,{getNextStoreID:kT}=xa,{DEFAULT_VALUE:LT,recoilValues:up,recoilValuesForKeys:cp}=ht,{AbstractRecoilValue:bT,getRecoilValueAsLoadable:PT,setRecoilValue:dp,setUnvalidatedRecoilValue:AT}=Xt,{updateRetainCount:di}=pr,{setInvalidateMemoizedSnapshot:OT}=Zv,{getNextTreeStateVersion:$T,makeEmptyStoreState:IT}=Bv,{isSSR:MT}=Ta,{memoizeOneWithArgsHashAndInvalidation:jT}=RT;class Na{constructor(t,n){ie(this,"_store",void 0),ie(this,"_refCount",1),ie(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),PT(this._store,r))),ie(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),ie(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 cp(i.dirtyAtoms)}const o=this._store.getState().knownAtoms,l=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?up.values():r.isInitialized===!0?cp(u0([o,l])):ud(up.values(),({key:i})=>!o.has(i)&&!l.has(i))}),ie(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),NT(this._store,this._store.getState().currentTree,r))),ie(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new $u(this,Ou);return r(o),o}),ie(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new $u(this,Ou);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:kT(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return Ce(o.get(r));const l=CT();return o.set(r,l),l},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ae("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)TT(this._store,r,"get"),di(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){MT||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(),!ye("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){ye("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 d0(e,t,n=!1){const r=e.getState(),o=n?$T():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(wa(r.nodeCleanupFunctions.entries(),([l])=>[l,()=>{}]))}}function DT(e){const t=new Na(IT());return e!=null?t.map(e):t}const[fp,f0]=jT((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Ce(r.previousTree);return new Na(d0(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)});OT(f0);function FT(e,t="latest"){const n=fp(e,t);return n.isRetained()?n:(f0(),fp(e,t))}class $u extends Na{constructor(t,n){super(d0(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),ie(this,"_batch",void 0),ie(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const l=this.getStore_INTERNAL();this._batch(()=>{di(l,r.key,1),dp(this.getStore_INTERNAL(),r,o)})}),ie(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{di(o,r.key,1),dp(this.getStore_INTERNAL(),r,LT)})}),ie(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();Ou(()=>{for(const[l,i]of r.entries())di(o,l,1),AT(o,new bT(l),i)})}),this._batch=n}}var Ca={Snapshot:Na,MutableSnapshot:$u,freshSnapshot:DT,cloneSnapshot:FT},UT=Ca.Snapshot,VT=Ca.MutableSnapshot,zT=Ca.freshSnapshot,BT=Ca.cloneSnapshot,ka=Object.freeze({__proto__:null,Snapshot:UT,MutableSnapshot:VT,freshSnapshot:zT,cloneSnapshot:BT});function WT(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var HT=WT;const{useRef:KT}=F;function GT(e){const t=KT(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var pp=GT;const{getNextTreeStateVersion:QT,makeEmptyStoreState:p0}=Bv,{cleanUpNode:YT,getDownstreamNodes:ZT,initializeNode:qT,setNodeValue:XT,setUnvalidatedAtomValue_DEPRECATED:JT}=zn,{graph:eN}=wl,{cloneGraph:tN}=wl,{getNextStoreID:h0}=xa,{createMutableSource:Rs,reactMode:m0}=Sl,{applyAtomValueWrites:nN}=Xt,{releaseScheduledRetainablesNow:v0}=pr,{freshSnapshot:rN}=ka,{useCallback:oN,useContext:g0,useEffect:Iu,useMemo:lN,useRef:iN,useState:aN}=F;function vo(){throw ae("This component must be used inside a <RecoilRoot> component.")}const y0=Object.freeze({storeID:h0(),getState:vo,replaceState:vo,getGraph:vo,subscribeToTransactions:vo,addTransactionMetadata:vo});let Mu=!1;function hp(e){if(Mu)throw ae("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){ye("recoil_memory_managament_2020")&&ye("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&v0(e);const n=t.currentTree.version,r=QT();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,tN(Ce(t.graphsByVersion.get(n))))}}const S0=F.createContext({current:y0}),La=()=>g0(S0),w0=F.createContext(null);function sN(){return g0(w0)}function pd(e,t,n){const r=ZT(e,n,n.dirtyAtoms);for(const o of r){const l=t.nodeToComponentSubscriptions.get(o);if(l)for(const[i,[a,s]]of l)s(n)}}function x0(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,a]of l)a(e);for(const[o,l]of t.transactionSubscriptions)l(e);(!m0().early||t.suspendedComponentResolvers.size>0)&&(pd(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 uN(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,x0(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):od("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,ye("recoil_memory_managament_2020")&&n==null&&v0(e)}finally{t.commitDepth--}}function cN({setNotifyBatcherOfChange:e}){const t=La(),[,n]=aN([]);return e(()=>n({})),Iu(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Iu(()=>{z_.enqueueExecution("Batcher",()=>{uN(t.current)})}),null}function dN(e,t){const n=p0();return t({set:(r,o)=>{const l=n.currentTree,i=XT(e,l,r.key,o),a=new Set(i.keys()),s=l.nonvalidatedAtoms.clone();for(const u of a)s.delete(u);n.currentTree={...l,dirtyAtoms:HT(l.dirtyAtoms,a),atomValues:nN(l.atomValues,i),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:r=>{r.forEach((o,l)=>{n.currentTree=JT(n.currentTree,l,o)})}}),n}function fN(e){const t=rN(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let mp=0;function pN({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const l=S=>{const y=o.current.graphsByVersion;if(y.has(S))return Ce(y.get(S));const w=eN();return y.set(S,w),w},i=(S,y)=>{if(y==null){const{transactionSubscriptions:w}=d.current.getState(),x=mp++;return w.set(x,S),{release:()=>{w.delete(x)}}}else{const{nodeTransactionSubscriptions:w}=d.current.getState();w.has(y)||w.set(y,new Map);const x=mp++;return Ce(w.get(y)).set(x,S),{release:()=>{const m=w.get(y);m&&(m.delete(x),m.size===0&&w.delete(y))}}}},a=S=>{hp(d.current);for(const y of Object.keys(S))Ce(d.current.getState().nextTree).transactionMetadata[y]=S[y]},s=S=>{hp(d.current);const y=Ce(o.current.nextTree);let w;try{Mu=!0,w=S(y)}finally{Mu=!1}w!==y&&(o.current.nextTree=w,m0().early&&pd(d.current,o.current,w),Ce(u.current)())},u=iN(null),c=oN(S=>{u.current=S},[u]),d=pp(()=>n??{storeID:h0(),getState:()=>o.current,replaceState:s,getGraph:l,subscribeToTransactions:i,addTransactionMetadata:a});n!=null&&(d.current=n),o=pp(()=>e!=null?dN(d.current,e):t!=null?fN(t):p0());const h=lN(()=>Rs==null?void 0:Rs(o,()=>o.current.currentTree.version),[o]);return Iu(()=>{const S=d.current;for(const y of new Set(S.getState().knownAtoms))qT(S,y,"get");return()=>{for(const y of S.getState().knownAtoms)YT(S,y)}},[d]),F.createElement(S0.Provider,{value:d},F.createElement(w0.Provider,{value:h},F.createElement(cN,{setNotifyBatcherOfChange:c}),r))}function hN(e){const{override:t,...n}=e,r=La();return t===!1&&r.current!==y0?e.children:F.createElement(pN,n)}function mN(){return La().current.storeID}var hn={RecoilRoot:hN,useStoreRef:La,useRecoilMutableSource:sN,useRecoilStoreID:mN,notifyComponents_FOR_TESTING:pd,sendEndOfBatchNotifications_FOR_TESTING:x0};function vN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}var gN=vN;const{useEffect:yN,useRef:SN}=F;function wN(e){const t=SN();return yN(()=>{t.current=e}),t.current}var E0=wN;const{useStoreRef:xN}=hn,{SUSPENSE_TIMEOUT_MS:EN}=pr,{updateRetainCount:go}=pr,{RetentionZone:_N}=Ea,{useEffect:RN,useRef:TN}=F,{isSSR:vp}=Ta;function NN(e){if(ye("recoil_memory_managament_2020"))return CN(e)}function CN(e){const n=(Array.isArray(e)?e:[e]).map(i=>i instanceof _N?i:i.key),r=xN();RN(()=>{if(!ye("recoil_memory_managament_2020"))return;const i=r.current;if(o.current&&!vp)window.clearTimeout(o.current),o.current=null;else for(const a of n)go(i,a,1);return()=>{for(const a of n)go(i,a,-1)}},[r,...n]);const o=TN(),l=E0(n);if(!vp&&(l===void 0||!gN(l,n))){const i=r.current;for(const a of n)go(i,a,1);if(l)for(const a of l)go(i,a,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const a of n)go(i,a,-1)},EN)}}var hd=NN;function kN(){return"<component name not available>"}var El=kN;const{batchUpdates:LN}=Ra,{DEFAULT_VALUE:_0}=ht,{currentRendererSupportsUseSyncExternalStore:bN,reactMode:to,useMutableSource:PN,useSyncExternalStore:AN}=Sl,{useRecoilMutableSource:ON,useStoreRef:Jt}=hn,{AbstractRecoilValue:ju,getRecoilValueAsLoadable:_l,setRecoilValue:Vi,setUnvalidatedRecoilValue:$N,subscribeToRecoilValue:Kr}=Xt,{useCallback:pt,useEffect:Gr,useMemo:R0,useRef:Uo,useState:md}=F,{setByAddingToSet:IN}=Hv,{isSSR:MN}=Ta;function vd(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),MN&&Ee(e.contents)&&e.contents.finally(()=>{l.delete(o)})}):e.state==="hasError"?e.contents:ae(`Invalid value of loadable atom "${t.key}"`)}function jN(){const e=El(),t=Jt(),[,n]=md([]),r=Uo(new Set);r.current=new Set;const o=Uo(new Set),l=Uo(new Map),i=pt(s=>{const u=l.current.get(s);u&&(u.release(),l.current.delete(s))},[l]),a=pt((s,u)=>{l.current.has(u)&&n([])},[]);return Gr(()=>{const s=t.current;Do(r.current,o.current).forEach(u=>{if(l.current.has(u))return;const c=Kr(s,new ju(u),h=>a(h,u),e);l.current.set(u,c),s.getState().nextTree?s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a(s.getState(),u)}):a(s.getState(),u)}),Do(o.current,r.current).forEach(u=>{i(u)}),o.current=r.current}),Gr(()=>{const s=l.current;return Do(r.current,new Set(s.keys())).forEach(u=>{const c=Kr(t.current,new ju(u),d=>a(d,u),e);s.set(u,c)}),()=>s.forEach((u,c)=>i(c))},[e,t,i,a]),R0(()=>{function s(y){return w=>{Vi(t.current,y,w)}}function u(y){return()=>Vi(t.current,y,_0)}function c(y){var w;r.current.has(y.key)||(r.current=IN(r.current,y.key));const x=t.current.getState();return _l(t.current,y,to().early&&(w=x.nextTree)!==null&&w!==void 0?w:x.currentTree)}function d(y){const w=c(y);return vd(w,y,t)}function h(y){return[d(y),s(y)]}function S(y){return[c(y),s(y)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:h,getRecoilStateLoadable:S,getSetRecoilState:s,getResetRecoilState:u}},[r,t])}const DN={current:0};function FN(e){const t=Jt(),n=El(),r=pt(()=>{var a;const s=t.current,u=s.getState(),c=to().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return{loadable:_l(s,e,c),key:e.key}},[t,e]),o=pt(a=>{let s;return()=>{var u,c;const d=a();return(u=s)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=s)===null||c===void 0?void 0:c.key)===d.key?s:(s=d,d)}},[]),l=R0(()=>o(r),[r,o]),i=pt(a=>{const s=t.current;return Kr(s,e,a,n).release},[t,e,n]);return AN(i,l,l).loadable}function UN(e){const t=Jt(),n=pt(()=>{var u;const c=t.current,d=c.getState(),h=to().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return _l(c,e,h)},[t,e]),r=pt(()=>n(),[n]),o=El(),l=pt((u,c)=>{const d=t.current;return Kr(d,e,()=>{if(!ye("recoil_suppress_rerender_in_callback"))return c();const S=n();s.current.is(S)||c(),s.current=S},o).release},[t,e,o,n]),i=ON();if(i==null)throw ae("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const a=PN(i,r,l),s=Uo(a);return Gr(()=>{s.current=a}),a}function Du(e){const t=Jt(),n=El(),r=pt(()=>{var s;const u=t.current,c=u.getState(),d=to().early&&(s=c.nextTree)!==null&&s!==void 0?s:c.currentTree;return _l(u,e,d)},[t,e]),o=pt(()=>({loadable:r(),key:e.key}),[r,e.key]),l=pt(s=>{const u=o();return s.loadable.is(u.loadable)&&s.key===u.key?s:u},[o]);Gr(()=>{const s=Kr(t.current,e,u=>{a(l)},n);return a(l),s.release},[n,e,t,l]);const[i,a]=md(o);return i.key!==e.key?o().loadable:i.loadable}function VN(e){const t=Jt(),[,n]=md([]),r=El(),o=pt(()=>{var a;const s=t.current,u=s.getState(),c=to().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return _l(s,e,c)},[t,e]),l=o(),i=Uo(l);return Gr(()=>{i.current=l}),Gr(()=>{const a=t.current,s=a.getState(),u=Kr(a,e,d=>{var h;if(!ye("recoil_suppress_rerender_in_callback"))return n([]);const S=o();(h=i.current)!==null&&h!==void 0&&h.is(S)||n(S),i.current=S},r);if(s.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{i.current=null,n([])});else{var c;if(!ye("recoil_suppress_rerender_in_callback"))return n([]);const d=o();(c=i.current)!==null&&c!==void 0&&c.is(d)||n(d),i.current=d}return u.release},[r,o,e,t]),l}function gd(e){return ye("recoil_memory_managament_2020")&&hd(e),{TRANSITION_SUPPORT:Du,SYNC_EXTERNAL_STORE:bN()?FN:Du,MUTABLE_SOURCE:UN,LEGACY:VN}[to().mode](e)}function T0(e){const t=Jt(),n=gd(e);return vd(n,e,t)}function ba(e){const t=Jt();return pt(n=>{Vi(t.current,e,n)},[t,e])}function zN(e){const t=Jt();return pt(()=>{Vi(t.current,e,_0)},[t,e])}function BN(e){return[T0(e),ba(e)]}function WN(e){return[gd(e),ba(e)]}function HN(){const e=Jt();return(t,n={})=>{LN(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>$N(e.current,new ju(o),r))})}}function N0(e){return ye("recoil_memory_managament_2020")&&hd(e),Du(e)}function C0(e){const t=Jt(),n=N0(e);return vd(n,e,t)}function KN(e){return[C0(e),ba(e)]}var GN={recoilComponentGetRecoilValueCount_FOR_TESTING:DN,useRecoilInterface:jN,useRecoilState:BN,useRecoilStateLoadable:WN,useRecoilValue:T0,useRecoilValueLoadable:gd,useResetRecoilState:zN,useSetRecoilState:ba,useSetUnvalidatedAtomValues:HN,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:N0,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:C0,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:KN};function QN(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var YN=QN;function ZN(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var qN=ZN;function XN(...e){const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].keys();let o;for(;!(o=r.next()).done;)t.set(o.value,e[n].get(o.value))}return t}var JN=XN;const{batchUpdates:eC}=Ra,{DEFAULT_VALUE:tC,getNode:k0,nodes:nC}=ht,{useStoreRef:yd}=hn,{AbstractRecoilValue:rC,setRecoilValueLoadable:oC}=Xt,{SUSPENSE_TIMEOUT_MS:lC}=pr,{cloneSnapshot:zi}=ka,{useCallback:Pa,useEffect:L0,useRef:gp,useState:iC}=F,{isSSR:yp}=Ta;function Aa(e){const t=yd();L0(()=>t.current.subscribeToTransactions(e).release,[e,t])}function Sp(e){const t=e.atomValues.toMap(),n=Ui(YN(t,(r,o)=>{const i=k0(o).persistence_UNSTABLE;return i!=null&&i.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return JN(e.nonvalidatedAtoms.toMap(),n)}function aC(e){Aa(Pa(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=Sp(r),l=Sp(n),i=Ui(nC,s=>{var u,c,d,h;return{persistence_UNSTABLE:{type:(u=(c=s.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(d=(h=s.persistence_UNSTABLE)===null||h===void 0?void 0:h.backButton)!==null&&d!==void 0?d:!1}}}),a=qN(r.dirtyAtoms,s=>o.has(s)||l.has(s));e({atomValues:o,previousAtomValues:l,atomInfo:i,modifiedAtoms:a,transactionMetadata:{...r.transactionMetadata}})},[e]))}function sC(e){Aa(Pa(t=>{const n=zi(t,"latest"),r=zi(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function uC(){const e=yd(),[t,n]=iC(()=>zi(e.current)),r=E0(t),o=gp(),l=gp();if(Aa(Pa(a=>n(zi(a)),[])),L0(()=>{const a=t.retain();if(o.current&&!yp){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(a,10)}},[t]),r!==t&&!yp){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 a;o.current=null,(a=l.current)===null||a===void 0||a.call(l),l.current=null},lC)}return t}function b0(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;eC(()=>{const i=new Set;for(const u of[o.atomValues.keys(),l.atomValues.keys()])for(const c of u){var a,s;((a=o.atomValues.get(c))===null||a===void 0?void 0:a.contents)!==((s=l.atomValues.get(c))===null||s===void 0?void 0:s.contents)&&k0(c).shouldRestoreFromSnapshots&&i.add(c)}i.forEach(u=>{oC(e,new rC(u),l.atomValues.has(u)?Ce(l.atomValues.get(u)):tC)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function cC(){const e=yd();return Pa(t=>b0(e.current,t),[e])}var P0={useRecoilSnapshot:uC,gotoSnapshot:b0,useGotoRecoilSnapshot:cC,useRecoilTransactionObserver:sC,useTransactionObservation_DEPRECATED:aC,useTransactionSubscription_DEPRECATED:Aa};const{peekNodeInfo:dC}=zn,{useStoreRef:fC}=hn;function pC(){const e=fC();return({key:t})=>dC(e.current,e.current.getState().currentTree,t)}var hC=pC;const{reactMode:mC}=Sl,{RecoilRoot:vC,useStoreRef:gC}=hn,{useMemo:yC}=F;function SC(){mC().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=gC().current;return yC(()=>{function t({children:n}){return F.createElement(vC,{store_INTERNAL:e},n)}return t},[e])}var wC=SC;const{loadableWithValue:xC}=yl,{initializeNode:EC}=zn,{DEFAULT_VALUE:_C,getNode:RC}=ht,{copyTreeState:TC,getRecoilValueAsLoadable:NC,invalidateDownstreams:CC,writeLoadableToTreeState:kC}=Xt;function wp(e){return RC(e.key).nodeType==="atom"}class LC{constructor(t,n){ie(this,"_store",void 0),ie(this,"_treeState",void 0),ie(this,"_changes",void 0),ie(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!wp(r))throw ae("Reading selectors within atomicUpdate is not supported");const o=NC(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:ae(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),ie(this,"set",(r,o)=>{if(!wp(r))throw ae("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const l=this.get(r);this._changes.set(r.key,o(l))}else EC(this._store,r.key,"set"),this._changes.set(r.key,o)}),ie(this,"reset",r=>{this.set(r,_C)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=TC(this._treeState);for(const[n,r]of this._changes)kC(t,n,xC(r));return CC(this._store,t),t}}function bC(e){return t=>{e.replaceState(n=>{const r=new LC(e,n);return t(r),r.newTreeState_INTERNAL()})}}var PC={atomicUpdater:bC},AC=PC.atomicUpdater,A0=Object.freeze({__proto__:null,atomicUpdater:AC});function OC(e,t){if(!e)throw new Error(t)}var $C=OC,No=$C;const{atomicUpdater:IC}=A0,{batchUpdates:MC}=Ra,{DEFAULT_VALUE:jC}=ht,{useStoreRef:DC}=hn,{refreshRecoilValue:FC,setRecoilValue:xp}=Xt,{cloneSnapshot:UC}=ka,{gotoSnapshot:VC}=P0,{useCallback:zC}=F;class O0{}const BC=new O0;function $0(e,t,n,r){let o=BC,l;if(MC(()=>{const a="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw ae(a);const s=Kv({...r??{},set:(c,d)=>xp(e,c,d),reset:c=>xp(e,c,jC),refresh:c=>FC(e,c),gotoSnapshot:c=>VC(e,c),transact_UNSTABLE:c=>IC(e)(c)},{snapshot:()=>{const c=UC(e);return l=c.retain(),c}}),u=t(s);if(typeof u!="function")throw ae(a);o=u(...n)}),o instanceof O0&&No(!1),Ee(o))o=o.finally(()=>{var a;(a=l)===null||a===void 0||a()});else{var i;(i=l)===null||i===void 0||i()}return o}function WC(e,t){const n=DC();return zC((...r)=>$0(n.current,e,r),t!=null?[...t,n]:void 0)}var I0={recoilCallback:$0,useRecoilCallback:WC};const{useStoreRef:HC}=hn,{refreshRecoilValue:KC}=Xt,{useCallback:GC}=F;function QC(e){const t=HC();return GC(()=>{const n=t.current;KC(n,e)},[e,t])}var YC=QC;const{atomicUpdater:ZC}=A0,{useStoreRef:qC}=hn,{useMemo:XC}=F;function JC(e,t){const n=qC();return XC(()=>(...r)=>{ZC(n.current)(l=>{e(l)(...r)})},t!=null?[...t,n]:void 0)}var ek=JC;class tk{constructor(t){ie(this,"value",void 0),this.value=t}}var nk={WrappedValue:tk},rk=nk.WrappedValue,M0=Object.freeze({__proto__:null,WrappedValue:rk});const{isFastRefreshEnabled:ok}=Sl;class Ep extends Error{}class lk{constructor(t){var n,r,o;ie(this,"_name",void 0),ie(this,"_numLeafs",void 0),ie(this,"_root",void 0),ie(this,"_onHit",void 0),ie(this,"_onSet",void 0),ie(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,a,s;let u,c;for(const[x,m]of t){var d,h,S;const f=this._root;if((f==null?void 0:f.type)==="leaf")throw this.invalidCacheError();const g=u;if(u=g?g.branches.get(c):f,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:x,parent:g,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==x)throw this.invalidCacheError();g==null||g.branches.set(c,u),r==null||(h=r.onNodeVisit)===null||h===void 0||h.call(r,u),c=this._mapNodeValue(m),this._root=(S=this._root)!==null&&S!==void 0?S:u}const y=u?(l=u)===null||l===void 0?void 0:l.branches.get(c):this._root;if(y!=null&&(y.type!=="leaf"||y.branchKey!==c))throw this.invalidCacheError();const w={type:"leaf",value:n,parent:u,branchKey:c};(i=u)===null||i===void 0||i.branches.set(c,w),this._root=(a=this._root)!==null&&a!==void 0?a:w,this._numLeafs++,this._onSet(w),r==null||(s=r.onNodeVisit)===null||s===void 0||s.call(r,w)};try{o()}catch(l){if(l instanceof Ep)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=ok()?"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 od(t+(this._name!=null?` - ${this._name}`:"")),new Ep}}var ik={TreeCache:lk},ak=ik.TreeCache,j0=Object.freeze({__proto__:null,TreeCache:ak});class sk{constructor(t){var n;ie(this,"_maxSize",void 0),ie(this,"_size",void 0),ie(this,"_head",void 0),ie(this,"_tail",void 0),ie(this,"_map",void 0),ie(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=Ce(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 uk={LRUCache:sk},ck=uk.LRUCache,D0=Object.freeze({__proto__:null,LRUCache:ck});const{LRUCache:dk}=D0,{TreeCache:fk}=j0;function pk({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new dk({maxSize:t}),o=new fk({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 _p=pk;function $t(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 ae("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(Ee(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,l)=>$t(o,t,l.toString()))}]`;if(typeof e.toJSON=="function")return $t(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[l,i]of e)o[typeof l=="string"?l:$t(l,t)]=i;return $t(o,t,n)}return e instanceof Set?$t(Array.from(e).sort((o,l)=>$t(o,t).localeCompare($t(l,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?$t(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${$t(o,t)}:${$t(e[o],t,o)}`).join(",")}}`}function hk(e,t={allowFunctions:!1}){return $t(e,t)}var Oa=hk;const{TreeCache:mk}=j0,Kl={equality:"reference",eviction:"keep-all",maxSize:1/0};function vk({equality:e=Kl.equality,eviction:t=Kl.eviction,maxSize:n=Kl.maxSize}=Kl,r){const o=gk(e);return yk(t,n,o,r)}function gk(e){switch(e){case"reference":return t=>t;case"value":return t=>Oa(t)}throw ae(`Unrecognized equality policy ${e}`)}function yk(e,t,n,r){switch(e){case"keep-all":return new mk({name:r,mapNodeValue:n});case"lru":return _p({name:r,maxSize:Ce(t),mapNodeValue:n});case"most-recent":return _p({name:r,maxSize:1,mapNodeValue:n})}throw ae(`Unrecognized eviction policy ${e}`)}var Sk=vk;function wk(e){return()=>null}var xk={startPerfBlock:wk};const{isLoadable:Ek,loadableWithError:Gl,loadableWithPromise:_k,loadableWithValue:Ts}=yl,{WrappedValue:F0}=M0,{getNodeLoadable:Ql,peekNodeLoadable:Rk,setNodeValue:Tk}=zn,{saveDepsToStore:Nk}=wl,{DEFAULT_VALUE:Ck,getConfigDeletionHandler:kk,getNode:Lk,registerNode:Rp}=ht,{isRecoilValue:bk}=Hr,{markRecoilValueModified:Tp}=Xt,{retainedByOptionWithDefault:Pk}=pr,{recoilCallback:Ak}=I0,{startPerfBlock:Ok}=xk;class U0{}const yo=new U0,So=[],Yl=new Map,$k=(()=>{let e=0;return()=>e++})();function V0(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,l=e.set!=null?e.set:void 0,i=new Set,a=Sk(o??{equality:"reference",eviction:"keep-all"},n),s=Pk(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!ye("recoil_memory_managament_2020")||c>0}function h(_){return _.getState().knownSelectors.add(n),c++,()=>{c--}}function S(){return kk(n)!==void 0&&!d()}function y(_,P,C,j,M){z(P,j,M),w(_,C)}function w(_,P){le(_,P)&&W(_),m(P,!0)}function x(_,P){le(_,P)&&(Ce(B(_)).stateVersions.clear(),m(P,!1))}function m(_,P){const C=Yl.get(_);if(C!=null){for(const j of C)Tp(j,Ce(t));P&&Yl.delete(_)}}function f(_,P){let C=Yl.get(P);C==null&&Yl.set(P,C=new Set),C.add(_)}function g(_,P,C,j,M,X){return P.then(oe=>{if(!d())throw W(_),yo;const H=Ts(oe);return y(_,C,M,H,j),oe}).catch(oe=>{if(!d())throw W(_),yo;if(Ee(oe))return R(_,oe,C,j,M,X);const H=Gl(oe);throw y(_,C,M,H,j),oe})}function R(_,P,C,j,M,X){return P.then(oe=>{if(!d())throw W(_),yo;X.loadingDepKey!=null&&X.loadingDepPromise===P?C.atomValues.set(X.loadingDepKey,Ts(oe)):_.getState().knownSelectors.forEach(de=>{C.atomValues.delete(de)});const H=k(_,C);if(H&&H.state!=="loading"){if((le(_,M)||B(_)==null)&&w(_,M),H.state==="hasValue")return H.contents;throw H.contents}if(!le(_,M)){const de=K(_,C);if(de!=null)return de.loadingLoadable.contents}const[ce,he]=N(_,C,M);if(ce.state!=="loading"&&y(_,C,M,ce,he),ce.state==="hasError")throw ce.contents;return ce.contents}).catch(oe=>{if(oe instanceof U0)throw yo;if(!d())throw W(_),yo;const H=Gl(oe);throw y(_,C,M,H,j),oe})}function L(_,P,C,j){var M,X,oe,H;if(le(_,j)||P.version===((M=_.getState())===null||M===void 0||(X=M.currentTree)===null||X===void 0?void 0:X.version)||P.version===((oe=_.getState())===null||oe===void 0||(H=oe.nextTree)===null||H===void 0?void 0:H.version)){var ce,he,de;Nk(n,C,_,(ce=(he=_.getState())===null||he===void 0||(de=he.nextTree)===null||de===void 0?void 0:de.version)!==null&&ce!==void 0?ce:_.getState().currentTree.version)}for(const Re of C)i.add(Re)}function N(_,P,C){const j=Ok(n);let M=!0,X=!0;const oe=()=>{j(),X=!1};let H,ce=!1,he;const de={loadingDepKey:null,loadingDepPromise:null},Re=new Map;function _t({key:et}){const Qe=Ql(_,P,et);switch(Re.set(et,Qe),M||(L(_,P,new Set(Re.keys()),C),x(_,C)),Qe.state){case"hasValue":return Qe.contents;case"hasError":throw Qe.contents;case"loading":throw de.loadingDepKey=et,de.loadingDepPromise=Qe.contents,Qe.contents}throw ae("Invalid Loadable state")}const en=et=>(...Qe)=>{if(X)throw ae("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&&No(!1),Ak(_,et,Qe,{node:t})};try{H=r({get:_t,getCallback:en}),H=bk(H)?_t(H):H,Ek(H)&&(H.state==="hasError"&&(ce=!0),H=H.contents),Ee(H)?H=g(_,H,P,Re,C,de).finally(oe):oe(),H=H instanceof F0?H.value:H}catch(et){H=et,Ee(H)?H=R(_,H,P,Re,C,de).finally(oe):(ce=!0,oe())}return ce?he=Gl(H):Ee(H)?he=_k(H):he=Ts(H),M=!1,te(_,C,Re),L(_,P,new Set(Re.keys()),C),[he,Re]}function k(_,P){let C=P.atomValues.get(n);if(C!=null)return C;const j=new Set;try{C=a.get(X=>(typeof X!="string"&&No(!1),Ql(_,P,X).contents),{onNodeVisit:X=>{X.type==="branch"&&X.nodeKey!==n&&j.add(X.nodeKey)}})}catch(X){throw ae(`Problem with cache lookup for selector "${n}": ${X.message}`)}if(C){var M;P.atomValues.set(n,C),L(_,P,j,(M=B(_))===null||M===void 0?void 0:M.executionID)}return C}function A(_,P){const C=k(_,P);if(C!=null)return W(_),C;const j=K(_,P);if(j!=null){var M;return((M=j.loadingLoadable)===null||M===void 0?void 0:M.state)==="loading"&&f(_,j.executionID),j.loadingLoadable}const X=$k(),[oe,H]=N(_,P,X);return oe.state==="loading"?(G(_,X,oe,H,P),f(_,X)):(W(_),z(P,oe,H)),oe}function K(_,P){const C=u0([u.has(_)?[Ce(u.get(_))]:[],wa(ud(u,([M])=>M!==_),([,M])=>M)]);function j(M){for(const[X,oe]of M)if(!Ql(_,P,X).is(oe))return!0;return!1}for(const M of C){if(M.stateVersions.get(P.version)||!j(M.depValuesDiscoveredSoFarDuringAsyncWork))return M.stateVersions.set(P.version,!0),M;M.stateVersions.set(P.version,!1)}}function B(_){return u.get(_)}function G(_,P,C,j,M){u.set(_,{depValuesDiscoveredSoFarDuringAsyncWork:j,executionID:P,loadingLoadable:C,stateVersions:new Map([[M.version,!0]])})}function te(_,P,C){if(le(_,P)){const j=B(_);j!=null&&(j.depValuesDiscoveredSoFarDuringAsyncWork=C)}}function W(_){u.delete(_)}function le(_,P){var C;return P===((C=B(_))===null||C===void 0?void 0:C.executionID)}function ge(_){return Array.from(_.entries()).map(([P,C])=>[P,C.contents])}function z(_,P,C){_.atomValues.set(n,P);try{a.set(ge(C),P)}catch(j){throw ae(`Problem with setting cache for selector "${n}": ${j.message}`)}}function q(_){if(So.includes(n)){const P=`Recoil selector has circular dependencies: ${So.slice(So.indexOf(n)).join(" → ")}`;return Gl(ae(P))}So.push(n);try{return _()}finally{So.pop()}}function b(_,P){const C=P.atomValues.get(n);return C??a.get(j=>{var M;return typeof j!="string"&&No(!1),(M=Rk(_,P,j))===null||M===void 0?void 0:M.contents})}function O(_,P){return q(()=>A(_,P))}function D(_){_.atomValues.delete(n)}function re(_,P){t==null&&No(!1);for(const j of i){var C;const M=Lk(j);(C=M.clearCache)===null||C===void 0||C.call(M,_,P)}i.clear(),D(P),a.clear(),Tp(_,t)}return l!=null?t=Rp({key:n,nodeType:"selector",peek:b,get:O,set:(P,C,j)=>{let M=!1;const X=new Map;function oe({key:de}){if(M)throw ae("Recoil: Async selector sets are not currently supported.");const Re=Ql(P,C,de);if(Re.state==="hasValue")return Re.contents;if(Re.state==="loading"){const _t=`Getting value of asynchronous atom or selector "${de}" in a pending state while setting selector "${n}" is not yet supported.`;throw ae(_t)}else throw Re.contents}function H(de,Re){if(M)throw ae("Recoil: Async selector sets are not currently supported.");const _t=typeof Re=="function"?Re(oe(de)):Re;Tk(P,C,de.key,_t).forEach((et,Qe)=>X.set(Qe,et))}function ce(de){H(de,Ck)}const he=l({set:H,get:oe,reset:ce},j);if(he!==void 0)throw Ee(he)?ae("Recoil: Async selector sets are not currently supported."):ae("Recoil: selector set should be a void function.");return M=!0,X},init:h,invalidate:D,clearCache:re,shouldDeleteConfigOnRelease:S,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s}):t=Rp({key:n,nodeType:"selector",peek:b,get:O,init:h,invalidate:D,clearCache:re,shouldDeleteConfigOnRelease:S,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}V0.value=e=>new F0(e);var Qr=V0;const{isLoadable:Ik,loadableWithError:Ns,loadableWithPromise:Cs,loadableWithValue:vr}=yl,{WrappedValue:z0}=M0,{peekNodeInfo:Mk}=zn,{DEFAULT_VALUE:Kn,DefaultValue:Sn,getConfigDeletionHandler:B0,registerNode:jk,setConfigDeletionHandler:Dk}=ht,{isRecoilValue:Fk}=Hr,{getRecoilValueAsLoadable:Uk,markRecoilValueModified:Vk,setRecoilValue:Np,setRecoilValueLoadable:zk}=Xt,{retainedByOptionWithDefault:Bk}=pr,wo=e=>e instanceof z0?e.value:e;function Wk(e){const{key:t,persistence_UNSTABLE:n}=e,r=Bk(e.retainedBy_UNSTABLE);let o=0;function l(f){return Cs(f.then(g=>(i=vr(g),g)).catch(g=>{throw i=Ns(g),g}))}let i=Ee(e.default)?l(e.default):Ik(e.default)?e.default.state==="loading"?l(e.default.contents):e.default:vr(wo(e.default));i.contents;let a;const s=new Map;function u(f){return f}function c(f,g){const R=g.then(L=>{var N,k;return((k=((N=f.getState().nextTree)!==null&&N!==void 0?N:f.getState().currentTree).atomValues.get(t))===null||k===void 0?void 0:k.contents)===R&&Np(f,m,L),L}).catch(L=>{var N,k;throw((k=((N=f.getState().nextTree)!==null&&N!==void 0?N:f.getState().currentTree).atomValues.get(t))===null||k===void 0?void 0:k.contents)===R&&zk(f,m,Ns(L)),L});return R}function d(f,g,R){var L;o++;const N=()=>{var W;o--,(W=s.get(f))===null||W===void 0||W.forEach(le=>le()),s.delete(f)};if(f.getState().knownAtoms.add(t),i.state==="loading"){const W=()=>{var le;((le=f.getState().nextTree)!==null&&le!==void 0?le:f.getState().currentTree).atomValues.has(t)||Vk(f,m)};i.contents.finally(W)}const k=(L=e.effects)!==null&&L!==void 0?L:e.effects_UNSTABLE;if(k!=null){let q=function(P){if(le&&P.key===t){const C=W;return C instanceof Sn?h(f,g):Ee(C)?Cs(C.then(j=>j instanceof Sn?i.toPromise():j)):vr(C)}return Uk(f,P)},b=function(P){return q(P).toPromise()},O=function(P){var C;const j=Mk(f,(C=f.getState().nextTree)!==null&&C!==void 0?C:f.getState().currentTree,P.key);return le&&P.key===t&&!(W instanceof Sn)?{...j,isSet:!0,loadable:q(P)}:j};var B=q,G=b,te=O;let W=Kn,le=!0,ge=!1,z=null;const D=P=>C=>{if(le){const j=q(m),M=j.state==="hasValue"?j.contents:Kn;W=typeof C=="function"?C(M):C,Ee(W)&&(W=W.then(X=>(z={effect:P,value:X},X)))}else{if(Ee(C))throw ae("Setting atoms to async values is not implemented.");typeof C!="function"&&(z={effect:P,value:wo(C)}),Np(f,m,typeof C=="function"?j=>{const M=wo(C(j));return z={effect:P,value:M},M}:wo(C))}},re=P=>()=>D(P)(Kn),_=P=>C=>{var j;const{release:M}=f.subscribeToTransactions(X=>{var oe;let{currentTree:H,previousTree:ce}=X.getState();ce||(ce=H);const he=(oe=H.atomValues.get(t))!==null&&oe!==void 0?oe:i;if(he.state==="hasValue"){var de,Re,_t,en;const et=he.contents,Qe=(de=ce.atomValues.get(t))!==null&&de!==void 0?de:i,Rl=Qe.state==="hasValue"?Qe.contents:Kn;((Re=z)===null||Re===void 0?void 0:Re.effect)!==P||((_t=z)===null||_t===void 0?void 0:_t.value)!==et?C(et,Rl,!H.atomValues.has(t)):((en=z)===null||en===void 0?void 0:en.effect)===P&&(z=null)}},t);s.set(f,[...(j=s.get(f))!==null&&j!==void 0?j:[],M])};for(const P of k)try{const C=P({node:m,storeID:f.storeID,parentStoreID_UNSTABLE:f.parentStoreID,trigger:R,setSelf:D(P),resetSelf:re(P),onSet:_(P),getPromise:b,getLoadable:q,getInfo_UNSTABLE:O});if(C!=null){var A;s.set(f,[...(A=s.get(f))!==null&&A!==void 0?A:[],C])}}catch(C){W=C,ge=!0}if(le=!1,!(W instanceof Sn)){var K;const P=ge?Ns(W):Ee(W)?Cs(c(f,W)):vr(wo(W));P.contents,g.atomValues.set(t,P),(K=f.getState().nextTree)===null||K===void 0||K.atomValues.set(t,P)}}return N}function h(f,g){var R,L;return(R=(L=g.atomValues.get(t))!==null&&L!==void 0?L:a)!==null&&R!==void 0?R:i}function S(f,g){if(g.atomValues.has(t))return Ce(g.atomValues.get(t));if(g.nonvalidatedAtoms.has(t)){if(a!=null)return a;if(n==null)return i;const R=g.nonvalidatedAtoms.get(t),L=n.validator(R,Kn);return a=L instanceof Sn?i:vr(L),a}else return i}function y(){a=void 0}function w(f,g,R){if(g.atomValues.has(t)){const L=Ce(g.atomValues.get(t));if(L.state==="hasValue"&&R===L.contents)return new Map}else if(!g.nonvalidatedAtoms.has(t)&&R instanceof Sn)return new Map;return a=void 0,new Map().set(t,vr(R))}function x(){return B0(t)!==void 0&&o<=0}const m=jk({key:t,nodeType:"atom",peek:h,get:S,set:w,init:d,invalidate:y,shouldDeleteConfigOnRelease:x,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 m}function Sd(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return Fk(n)?Hk({...t,default:n}):Wk({...t,default:n})}function Hk(e){const t=Sd({...e,default:Kn,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Sn?r:Ce(e.persistence_UNSTABLE).validator(r,Kn)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Qr({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof Sn?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return Dk(n.key,B0(e.key)),n}Sd.value=e=>new z0(e);var W0=Sd;class Kk{constructor(t){var n;ie(this,"_map",void 0),ie(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 Gk={MapCache:Kk},Qk=Gk.MapCache,Yk=Object.freeze({__proto__:null,MapCache:Qk});const{LRUCache:Cp}=D0,{MapCache:Zk}=Yk,Zl={equality:"reference",eviction:"none",maxSize:1/0};function qk({equality:e=Zl.equality,eviction:t=Zl.eviction,maxSize:n=Zl.maxSize}=Zl){const r=Xk(e);return Jk(t,n,r)}function Xk(e){switch(e){case"reference":return t=>t;case"value":return t=>Oa(t)}throw ae(`Unrecognized equality policy ${e}`)}function Jk(e,t,n){switch(e){case"keep-all":return new Zk({mapKey:n});case"lru":return new Cp({mapKey:n,maxSize:Ce(t)});case"most-recent":return new Cp({mapKey:n,maxSize:1})}throw ae(`Unrecognized eviction policy ${e}`)}var H0=qk;const{setConfigDeletionHandler:e2}=ht;function t2(e){var t,n;const r=H0({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 a=r.get(o);if(a!=null)return a;const{cachePolicyForParams_UNSTABLE:s,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=W0({...u,key:`${e.key}__${(l=Oa(o))!==null&&l!==void 0?l:"void"}`,default:typeof c=="function"?c(o):c,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,d),e2(d.key,()=>{r.delete(o)}),d}}var n2=t2;const{setConfigDeletionHandler:r2}=ht;let o2=0;function l2(e){var t,n;const r=H0({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(h){throw ae(`Problem with cache lookup for selector ${e.key}: ${h.message}`)}if(i!=null)return i;const a=`${e.key}__selectorFamily/${(l=Oa(o,{allowFunctions:!0}))!==null&&l!==void 0?l:"void"}/${o2++}`,s=h=>e.get(o)(h),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const h=e.set;d=Qr({key:a,get:s,set:(y,w)=>h(o)(y,w),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=Qr({key:a,get:s,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(o,d),r2(d.key,()=>{r.delete(o)}),d}}var Bn=l2;const i2=Bn({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function a2(e){return i2(e)}var s2=a2;const u2=Bn({key:"__error",get:e=>()=>{throw ae(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function c2(e){return u2(e)}var d2=c2;function f2(e){return e}var p2=f2;const{loadableWithError:K0,loadableWithPromise:G0,loadableWithValue:Q0}=yl;function $a(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 h2(e){return e!=null&&!Ee(e)}function Ia(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Fu(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function Ir(e,t,n){const r=n.map((o,l)=>o==null?Q0(t[l]):Ee(o)?G0(o):K0(o));return Fu(e,r)}function m2(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const v2=Bn({key:"__waitForNone",get:e=>({get:t})=>{const n=Ia(e),[r,o]=$a(t,n);return Ir(e,r,o)},dangerouslyAllowMutability:!0}),g2=Bn({key:"__waitForAny",get:e=>({get:t})=>{const n=Ia(e),[r,o]=$a(t,n);return o.some(l=>!Ee(l))?Ir(e,r,o):new Promise(l=>{for(const[i,a]of o.entries())Ee(a)&&a.then(s=>{r[i]=s,o[i]=void 0,l(Ir(e,r,o))}).catch(s=>{o[i]=s,l(Ir(e,r,o))})})},dangerouslyAllowMutability:!0}),y2=Bn({key:"__waitForAll",get:e=>({get:t})=>{const n=Ia(e),[r,o]=$a(t,n);if(o.every(i=>i==null))return Fu(e,r);const l=o.find(h2);if(l!=null)throw l;return Promise.all(o).then(i=>Fu(e,m2(r,i)))},dangerouslyAllowMutability:!0}),S2=Bn({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Ia(e),[r,o]=$a(t,n);return o.every(l=>!Ee(l))?Ir(e,r,o):Promise.all(o.map((l,i)=>Ee(l)?l.then(a=>{r[i]=a,o[i]=void 0}).catch(a=>{r[i]=void 0,o[i]=a}):null)).then(()=>Ir(e,r,o))},dangerouslyAllowMutability:!0}),w2=Bn({key:"__noWait",get:e=>({get:t})=>{try{return Qr.value(Q0(t(e)))}catch(n){return Qr.value(Ee(n)?G0(n):K0(n))}},dangerouslyAllowMutability:!0});var x2={waitForNone:v2,waitForAny:g2,waitForAll:y2,waitForAllSettled:S2,noWait:w2};const{RecoilLoadable:E2}=yl,{DefaultValue:_2}=ht,{RecoilRoot:R2,useRecoilStoreID:T2}=hn,{isRecoilValue:N2}=Hr,{retentionZone:C2}=Ea,{freshSnapshot:k2}=ka,{useRecoilState:L2,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:b2,useRecoilStateLoadable:P2,useRecoilValue:A2,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:O2,useRecoilValueLoadable:$2,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:I2,useResetRecoilState:M2,useSetRecoilState:j2}=GN,{useGotoRecoilSnapshot:D2,useRecoilSnapshot:F2,useRecoilTransactionObserver:U2}=P0,{useRecoilCallback:V2}=I0,{noWait:z2,waitForAll:B2,waitForAllSettled:W2,waitForAny:H2,waitForNone:K2}=x2;var no={DefaultValue:_2,isRecoilValue:N2,RecoilLoadable:E2,RecoilEnv:eo,RecoilRoot:R2,useRecoilStoreID:T2,useRecoilBridgeAcrossReactRoots_UNSTABLE:wC,atom:W0,selector:Qr,atomFamily:n2,selectorFamily:Bn,constSelector:s2,errorSelector:d2,readOnlySelector:p2,noWait:z2,waitForNone:K2,waitForAny:H2,waitForAll:B2,waitForAllSettled:W2,useRecoilValue:A2,useRecoilValueLoadable:$2,useRecoilState:L2,useRecoilStateLoadable:P2,useSetRecoilState:j2,useResetRecoilState:M2,useGetRecoilValueInfo_UNSTABLE:hC,useRecoilRefresher_UNSTABLE:YC,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:I2,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:O2,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:b2,useRecoilCallback:V2,useRecoilTransaction_UNSTABLE:ek,useGotoRecoilSnapshot:D2,useRecoilSnapshot:F2,useRecoilTransactionObserver_UNSTABLE:U2,snapshot_UNSTABLE:k2,useRetain:hd,retentionZone:C2},G2=no.RecoilRoot,Q2=no.atom,Y2=no.atomFamily,Z2=no.useRecoilValue,q2=no.useSetRecoilState,X2=no.useRecoilCallback;const Y0=Y2({default:void 0,key:"projectFilesState"}),J2=Q2({default:[],key:"projectTreeNodesState"});function Z0(){const e=X2(({set:t})=>n=>{t(Y0(n.path),n)},[]);return t=>{e(t)}}function eL(){const e=Z0(),t=q2(J2);return n=>{n.saveState===vl.new&&t(r=>[...r,n]),e(n)}}function q0(){const e=eL();return(t,n=vl.modified)=>{e({...t,saveState:n})}}function X0(e){return Z2(Y0(e??""))}const tL=e=>{const t=q0(),n=X0(e);return r=>{n&&t(n,r)}};/**
|
|
55
|
+
hot module replacement.`;console.warn(t)}}function L1(e){pi.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&P1(e.key),so.set(e.key,e);const t=e.set==null?new ei.RecoilValueReadOnly(e.key):new ei.RecoilState(e.key);return hm.set(e.key,t),t}class RM extends Error{}function R1(e){const t=so.get(e);if(t==null)throw new RM(`Missing definition for RecoilValue: "${e}""`);return t}function O1(e){return so.get(e)}const _s=new Map;function k1(e){var t;if(!De("recoil_memory_managament_2020"))return;const n=so.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;so.delete(e),(r=OM(e))===null||r===void 0||r(),_s.delete(e)}}function z1(e,t){De("recoil_memory_managament_2020")&&(t===void 0?_s.delete(e):_s.set(e,t))}function OM(e){return _s.get(e)}var Ut={nodes:so,recoilValues:hm,registerNode:L1,getNode:R1,getNodeMaybe:O1,deleteNodeConfigIfPossible:k1,setConfigDeletionHandler:z1,getConfigDeletionHandler:OM,recoilValuesForKeys:j1,NodeMissingError:RM,DefaultValue:LM,DEFAULT_VALUE:E1};function U1(e,t){t()}var B1={enqueueExecution:U1};function _1(e,t){return t={exports:{}},e(t,t.exports),t.exports}var $1=_1(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},n={},r=5,o=Math.pow(2,r),i=o-1,a=o/2,l=o/4,s={},u=function(A){return function(){return A}},c=n.hash=function(E){var A=typeof E>"u"?"undefined":t(E);if(A==="number")return E;A!=="string"&&(E+="");for(var $=0,J=0,X=E.length;J<X;++J){var te=E.charCodeAt(J);$=($<<5)-$+te|0}return $},d=function(A){return A-=A>>1&1431655765,A=(A&858993459)+(A>>2&858993459),A=A+(A>>4)&252645135,A+=A>>8,A+=A>>16,A&127},p=function(A,$){return $>>>A&i},f=function(A){return 1<<A},g=function(A,$){return d(A&$-1)},I=function(A,$,J,X){var te=X;if(!A){var de=X.length;te=new Array(de);for(var ue=0;ue<de;++ue)te[ue]=X[ue]}return te[$]=J,te},w=function(A,$,J){var X=J.length-1,te=0,de=0,ue=J;if(A)te=de=$;else for(ue=new Array(X);te<$;)ue[de++]=J[te++];for(++te;te<=X;)ue[de++]=J[te++];return A&&(ue.length=X),ue},y=function(A,$,J,X){var te=X.length;if(A){for(var de=te;de>=$;)X[de--]=X[de];return X[$]=J,X}for(var ue=0,ce=0,he=new Array(te+1);ue<$;)he[ce++]=X[ue++];for(he[$]=J;ue<te;)he[++ce]=X[ue++];return he},h=1,M=2,b=3,N=4,x={__hamt_isEmpty:!0},D=function(A){return A===x||A&&A.__hamt_isEmpty},j=function(A,$,J,X){return{type:h,edit:A,hash:$,key:J,value:X,_modify:P}},L=function(A,$,J){return{type:M,edit:A,hash:$,children:J,_modify:z}},R=function(A,$,J){return{type:b,edit:A,mask:$,children:J,_modify:_}},U=function(A,$,J){return{type:N,edit:A,size:$,children:J,_modify:G}},ee=function(A){return A===x||A.type===h||A.type===M},W=function(A,$,J,X,te){for(var de=[],ue=X,ce=0,he=0;ue;++he)ue&1&&(de[he]=te[ce++]),ue>>>=1;return de[$]=J,U(A,ce+1,de)},q=function(A,$,J,X){for(var te=new Array($-1),de=0,ue=0,ce=0,he=X.length;ce<he;++ce)if(ce!==J){var Le=X[ce];Le&&!D(Le)&&(te[de++]=Le,ue|=1<<ce)}return R(A,ue,te)},Y=function E(A,$,J,X,te,de){if(J===te)return L(A,J,[de,X]);var ue=p($,J),ce=p($,te);return R(A,f(ue)|f(ce),ue===ce?[E(A,$+r,J,X,te,de)]:ue<ce?[X,de]:[de,X])},F=function(A,$,J,X,te,de,ue,ce){for(var he=te.length,Le=0;Le<he;++Le){var Tt=te[Le];if(J(ue,Tt.key)){var tt=Tt.value,Kt=de(tt);return Kt===tt?te:Kt===s?(--ce.value,w(A,Le,te)):I(A,Le,j($,X,ue,Kt),te)}}var fn=de();return fn===s?te:(++ce.value,I(A,he,j($,X,ue,fn),te))},ne=function(A,$){return A===$.edit},P=function(A,$,J,X,te,de,ue){if($(de,this.key)){var ce=X(this.value);return ce===this.value?this:ce===s?(--ue.value,x):ne(A,this)?(this.value=ce,this):j(A,te,de,ce)}var he=X();return he===s?this:(++ue.value,Y(A,J,this.hash,this,te,j(A,te,de,he)))},z=function(A,$,J,X,te,de,ue){if(te===this.hash){var ce=ne(A,this),he=F(ce,A,$,this.hash,this.children,X,de,ue);return he===this.children?this:he.length>1?L(A,this.hash,he):he[0]}var Le=X();return Le===s?this:(++ue.value,Y(A,J,this.hash,this,te,j(A,te,de,Le)))},_=function(A,$,J,X,te,de,ue){var ce=this.mask,he=this.children,Le=p(J,te),Tt=f(Le),tt=g(ce,Tt),Kt=ce&Tt,fn=Kt?he[tt]:x,vo=fn._modify(A,$,J+r,X,te,de,ue);if(fn===vo)return this;var vl=ne(A,this),vi=ce,yi=void 0;if(Kt&&D(vo)){if(vi&=~Tt,!vi)return x;if(he.length<=2&&ee(he[tt^1]))return he[tt^1];yi=w(vl,tt,he)}else if(!Kt&&!D(vo)){if(he.length>=a)return W(A,Le,vo,ce,he);vi|=Tt,yi=y(vl,tt,vo,he)}else yi=I(vl,tt,vo,he);return vl?(this.mask=vi,this.children=yi,this):R(A,vi,yi)},G=function(A,$,J,X,te,de,ue){var ce=this.size,he=this.children,Le=p(J,te),Tt=he[Le],tt=(Tt||x)._modify(A,$,J+r,X,te,de,ue);if(Tt===tt)return this;var Kt=ne(A,this),fn=void 0;if(D(Tt)&&!D(tt))++ce,fn=I(Kt,Le,tt,he);else if(!D(Tt)&&D(tt)){if(--ce,ce<=l)return q(A,ce,Le,he);fn=I(Kt,Le,x,he)}else fn=I(Kt,Le,tt,he);return Kt?(this.size=ce,this.children=fn,this):U(A,ce,fn)};x._modify=function(E,A,$,J,X,te,de){var ue=J();return ue===s?x:(++de.value,j(E,X,te,ue))};function S(E,A,$,J,X){this._editable=E,this._edit=A,this._config=$,this._root=J,this._size=X}S.prototype.setTree=function(E,A){return this._editable?(this._root=E,this._size=A,this):E===this._root?this:new S(this._editable,this._edit,this._config,E,A)};var C=n.tryGetHash=function(E,A,$,J){for(var X=J._root,te=0,de=J._config.keyEq;;)switch(X.type){case h:return de($,X.key)?X.value:E;case M:{if(A===X.hash)for(var ue=X.children,ce=0,he=ue.length;ce<he;++ce){var Le=ue[ce];if(de($,Le.key))return Le.value}return E}case b:{var Tt=p(te,A),tt=f(Tt);if(X.mask&tt){X=X.children[g(X.mask,tt)],te+=r;break}return E}case N:{if(X=X.children[p(te,A)],X){te+=r;break}return E}default:return E}};S.prototype.tryGetHash=function(E,A,$){return C(E,A,$,this)};var T=n.tryGet=function(E,A,$){return C(E,$._config.hash(A),A,$)};S.prototype.tryGet=function(E,A){return T(E,A,this)};var k=n.getHash=function(E,A,$){return C(void 0,E,A,$)};S.prototype.getHash=function(E,A){return k(E,A,this)},n.get=function(E,A){return C(void 0,A._config.hash(E),E,A)},S.prototype.get=function(E,A){return T(A,E,this)};var B=n.has=function(E,A,$){return C(s,E,A,$)!==s};S.prototype.hasHash=function(E,A){return B(E,A,this)};var oe=n.has=function(E,A){return B(A._config.hash(E),E,A)};S.prototype.has=function(E){return oe(E,this)};var se=function(A,$){return A===$};n.make=function(E){return new S(0,0,{keyEq:E&&E.keyEq||se,hash:E&&E.hash||c},x,0)},n.empty=n.make();var Q=n.isEmpty=function(E){return E&&!!D(E._root)};S.prototype.isEmpty=function(){return Q(this)};var me=n.modifyHash=function(E,A,$,J){var X={value:J._size},te=J._root._modify(J._editable?J._edit:NaN,J._config.keyEq,0,E,A,$,X);return J.setTree(te,X.value)};S.prototype.modifyHash=function(E,A,$){return me($,E,A,this)};var Ie=n.modify=function(E,A,$){return me(E,$._config.hash(A),A,$)};S.prototype.modify=function(E,A){return Ie(A,E,this)};var ve=n.setHash=function(E,A,$,J){return me(u($),E,A,J)};S.prototype.setHash=function(E,A,$){return ve(E,A,$,this)};var Ne=n.set=function(E,A,$){return ve($._config.hash(E),E,A,$)};S.prototype.set=function(E,A){return Ne(E,A,this)};var st=u(s),qt=n.removeHash=function(E,A,$){return me(st,E,A,$)};S.prototype.removeHash=S.prototype.deleteHash=function(E,A){return qt(E,A,this)};var Xe=n.remove=function(E,A){return qt(A._config.hash(E),E,A)};S.prototype.remove=S.prototype.delete=function(E){return Xe(E,this)};var Ve=n.beginMutation=function(E){return new S(E._editable+1,E._edit+1,E._config,E._root,E._size)};S.prototype.beginMutation=function(){return Ve(this)};var ho=n.endMutation=function(E){return E._editable=E._editable&&E._editable-1,E};S.prototype.endMutation=function(){return ho(this)};var zr=n.mutate=function(E,A){var $=Ve(A);return E($),ho($)};S.prototype.mutate=function(E){return zr(E,this)};var Ur=function(A){return A&&Ig(A[0],A[1],A[2],A[3],A[4])},Ig=function(A,$,J,X,te){for(;J<A;){var de=$[J++];if(de&&!D(de))return Mg(de,X,[A,$,J,X,te])}return Ur(te)},Mg=function(A,$,J){switch(A.type){case h:return{value:$(A),rest:J};case M:case N:case b:var X=A.children;return Ig(X.length,X,0,$,J);default:return Ur(J)}},Yx={done:!0};function xc(E){this.v=E}xc.prototype.next=function(){if(!this.v)return Yx;var E=this.v;return this.v=Ur(E.rest),E},xc.prototype[Symbol.iterator]=function(){return this};var Sc=function(A,$){return new xc(Mg(A._root,$))},Qx=function(A){return[A.key,A.value]},Jx=n.entries=function(E){return Sc(E,Qx)};S.prototype.entries=S.prototype[Symbol.iterator]=function(){return Jx(this)};var Xx=function(A){return A.key},qx=n.keys=function(E){return Sc(E,Xx)};S.prototype.keys=function(){return qx(this)};var Kx=function(A){return A.value},eS=n.values=S.prototype.values=function(E){return Sc(E,Kx)};S.prototype.values=function(){return eS(this)};var wg=n.fold=function(E,A,$){var J=$._root;if(J.type===h)return E(A,J.value,J.key);for(var X=[J.children],te=void 0;te=X.pop();)for(var de=0,ue=te.length;de<ue;){var ce=te[de++];ce&&ce.type&&(ce.type===h?A=E(A,ce.value,ce.key):X.push(ce.children))}return A};S.prototype.fold=function(E,A){return wg(E,A,this)};var tS=n.forEach=function(E,A){return wg(function($,J,X){return E(J,X,A)},null,A)};S.prototype.forEach=function(E){return tS(E,this)};var nS=n.count=function(E){return E._size};S.prototype.count=function(){return nS(this)},Object.defineProperty(S.prototype,"size",{get:S.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n});class F1{constructor(t){pe(this,"_map",void 0),this._map=new Map(t==null?void 0:t.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(t){return this._map.get(t)}has(t){return this._map.has(t)}set(t,n){return this._map.set(t,n),this}delete(t){return this._map.delete(t),this}clone(){return ym(this)}toMap(){return new Map(this._map)}}class vm{constructor(t){if(pe(this,"_hamt",$1.empty.beginMutation()),t instanceof vm){const n=t._hamt.endMutation();t._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(t)for(const[n,r]of t.entries())this._hamt.set(n,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(t){return this._hamt.get(t)}has(t){return this._hamt.has(t)}set(t,n){return this._hamt.set(t,n),this}delete(t){return this._hamt.delete(t),this}clone(){return ym(this)}toMap(){return new Map(this._hamt)}}function ym(e){return De("recoil_hamt_2020")?new vm(e):new F1(e)}var H1={persistentMap:ym},W1=H1.persistentMap,G1=Object.freeze({__proto__:null,persistentMap:W1});function Z1(e,...t){const n=new Set;e:for(const r of e){for(const o of t)if(o.has(r))continue e;n.add(r)}return n}var ra=Z1;function V1(e,t){const n=new Map;return e.forEach((r,o)=>{n.set(o,t(r,o))}),n}var $s=V1;function Y1(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function Q1(e){return{nodeDeps:$s(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:$s(e.nodeToNodeSubscriptions,t=>new Set(t))}}function cd(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:i}=n,a=o.get(e);if(a&&r&&a!==r.nodeDeps.get(e))return;o.set(e,t);const l=a==null?t:ra(t,a);for(const s of l)i.has(s)||i.set(s,new Set),ke(i.get(s)).add(e);if(a){const s=ra(a,t);for(const u of s){if(!i.has(u))return;const c=ke(i.get(u));c.delete(e),c.size===0&&i.delete(u)}}}function J1(e,t,n,r){var o,i,a,l;const s=n.getState();r===s.currentTree.version||r===((o=s.nextTree)===null||o===void 0?void 0:o.version)||((i=s.previousTree)===null||i===void 0||i.version);const u=n.getGraph(r);if(cd(e,t,u),r===((a=s.previousTree)===null||a===void 0?void 0:a.version)){const d=n.getGraph(s.currentTree.version);cd(e,t,d,u)}if(r===((l=s.previousTree)===null||l===void 0?void 0:l.version)||r===s.currentTree.version){var c;const d=(c=s.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const p=n.getGraph(d);cd(e,t,p,u)}}}var el={cloneGraph:Q1,graph:Y1,saveDepsToStore:J1};let X1=0;const q1=()=>X1++;let K1=0;const ej=()=>K1++;let tj=0;const nj=()=>tj++;var Bu={getNextTreeStateVersion:q1,getNextStoreID:ej,getNextComponentID:nj};const{persistentMap:Yh}=G1,{graph:rj}=el,{getNextTreeStateVersion:kM}=Bu;function zM(){const e=kM();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Yh(),nonvalidatedAtoms:Yh()}}function oj(){const e=zM();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,rj()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var UM={makeEmptyTreeState:zM,makeEmptyStoreState:oj,getNextTreeStateVersion:kM};class BM{}function ij(){return new BM}var _u={RetentionZone:BM,retentionZone:ij};function aj(e,t){const n=new Set(e);return n.add(t),n}function lj(e,t){const n=new Set(e);return n.delete(t),n}function sj(e,t,n){const r=new Map(e);return r.set(t,n),r}function uj(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function cj(e,t){const n=new Map(e);return n.delete(t),n}function dj(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var _M={setByAddingToSet:aj,setByDeletingFromSet:lj,mapBySettingInMap:sj,mapByUpdatingInMap:uj,mapByDeletingFromMap:cj,mapByDeletingMultipleFromMap:dj};function*pj(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var Im=pj;function fj(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 $M=fj;const{getNode:tl,getNodeMaybe:mj,recoilValuesForKeys:Qh}=Ut,{RetentionZone:Jh}=_u,{setByAddingToSet:gj}=_M,hj=Object.freeze(new Set);class vj extends Error{}function yj(e,t,n){if(!De("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(i){let a=r.get(i);a||r.set(i,a=new Set),a.add(t)}if(n instanceof Jh)o(n);else if(Array.isArray(n))for(const i of n)o(i);return()=>{if(!De("recoil_memory_managament_2020"))return;const{retention:i}=e.getState();function a(l){const s=i.nodesRetainedByZone.get(l);s==null||s.delete(t),s&&s.size===0&&i.nodesRetainedByZone.delete(l)}if(n instanceof Jh)a(n);else if(Array.isArray(n))for(const l of n)a(l)}}function Mm(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const i=tl(n),a=yj(e,n,i.retainedBy),l=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{l(),a()})}function Ij(e,t,n){Mm(e,e.getState().currentTree,t,n)}function Mj(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function wj(e,t,n){return Mm(e,t,n,"get"),tl(n).get(e,t)}function FM(e,t,n){return tl(n).peek(e,t)}function bj(e,t,n){var r;const o=mj(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:gj(e.dirtyAtoms,t)}}function xj(e,t,n,r){const o=tl(n);if(o.set==null)throw new vj(`Attempt to set read-only RecoilValue: ${n}`);const i=o.set;return Mm(e,t,n,"set"),i(e,t,r)}function Sj(e,t,n){const r=e.getState(),o=e.getGraph(t.version),i=tl(n).nodeType;return $M({type:i},{loadable:()=>FM(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>i==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var a;return Qh((a=o.nodeDeps.get(n))!==null&&a!==void 0?a:[])},subscribers:()=>{var a,l;return{nodes:Qh(Im(HM(e,t,new Set([n])),s=>s!==n)),components:Uu((a=(l=r.nodeToComponentSubscriptions.get(n))===null||l===void 0?void 0:l.values())!==null&&a!==void 0?a:[],([s])=>({name:s}))}}})}function HM(e,t,n){const r=new Set,o=Array.from(n),i=e.getGraph(t.version);for(let l=o.pop();l;l=o.pop()){var a;r.add(l);const s=(a=i.nodeToNodeSubscriptions.get(l))!==null&&a!==void 0?a:hj;for(const u of s)r.has(u)||o.push(u)}return r}var Rr={getNodeLoadable:wj,peekNodeLoadable:FM,setNodeValue:xj,initializeNode:Ij,cleanUpNode:Mj,setUnvalidatedAtomValue_DEPRECATED:bj,peekNodeInfo:Sj,getDownstreamNodes:HM};let WM=null;function Nj(e){WM=e}function Dj(){var e;(e=WM)===null||e===void 0||e()}var GM={setInvalidateMemoizedSnapshot:Nj,invalidateMemoizedSnapshot:Dj};const{getDownstreamNodes:Aj,getNodeLoadable:ZM,setNodeValue:Cj}=Rr,{getNextComponentID:Tj}=Bu,{getNode:Ej,getNodeMaybe:VM}=Ut,{DefaultValue:wm}=Ut,{reactMode:jj}=Ka,{AbstractRecoilValue:Pj,RecoilState:Lj,RecoilValueReadOnly:Rj,isRecoilValue:Oj}=ei,{invalidateMemoizedSnapshot:kj}=GM;function zj(e,{key:t},n=e.getState().currentTree){var r,o;const i=e.getState();n.version===i.currentTree.version||n.version===((r=i.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=i.previousTree)===null||o===void 0||o.version);const a=ZM(e,n,t);return a.state==="loading"&&a.contents.catch(()=>{}),a}function Uj(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof wm?n.delete(o):n.set(o,r)}),n}function Bj(e,t,{key:n},r){if(typeof r=="function"){const o=ZM(e,t,n);if(o.state==="loading"){const i=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw ge(i)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function _j(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:i}=n,a=Bj(e,t,o,i),l=Cj(e,t,o.key,a);for(const[s,u]of l.entries())Up(t,s,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:i}=n;Up(t,o,i)}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:i}=n,a=VM(o);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,i),t.dirtyAtoms.add(o)}else mm(`Unknown action ${n.type}`)}function Up(e,t,n){n.state==="hasValue"&&n.contents instanceof wm?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function YM(e,t){e.replaceState(n=>{const r=QM(n);for(const o of t)_j(e,r,o);return JM(e,r),kj(),r})}function $u(e,t){if(oa.length){const n=oa[oa.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else YM(e,[t])}const oa=[];function $j(){const e=new Map;return oa.push(e),()=>{for(const[t,n]of e)YM(t,n);oa.pop()}}function QM(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function JM(e,t){const n=Aj(e,t,t.dirtyAtoms);for(const i of n){var r,o;(r=VM(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function XM(e,t,n){$u(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function Fj(e,t,n){if(n instanceof wm)return XM(e,t,n);$u(e,{type:"setLoadable",recoilValue:t,loadable:n})}function Hj(e,t){$u(e,{type:"markModified",recoilValue:t})}function Wj(e,t,n){$u(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function Gj(e,{key:t},n,r=null){const o=Tj(),i=e.getState();i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),ke(i.nodeToComponentSubscriptions.get(t)).set(o,[r??"<not captured>",n]);const a=jj();if(a.early&&(a.mode==="LEGACY"||a.mode==="MUTABLE_SOURCE")){const l=e.getState().nextTree;l&&l.dirtyAtoms.has(t)&&n(l)}return{release:()=>{const l=e.getState(),s=l.nodeToComponentSubscriptions.get(t);s===void 0||!s.has(o)||(s.delete(o),s.size===0&&l.nodeToComponentSubscriptions.delete(t))}}}function Zj(e,t){var n;const{currentTree:r}=e.getState(),o=Ej(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var kn={RecoilValueReadOnly:Rj,AbstractRecoilValue:Pj,RecoilState:Lj,getRecoilValueAsLoadable:zj,setRecoilValue:XM,setRecoilValueLoadable:Fj,markRecoilValueModified:Hj,setUnvalidatedRecoilValue:Wj,subscribeToRecoilValue:Gj,isRecoilValue:Oj,applyAtomValueWrites:Uj,batchStart:$j,writeLoadableToTreeState:Up,invalidateDownstreams:JM,copyTreeState:QM,refreshRecoilValue:Zj};function Vj(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const i=o.value;if(t.call(n,i[1],i[0],e))return!0;o=r.next()}return!1}var Yj=Vj;const{cleanUpNode:Qj}=Rr,{deleteNodeConfigIfPossible:Jj,getNode:qM}=Ut,{RetentionZone:KM}=_u,Xj=12e4,ew=new Set;function tw(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const a of t)if(a instanceof KM)for(const l of tP(n,a))o.add(l);else o.add(a);const i=qj(e,o);for(const a of i)eP(e,r,a)}function qj(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),i=new Set,a=new Set;return l(t),i;function l(s){const u=new Set,c=Kj(e,r,s,i,a);for(const g of c){var d;if(qM(g).retainedBy==="recoilRoot"){a.add(g);continue}if(((d=n.retention.referenceCounts.get(g))!==null&&d!==void 0?d:0)>0){a.add(g);continue}if(nw(g).some(w=>n.retention.referenceCounts.get(w))){a.add(g);continue}const I=o.nodeToNodeSubscriptions.get(g);if(I&&Yj(I,w=>a.has(w))){a.add(g);continue}i.add(g),u.add(g)}const p=new Set;for(const g of u)for(const I of(f=o.nodeDeps.get(g))!==null&&f!==void 0?f:ew){var f;i.has(I)||p.add(I)}p.size&&l(p)}}function Kj(e,t,n,r,o){const i=e.getGraph(t.version),a=[],l=new Set;for(;n.size>0;)s(ke(n.values().next().value));return a;function s(u){if(r.has(u)||o.has(u)){n.delete(u);return}if(l.has(u))return;const c=i.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)s(d);l.add(u),n.delete(u),a.push(u)}}function eP(e,t,n){if(!De("recoil_memory_managament_2020"))return;Qj(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=nw(n);for(const s of o){var i;(i=r.retention.nodesRetainedByZone.get(s))===null||i===void 0||i.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const a=r.graphsByVersion.get(t.version);if(a){const s=a.nodeDeps.get(n);if(s!==void 0){a.nodeDeps.delete(n);for(const u of s){var l;(l=a.nodeToNodeSubscriptions.get(u))===null||l===void 0||l.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}Jj(n)}function tP(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:ew}function nw(e){const t=qM(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof KM?[t]:t}function nP(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):tw(e,new Set([t]))}function rP(e,t,n){var r;if(!De("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,i=((r=o.get(t))!==null&&r!==void 0?r:0)+n;i===0?rw(e,t):o.set(t,i)}function rw(e,t){if(!De("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),nP(e,t)}function oP(e){if(!De("recoil_memory_managament_2020"))return;const t=e.getState();tw(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function iP(e){return e===void 0?"recoilRoot":e}var mo={SUSPENSE_TIMEOUT_MS:Xj,updateRetainCount:rP,updateRetainCountToZero:rw,releaseScheduledRetainablesNow:oP,retainedByOptionWithDefault:iP};const{unstable_batchedUpdates:aP}=$0;var lP={unstable_batchedUpdates:aP};const{unstable_batchedUpdates:sP}=lP;var uP={unstable_batchedUpdates:sP};const{batchStart:cP}=kn,{unstable_batchedUpdates:dP}=uP;let bm=dP||(e=>e());const pP=e=>{bm=e},fP=()=>bm,mP=e=>{bm(()=>{let t=()=>{};try{t=cP(),e()}finally{t()}})};var Fu={getBatcher:fP,setBatcher:pP,batchUpdates:mP};function*gP(e){for(const t of e)for(const n of t)yield n}var ow=gP;const iw=typeof Window>"u"||typeof window>"u",hP=e=>!iw&&(e===window||e instanceof Window),vP=typeof navigator<"u"&&navigator.product==="ReactNative";var Hu={isSSR:iw,isReactNative:vP,isWindow:hP};function yP(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 IP(e,t){let n,r;return(...o)=>{const i=t(...o);return n===i||(n=i,r=e(...o)),r}}function MP(e,t){let n,r;return[(...a)=>{const l=t(...a);return n===l||(n=l,r=e(...a)),r},()=>{n=null}]}var wP={memoizeWithArgsHash:yP,memoizeOneWithArgsHash:IP,memoizeOneWithArgsHashAndInvalidation:MP};const{batchUpdates:Bp}=Fu,{initializeNode:bP,peekNodeInfo:xP}=Rr,{graph:SP}=el,{getNextStoreID:NP}=Bu,{DEFAULT_VALUE:DP,recoilValues:Xh,recoilValuesForKeys:qh}=Ut,{AbstractRecoilValue:AP,getRecoilValueAsLoadable:CP,setRecoilValue:Kh,setUnvalidatedRecoilValue:TP}=kn,{updateRetainCount:us}=mo,{setInvalidateMemoizedSnapshot:EP}=GM,{getNextTreeStateVersion:jP,makeEmptyStoreState:PP}=UM,{isSSR:LP}=Hu,{memoizeOneWithArgsHashAndInvalidation:RP}=wP;class Wu{constructor(t,n){pe(this,"_store",void 0),pe(this,"_refCount",1),pe(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),CP(this._store,r))),pe(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),pe(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 a=this._store.getState().currentTree;return qh(a.dirtyAtoms)}const o=this._store.getState().knownAtoms,i=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Xh.values():r.isInitialized===!0?qh(ow([o,i])):Im(Xh.values(),({key:a})=>!o.has(a)&&!i.has(a))}),pe(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),xP(this._store,this._store.getState().currentTree,r))),pe(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new _p(this,Bp);return r(o),o}),pe(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new _p(this,Bp);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:NP(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return ke(o.get(r));const i=SP();return o.set(r,i),i},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ge("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)bP(this._store,r,"get"),us(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){LP||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(),!De("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){De("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 aw(e,t,n=!1){const r=e.getState(),o=n?jP():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(Uu(r.nodeCleanupFunctions.entries(),([i])=>[i,()=>{}]))}}function OP(e){const t=new Wu(PP());return e!=null?t.map(e):t}const[ev,lw]=RP((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:ke(r.previousTree);return new Wu(aw(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)});EP(lw);function kP(e,t="latest"){const n=ev(e,t);return n.isRetained()?n:(lw(),ev(e,t))}class _p extends Wu{constructor(t,n){super(aw(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),pe(this,"_batch",void 0),pe(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{us(i,r.key,1),Kh(this.getStore_INTERNAL(),r,o)})}),pe(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{us(o,r.key,1),Kh(this.getStore_INTERNAL(),r,DP)})}),pe(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();Bp(()=>{for(const[i,a]of r.entries())us(o,i,1),TP(o,new AP(i),a)})}),this._batch=n}}var Gu={Snapshot:Wu,MutableSnapshot:_p,freshSnapshot:OP,cloneSnapshot:kP},zP=Gu.Snapshot,UP=Gu.MutableSnapshot,BP=Gu.freshSnapshot,_P=Gu.cloneSnapshot,Zu=Object.freeze({__proto__:null,Snapshot:zP,MutableSnapshot:UP,freshSnapshot:BP,cloneSnapshot:_P});function $P(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var FP=$P;const{useRef:HP}=O;function WP(e){const t=HP(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var tv=WP;const{getNextTreeStateVersion:GP,makeEmptyStoreState:sw}=UM,{cleanUpNode:ZP,getDownstreamNodes:VP,initializeNode:YP,setNodeValue:QP,setUnvalidatedAtomValue_DEPRECATED:JP}=Rr,{graph:XP}=el,{cloneGraph:qP}=el,{getNextStoreID:uw}=Bu,{createMutableSource:dd,reactMode:cw}=Ka,{applyAtomValueWrites:KP}=kn,{releaseScheduledRetainablesNow:dw}=mo,{freshSnapshot:eL}=Zu,{useCallback:tL,useContext:pw,useEffect:$p,useMemo:nL,useRef:rL,useState:oL}=O;function Ti(){throw ge("This component must be used inside a <RecoilRoot> component.")}const fw=Object.freeze({storeID:uw(),getState:Ti,replaceState:Ti,getGraph:Ti,subscribeToTransactions:Ti,addTransactionMetadata:Ti});let Fp=!1;function nv(e){if(Fp)throw ge("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){De("recoil_memory_managament_2020")&&De("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&dw(e);const n=t.currentTree.version,r=GP();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,qP(ke(t.graphsByVersion.get(n))))}}const mw=O.createContext({current:fw}),Vu=()=>pw(mw),gw=O.createContext(null);function iL(){return pw(gw)}function xm(e,t,n){const r=VP(e,n,n.dirtyAtoms);for(const o of r){const i=t.nodeToComponentSubscriptions.get(o);if(i)for(const[a,[l,s]]of i)s(n)}}function hw(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,i]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[a,l]of i)l(e);for(const[o,i]of t.transactionSubscriptions)i(e);(!cw().early||t.suspendedComponentResolvers.size>0)&&(xm(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 aL(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,hw(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):mm("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,De("recoil_memory_managament_2020")&&n==null&&dw(e)}finally{t.commitDepth--}}function lL({setNotifyBatcherOfChange:e}){const t=Vu(),[,n]=oL([]);return e(()=>n({})),$p(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),$p(()=>{B1.enqueueExecution("Batcher",()=>{aL(t.current)})}),null}function sL(e,t){const n=sw();return t({set:(r,o)=>{const i=n.currentTree,a=QP(e,i,r.key,o),l=new Set(a.keys()),s=i.nonvalidatedAtoms.clone();for(const u of l)s.delete(u);n.currentTree={...i,dirtyAtoms:FP(i.dirtyAtoms,l),atomValues:KP(i.atomValues,a),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=JP(n.currentTree,i,o)})}}),n}function uL(e){const t=eL(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let rv=0;function cL({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const i=f=>{const g=o.current.graphsByVersion;if(g.has(f))return ke(g.get(f));const I=XP();return g.set(f,I),I},a=(f,g)=>{if(g==null){const{transactionSubscriptions:I}=d.current.getState(),w=rv++;return I.set(w,f),{release:()=>{I.delete(w)}}}else{const{nodeTransactionSubscriptions:I}=d.current.getState();I.has(g)||I.set(g,new Map);const w=rv++;return ke(I.get(g)).set(w,f),{release:()=>{const y=I.get(g);y&&(y.delete(w),y.size===0&&I.delete(g))}}}},l=f=>{nv(d.current);for(const g of Object.keys(f))ke(d.current.getState().nextTree).transactionMetadata[g]=f[g]},s=f=>{nv(d.current);const g=ke(o.current.nextTree);let I;try{Fp=!0,I=f(g)}finally{Fp=!1}I!==g&&(o.current.nextTree=I,cw().early&&xm(d.current,o.current,I),ke(u.current)())},u=rL(null),c=tL(f=>{u.current=f},[u]),d=tv(()=>n??{storeID:uw(),getState:()=>o.current,replaceState:s,getGraph:i,subscribeToTransactions:a,addTransactionMetadata:l});n!=null&&(d.current=n),o=tv(()=>e!=null?sL(d.current,e):t!=null?uL(t):sw());const p=nL(()=>dd==null?void 0:dd(o,()=>o.current.currentTree.version),[o]);return $p(()=>{const f=d.current;for(const g of new Set(f.getState().knownAtoms))YP(f,g,"get");return()=>{for(const g of f.getState().knownAtoms)ZP(f,g)}},[d]),O.createElement(mw.Provider,{value:d},O.createElement(gw.Provider,{value:p},O.createElement(lL,{setNotifyBatcherOfChange:c}),r))}function dL(e){const{override:t,...n}=e,r=Vu();return t===!1&&r.current!==fw?e.children:O.createElement(cL,n)}function pL(){return Vu().current.storeID}var qn={RecoilRoot:dL,useStoreRef:Vu,useRecoilMutableSource:iL,useRecoilStoreID:pL,notifyComponents_FOR_TESTING:xm,sendEndOfBatchNotifications_FOR_TESTING:hw};function fL(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}var mL=fL;const{useEffect:gL,useRef:hL}=O;function vL(e){const t=hL();return gL(()=>{t.current=e}),t.current}var vw=vL;const{useStoreRef:yL}=qn,{SUSPENSE_TIMEOUT_MS:IL}=mo,{updateRetainCount:Ei}=mo,{RetentionZone:ML}=_u,{useEffect:wL,useRef:bL}=O,{isSSR:ov}=Hu;function xL(e){if(De("recoil_memory_managament_2020"))return SL(e)}function SL(e){const n=(Array.isArray(e)?e:[e]).map(a=>a instanceof ML?a:a.key),r=yL();wL(()=>{if(!De("recoil_memory_managament_2020"))return;const a=r.current;if(o.current&&!ov)window.clearTimeout(o.current),o.current=null;else for(const l of n)Ei(a,l,1);return()=>{for(const l of n)Ei(a,l,-1)}},[r,...n]);const o=bL(),i=vw(n);if(!ov&&(i===void 0||!mL(i,n))){const a=r.current;for(const l of n)Ei(a,l,1);if(i)for(const l of i)Ei(a,l,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const l of n)Ei(a,l,-1)},IL)}}var Sm=xL;function NL(){return"<component name not available>"}var nl=NL;const{batchUpdates:DL}=Fu,{DEFAULT_VALUE:yw}=Ut,{currentRendererSupportsUseSyncExternalStore:AL,reactMode:fi,useMutableSource:CL,useSyncExternalStore:TL}=Ka,{useRecoilMutableSource:EL,useStoreRef:zn}=qn,{AbstractRecoilValue:Hp,getRecoilValueAsLoadable:rl,setRecoilValue:Fs,setUnvalidatedRecoilValue:jL,subscribeToRecoilValue:ti}=kn,{useCallback:zt,useEffect:ni,useMemo:Iw,useRef:ia,useState:Nm}=O,{setByAddingToSet:PL}=_M,{isSSR:LL}=Hu;function Dm(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const i=n.current.getState().suspendedComponentResolvers;i.add(o),LL&&je(e.contents)&&e.contents.finally(()=>{i.delete(o)})}):e.state==="hasError"?e.contents:ge(`Invalid value of loadable atom "${t.key}"`)}function RL(){const e=nl(),t=zn(),[,n]=Nm([]),r=ia(new Set);r.current=new Set;const o=ia(new Set),i=ia(new Map),a=zt(s=>{const u=i.current.get(s);u&&(u.release(),i.current.delete(s))},[i]),l=zt((s,u)=>{i.current.has(u)&&n([])},[]);return ni(()=>{const s=t.current;ra(r.current,o.current).forEach(u=>{if(i.current.has(u))return;const c=ti(s,new Hp(u),p=>l(p,u),e);i.current.set(u,c),s.getState().nextTree?s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{l(s.getState(),u)}):l(s.getState(),u)}),ra(o.current,r.current).forEach(u=>{a(u)}),o.current=r.current}),ni(()=>{const s=i.current;return ra(r.current,new Set(s.keys())).forEach(u=>{const c=ti(t.current,new Hp(u),d=>l(d,u),e);s.set(u,c)}),()=>s.forEach((u,c)=>a(c))},[e,t,a,l]),Iw(()=>{function s(g){return I=>{Fs(t.current,g,I)}}function u(g){return()=>Fs(t.current,g,yw)}function c(g){var I;r.current.has(g.key)||(r.current=PL(r.current,g.key));const w=t.current.getState();return rl(t.current,g,fi().early&&(I=w.nextTree)!==null&&I!==void 0?I:w.currentTree)}function d(g){const I=c(g);return Dm(I,g,t)}function p(g){return[d(g),s(g)]}function f(g){return[c(g),s(g)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:p,getRecoilStateLoadable:f,getSetRecoilState:s,getResetRecoilState:u}},[r,t])}const OL={current:0};function kL(e){const t=zn(),n=nl(),r=zt(()=>{var l;const s=t.current,u=s.getState(),c=fi().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return{loadable:rl(s,e,c),key:e.key}},[t,e]),o=zt(l=>{let s;return()=>{var u,c;const d=l();return(u=s)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=s)===null||c===void 0?void 0:c.key)===d.key?s:(s=d,d)}},[]),i=Iw(()=>o(r),[r,o]),a=zt(l=>{const s=t.current;return ti(s,e,l,n).release},[t,e,n]);return TL(a,i,i).loadable}function zL(e){const t=zn(),n=zt(()=>{var u;const c=t.current,d=c.getState(),p=fi().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return rl(c,e,p)},[t,e]),r=zt(()=>n(),[n]),o=nl(),i=zt((u,c)=>{const d=t.current;return ti(d,e,()=>{if(!De("recoil_suppress_rerender_in_callback"))return c();const f=n();s.current.is(f)||c(),s.current=f},o).release},[t,e,o,n]),a=EL();if(a==null)throw ge("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const l=CL(a,r,i),s=ia(l);return ni(()=>{s.current=l}),l}function Wp(e){const t=zn(),n=nl(),r=zt(()=>{var s;const u=t.current,c=u.getState(),d=fi().early&&(s=c.nextTree)!==null&&s!==void 0?s:c.currentTree;return rl(u,e,d)},[t,e]),o=zt(()=>({loadable:r(),key:e.key}),[r,e.key]),i=zt(s=>{const u=o();return s.loadable.is(u.loadable)&&s.key===u.key?s:u},[o]);ni(()=>{const s=ti(t.current,e,u=>{l(i)},n);return l(i),s.release},[n,e,t,i]);const[a,l]=Nm(o);return a.key!==e.key?o().loadable:a.loadable}function UL(e){const t=zn(),[,n]=Nm([]),r=nl(),o=zt(()=>{var l;const s=t.current,u=s.getState(),c=fi().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return rl(s,e,c)},[t,e]),i=o(),a=ia(i);return ni(()=>{a.current=i}),ni(()=>{const l=t.current,s=l.getState(),u=ti(l,e,d=>{var p;if(!De("recoil_suppress_rerender_in_callback"))return n([]);const f=o();(p=a.current)!==null&&p!==void 0&&p.is(f)||n(f),a.current=f},r);if(s.nextTree)l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!De("recoil_suppress_rerender_in_callback"))return n([]);const d=o();(c=a.current)!==null&&c!==void 0&&c.is(d)||n(d),a.current=d}return u.release},[r,o,e,t]),i}function Am(e){return De("recoil_memory_managament_2020")&&Sm(e),{TRANSITION_SUPPORT:Wp,SYNC_EXTERNAL_STORE:AL()?kL:Wp,MUTABLE_SOURCE:zL,LEGACY:UL}[fi().mode](e)}function Mw(e){const t=zn(),n=Am(e);return Dm(n,e,t)}function Yu(e){const t=zn();return zt(n=>{Fs(t.current,e,n)},[t,e])}function BL(e){const t=zn();return zt(()=>{Fs(t.current,e,yw)},[t,e])}function _L(e){return[Mw(e),Yu(e)]}function $L(e){return[Am(e),Yu(e)]}function FL(){const e=zn();return(t,n={})=>{DL(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>jL(e.current,new Hp(o),r))})}}function ww(e){return De("recoil_memory_managament_2020")&&Sm(e),Wp(e)}function bw(e){const t=zn(),n=ww(e);return Dm(n,e,t)}function HL(e){return[bw(e),Yu(e)]}var WL={recoilComponentGetRecoilValueCount_FOR_TESTING:OL,useRecoilInterface:RL,useRecoilState:_L,useRecoilStateLoadable:$L,useRecoilValue:Mw,useRecoilValueLoadable:Am,useResetRecoilState:BL,useSetRecoilState:Yu,useSetUnvalidatedAtomValues:FL,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:ww,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:bw,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:HL};function GL(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var ZL=GL;function VL(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var YL=VL;function QL(...e){const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].keys();let o;for(;!(o=r.next()).done;)t.set(o.value,e[n].get(o.value))}return t}var JL=QL;const{batchUpdates:XL}=Fu,{DEFAULT_VALUE:qL,getNode:xw,nodes:KL}=Ut,{useStoreRef:Cm}=qn,{AbstractRecoilValue:eR,setRecoilValueLoadable:tR}=kn,{SUSPENSE_TIMEOUT_MS:nR}=mo,{cloneSnapshot:Hs}=Zu,{useCallback:Qu,useEffect:Sw,useRef:iv,useState:rR}=O,{isSSR:av}=Hu;function Ju(e){const t=Cm();Sw(()=>t.current.subscribeToTransactions(e).release,[e,t])}function lv(e){const t=e.atomValues.toMap(),n=$s(ZL(t,(r,o)=>{const a=xw(o).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return JL(e.nonvalidatedAtoms.toMap(),n)}function oR(e){Ju(Qu(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=lv(r),i=lv(n),a=$s(KL,s=>{var u,c,d,p;return{persistence_UNSTABLE:{type:(u=(c=s.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(d=(p=s.persistence_UNSTABLE)===null||p===void 0?void 0:p.backButton)!==null&&d!==void 0?d:!1}}}),l=YL(r.dirtyAtoms,s=>o.has(s)||i.has(s));e({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:l,transactionMetadata:{...r.transactionMetadata}})},[e]))}function iR(e){Ju(Qu(t=>{const n=Hs(t,"latest"),r=Hs(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function aR(){const e=Cm(),[t,n]=rR(()=>Hs(e.current)),r=vw(t),o=iv(),i=iv();if(Ju(Qu(l=>n(Hs(l)),[])),Sw(()=>{const l=t.retain();if(o.current&&!av){var s;window.clearTimeout(o.current),o.current=null,(s=i.current)===null||s===void 0||s.call(i),i.current=null}return()=>{window.setTimeout(l,10)}},[t]),r!==t&&!av){if(o.current){var a;window.clearTimeout(o.current),o.current=null,(a=i.current)===null||a===void 0||a.call(i),i.current=null}i.current=t.retain(),o.current=window.setTimeout(()=>{var l;o.current=null,(l=i.current)===null||l===void 0||l.call(i),i.current=null},nR)}return t}function Nw(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,i=t.getStore_INTERNAL().getState().currentTree;XL(()=>{const a=new Set;for(const u of[o.atomValues.keys(),i.atomValues.keys()])for(const c of u){var l,s;((l=o.atomValues.get(c))===null||l===void 0?void 0:l.contents)!==((s=i.atomValues.get(c))===null||s===void 0?void 0:s.contents)&&xw(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{tR(e,new eR(u),i.atomValues.has(u)?ke(i.atomValues.get(u)):qL)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function lR(){const e=Cm();return Qu(t=>Nw(e.current,t),[e])}var Dw={useRecoilSnapshot:aR,gotoSnapshot:Nw,useGotoRecoilSnapshot:lR,useRecoilTransactionObserver:iR,useTransactionObservation_DEPRECATED:oR,useTransactionSubscription_DEPRECATED:Ju};const{peekNodeInfo:sR}=Rr,{useStoreRef:uR}=qn;function cR(){const e=uR();return({key:t})=>sR(e.current,e.current.getState().currentTree,t)}var dR=cR;const{reactMode:pR}=Ka,{RecoilRoot:fR,useStoreRef:mR}=qn,{useMemo:gR}=O;function hR(){pR().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=mR().current;return gR(()=>{function t({children:n}){return O.createElement(fR,{store_INTERNAL:e},n)}return t},[e])}var vR=hR;const{loadableWithValue:yR}=qa,{initializeNode:IR}=Rr,{DEFAULT_VALUE:MR,getNode:wR}=Ut,{copyTreeState:bR,getRecoilValueAsLoadable:xR,invalidateDownstreams:SR,writeLoadableToTreeState:NR}=kn;function sv(e){return wR(e.key).nodeType==="atom"}class DR{constructor(t,n){pe(this,"_store",void 0),pe(this,"_treeState",void 0),pe(this,"_changes",void 0),pe(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!sv(r))throw ge("Reading selectors within atomicUpdate is not supported");const o=xR(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:ge(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),pe(this,"set",(r,o)=>{if(!sv(r))throw ge("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const i=this.get(r);this._changes.set(r.key,o(i))}else IR(this._store,r.key,"set"),this._changes.set(r.key,o)}),pe(this,"reset",r=>{this.set(r,MR)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=bR(this._treeState);for(const[n,r]of this._changes)NR(t,n,yR(r));return SR(this._store,t),t}}function AR(e){return t=>{e.replaceState(n=>{const r=new DR(e,n);return t(r),r.newTreeState_INTERNAL()})}}var CR={atomicUpdater:AR},TR=CR.atomicUpdater,Aw=Object.freeze({__proto__:null,atomicUpdater:TR});function ER(e,t){if(!e)throw new Error(t)}var jR=ER,Fi=jR;const{atomicUpdater:PR}=Aw,{batchUpdates:LR}=Fu,{DEFAULT_VALUE:RR}=Ut,{useStoreRef:OR}=qn,{refreshRecoilValue:kR,setRecoilValue:uv}=kn,{cloneSnapshot:zR}=Zu,{gotoSnapshot:UR}=Dw,{useCallback:BR}=O;class Cw{}const _R=new Cw;function Tw(e,t,n,r){let o=_R,i;if(LR(()=>{const l="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 ge(l);const s=$M({...r??{},set:(c,d)=>uv(e,c,d),reset:c=>uv(e,c,RR),refresh:c=>kR(e,c),gotoSnapshot:c=>UR(e,c),transact_UNSTABLE:c=>PR(e)(c)},{snapshot:()=>{const c=zR(e);return i=c.retain(),c}}),u=t(s);if(typeof u!="function")throw ge(l);o=u(...n)}),o instanceof Cw&&Fi(!1),je(o))o=o.finally(()=>{var l;(l=i)===null||l===void 0||l()});else{var a;(a=i)===null||a===void 0||a()}return o}function $R(e,t){const n=OR();return BR((...r)=>Tw(n.current,e,r),t!=null?[...t,n]:void 0)}var Ew={recoilCallback:Tw,useRecoilCallback:$R};const{useStoreRef:FR}=qn,{refreshRecoilValue:HR}=kn,{useCallback:WR}=O;function GR(e){const t=FR();return WR(()=>{const n=t.current;HR(n,e)},[e,t])}var ZR=GR;const{atomicUpdater:VR}=Aw,{useStoreRef:YR}=qn,{useMemo:QR}=O;function JR(e,t){const n=YR();return QR(()=>(...r)=>{VR(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var XR=JR;class qR{constructor(t){pe(this,"value",void 0),this.value=t}}var KR={WrappedValue:qR},eO=KR.WrappedValue,jw=Object.freeze({__proto__:null,WrappedValue:eO});const{isFastRefreshEnabled:tO}=Ka;class cv extends Error{}class nO{constructor(t){var n,r,o;pe(this,"_name",void 0),pe(this,"_numLeafs",void 0),pe(this,"_root",void 0),pe(this,"_onHit",void 0),pe(this,"_onSet",void 0),pe(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:i=>i}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 i,a,l,s;let u,c;for(const[w,y]of t){var d,p,f;const h=this._root;if((h==null?void 0:h.type)==="leaf")throw this.invalidCacheError();const M=u;if(u=M?M.branches.get(c):h,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:w,parent:M,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==w)throw this.invalidCacheError();M==null||M.branches.set(c,u),r==null||(p=r.onNodeVisit)===null||p===void 0||p.call(r,u),c=this._mapNodeValue(y),this._root=(f=this._root)!==null&&f!==void 0?f:u}const g=u?(i=u)===null||i===void 0?void 0:i.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.branchKey!==c))throw this.invalidCacheError();const I={type:"leaf",value:n,parent:u,branchKey:c};(a=u)===null||a===void 0||a.branches.set(c,I),this._root=(l=this._root)!==null&&l!==void 0?l:I,this._numLeafs++,this._onSet(I),r==null||(s=r.onNodeVisit)===null||s===void 0||s.call(r,I)};try{o()}catch(i){if(i instanceof cv)this.clear(),o();else throw i}}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 i;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=(i=r)===null||i===void 0?void 0:i.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=tO()?"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 mm(t+(this._name!=null?` - ${this._name}`:"")),new cv}}var rO={TreeCache:nO},oO=rO.TreeCache,Pw=Object.freeze({__proto__:null,TreeCache:oO});class iO{constructor(t){var n;pe(this,"_maxSize",void 0),pe(this,"_size",void 0),pe(this,"_head",void 0),pe(this,"_tail",void 0),pe(this,"_map",void 0),pe(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 i=this.head(),a={key:t,right:i,left:null,value:n};i?i.left=a:this._tail=a,this._map.set(r,a),this._head=a,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=ke(this._map.get(n)),o=r.right,i=r.left;o&&(o.left=r.left),i&&(i.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=i),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var aO={LRUCache:iO},lO=aO.LRUCache,Lw=Object.freeze({__proto__:null,LRUCache:lO});const{LRUCache:sO}=Lw,{TreeCache:uO}=Pw;function cO({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new sO({maxSize:t}),o=new uO({name:e,mapNodeValue:n,onHit:i=>{r.set(i,!0)},onSet:i=>{const a=r.tail();r.set(i,!0),a&&o.size()>t&&o.delete(a.key)}});return o}var dv=cO;function gn(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 ge("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(je(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>gn(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return gn(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[i,a]of e)o[typeof i=="string"?i:gn(i,t)]=a;return gn(o,t,n)}return e instanceof Set?gn(Array.from(e).sort((o,i)=>gn(o,t).localeCompare(gn(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?gn(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${gn(o,t)}:${gn(e[o],t,o)}`).join(",")}}`}function dO(e,t={allowFunctions:!1}){return gn(e,t)}var Xu=dO;const{TreeCache:pO}=Pw,Ul={equality:"reference",eviction:"keep-all",maxSize:1/0};function fO({equality:e=Ul.equality,eviction:t=Ul.eviction,maxSize:n=Ul.maxSize}=Ul,r){const o=mO(e);return gO(t,n,o,r)}function mO(e){switch(e){case"reference":return t=>t;case"value":return t=>Xu(t)}throw ge(`Unrecognized equality policy ${e}`)}function gO(e,t,n,r){switch(e){case"keep-all":return new pO({name:r,mapNodeValue:n});case"lru":return dv({name:r,maxSize:ke(t),mapNodeValue:n});case"most-recent":return dv({name:r,maxSize:1,mapNodeValue:n})}throw ge(`Unrecognized eviction policy ${e}`)}var hO=fO;function vO(e){return()=>null}var yO={startPerfBlock:vO};const{isLoadable:IO,loadableWithError:Bl,loadableWithPromise:MO,loadableWithValue:pd}=qa,{WrappedValue:Rw}=jw,{getNodeLoadable:_l,peekNodeLoadable:wO,setNodeValue:bO}=Rr,{saveDepsToStore:xO}=el,{DEFAULT_VALUE:SO,getConfigDeletionHandler:NO,getNode:DO,registerNode:pv}=Ut,{isRecoilValue:AO}=ei,{markRecoilValueModified:fv}=kn,{retainedByOptionWithDefault:CO}=mo,{recoilCallback:TO}=Ew,{startPerfBlock:EO}=yO;class Ow{}const ji=new Ow,Pi=[],$l=new Map,jO=(()=>{let e=0;return()=>e++})();function kw(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,i=e.set!=null?e.set:void 0,a=new Set,l=hO(o??{equality:"reference",eviction:"keep-all"},n),s=CO(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!De("recoil_memory_managament_2020")||c>0}function p(S){return S.getState().knownSelectors.add(n),c++,()=>{c--}}function f(){return NO(n)!==void 0&&!d()}function g(S,C,T,k,B){F(C,k,B),I(S,T)}function I(S,C){q(S,C)&&W(S),y(C,!0)}function w(S,C){q(S,C)&&(ke(R(S)).stateVersions.clear(),y(C,!1))}function y(S,C){const T=$l.get(S);if(T!=null){for(const k of T)fv(k,ke(t));C&&$l.delete(S)}}function h(S,C){let T=$l.get(C);T==null&&$l.set(C,T=new Set),T.add(S)}function M(S,C,T,k,B,oe){return C.then(se=>{if(!d())throw W(S),ji;const Q=pd(se);return g(S,T,B,Q,k),se}).catch(se=>{if(!d())throw W(S),ji;if(je(se))return b(S,se,T,k,B,oe);const Q=Bl(se);throw g(S,T,B,Q,k),se})}function b(S,C,T,k,B,oe){return C.then(se=>{if(!d())throw W(S),ji;oe.loadingDepKey!=null&&oe.loadingDepPromise===C?T.atomValues.set(oe.loadingDepKey,pd(se)):S.getState().knownSelectors.forEach(ve=>{T.atomValues.delete(ve)});const Q=D(S,T);if(Q&&Q.state!=="loading"){if((q(S,B)||R(S)==null)&&I(S,B),Q.state==="hasValue")return Q.contents;throw Q.contents}if(!q(S,B)){const ve=L(S,T);if(ve!=null)return ve.loadingLoadable.contents}const[me,Ie]=x(S,T,B);if(me.state!=="loading"&&g(S,T,B,me,Ie),me.state==="hasError")throw me.contents;return me.contents}).catch(se=>{if(se instanceof Ow)throw ji;if(!d())throw W(S),ji;const Q=Bl(se);throw g(S,T,B,Q,k),se})}function N(S,C,T,k){var B,oe,se,Q;if(q(S,k)||C.version===((B=S.getState())===null||B===void 0||(oe=B.currentTree)===null||oe===void 0?void 0:oe.version)||C.version===((se=S.getState())===null||se===void 0||(Q=se.nextTree)===null||Q===void 0?void 0:Q.version)){var me,Ie,ve;xO(n,T,S,(me=(Ie=S.getState())===null||Ie===void 0||(ve=Ie.nextTree)===null||ve===void 0?void 0:ve.version)!==null&&me!==void 0?me:S.getState().currentTree.version)}for(const Ne of T)a.add(Ne)}function x(S,C,T){const k=EO(n);let B=!0,oe=!0;const se=()=>{k(),oe=!1};let Q,me=!1,Ie;const ve={loadingDepKey:null,loadingDepPromise:null},Ne=new Map;function st({key:Xe}){const Ve=_l(S,C,Xe);switch(Ne.set(Xe,Ve),B||(N(S,C,new Set(Ne.keys()),T),w(S,T)),Ve.state){case"hasValue":return Ve.contents;case"hasError":throw Ve.contents;case"loading":throw ve.loadingDepKey=Xe,ve.loadingDepPromise=Ve.contents,Ve.contents}throw ge("Invalid Loadable state")}const qt=Xe=>(...Ve)=>{if(oe)throw ge("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&&Fi(!1),TO(S,Xe,Ve,{node:t})};try{Q=r({get:st,getCallback:qt}),Q=AO(Q)?st(Q):Q,IO(Q)&&(Q.state==="hasError"&&(me=!0),Q=Q.contents),je(Q)?Q=M(S,Q,C,Ne,T,ve).finally(se):se(),Q=Q instanceof Rw?Q.value:Q}catch(Xe){Q=Xe,je(Q)?Q=b(S,Q,C,Ne,T,ve).finally(se):(me=!0,se())}return me?Ie=Bl(Q):je(Q)?Ie=MO(Q):Ie=pd(Q),B=!1,ee(S,T,Ne),N(S,C,new Set(Ne.keys()),T),[Ie,Ne]}function D(S,C){let T=C.atomValues.get(n);if(T!=null)return T;const k=new Set;try{T=l.get(oe=>(typeof oe!="string"&&Fi(!1),_l(S,C,oe).contents),{onNodeVisit:oe=>{oe.type==="branch"&&oe.nodeKey!==n&&k.add(oe.nodeKey)}})}catch(oe){throw ge(`Problem with cache lookup for selector "${n}": ${oe.message}`)}if(T){var B;C.atomValues.set(n,T),N(S,C,k,(B=R(S))===null||B===void 0?void 0:B.executionID)}return T}function j(S,C){const T=D(S,C);if(T!=null)return W(S),T;const k=L(S,C);if(k!=null){var B;return((B=k.loadingLoadable)===null||B===void 0?void 0:B.state)==="loading"&&h(S,k.executionID),k.loadingLoadable}const oe=jO(),[se,Q]=x(S,C,oe);return se.state==="loading"?(U(S,oe,se,Q,C),h(S,oe)):(W(S),F(C,se,Q)),se}function L(S,C){const T=ow([u.has(S)?[ke(u.get(S))]:[],Uu(Im(u,([B])=>B!==S),([,B])=>B)]);function k(B){for(const[oe,se]of B)if(!_l(S,C,oe).is(se))return!0;return!1}for(const B of T){if(B.stateVersions.get(C.version)||!k(B.depValuesDiscoveredSoFarDuringAsyncWork))return B.stateVersions.set(C.version,!0),B;B.stateVersions.set(C.version,!1)}}function R(S){return u.get(S)}function U(S,C,T,k,B){u.set(S,{depValuesDiscoveredSoFarDuringAsyncWork:k,executionID:C,loadingLoadable:T,stateVersions:new Map([[B.version,!0]])})}function ee(S,C,T){if(q(S,C)){const k=R(S);k!=null&&(k.depValuesDiscoveredSoFarDuringAsyncWork=T)}}function W(S){u.delete(S)}function q(S,C){var T;return C===((T=R(S))===null||T===void 0?void 0:T.executionID)}function Y(S){return Array.from(S.entries()).map(([C,T])=>[C,T.contents])}function F(S,C,T){S.atomValues.set(n,C);try{l.set(Y(T),C)}catch(k){throw ge(`Problem with setting cache for selector "${n}": ${k.message}`)}}function ne(S){if(Pi.includes(n)){const C=`Recoil selector has circular dependencies: ${Pi.slice(Pi.indexOf(n)).join(" → ")}`;return Bl(ge(C))}Pi.push(n);try{return S()}finally{Pi.pop()}}function P(S,C){const T=C.atomValues.get(n);return T??l.get(k=>{var B;return typeof k!="string"&&Fi(!1),(B=wO(S,C,k))===null||B===void 0?void 0:B.contents})}function z(S,C){return ne(()=>j(S,C))}function _(S){S.atomValues.delete(n)}function G(S,C){t==null&&Fi(!1);for(const k of a){var T;const B=DO(k);(T=B.clearCache)===null||T===void 0||T.call(B,S,C)}a.clear(),_(C),l.clear(),fv(S,t)}return i!=null?t=pv({key:n,nodeType:"selector",peek:P,get:z,set:(C,T,k)=>{let B=!1;const oe=new Map;function se({key:ve}){if(B)throw ge("Recoil: Async selector sets are not currently supported.");const Ne=_l(C,T,ve);if(Ne.state==="hasValue")return Ne.contents;if(Ne.state==="loading"){const st=`Getting value of asynchronous atom or selector "${ve}" in a pending state while setting selector "${n}" is not yet supported.`;throw ge(st)}else throw Ne.contents}function Q(ve,Ne){if(B)throw ge("Recoil: Async selector sets are not currently supported.");const st=typeof Ne=="function"?Ne(se(ve)):Ne;bO(C,T,ve.key,st).forEach((Xe,Ve)=>oe.set(Ve,Xe))}function me(ve){Q(ve,SO)}const Ie=i({set:Q,get:se,reset:me},k);if(Ie!==void 0)throw je(Ie)?ge("Recoil: Async selector sets are not currently supported."):ge("Recoil: selector set should be a void function.");return B=!0,oe},init:p,invalidate:_,clearCache:G,shouldDeleteConfigOnRelease:f,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s}):t=pv({key:n,nodeType:"selector",peek:P,get:z,init:p,invalidate:_,clearCache:G,shouldDeleteConfigOnRelease:f,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}kw.value=e=>new Rw(e);var ri=kw;const{isLoadable:PO,loadableWithError:fd,loadableWithPromise:md,loadableWithValue:Mo}=qa,{WrappedValue:zw}=jw,{peekNodeInfo:LO}=Rr,{DEFAULT_VALUE:Hr,DefaultValue:rr,getConfigDeletionHandler:Uw,registerNode:RO,setConfigDeletionHandler:OO}=Ut,{isRecoilValue:kO}=ei,{getRecoilValueAsLoadable:zO,markRecoilValueModified:UO,setRecoilValue:mv,setRecoilValueLoadable:BO}=kn,{retainedByOptionWithDefault:_O}=mo,Li=e=>e instanceof zw?e.value:e;function $O(e){const{key:t,persistence_UNSTABLE:n}=e,r=_O(e.retainedBy_UNSTABLE);let o=0;function i(h){return md(h.then(M=>(a=Mo(M),M)).catch(M=>{throw a=fd(M),M}))}let a=je(e.default)?i(e.default):PO(e.default)?e.default.state==="loading"?i(e.default.contents):e.default:Mo(Li(e.default));a.contents;let l;const s=new Map;function u(h){return h}function c(h,M){const b=M.then(N=>{var x,D;return((D=((x=h.getState().nextTree)!==null&&x!==void 0?x:h.getState().currentTree).atomValues.get(t))===null||D===void 0?void 0:D.contents)===b&&mv(h,y,N),N}).catch(N=>{var x,D;throw((D=((x=h.getState().nextTree)!==null&&x!==void 0?x:h.getState().currentTree).atomValues.get(t))===null||D===void 0?void 0:D.contents)===b&&BO(h,y,fd(N)),N});return b}function d(h,M,b){var N;o++;const x=()=>{var W;o--,(W=s.get(h))===null||W===void 0||W.forEach(q=>q()),s.delete(h)};if(h.getState().knownAtoms.add(t),a.state==="loading"){const W=()=>{var q;((q=h.getState().nextTree)!==null&&q!==void 0?q:h.getState().currentTree).atomValues.has(t)||UO(h,y)};a.contents.finally(W)}const D=(N=e.effects)!==null&&N!==void 0?N:e.effects_UNSTABLE;if(D!=null){let ne=function(C){if(q&&C.key===t){const T=W;return T instanceof rr?p(h,M):je(T)?md(T.then(k=>k instanceof rr?a.toPromise():k)):Mo(T)}return zO(h,C)},P=function(C){return ne(C).toPromise()},z=function(C){var T;const k=LO(h,(T=h.getState().nextTree)!==null&&T!==void 0?T:h.getState().currentTree,C.key);return q&&C.key===t&&!(W instanceof rr)?{...k,isSet:!0,loadable:ne(C)}:k};var R=ne,U=P,ee=z;let W=Hr,q=!0,Y=!1,F=null;const _=C=>T=>{if(q){const k=ne(y),B=k.state==="hasValue"?k.contents:Hr;W=typeof T=="function"?T(B):T,je(W)&&(W=W.then(oe=>(F={effect:C,value:oe},oe)))}else{if(je(T))throw ge("Setting atoms to async values is not implemented.");typeof T!="function"&&(F={effect:C,value:Li(T)}),mv(h,y,typeof T=="function"?k=>{const B=Li(T(k));return F={effect:C,value:B},B}:Li(T))}},G=C=>()=>_(C)(Hr),S=C=>T=>{var k;const{release:B}=h.subscribeToTransactions(oe=>{var se;let{currentTree:Q,previousTree:me}=oe.getState();me||(me=Q);const Ie=(se=Q.atomValues.get(t))!==null&&se!==void 0?se:a;if(Ie.state==="hasValue"){var ve,Ne,st,qt;const Xe=Ie.contents,Ve=(ve=me.atomValues.get(t))!==null&&ve!==void 0?ve:a,ho=Ve.state==="hasValue"?Ve.contents:Hr;((Ne=F)===null||Ne===void 0?void 0:Ne.effect)!==C||((st=F)===null||st===void 0?void 0:st.value)!==Xe?T(Xe,ho,!Q.atomValues.has(t)):((qt=F)===null||qt===void 0?void 0:qt.effect)===C&&(F=null)}},t);s.set(h,[...(k=s.get(h))!==null&&k!==void 0?k:[],B])};for(const C of D)try{const T=C({node:y,storeID:h.storeID,parentStoreID_UNSTABLE:h.parentStoreID,trigger:b,setSelf:_(C),resetSelf:G(C),onSet:S(C),getPromise:P,getLoadable:ne,getInfo_UNSTABLE:z});if(T!=null){var j;s.set(h,[...(j=s.get(h))!==null&&j!==void 0?j:[],T])}}catch(T){W=T,Y=!0}if(q=!1,!(W instanceof rr)){var L;const C=Y?fd(W):je(W)?md(c(h,W)):Mo(Li(W));C.contents,M.atomValues.set(t,C),(L=h.getState().nextTree)===null||L===void 0||L.atomValues.set(t,C)}}return x}function p(h,M){var b,N;return(b=(N=M.atomValues.get(t))!==null&&N!==void 0?N:l)!==null&&b!==void 0?b:a}function f(h,M){if(M.atomValues.has(t))return ke(M.atomValues.get(t));if(M.nonvalidatedAtoms.has(t)){if(l!=null)return l;if(n==null)return a;const b=M.nonvalidatedAtoms.get(t),N=n.validator(b,Hr);return l=N instanceof rr?a:Mo(N),l}else return a}function g(){l=void 0}function I(h,M,b){if(M.atomValues.has(t)){const N=ke(M.atomValues.get(t));if(N.state==="hasValue"&&b===N.contents)return new Map}else if(!M.nonvalidatedAtoms.has(t)&&b instanceof rr)return new Map;return l=void 0,new Map().set(t,Mo(b))}function w(){return Uw(t)!==void 0&&o<=0}const y=RO({key:t,nodeType:"atom",peek:p,get:f,set:I,init:d,invalidate:g,shouldDeleteConfigOnRelease:w,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 y}function Tm(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return kO(n)?FO({...t,default:n}):$O({...t,default:n})}function FO(e){const t=Tm({...e,default:Hr,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof rr?r:ke(e.persistence_UNSTABLE).validator(r,Hr)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=ri({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof rr?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return OO(n.key,Uw(e.key)),n}Tm.value=e=>new zw(e);var Bw=Tm;class HO{constructor(t){var n;pe(this,"_map",void 0),pe(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 WO={MapCache:HO},GO=WO.MapCache,ZO=Object.freeze({__proto__:null,MapCache:GO});const{LRUCache:gv}=Lw,{MapCache:VO}=ZO,Fl={equality:"reference",eviction:"none",maxSize:1/0};function YO({equality:e=Fl.equality,eviction:t=Fl.eviction,maxSize:n=Fl.maxSize}=Fl){const r=QO(e);return JO(t,n,r)}function QO(e){switch(e){case"reference":return t=>t;case"value":return t=>Xu(t)}throw ge(`Unrecognized equality policy ${e}`)}function JO(e,t,n){switch(e){case"keep-all":return new VO({mapKey:n});case"lru":return new gv({mapKey:n,maxSize:ke(t)});case"most-recent":return new gv({mapKey:n,maxSize:1})}throw ge(`Unrecognized eviction policy ${e}`)}var _w=YO;const{setConfigDeletionHandler:XO}=Ut;function qO(e){var t,n;const r=_w({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 i,a;const l=r.get(o);if(l!=null)return l;const{cachePolicyForParams_UNSTABLE:s,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=Bw({...u,key:`${e.key}__${(i=Xu(o))!==null&&i!==void 0?i:"void"}`,default:typeof c=="function"?c(o):c,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):(a=e.effects)!==null&&a!==void 0?a:e.effects_UNSTABLE});return r.set(o,d),XO(d.key,()=>{r.delete(o)}),d}}var KO=qO;const{setConfigDeletionHandler:e2}=Ut;let t2=0;function n2(e){var t,n;const r=_w({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 i;let a;try{a=r.get(o)}catch(p){throw ge(`Problem with cache lookup for selector ${e.key}: ${p.message}`)}if(a!=null)return a;const l=`${e.key}__selectorFamily/${(i=Xu(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${t2++}`,s=p=>e.get(o)(p),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const p=e.set;d=ri({key:l,get:s,set:(g,I)=>p(o)(g,I),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=ri({key:l,get:s,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(o,d),e2(d.key,()=>{r.delete(o)}),d}}var Or=n2;const r2=Or({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function o2(e){return r2(e)}var i2=o2;const a2=Or({key:"__error",get:e=>()=>{throw ge(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function l2(e){return a2(e)}var s2=l2;function u2(e){return e}var c2=u2;const{loadableWithError:$w,loadableWithPromise:Fw,loadableWithValue:Hw}=qa;function qu(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,i]of t.entries())try{n[o]=e(i)}catch(a){r[o]=a}return[n,r]}function d2(e){return e!=null&&!je(e)}function Ku(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Gp(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function Fo(e,t,n){const r=n.map((o,i)=>o==null?Hw(t[i]):je(o)?Fw(o):$w(o));return Gp(e,r)}function p2(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const f2=Or({key:"__waitForNone",get:e=>({get:t})=>{const n=Ku(e),[r,o]=qu(t,n);return Fo(e,r,o)},dangerouslyAllowMutability:!0}),m2=Or({key:"__waitForAny",get:e=>({get:t})=>{const n=Ku(e),[r,o]=qu(t,n);return o.some(i=>!je(i))?Fo(e,r,o):new Promise(i=>{for(const[a,l]of o.entries())je(l)&&l.then(s=>{r[a]=s,o[a]=void 0,i(Fo(e,r,o))}).catch(s=>{o[a]=s,i(Fo(e,r,o))})})},dangerouslyAllowMutability:!0}),g2=Or({key:"__waitForAll",get:e=>({get:t})=>{const n=Ku(e),[r,o]=qu(t,n);if(o.every(a=>a==null))return Gp(e,r);const i=o.find(d2);if(i!=null)throw i;return Promise.all(o).then(a=>Gp(e,p2(r,a)))},dangerouslyAllowMutability:!0}),h2=Or({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Ku(e),[r,o]=qu(t,n);return o.every(i=>!je(i))?Fo(e,r,o):Promise.all(o.map((i,a)=>je(i)?i.then(l=>{r[a]=l,o[a]=void 0}).catch(l=>{r[a]=void 0,o[a]=l}):null)).then(()=>Fo(e,r,o))},dangerouslyAllowMutability:!0}),v2=Or({key:"__noWait",get:e=>({get:t})=>{try{return ri.value(Hw(t(e)))}catch(n){return ri.value(je(n)?Fw(n):$w(n))}},dangerouslyAllowMutability:!0});var y2={waitForNone:f2,waitForAny:m2,waitForAll:g2,waitForAllSettled:h2,noWait:v2};const{RecoilLoadable:I2}=qa,{DefaultValue:M2}=Ut,{RecoilRoot:w2,useRecoilStoreID:b2}=qn,{isRecoilValue:x2}=ei,{retentionZone:S2}=_u,{freshSnapshot:N2}=Zu,{useRecoilState:D2,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:A2,useRecoilStateLoadable:C2,useRecoilValue:T2,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:E2,useRecoilValueLoadable:j2,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:P2,useResetRecoilState:L2,useSetRecoilState:R2}=WL,{useGotoRecoilSnapshot:O2,useRecoilSnapshot:k2,useRecoilTransactionObserver:z2}=Dw,{useRecoilCallback:U2}=Ew,{noWait:B2,waitForAll:_2,waitForAllSettled:$2,waitForAny:F2,waitForNone:H2}=y2;var go={DefaultValue:M2,isRecoilValue:x2,RecoilLoadable:I2,RecoilEnv:pi,RecoilRoot:w2,useRecoilStoreID:b2,useRecoilBridgeAcrossReactRoots_UNSTABLE:vR,atom:Bw,selector:ri,atomFamily:KO,selectorFamily:Or,constSelector:i2,errorSelector:s2,readOnlySelector:c2,noWait:B2,waitForNone:H2,waitForAny:F2,waitForAll:_2,waitForAllSettled:$2,useRecoilValue:T2,useRecoilValueLoadable:j2,useRecoilState:D2,useRecoilStateLoadable:C2,useSetRecoilState:R2,useResetRecoilState:L2,useGetRecoilValueInfo_UNSTABLE:dR,useRecoilRefresher_UNSTABLE:ZR,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:P2,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:E2,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:A2,useRecoilCallback:U2,useRecoilTransaction_UNSTABLE:XR,useGotoRecoilSnapshot:O2,useRecoilSnapshot:k2,useRecoilTransactionObserver_UNSTABLE:z2,snapshot_UNSTABLE:N2,useRetain:Sm,retentionZone:S2},W2=go.RecoilRoot,G2=go.atom,Z2=go.selector,V2=go.atomFamily,Ww=go.useRecoilValue,Gw=go.useSetRecoilState,Y2=go.useRecoilCallback;const Em=V2({default:void 0,key:"projectFilesState"}),jm=G2({default:[],key:"projectTreeNodesState"});var Q2=Zw;function Zw(e,t,n){e instanceof RegExp&&(e=hv(e,n)),t instanceof RegExp&&(t=hv(t,n));var r=Vw(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function hv(e,t){var n=t.match(e);return n?n[0]:null}Zw.range=Vw;function Vw(e,t,n){var r,o,i,a,l,s=n.indexOf(e),u=n.indexOf(t,s+1),c=s;if(s>=0&&u>0){if(e===t)return[s,u];for(r=[],i=n.length;c>=0&&!l;)c==s?(r.push(c),s=n.indexOf(e,c+1)):r.length==1?l=[r.pop(),u]:(o=r.pop(),o<i&&(i=o,a=u),u=n.indexOf(t,c+1)),c=s<u&&s>=0?s:u;r.length&&(l=[i,a])}return l}var Yw=Q2,J2=K2,Qw="\0SLASH"+Math.random()+"\0",Jw="\0OPEN"+Math.random()+"\0",Pm="\0CLOSE"+Math.random()+"\0",Xw="\0COMMA"+Math.random()+"\0",qw="\0PERIOD"+Math.random()+"\0";function gd(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function X2(e){return e.split("\\\\").join(Qw).split("\\{").join(Jw).split("\\}").join(Pm).split("\\,").join(Xw).split("\\.").join(qw)}function q2(e){return e.split(Qw).join("\\").split(Jw).join("{").split(Pm).join("}").split(Xw).join(",").split(qw).join(".")}function Kw(e){if(!e)return[""];var t=[],n=Yw("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,i=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var l=Kw(i);return i.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function K2(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Hi(X2(e),!0).map(q2)):[]}function e4(e){return"{"+e+"}"}function t4(e){return/^-?0\d/.test(e)}function n4(e,t){return e<=t}function r4(e,t){return e>=t}function Hi(e,t){var n=[],r=Yw("{","}",e);if(!r)return[e];var o=r.pre,i=r.post.length?Hi(r.post,!1):[""];if(/\$$/.test(r.pre))for(var a=0;a<i.length;a++){var l=o+"{"+r.body+"}"+i[a];n.push(l)}else{var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),c=s||u,d=r.body.indexOf(",")>=0;if(!c&&!d)return r.post.match(/,.*\}/)?(e=r.pre+"{"+r.body+Pm+r.post,Hi(e)):[e];var p;if(c)p=r.body.split(/\.\./);else if(p=Kw(r.body),p.length===1&&(p=Hi(p[0],!1).map(e4),p.length===1))return i.map(function(R){return r.pre+p[0]+R});var f;if(c){var g=gd(p[0]),I=gd(p[1]),w=Math.max(p[0].length,p[1].length),y=p.length==3?Math.abs(gd(p[2])):1,h=n4,M=I<g;M&&(y*=-1,h=r4);var b=p.some(t4);f=[];for(var N=g;h(N,I);N+=y){var x;if(u)x=String.fromCharCode(N),x==="\\"&&(x="");else if(x=String(N),b){var D=w-x.length;if(D>0){var j=new Array(D+1).join("0");N<0?x="-"+j+x.slice(1):x=j+x}}f.push(x)}}else{f=[];for(var L=0;L<p.length;L++)f.push.apply(f,Hi(p[L],!1))}for(var L=0;L<f.length;L++)for(var a=0;a<i.length;a++){var l=o+f[L]+i[a];(!t||c||l)&&n.push(l)}}return n}const o4=Ua(J2),i4=1024*64,Ws=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>i4)throw new TypeError("pattern is too long")},a4={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Ri=e=>e.replace(/[[\]\\-]/g,"\\$&"),l4=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),vv=e=>e.join(""),s4=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const r=[],o=[];let i=n+1,a=!1,l=!1,s=!1,u=!1,c=n,d="";e:for(;i<e.length;){const I=e.charAt(i);if((I==="!"||I==="^")&&i===n+1){u=!0,i++;continue}if(I==="]"&&a&&!s){c=i+1;break}if(a=!0,I==="\\"&&!s){s=!0,i++;continue}if(I==="["&&!s){for(const[w,[y,h,M]]of Object.entries(a4))if(e.startsWith(w,i)){if(d)return["$.",!1,e.length-n,!0];i+=w.length,M?o.push(y):r.push(y),l=l||h;continue e}}if(s=!1,d){I>d?r.push(Ri(d)+"-"+Ri(I)):I===d&&r.push(Ri(I)),d="",i++;continue}if(e.startsWith("-]",i+1)){r.push(Ri(I+"-")),i+=2;continue}if(e.startsWith("-",i+1)){d=I,i+=2;continue}r.push(Ri(I)),i++}if(c<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){const I=r[0].length===2?r[0].slice(-1):r[0];return[l4(I),!1,c-n,!1]}const p="["+(u?"^":"")+vv(r)+"]",f="["+(u?"":"^")+vv(o)+"]";return[r.length&&o.length?"("+p+"|"+f+")":r.length?p:f,l,c-n,!0]},Wi=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),u4=new Set(["!","?","+","*","@"]),yv=e=>u4.has(e),c4="(?!\\.\\.?(?:$|/))",hd="(?!\\.)",d4=new Set(["[","."]),p4=new Set(["..","."]),f4=new Set("().*{}+?[]^$\\!"),m4=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Lm="[^/]",Iv=Lm+"*?",Mv=Lm+"+?";var qe,nt,_n,Re,Ye,lr,Qr,sr,rn,Jr,za,ou,eb,Ho,cs,iu,tb;const vt=class vt{constructor(t,n,r={}){bt(this,ou);le(this,"type");bt(this,qe,void 0);bt(this,nt,void 0);bt(this,_n,!1);bt(this,Re,[]);bt(this,Ye,void 0);bt(this,lr,void 0);bt(this,Qr,void 0);bt(this,sr,!1);bt(this,rn,void 0);bt(this,Jr,void 0);bt(this,za,!1);this.type=t,t&&Ge(this,nt,!0),Ge(this,Ye,n),Ge(this,qe,Z(this,Ye)?Z(Z(this,Ye),qe):this),Ge(this,rn,Z(this,qe)===this?r:Z(Z(this,qe),rn)),Ge(this,Qr,Z(this,qe)===this?[]:Z(Z(this,qe),Qr)),t==="!"&&!Z(Z(this,qe),sr)&&Z(this,Qr).push(this),Ge(this,lr,Z(this,Ye)?Z(Z(this,Ye),Re).length:0)}get hasMagic(){if(Z(this,nt)!==void 0)return Z(this,nt);for(const t of Z(this,Re))if(typeof t!="string"&&(t.type||t.hasMagic))return Ge(this,nt,!0);return Z(this,nt)}toString(){return Z(this,Jr)!==void 0?Z(this,Jr):this.type?Ge(this,Jr,this.type+"("+Z(this,Re).map(t=>String(t)).join("|")+")"):Ge(this,Jr,Z(this,Re).map(t=>String(t)).join(""))}push(...t){for(const n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof vt&&Z(n,Ye)===this))throw new Error("invalid part: "+n);Z(this,Re).push(n)}}toJSON(){var n;const t=this.type===null?Z(this,Re).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...Z(this,Re).map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===Z(this,qe)||Z(Z(this,qe),sr)&&((n=Z(this,Ye))==null?void 0:n.type)==="!")&&t.push({}),t}isStart(){var n;if(Z(this,qe)===this)return!0;if(!((n=Z(this,Ye))!=null&&n.isStart()))return!1;if(Z(this,lr)===0)return!0;const t=Z(this,Ye);for(let r=0;r<Z(this,lr);r++){const o=Z(t,Re)[r];if(!(o instanceof vt&&o.type==="!"))return!1}return!0}isEnd(){var n,r,o;if(Z(this,qe)===this||((n=Z(this,Ye))==null?void 0:n.type)==="!")return!0;if(!((r=Z(this,Ye))!=null&&r.isEnd()))return!1;if(!this.type)return(o=Z(this,Ye))==null?void 0:o.isEnd();const t=Z(this,Ye)?Z(Z(this,Ye),Re).length:0;return Z(this,lr)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new vt(this.type,t);for(const r of Z(this,Re))n.copyIn(r);return n}static fromGlob(t,n={}){var o;const r=new vt(null,void 0,n);return yo(o=vt,Ho,cs).call(o,t,r,0,n),r}toMMPattern(){if(this!==Z(this,qe))return Z(this,qe).toMMPattern();const t=this.toString(),[n,r,o,i]=this.toRegExpSource();if(!(o||Z(this,nt)||Z(this,rn).nocase&&!Z(this,rn).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const l=(Z(this,rn).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}toRegExpSource(){var o;if(Z(this,qe)===this&&yo(this,ou,eb).call(this),!this.type){const i=this.isStart()&&this.isEnd(),a=Z(this,Re).map(c=>{var I;const[d,p,f,g]=typeof c=="string"?yo(I=vt,iu,tb).call(I,c,Z(this,nt),i):c.toRegExpSource();return Ge(this,nt,Z(this,nt)||f),Ge(this,_n,Z(this,_n)||g),d}).join("");let l="";if(this.isStart()&&typeof Z(this,Re)[0]=="string"&&!(Z(this,Re).length===1&&p4.has(Z(this,Re)[0]))){const d=d4,p=Z(this,rn).dot&&d.has(a.charAt(0))||a.startsWith("\\.")&&d.has(a.charAt(2))||a.startsWith("\\.\\.")&&d.has(a.charAt(4)),f=!Z(this,rn).dot&&d.has(a.charAt(0));l=p?c4:f?hd:""}let s="";return this.isEnd()&&Z(Z(this,qe),sr)&&((o=Z(this,Ye))==null?void 0:o.type)==="!"&&(s="(?:$|\\/)"),[l+a+s,Wi(a),Ge(this,nt,!!Z(this,nt)),Z(this,_n)]}const t=this.type==="!"?"(?:(?!(?:":"(?:",n=Z(this,Re).map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");const[a,l,s,u]=i.toRegExpSource();return Ge(this,_n,Z(this,_n)||u),a}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|");if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const i=this.toString();return Ge(this,Re,[i]),this.type=null,Ge(this,nt,void 0),[i,Wi(this.toString()),!1,!1]}let r="";if(this.type==="!"&&Z(this,za))r=(this.isStart()&&!Z(this,rn).dot?hd:"")+Mv;else{const i=this.type==="!"?"))"+(this.isStart()&&!Z(this,rn).dot?hd:"")+Iv+")":this.type==="@"?")":`)${this.type}`;r=t+n+i}return[r,Wi(n),Ge(this,nt,!!Z(this,nt)),Z(this,_n)]}};qe=new WeakMap,nt=new WeakMap,_n=new WeakMap,Re=new WeakMap,Ye=new WeakMap,lr=new WeakMap,Qr=new WeakMap,sr=new WeakMap,rn=new WeakMap,Jr=new WeakMap,za=new WeakMap,ou=new WeakSet,eb=function(){if(this!==Z(this,qe))throw new Error("should only call on root");if(Z(this,sr))return this;this.toString(),Ge(this,sr,!0);let t;for(;t=Z(this,Qr).pop();){if(t.type!=="!")continue;let n=t,r=Z(n,Ye);for(;r;){for(let o=Z(n,lr)+1;!r.type&&o<Z(r,Re).length;o++)for(const i of Z(t,Re)){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(Z(r,Re)[o])}n=r,r=Z(n,Ye)}}return this},Ho=new WeakSet,cs=function(t,n,r,o){var f,g;let i=!1,a=!1,l=-1,s=!1;if(n.type===null){let I=r,w="";for(;I<t.length;){const y=t.charAt(I++);if(i||y==="\\"){i=!i,w+=y;continue}if(a){I===l+1?(y==="^"||y==="!")&&(s=!0):y==="]"&&!(I===l+2&&s)&&(a=!1),w+=y;continue}else if(y==="["){a=!0,l=I,s=!1,w+=y;continue}if(!o.noext&&yv(y)&&t.charAt(I)==="("){n.push(w),w="";const h=new vt(y,n);I=yo(f=vt,Ho,cs).call(f,t,h,I,o),n.push(h);continue}w+=y}return n.push(w),I}let u=r+1,c=new vt(null,n);const d=[];let p="";for(;u<t.length;){const I=t.charAt(u++);if(i||I==="\\"){i=!i,p+=I;continue}if(a){u===l+1?(I==="^"||I==="!")&&(s=!0):I==="]"&&!(u===l+2&&s)&&(a=!1),p+=I;continue}else if(I==="["){a=!0,l=u,s=!1,p+=I;continue}if(yv(I)&&t.charAt(u)==="("){c.push(p),p="";const w=new vt(I,c);c.push(w),u=yo(g=vt,Ho,cs).call(g,t,w,u,o);continue}if(I==="|"){c.push(p),p="",d.push(c),c=new vt(null,n);continue}if(I===")")return p===""&&Z(n,Re).length===0&&Ge(n,za,!0),c.push(p),p="",n.push(...d,c),u;p+=I}return n.type=null,Ge(n,nt,void 0),Ge(n,Re,[t.substring(r-1)]),u},iu=new WeakSet,tb=function(t,n,r=!1){let o=!1,i="",a=!1;for(let l=0;l<t.length;l++){const s=t.charAt(l);if(o){o=!1,i+=(f4.has(s)?"\\":"")+s;continue}if(s==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(s==="["){const[u,c,d,p]=s4(t,l);if(d){i+=u,a=a||c,l+=d-1,n=n||p;continue}}if(s==="*"){r&&t==="*"?i+=Mv:i+=Iv,n=!0;continue}if(s==="?"){i+=Lm,n=!0;continue}i+=m4(s)}return[i,Wi(t),!!n,a]},bt(vt,Ho),bt(vt,iu);let Gs=vt;const g4=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),wt=(e,t,n={})=>(Ws(t),!n.nocomment&&t.charAt(0)==="#"?!1:new ec(t,n).match(e)),h4=/^\*+([^+@!?\*\[\(]*)$/,v4=e=>t=>!t.startsWith(".")&&t.endsWith(e),y4=e=>t=>t.endsWith(e),I4=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),M4=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),w4=/^\*+\.\*+$/,b4=e=>!e.startsWith(".")&&e.includes("."),x4=e=>e!=="."&&e!==".."&&e.includes("."),S4=/^\.\*+$/,N4=e=>e!=="."&&e!==".."&&e.startsWith("."),D4=/^\*+$/,A4=e=>e.length!==0&&!e.startsWith("."),C4=e=>e.length!==0&&e!=="."&&e!=="..",T4=/^\?+([^+@!?\*\[\(]*)?$/,E4=([e,t=""])=>{const n=nb([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},j4=([e,t=""])=>{const n=rb([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},P4=([e,t=""])=>{const n=rb([e]);return t?r=>n(r)&&r.endsWith(t):n},L4=([e,t=""])=>{const n=nb([e]);return t?r=>n(r)&&r.endsWith(t):n},nb=([e])=>{const t=e.length;return n=>n.length===t&&!n.startsWith(".")},rb=([e])=>{const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},ob=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",wv={win32:{sep:"\\"},posix:{sep:"/"}},R4=ob==="win32"?wv.win32.sep:wv.posix.sep;wt.sep=R4;const nn=Symbol("globstar **");wt.GLOBSTAR=nn;const O4="[^/]",k4=O4+"*?",z4="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",U4="(?:(?!(?:\\/|^)\\.).)*?",B4=(e,t={})=>n=>wt(n,e,t);wt.filter=B4;const en=(e,t={})=>Object.assign({},e,t),_4=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return wt;const t=wt;return Object.assign((r,o,i={})=>t(r,o,en(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,en(e,i))}static defaults(o){return t.defaults(en(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,en(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,en(e,i))}},unescape:(r,o={})=>t.unescape(r,en(e,o)),escape:(r,o={})=>t.escape(r,en(e,o)),filter:(r,o={})=>t.filter(r,en(e,o)),defaults:r=>t.defaults(en(e,r)),makeRe:(r,o={})=>t.makeRe(r,en(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,en(e,o)),match:(r,o,i={})=>t.match(r,o,en(e,i)),sep:t.sep,GLOBSTAR:nn})};wt.defaults=_4;const ib=(e,t={})=>(Ws(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:o4(e));wt.braceExpand=ib;const $4=(e,t={})=>new ec(e,t).makeRe();wt.makeRe=$4;const F4=(e,t,n={})=>{const r=new ec(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};wt.match=F4;const bv=/[?*]|[+@!]\(.*?\)|\[|\]/,H4=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class ec{constructor(t,n={}){le(this,"options");le(this,"set");le(this,"pattern");le(this,"windowsPathsNoEscape");le(this,"nonegate");le(this,"negate");le(this,"comment");le(this,"empty");le(this,"preserveMultipleSlashes");le(this,"partial");le(this,"globSet");le(this,"globParts");le(this,"nocase");le(this,"isWindows");le(this,"platform");le(this,"windowsNoMagicRoot");le(this,"regexp");Ws(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||ob,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){const s=i[0]===""&&i[1]===""&&(i[2]==="?"||!bv.test(i[2]))&&!bv.test(i[3]),u=/^[a-z]:/i.test(i[0]);if(s)return[...i.slice(0,4),...i.slice(4).map(c=>this.parse(c))];if(u)return[i[0],...i.slice(1).map(c=>this.parse(c))]}return i.map(s=>this.parse(s))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){const a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{const i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){const i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let a=o;for(;r[a+1]==="**";)a++;a>o&&r.splice(o+1,a-o);let l=r[o+1];const s=r[o+2],u=r[o+3];if(l!==".."||!s||s==="."||s===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(o,1);const c=r.slice(0);c[o]="**",t.push(c),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){const l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){const a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;const s=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...s),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){const o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);o&&(t[n]=o,t[r]=[])}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,a=[],l="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])a.push(l==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])a.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])a.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(l==="b")return!1;l="a",a.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(l==="a")return!1;l="b",a.push(n[i]),o++,i++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){const o=this.options;if(this.isWindows){const I=t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),w=n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]);if(I&&w){const y=t[3],h=n[3];y.toLowerCase()===h.toLowerCase()&&(t[3]=h)}else if(w&&typeof t[0]=="string"){const y=n[3],h=t[0];y.toLowerCase()===h.toLowerCase()&&(n[3]=h,n=n.slice(3))}else if(I&&typeof n[0]=="string"){const y=t[3];y.toLowerCase()===n[0].toLowerCase()&&(n[0]=y,t=t.slice(3))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var a=0,l=0,s=t.length,u=n.length;a<s&&l<u;a++,l++){this.debug("matchOne loop");var c=n[l],d=t[a];if(this.debug(n,c,d),c===!1)return!1;if(c===nn){this.debug("GLOBSTAR",[n,c,d]);var p=a,f=l+1;if(f===u){for(this.debug("** at the end");a<s;a++)if(t[a]==="."||t[a]===".."||!o.dot&&t[a].charAt(0)===".")return!1;return!0}for(;p<s;){var g=t[p];if(this.debug(`
|
|
56
|
+
globstar while`,t,p,n,f,g),this.matchOne(t.slice(p),n.slice(f),r))return this.debug("globstar found match!",p,s,g),!0;if(g==="."||g===".."||!o.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,p,n,f);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
|
|
57
|
+
>>> no match, partial?`,t,p,n,f),p===s))}let I;if(typeof c=="string"?(I=d===c,this.debug("string match",c,d,I)):(I=c.test(d),this.debug("pattern match",c,d,I)),!I)return!1}if(a===s&&l===u)return!0;if(a===s)return r;if(l===u)return a===s-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return ib(this.pattern,this.options)}parse(t){Ws(t);const n=this.options;if(t==="**")return nn;if(t==="")return"";let r,o=null;(r=t.match(D4))?o=n.dot?C4:A4:(r=t.match(h4))?o=(n.nocase?n.dot?M4:I4:n.dot?y4:v4)(r[1]):(r=t.match(T4))?o=(n.nocase?n.dot?j4:E4:n.dot?P4:L4)(r):(r=t.match(w4))?o=n.dot?x4:b4:(r=t.match(S4))&&(o=N4);const i=Gs.fromGlob(t,this.options).toMMPattern();return o?Object.assign(i,{test:o}):i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,r=n.noglobstar?k4:n.dot?z4:U4,o=new Set(n.nocase?["i"]:[]);let i=t.map(s=>{const u=s.map(c=>{if(c instanceof RegExp)for(const d of c.flags.split(""))o.add(d);return typeof c=="string"?H4(c):c===nn?nn:c._src});return u.forEach((c,d)=>{const p=u[d+1],f=u[d-1];c!==nn||f===nn||(f===void 0?p!==void 0&&p!==nn?u[d+1]="(?:\\/|"+r+"\\/)?"+p:u[d]=r:p===void 0?u[d-1]=f+"(?:\\/|"+r+")?":p!==nn&&(u[d-1]=f+"(?:\\/|\\/"+r+"\\/)"+p,u[d+1]=nn))}),u.filter(c=>c!==nn).join("/")}).join("|");const[a,l]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+l+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const o=this.slashSplit(t);this.debug(this.pattern,"split",o);const i=this.set;this.debug(this.pattern,"set",i);let a=o[o.length-1];if(!a)for(let l=o.length-2;!a&&l>=0;l--)a=o[l];for(let l=0;l<i.length;l++){const s=i[l];let u=o;if(r.matchBase&&s.length===1&&(u=[a]),this.matchOne(u,s,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return wt.defaults(t).Minimatch}}wt.AST=Gs;wt.Minimatch=ec;wt.escape=g4;wt.unescape=Wi;function ab(){const e=Y2(({set:t})=>n=>{t(Em(n.path),n)},[]);return t=>{e(t)}}function W4(){const e=ab(),t=Gw(jm);return n=>{n.saveState===Ja.new&&t(r=>[...r,n]),e(n)}}function Rm(){const e=W4();return(t,n=Ja.modified)=>{e({...t,saveState:n})}}function Om(e){return Ww(Em(e??""))}const G4=e=>{const t=Rm(),n=Om(e);return r=>{n&&t(n,r)}};const Z4=Z2({key:"projectOpenApiFilesState",get:({get:e})=>{const t=e(jm),n=[];return t.forEach(r=>{if(r.path&&wt(r.path,"*.oas.json")){const o=e(Em(r.path));o&&n.push({...o})}}),n}});function V4(){return Ww(Z4)}/**
|
|
56
58
|
* @remix-run/router v1.8.0
|
|
57
59
|
*
|
|
58
60
|
* Copyright (c) Remix Software Inc.
|
|
@@ -61,7 +63,7 @@ Error generating stack: `+l.message+`
|
|
|
61
63
|
* LICENSE.md file in the root directory of this source tree.
|
|
62
64
|
*
|
|
63
65
|
* @license MIT
|
|
64
|
-
*/function
|
|
66
|
+
*/function Ta(){return Ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ta.apply(this,arguments)}var Yr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Yr||(Yr={}));const xv="popstate";function Y4(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return Zp("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:lb(o)}return J4(t,n,null,e)}function Ln(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Q4(){return Math.random().toString(36).substr(2,8)}function Sv(e,t){return{usr:e.state,key:e.key,idx:t}}function Zp(e,t,n,r){return n===void 0&&(n=null),Ta({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?tc(t):t,{state:n,key:t&&t.key||r||Q4()})}function lb(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function tc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function J4(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=Yr.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(Ta({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){l=Yr.Pop;let w=c(),y=w==null?null:w-u;u=w,s&&s({action:l,location:I.location,delta:y})}function p(w,y){l=Yr.Push;let h=Zp(I.location,w,y);n&&n(h,w),u=c()+1;let M=Sv(h,u),b=I.createHref(h);try{a.pushState(M,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(b)}i&&s&&s({action:l,location:I.location,delta:1})}function f(w,y){l=Yr.Replace;let h=Zp(I.location,w,y);n&&n(h,w),u=c();let M=Sv(h,u),b=I.createHref(h);a.replaceState(M,"",b),i&&s&&s({action:l,location:I.location,delta:0})}function g(w){let y=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof w=="string"?w:lb(w);return Ln(y,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,y)}let I={get action(){return l},get location(){return e(o,a)},listen(w){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(xv,d),s=w,()=>{o.removeEventListener(xv,d),s=null}},createHref(w){return t(o,w)},createURL:g,encodeLocation(w){let y=g(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:f,go(w){return a.go(w)}};return I}var Nv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Nv||(Nv={}));function X4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function q4(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?tc(e):e;return{pathname:n?n.startsWith("/")?n:K4(n,t):t,search:rk(r),hash:ok(o)}}function K4(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function vd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ek(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tk(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=tc(e):(o=Ta({},e),Ln(!o.pathname||!o.pathname.includes("?"),vd("?","pathname","search",o)),Ln(!o.pathname||!o.pathname.includes("#"),vd("#","pathname","hash",o)),Ln(!o.search||!o.search.includes("#"),vd("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(r||a==null)l=n;else{let d=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;o.pathname=p.join("/")}l=d>=0?t[d]:"/"}let s=q4(o,l),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const nk=e=>e.join("/").replace(/\/\/+/g,"/"),rk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ok=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,sb=["post","put","patch","delete"];new Set(sb);const ik=["get",...sb];new Set(ik);/**
|
|
65
67
|
* React Router v6.15.0
|
|
66
68
|
*
|
|
67
69
|
* Copyright (c) Remix Software Inc.
|
|
@@ -70,7 +72,7 @@ Error generating stack: `+l.message+`
|
|
|
70
72
|
* LICENSE.md file in the root directory of this source tree.
|
|
71
73
|
*
|
|
72
74
|
* @license MIT
|
|
73
|
-
*/function
|
|
75
|
+
*/function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vp.apply(this,arguments)}const ub=v.createContext(null),km=v.createContext(null),zm=v.createContext(null),Um=v.createContext({outlet:null,matches:[],isDataRoute:!1});function Bm(){return v.useContext(zm)!=null}function _m(){return Bm()||Ln(!1),v.useContext(zm).location}function cb(e){v.useContext(km).static||v.useLayoutEffect(e)}function ak(){let{isDataRoute:e}=v.useContext(Um);return e?dk():lk()}function lk(){Bm()||Ln(!1);let e=v.useContext(ub),{basename:t,navigator:n}=v.useContext(km),{matches:r}=v.useContext(Um),{pathname:o}=_m(),i=JSON.stringify(ek(r).map(s=>s.pathnameBase)),a=v.useRef(!1);return cb(()=>{a.current=!0}),v.useCallback(function(s,u){if(u===void 0&&(u={}),!a.current)return;if(typeof s=="number"){n.go(s);return}let c=tk(s,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:nk([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}var db=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(db||{}),pb=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pb||{});function sk(e){let t=v.useContext(ub);return t||Ln(!1),t}function uk(e){let t=v.useContext(Um);return t||Ln(!1),t}function ck(e){let t=uk(),n=t.matches[t.matches.length-1];return n.route.id||Ln(!1),n.route.id}function dk(){let{router:e}=sk(db.UseNavigateStable),t=ck(pb.UseNavigateStable),n=v.useRef(!1);return cb(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Vp({fromRouteId:t},i)))},[e,t])}function pk(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Yr.Pop,navigator:i,static:a=!1}=e;Bm()&&Ln(!1);let l=t.replace(/^\/*/,"/"),s=v.useMemo(()=>({basename:l,navigator:i,static:a}),[l,i,a]);typeof r=="string"&&(r=tc(r));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default"}=r,g=v.useMemo(()=>{let I=X4(u,l);return I==null?null:{location:{pathname:I,search:c,hash:d,state:p,key:f},navigationType:o}},[l,u,c,d,p,f,o]);return g==null?null:v.createElement(km.Provider,{value:s},v.createElement(zm.Provider,{children:n,value:g}))}new Promise(()=>{});/**
|
|
74
76
|
* React Router DOM v6.15.0
|
|
75
77
|
*
|
|
76
78
|
* Copyright (c) Remix Software Inc.
|
|
@@ -79,4 +81,81 @@ Error generating stack: `+l.message+`
|
|
|
79
81
|
* LICENSE.md file in the root directory of this source tree.
|
|
80
82
|
*
|
|
81
83
|
* @license MIT
|
|
82
|
-
*/function zu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function xL(e,t){let n=zu(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(l=>{n.append(o,l)})}),n}const EL="startTransition",Pp=Mr[EL];function _L(e){let{basename:t,children:n,future:r,window:o}=e,l=p.useRef();l.current==null&&(l.current=nL({window:o,v5Compat:!0}));let i=l.current,[a,s]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},c=p.useCallback(d=>{u&&Pp?Pp(()=>s(d)):s(d)},[s,u]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.createElement(wL,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}var Ap;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Ap||(Ap={}));var Op;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Op||(Op={}));function RL(e){let t=p.useRef(zu(e)),n=p.useRef(!1),r=Rd(),o=p.useMemo(()=>xL(r.search,n.current?null:t.current),[r.search]),l=hL(),i=p.useCallback((a,s)=>{const u=zu(typeof a=="function"?a(o):a);n.current=!0,l("?"+u,s)},[l,o]);return[o,i]}function Td(){return new URLSearchParams(Rd().search)}const lg=F.createContext(void 0),Nd=()=>{const e=p.useContext(lg);if(!e)throw new Error("useOpenApiDesignerContext must be used within a OpenApiDesignerContextWrapper");return e},TL=({url:e,children:t,handleErrors:n})=>{const r=Td().get("path"),o=Z0(),[l,i]=p.useState(!0),a=X0(r),s=q0();if(p.useEffect(()=>{async function c(){try{if(r){const d=await fetch(`${e}/open-api-content?path=${r}`,{method:"GET"});if(d.status!==200){const S=await d.json();n(S.message);return}const h=await d.json();o({path:r,type:Lv.File,content:JSON.stringify(h),saveState:vl.unmodified})}i(!1)}catch(d){n(d.message),i(!1)}}c()},[e,r]),!a&&l===!1||r===null)return v.jsx("div",{className:"p-6",children:"You must select an Open API file to use the Open API Designer"});if(!a||l)return v.jsx("div",{className:"p-6",children:v.jsx(td,{className:"w-4 h-4 mr-4"})});if(a.content===void 0)throw new Error("Invalid State - the oas.json fileModel content is 'undefined'");const u=new UE(a,s);return v.jsx(lg.Provider,{value:u,children:t})};function NL({operationData:e}){return e?v.jsx("div",{className:"w-full h-fit flex flex-col",children:v.jsx(CL,{operationData:e})}):v.jsx("div",{className:"m-auto flex text-center",children:v.jsxs("h1",{className:"text-gray-400 text-xl mb-5",children:["No operation selected ",v.jsx("br",{}),"Select an operation to start editing"]})})}const CL=({operationData:e})=>{var te,W,le,ge;const t=Td().get("path");if(!t)throw new Error("Open API file path not found in URL");const n=tL(t),{path:r,method:o}=e.additionalOperationContext,{additionalOperationContext:l,...i}=e,a=Nd(),s="",[u,c]=p.useState(),[d,h]=p.useState(),[S,y]=p.useState(),w=(le=(W=(te=a.openApiData)==null?void 0:te.servers)==null?void 0:W.at(0))==null?void 0:le.url,x=i[To]??Bu(w??Di),m=i[Jf]===!0;p.useEffect(()=>{c(void 0),h(void 0)},[e.operationId]);const f=z=>{const q={...z},b={...x,handler:q};a.updateOperation({path:r,method:o,newOperationObject:{...i,[To]:b}}),c(void 0)},g=z=>{a.updateOperation({path:r,method:o,newOperationObject:{...i,summary:z}}),c(void 0)},R=z=>{a.updateOperation({path:r,method:o,newOperationObject:{...i,[Jf]:z}})},L=z=>{let{newPath:q}=z;const{newMethod:b}=z;S!=null&&q==null&&(q=S);try{a.updateOperation({path:r,newPath:q,method:o,newMethod:b,newOperationObject:i}),h(void 0),c(void 0),y(void 0)}catch(O){O instanceof Error&&(q!=null&&(y(q),h(O.message)),b!=null&&c(O.message))}},N=z=>{if(z===r){h(void 0),c(void 0),y(void 0);return}const q=z.startsWith("/")?z:"/"+z;L({newPath:q})},k=({value:z})=>{const q=z;if(q===o){c(void 0);return}L({newMethod:q})},A=z=>{const q={...x,corsPolicy:z};a.updateOperation({path:r,method:o,newOperationObject:{...i,[To]:q}}),c(void 0)},K=z=>{const q={...e.additionalOperationContext.pathZuploConfig,pathMode:z},O=a.getOpenApiDataEnforced().paths;if(!O)throw new Error("Property 'paths' is undefined");const D=O[r];if(!D)throw new Error(`Path Item '${r}' is undefined`);a.updatePathItem(r,{...D,[kv]:q}),c(void 0)},B=()=>{n(vl.modified)},G=v.jsx("div",{children:v.jsx(n_,{isOpenApi:!0,routeHandler:(e[To]??Bu(w??Di)).handler,onRequestHandlerChange:f})});return v.jsxs("div",{className:"m-2 p-3 pt-3 rounded","data-test":"route-handling-section",children:[v.jsxs("div",{className:"flex items-center mb-4",children:[v.jsx("span",{className:"pr-3 text-lg font-medium text-gray-900 whitespace-nowrap flex-none",children:"Request Handling"}),v.jsx("div",{className:"border-t border-gray-300 flex-grow"})]}),v.jsxs("div",{className:"flex flex-col gap-y-3 pb-4",children:[v.jsx(OE,{initialSummary:i.summary,span:4,onSummaryChange:g,onFieldModified:B}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx(AE,{initialPath:r,method:o,summary:e.summary,span:6,pathMode:(ge=e.additionalOperationContext.pathZuploConfig)==null?void 0:ge.pathMode,hasError:d!=null,onPathChange:N,onPathModeChange:K,operationData:e,onFieldModified:B}),d?v.jsx("p",{"data-test":"path-error",className:"text-sm text-red-600 pt-1 ml-10",children:d}):null]}),v.jsxs("div",{className:"flex flex-col",children:[v.jsxs("div",{className:"flex justify-start gap-x-3 xl:gap-x-8 w-full items-center flex-wrap gap-y-3 lg:gap-y-0 lg:flex-nowrap",children:[v.jsx(PE,{selectedMethod:o,onSelectionChanged:k,versionPathPrefix:s,span:4}),v.jsx(kE,{selectedCorsPolicy:x.corsPolicy,corsPolicies:[],span:3,onCORSSelectionChanged:A}),v.jsx(LE,{shouldExcludeFromDocs:m,span:3,onSelectionChanged:R})]}),u?v.jsx("p",{"data-test":"method-error",className:"text-sm text-red-600 pt-1 w-full",children:u}):null]})]}),v.jsx("div",{className:"w-full col-span-12",children:G})]})};let ql;const kL=new Uint8Array(16);function LL(){if(!ql&&(ql=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ql))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ql(kL)}const We=[];for(let e=0;e<256;++e)We.push((e+256).toString(16).slice(1));function bL(e,t=0){return(We[e[t+0]]+We[e[t+1]]+We[e[t+2]]+We[e[t+3]]+"-"+We[e[t+4]]+We[e[t+5]]+"-"+We[e[t+6]]+We[e[t+7]]+"-"+We[e[t+8]]+We[e[t+9]]+"-"+We[e[t+10]]+We[e[t+11]]+We[e[t+12]]+We[e[t+13]]+We[e[t+14]]+We[e[t+15]]).toLowerCase()}const PL=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$p={randomUUID:PL};function AL(e,t,n){if($p.randomUUID&&!t&&!e)return $p.randomUUID();e=e||{};const r=e.random||(e.rng||LL)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return bL(r)}const OL="Document Order",$L=["Document Order","Path","Summary"],Ls="Untagged";function IL(e){return{summary:"New Route",description:"Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do `eiusmod tempor` incididunt ut labore et dolore magna aliqua.",[To]:Bu(e),operationId:AL()}}function Bu(e){return{corsPolicy:"none",handler:{export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:e}},policies:{inbound:[]}}}const ML=()=>{var q;const[e,t]=p.useState(),[n,r]=p.useState([]),[o,l]=p.useState(),[i,a]=p.useState(void 0),[s,u]=p.useState(OL),[c,d]=p.useState(void 0),h=Nd(),[S,y]=p.useState(),[w,x]=p.useState(),[m,f]=Vf(()=>{if(o==null)throw new Error("Invalid state, operationToDelete should not be undefined");const b=()=>{try{A(o.path,o.method)}catch(D){D instanceof Error&&(d(D.message),g())}l(void 0),f()},O=()=>{l(void 0),f()};return v.jsx(Yf,{hideModal:f,alertType:"DELETE",bodyText:"Are you sure you want to delete this operation?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:b,onSecondaryButtonClick:O,primaryButtonTestID:"confirm-delete-btn"})},[o,l]),[g,R]=Vf(()=>{const b=()=>{d(void 0),R()};return v.jsx(Yf,{alertType:"ERROR",bodyText:c??"",onPrimaryButtonClick:()=>{},onSecondaryButtonClick:b,primaryButtonText:"Edit file directly",secondaryButtonText:"Cancel",hideModal:b,title:"Error"})},[c]);if(!h.openApiData)throw new Error("Invalid State - no OpenApiData");const L=(q=h.openApiData.tags)==null?void 0:q.map(b=>({value:b.name,label:b.name,shouldSupportOnly:!0}));L==null||L.push({value:Ls,label:Ls,shouldSupportOnly:!0});const N=n.reduce((b,O)=>(b.set(O,!0),b),new Map),k=h.operationArray,A=(b,O)=>{h.deleteOperation(b,O)},K=()=>{var P,C,j,M;const b=(j=(C=(P=h.openApiData)==null?void 0:P.servers)==null?void 0:C.at(0))==null?void 0:j.url,O=IL(b??Di),re=`/path-${((M=h.operationArray)==null?void 0:M.length)??0}`,_=Wt.OpenAPIV3.HttpMethods.GET;try{h.addOperation(re,_,O)}catch(X){X instanceof Error&&(d(X.message),g())}a(O.operationId)},B=(b,O,D)=>{l({path:b,method:O,operationId:D}),m()},G=b=>{t(b)},te=b=>{r(b)},W=b=>{u(b.value)},le=b=>{var D;if(!e||e==="")return!0;const O=e.toLowerCase();return b.additionalOperationContext.path.includes(O)||((D=b.summary)==null?void 0:D.toLowerCase().includes(O))},ge=b=>{if(n.length===0)return!0;const O=b.tags;return O?O.some(D=>N.has(D)):n.includes(Ls)},z=(b,O)=>{var D;switch(s){case"Document Order":return 0;case"Path":return b.additionalOperationContext.path.localeCompare(O.additionalOperationContext.path);case"Summary":return!b.summary&&!O.summary?0:!b.summary&&O.summary?1:b.summary&&!O.summary?-1:((D=b.summary)==null?void 0:D.localeCompare(O.summary??""))??0}};return!k||k.length===0&&(!e||e.trim().length===0)?v.jsx(xE,{addRoute:K}):v.jsx(v.Fragment,{children:v.jsxs("div",{className:"mx-2 grid grid-cols-3 h-full flex-grow",children:[v.jsxs("div",{className:"flex flex-col justify-start col-span-1 h-full py-6",children:[v.jsx("div",{className:"flex w-full mr-3 pb-5",children:v.jsx(RE,{onSearch:G})}),v.jsxs("div",{className:"flex flex-wrap w-full justify-between gap-x-4 gap-y-2 mr-3 pb-5",children:[v.jsx(Vn,{labelPrefixElement:v.jsx("span",{className:"hidden 2xl:inline mr-1",children:"Sort:"}),selected:{label:s,value:s},onChange:W,options:$L.map(b=>({label:b,value:b}))}),v.jsx(cE,{filterPrefixClassName:"hidden 2xl:inline",filterName:n.length===1?"Tag":"Tags",activeFilters:n,options:L??[],onFilterChange:te,isDisabled:!L})]}),v.jsx("div",{className:"relative max-h-[calc(100vh-250px)] overflow-auto w-full mb-2",children:k.filter(le).filter(ge).sort(z).map(({additionalOperationContext:b,...O})=>{const D=O.operationId===i,re=D&&S?S:b.path,_=D&&w?w:O.summary;return v.jsx("div",{className:"flex w-full items-center",children:v.jsx(_E,{path:re,method:b.method,summary:_,operationId:O.operationId,isSelected:O.operationId===i,onOperationSelected:P=>{a(P),y(""),x("")},onDelete:B})},O.operationId)})}),v.jsx("div",{className:"flex justify-center",children:v.jsxs("button",{type:"button",onClick:K,className:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500","data-test":"add-route-btn",children:[v.jsx(hS,{className:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),v.jsx("span",{children:"Add Route"})]})})]}),v.jsx("div",{className:"col-span-2 flex flex-col",children:v.jsx(nd.Provider,{value:{setPath:y,setSummary:x},children:v.jsx(NL,{operationData:k.find(b=>b.operationId===i)})})})]})})},jL=({url:e,surfaceResponse:t})=>{const n=Td().get("path"),[r,o]=p.useState(!1),l=Nd();l.openApiData;const i=async()=>{try{if(!n)throw new Error("You must pick a file before saving");o(!0);const a=await fetch(`${e}/save-open-api-updates`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({filePath:n,content:l.openApiData})}),s=await a.json();if(t(s.message,a.status===200?"success":"error"),a.status===200)return}catch(a){t(`Error: ${a.message}`,"error")}finally{o(!1)}};return v.jsx("div",{className:"mt-5",children:v.jsx("div",{className:"inline-block ml-3",children:r?v.jsx(td,{className:"w-4 h-4 mr-4 float-right"}):v.jsx("button",{type:"button",onClick:()=>i(),className:"inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500 bg-zuplo-pink hover:bg-zuplo-pink-hover",disabled:r,children:"Save Changes"})})})},DL=({url:e,handleErrors:t})=>{const[n,r]=p.useState(null),[o,l]=p.useState([]),i=[],[a,s]=RL(),[u,c]=p.useState(!0),d=S=>{const y=S.value;r(S),h("path",y)},h=(S,y)=>{let w=new URLSearchParams(a);w.set(S,y),s(w)};return p.useEffect(()=>{o&&o.length>0&&(r({label:o[0],value:o[0]}),h("path",o[0]))},[o]),p.useEffect(()=>{async function S(){try{c(!0);const y=await fetch(`${e}/open-api-files`,{method:"GET"});if(y.status!==200){const x=await y.json();t(x.message);return}const w=await y.json();l(w),c(!1)}catch(y){t(y.message)}finally{c(!1)}}S()},[e]),o.forEach(S=>{i.push({label:S,value:S})}),v.jsx("div",{className:"mt-5 justify-end pl-3 pr-6",children:v.jsx("div",{className:"inline-block w-1/5 ",children:v.jsx(Vn,{testId:"file-selector",placeholder:"Select Open API file",options:i,selected:n,onChange:d,className:"inline-block w-full text-base max-w-sm md:max-w-xs mr-4 h-[42px] text-slate-600",classNameOptions:"w-full",isLoadingData:u})})})},FL=({message:e,type:t,className:n})=>v.jsx(v.Fragment,{children:v.jsx(tr,{show:e!=="",enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:pe("col-span-12 rounded-md p-5",{"bg-pink-100":t==="error","bg-green-100 ":t==="success"},n),children:v.jsx("span",{className:"text-sm text-gray-500",children:e})})}),UL=5e3;function VL(){const[e,t]=p.useState(null),n=l=>{t({message:l,type:"error"})},r=(l,i)=>{t({message:l,type:i}),setTimeout(()=>{t(null)},UL)},o="http://localhost:5500";return v.jsx(_L,{children:v.jsxs(G1,{children:[v.jsxs("div",{className:"flex flex-row text-slate-500 rounded-md w-auto gap-5 mt-5",children:[v.jsx("div",{className:"inline-block w-1/5",children:v.jsx(DL,{url:o,handleErrors:n})}),v.jsx("div",{className:"text-left inline-block w-3/5",children:e!==null&&v.jsx(FL,{message:e.message,type:e.type})})]}),v.jsx(G2,{children:v.jsx(TL,{url:o,handleErrors:n,children:v.jsxs(v.Fragment,{children:[v.jsx(jL,{url:o,surfaceResponse:r}),v.jsx(ML,{})]})})})]})})}bs.createRoot(document.getElementById("root")).render(v.jsx(F.StrictMode,{children:v.jsx(VL,{})}));
|
|
84
|
+
*/function Yp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function fk(e,t){let n=Yp(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const mk="startTransition",Dv=Wo[mk];function gk(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=Y4({window:o,v5Compat:!0}));let a=i.current,[l,s]=v.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&Dv?Dv(()=>s(d)):s(d)},[s,u]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(pk,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}var Av;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Av||(Av={}));var Cv;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Cv||(Cv={}));function hk(e){let t=v.useRef(Yp(e)),n=v.useRef(!1),r=_m(),o=v.useMemo(()=>fk(r.search,n.current?null:t.current),[r.search]),i=ak(),a=v.useCallback((l,s)=>{const u=Yp(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,s)},[i,o]);return[o,a]}function $m(){return new URLSearchParams(_m().search)}const fb=O.createContext(void 0),Fm=()=>{const e=v.useContext(fb);if(!e)throw new Error("useOpenApiDesignerContext must be used within a OpenApiDesignerContextWrapper");return e},vk=({url:e,children:t,handleErrors:n})=>{const r=$m().get("path"),o=ab(),[i,a]=v.useState(!0),l=Om(r),s=Rm(),u=Gw(jm);if(v.useEffect(()=>{async function d(){try{if(r){const p=await fetch(`${e}/open-api-content?path=${r}`,{method:"GET"});if(p.status!==200){const I=await p.json();n(I.message);return}const f=await p.json(),g=[];f.forEach(I=>{o({path:I.path,type:kp.File,content:JSON.stringify(I.content),saveState:Ja.unmodified}),g.push({path:I.path,type:kp.File})}),u(g)}a(!1)}catch(p){n(p.message),a(!1)}}d()},[e,r]),!l&&i===!1||r===null)return m.jsx("div",{className:"p-6",children:"You must select an Open API file to use the Open API Designer"});if(!l||i)return m.jsx("div",{className:"p-6",children:m.jsx(Lu,{className:"w-4 h-4 mr-4"})});if(l.content===void 0)throw new Error("Invalid State - the oas.json fileModel content is 'undefined'");const c=new zE(l,s);return m.jsx(fb.Provider,{value:c,children:t})},yk=({message:e})=>m.jsxs("div",{className:"flex flex-row items-center h-12 p-2",children:[m.jsx(Lu,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}),m.jsx("span",{children:e??"Loading"})]}),Ik=()=>{const e=void 0;return m.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[m.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[m.jsx(mE,{className:"h-6 w-auto mr-1"}),m.jsx("span",{children:"policies.json not found"})]}),m.jsx("p",{children:"You now need a policies.json file to continue building your Zup."}),m.jsx("p",{children:"We can generate one for you, so you can keep working."}),m.jsx(Hn,{classNames:"w-32",label:"Generate file",buttonType:qo.PRIMARY,onClick:()=>e})]})};class Mk{constructor(t,n,r){le(this,"updateActiveFile");le(this,"getPolicyListEnforced",()=>{if(!this.policyList)throw new Error("Invalid State - PolicyManagerInstance.policyList was undefined");return this.policyList});le(this,"getOpenApiDocumentsEnforced",()=>{if(!this.openApiDocuments)throw new Error("Invalid State - PolicyManagerInstance.openApiDocuments was undefined");return this.openApiDocuments});le(this,"policyListFileModel");le(this,"policyList");le(this,"corsPolicyList");le(this,"openApiFileModels");le(this,"openApiDocuments");le(this,"policiesUsageInfo");le(this,"parseError");le(this,"updatePolicyList",t=>{const n={...this.policyListFileModel,content:JSON.stringify({policies:t,corsPolicies:this.corsPolicyList},null,2)};this.policyList=t,this.updateActiveFile(n)});le(this,"createPolicy",(t,n)=>{let r=this.policyList;if(r||(r=[]),r.some(i=>i.name===t.name))throw new Error(`Failed to create policy: Policy with name ${t.name} already exists. Please choose another name.`);r.push(t),this.updatePolicyList(r),n&&this.batchUpdateOperationPolicies(n,Ro(t.policyType),[t.name],"ADD")});le(this,"removePolicy",(t,n,r)=>{this.batchUpdateOperationPolicies(r,n,[t],"REMOVE")});le(this,"movePolicy",(t,n,r,o,i)=>{const a=bk(t,n,r);this.batchUpdateOperationPolicies([i],o,a,"OVERRIDE")});le(this,"deletePolicy",t=>{const n=this.policyList;if(!n)throw new Error("Failed to remove policy: policy list was not found");const r=n.findIndex(l=>l.name===t);if(r===-1)throw new Error(`Failed to delete policy: Policy with name ${t} does not exist.`);const o=n.splice(r,1)[0],i=Ro(o.policyType),a=this.getOperationsUsingPolicy(o.name).map(({additionalOperationContext:{oasFilePath:l,path:s,method:u}})=>({filePath:l,path:s,method:u}));this.batchUpdateOperationPolicies(a,i,[o.name],"REMOVE"),this.updatePolicyList(n)});le(this,"updatePolicy",(t,n)=>{const r=this.policyList;if(!r)throw new Error("Failed to update policy: Policy list not found");const o=r.findIndex(s=>s.name===t);if(o===-1)throw new Error(`Failed to update policy: Policy with name ${t} not found`);if(n.name===t){r[o]=n,this.updatePolicyList(r);return}const i=n.name;if(r.some(s=>s.name===i))throw new Error(`Failed to update policy: Policy with name ${i} already exists. Please choose another name`);const l=this.getOperationsUsingPolicy(t).map(({additionalOperationContext:{oasFilePath:s,path:u,method:c}})=>({filePath:s,path:u,method:c}));l.length>0&&this.batchUpdateOperationPolicies(l,Ro(n.policyType),[t,n.name],"RENAME"),r[o]=n,this.updatePolicyList(r)});le(this,"applyPolicy",(t,n)=>{const r=this.policyList;if(!r)throw new Error("Failed to apply policy: Policy list was not found");const o=r.find(i=>i.name===t);if(!o)throw new Error(`Failed to apply policy: Policy with name ${t} does not exist.`);this.batchUpdateOperationPolicies(n,Ro(o.policyType),[t],"ADD")});le(this,"getOperationsUsingPolicy",t=>{var n;return((n=this.policiesUsageInfo.find(r=>r.name===t))==null?void 0:n.operations)??[]});le(this,"getAllOperations",()=>{const t=this.openApiFileModels;return this.getOpenApiDocumentsEnforced().flatMap((r,o)=>{const i=t[o],a=r.paths??{};return Bs(i.path,a)})});this.openApiFileModels=n,this.openApiDocuments=[],n.forEach(o=>{try{const i=o.content;if(!i)throw new Error(`File: ${o.path} contains no content. Please configure it as a valid Open API file`);this.openApiDocuments=(this.openApiDocuments??[]).concat(JSON.parse(i))}catch(i){this.parseError=i}}),this.policyListFileModel=t;try{const o=JSON.parse(t.content??"");this.policyList=o.policies,this.corsPolicyList=o.corsPolicies}catch(o){this.parseError=o}try{this.policiesUsageInfo=Tv(this.policyList??[],this.openApiDocuments,n)}catch(o){this.parseError=o,this.policiesUsageInfo=[]}this.updateActiveFile=r}batchUpdateOperationPolicies(t,n,r,o){const i=this.openApiDocuments?Array.from(this.openApiDocuments):void 0,a=Array.from(this.openApiFileModels),l=[];if(!i)throw new Error("Failed to update operation, no Open API Documents found");for(const s of t){const{filePath:u,path:c,method:d}=s,p=a.findIndex(I=>I.path===u);if(p===-1)throw new Error(`Failed to update operation, Open API file '${u}' not found`);const f=i.at(p);if(!f)throw new Error(`Failed to update operation, Open API file '${u}' not found`);const g=this.updateOperationPolicies(f,u,c,d,n,r,o);i[p]=g,a[p]={...a[p],content:JSON.stringify(g,null,2)},l.includes(p)||l.push(p)}this.openApiDocuments=i,this.openApiFileModels=a,this.policiesUsageInfo=Tv(this.getPolicyListEnforced(),i,a),l.forEach(s=>{this.updateActiveFile(a[s])})}updateOperationPolicies(t,n,r,o,i,a,l){var I,w;const s=t.paths;if(!s)throw new Error(`Failed to update operation, no paths found in ${n}`);const u=s[r];if(!u)throw new Error(`Failed to update operation, path '${r}' not found in ${n}`);const c=u[o];if(!c)throw new Error(`Failed to update operation, method '${o}' not found in path ${r}`);const d=(w=(I=t.servers)==null?void 0:I.at(0))==null?void 0:w.url,p=c[pr]??ru(d??Ca);let f=p.policies;f||(f={});const g=f[i]??[];switch(l){case"ADD":f[i]=g.concat(a);break;case"REMOVE":f[i]=g.filter(M=>!a.includes(M));break;case"OVERRIDE":f[i]=a;break;case"RENAME":const y=a[0],h=a[1];f[i]=g.map(M=>M===y?h:M)}return p.policies=f,c[pr]=p,u[o]=c,s[r]=u,t.paths=s,t}}const nc=()=>{const e=v.useContext(mb);if(!e)throw new Error("usePolicyManager found no context, it must be nested inside <PolicyContextWrapper />");return e},mb=O.createContext(void 0),wk=({children:e})=>{const t=Om("policies.json"),n=V4(),r=Rm();if(!t)return n.length===0?m.jsx("div",{className:"p-6",children:m.jsx(yk,{message:"Loading policies.json"})}):m.jsx("div",{className:"p-6",children:m.jsx(Ik,{})});if(t.content===void 0)throw new Error("Invalid State - the policies.json fileModel content is 'undefined'");const o=new Mk(t,n,r);return m.jsx(mb.Provider,{value:o,children:e})},Ro=e=>e.includes("inbound")?"inbound":"outbound",bk=(e,t,n)=>{const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r},Tv=(e,t,n)=>{const r=t.flatMap((o,i)=>{const a=n[i],l=o.paths??{};return Bs(a.path,l)});return e.reduce((o,i)=>{const a=Ro(i.policyType),l=r.reduce((u,c)=>{var d,p,f;return(f=(p=(d=c[pr])==null?void 0:d.policies)==null?void 0:p[a])!=null&&f.includes(i.name)?u.concat(c):u},[]),s={...i,operations:l};return o.concat(s)},[])},gb=({isOpen:e,setIsOpen:t,children:n,title:r,badgeTitle:o,matchWidth:i=!1})=>m.jsx(Pn.Root,{show:e,as:"div",children:m.jsx(Us,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>t(!0),children:m.jsxs("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[m.jsx(Pn.Child,{as:"div",enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),m.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),m.jsx(Pn.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs("div",{className:`inline-block align-bottom bg-gray-100 rounded-md text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-5xl ${i?"sm:w-fit":"sm:w-full"} outline-none`,children:[m.jsxs("div",{className:"flex justify-between items-center pl-8 pt-4 pr-6 h-14",children:[m.jsxs("h1",{className:"self-end flex space-x-4 items-center",children:[m.jsx("span",{className:"font-bold text-2xl tracking-wide",children:r}),o?m.jsx("span",{className:"bg-zuplo-purple rounded-lg py-1 px-4 text-white opacity-50",children:o.toLocaleUpperCase()}):null]}),m.jsxs("button",{type:"button",className:"bg-gray-100 rounded-md text-gray-400 hover:text-gray-500 outline-none self-start",onClick:()=>t(!1),style:{transform:"rotate(45deg)"},children:[m.jsx("span",{className:"sr-only",children:"Close"}),m.jsx("span",{className:"text-3xl text-black font-sans font-bold","aria-hidden":"true",children:"+"})]})]}),n]})})]})})});function xk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ev(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function jv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ev(Object(n),!0).forEach(function(r){xk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ev(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Nk(e,t){if(e==null)return{};var n=Sk(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dk(e,t){return Ak(e)||Ck(e,t)||Tk(e,t)||Ek()}function Ak(e){if(Array.isArray(e))return e}function Ck(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function Tk(e,t){if(e){if(typeof e=="string")return Pv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pv(e,t)}}function Pv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ek(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
85
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Rv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(n),!0).forEach(function(r){jk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,i){return i(o)},r)}}function Gi(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return t.apply(n,[].concat(o,l))}}}function Zs(e){return{}.toString.call(e).includes("Object")}function Lk(e){return!Object.keys(e).length}function Ea(e){return typeof e=="function"}function Rk(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ok(e,t){return Zs(t)||wr("changeType"),Object.keys(t).some(function(n){return!Rk(e,n)})&&wr("changeField"),t}function kk(e){Ea(e)||wr("selectorType")}function zk(e){Ea(e)||Zs(e)||wr("handlerType"),Zs(e)&&Object.values(e).some(function(t){return!Ea(t)})&&wr("handlersType")}function Uk(e){e||wr("initialIsRequired"),Zs(e)||wr("initialType"),Lk(e)&&wr("initialContent")}function Bk(e,t){throw new Error(e[t]||e.default)}var _k={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wr=Gi(Bk)(_k),Hl={changes:Ok,selector:kk,handler:zk,initial:Uk};function $k(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Hl.initial(e),Hl.handler(t);var n={current:e},r=Gi(Wk)(n,t),o=Gi(Hk)(n),i=Gi(Hl.changes)(e),a=Gi(Fk)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return Hl.selector(u),u(n.current)}function s(u){Pk(r,o,i,a)(u)}return[l,s]}function Fk(e,t){return Ea(t)?t(e.current):t}function Hk(e,t){return e.current=Rv(Rv({},e.current),t),t}function Wk(e,t,n){return Ea(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var Gk={create:$k},Zk={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function Vk(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return t.apply(n,[].concat(o,l))}}}function Yk(e){return{}.toString.call(e).includes("Object")}function Qk(e){return e||Ov("configIsRequired"),Yk(e)||Ov("configType"),e.urls?(Jk(),{paths:{vs:e.urls.monacoBase}}):e}function Jk(){console.warn(hb.deprecation)}function Xk(e,t){throw new Error(e[t]||e.default)}var hb={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
86
|
+
You are using deprecated way of configuration.
|
|
87
|
+
|
|
88
|
+
Instead of using
|
|
89
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
90
|
+
use
|
|
91
|
+
monaco.config({ paths: { vs: '...' } })
|
|
92
|
+
|
|
93
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
94
|
+
`},Ov=Vk(Xk)(hb),qk={config:Qk},Kk=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(i,a){return a(i)},o)}};function vb(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],vb(e[n],t[n]))}),jv(jv({},e),t)}var ez={type:"cancelation",msg:"operation is manually canceled"};function yd(e){var t=!1,n=new Promise(function(r,o){e.then(function(i){return t?o(ez):r(i)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var tz=Gk.create({config:Zk,isInitialized:!1,resolve:null,reject:null,monaco:null}),yb=Dk(tz,2),ol=yb[0],rc=yb[1];function nz(e){var t=qk.config(e),n=t.monaco,r=Nk(t,["monaco"]);rc(function(o){return{config:vb(o.config,r),monaco:n}})}function rz(){var e=ol(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(rc({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),yd(Id);if(window.monaco&&window.monaco.editor)return Ib(window.monaco),e.resolve(window.monaco),yd(Id);Kk(oz,az)(lz)}return yd(Id)}function oz(e){return document.body.appendChild(e)}function iz(e){var t=document.createElement("script");return e&&(t.src=e),t}function az(e){var t=ol(function(r){var o=r.config,i=r.reject;return{config:o,reject:i}}),n=iz("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function lz(){var e=ol(function(n){var r=n.config,o=n.resolve,i=n.reject;return{config:r,resolve:o,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){Ib(n),e.resolve(n)},function(n){e.reject(n)})}function Ib(e){ol().monaco||rc({monaco:e})}function sz(){return ol(function(e){var t=e.monaco;return t})}var Id=new Promise(function(e,t){return rc({resolve:e,reject:t})}),Mb={config:nz,init:rz,__getMonacoInstance:sz},uz={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Md=uz,cz={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dz=cz;function pz({children:e}){return O.createElement("div",{style:dz.container},e)}var fz=pz,mz=fz;function gz({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:i,wrapperProps:a}){return O.createElement("section",{style:{...Md.wrapper,width:e,height:t},...a},!n&&O.createElement(mz,null,r),O.createElement("div",{ref:o,style:{...Md.fullWidth,...!n&&Md.hide},className:i}))}var hz=gz,wb=v.memo(hz);function vz(e){v.useEffect(e,[])}var bb=vz;function yz(e,t,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var _t=yz;function aa(){}function Oo(e,t,n,r){return Iz(e,r)||Mz(e,t,n,r)}function Iz(e,t){return e.editor.getModel(xb(e,t))}function Mz(e,t,n,r){return e.editor.createModel(t,n,r?xb(e,r):void 0)}function xb(e,t){return e.Uri.parse(t)}function wz({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:s=!1,theme:u="light",loading:c="Loading...",options:d={},height:p="100%",width:f="100%",className:g,wrapperProps:I={},beforeMount:w=aa,onMount:y=aa}){let[h,M]=v.useState(!1),[b,N]=v.useState(!0),x=v.useRef(null),D=v.useRef(null),j=v.useRef(null),L=v.useRef(y),R=v.useRef(w),U=v.useRef(!1);bb(()=>{let Y=Mb.init();return Y.then(F=>(D.current=F)&&N(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>x.current?q():Y.cancel()}),_t(()=>{if(x.current&&D.current){let Y=x.current.getOriginalEditor(),F=Oo(D.current,e||"",r||n||"text",i||"");F!==Y.getModel()&&Y.setModel(F)}},[i],h),_t(()=>{if(x.current&&D.current){let Y=x.current.getModifiedEditor(),F=Oo(D.current,t||"",o||n||"text",a||"");F!==Y.getModel()&&Y.setModel(F)}},[a],h),_t(()=>{let Y=x.current.getModifiedEditor();Y.getOption(D.current.editor.EditorOption.readOnly)?Y.setValue(t||""):t!==Y.getValue()&&(Y.executeEdits("",[{range:Y.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),Y.pushUndoStop())},[t],h),_t(()=>{var Y,F;(F=(Y=x.current)==null?void 0:Y.getModel())==null||F.original.setValue(e||"")},[e],h),_t(()=>{let{original:Y,modified:F}=x.current.getModel();D.current.editor.setModelLanguage(Y,r||n||"text"),D.current.editor.setModelLanguage(F,o||n||"text")},[n,r,o],h),_t(()=>{var Y;(Y=D.current)==null||Y.editor.setTheme(u)},[u],h),_t(()=>{var Y;(Y=x.current)==null||Y.updateOptions(d)},[d],h);let ee=v.useCallback(()=>{var ne;if(!D.current)return;R.current(D.current);let Y=Oo(D.current,e||"",r||n||"text",i||""),F=Oo(D.current,t||"",o||n||"text",a||"");(ne=x.current)==null||ne.setModel({original:Y,modified:F})},[n,t,o,e,r,i,a]),W=v.useCallback(()=>{var Y;!U.current&&j.current&&(x.current=D.current.editor.createDiffEditor(j.current,{automaticLayout:!0,...d}),ee(),(Y=D.current)==null||Y.editor.setTheme(u),M(!0),U.current=!0)},[d,u,ee]);v.useEffect(()=>{h&&L.current(x.current,D.current)},[h]),v.useEffect(()=>{!b&&!h&&W()},[b,h,W]);function q(){var F,ne,P,z;let Y=(F=x.current)==null?void 0:F.getModel();l||((ne=Y==null?void 0:Y.original)==null||ne.dispose()),s||((P=Y==null?void 0:Y.modified)==null||P.dispose()),(z=x.current)==null||z.dispose()}return O.createElement(wb,{width:f,height:p,isEditorReady:h,loading:c,_ref:j,className:g,wrapperProps:I})}var bz=wz;v.memo(bz);function xz(e){let t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}var Sz=xz,Wl=new Map;function Nz({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:i,theme:a="light",line:l,loading:s="Loading...",options:u={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:p=!1,width:f="100%",height:g="100%",className:I,wrapperProps:w={},beforeMount:y=aa,onMount:h=aa,onChange:M,onValidate:b=aa}){let[N,x]=v.useState(!1),[D,j]=v.useState(!0),L=v.useRef(null),R=v.useRef(null),U=v.useRef(null),ee=v.useRef(h),W=v.useRef(y),q=v.useRef(),Y=v.useRef(r),F=Sz(i),ne=v.useRef(!1),P=v.useRef(!1);bb(()=>{let G=Mb.init();return G.then(S=>(L.current=S)&&j(!1)).catch(S=>(S==null?void 0:S.type)!=="cancelation"&&console.error("Monaco initialization: error:",S)),()=>R.current?_():G.cancel()}),_t(()=>{var S,C,T,k;let G=Oo(L.current,e||r||"",t||o||"",i||n||"");G!==((S=R.current)==null?void 0:S.getModel())&&(d&&Wl.set(F,(C=R.current)==null?void 0:C.saveViewState()),(T=R.current)==null||T.setModel(G),d&&((k=R.current)==null||k.restoreViewState(Wl.get(i))))},[i],N),_t(()=>{var G;(G=R.current)==null||G.updateOptions(u)},[u],N),_t(()=>{!R.current||r===void 0||(R.current.getOption(L.current.editor.EditorOption.readOnly)?R.current.setValue(r):r!==R.current.getValue()&&(P.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),R.current.pushUndoStop(),P.current=!1))},[r],N),_t(()=>{var S,C;let G=(S=R.current)==null?void 0:S.getModel();G&&o&&((C=L.current)==null||C.editor.setModelLanguage(G,o))},[o],N),_t(()=>{var G;l!==void 0&&((G=R.current)==null||G.revealLine(l))},[l],N),_t(()=>{var G;(G=L.current)==null||G.editor.setTheme(a)},[a],N);let z=v.useCallback(()=>{var G;if(!(!U.current||!L.current)&&!ne.current){W.current(L.current);let S=i||n,C=Oo(L.current,r||e||"",t||o||"",S||"");R.current=(G=L.current)==null?void 0:G.editor.create(U.current,{model:C,automaticLayout:!0,...u},c),d&&R.current.restoreViewState(Wl.get(S)),L.current.editor.setTheme(a),x(!0),ne.current=!0}},[e,t,n,r,o,i,u,c,d,a]);v.useEffect(()=>{N&&ee.current(R.current,L.current)},[N]),v.useEffect(()=>{!D&&!N&&z()},[D,N,z]),Y.current=r,v.useEffect(()=>{var G,S;N&&M&&((G=q.current)==null||G.dispose(),q.current=(S=R.current)==null?void 0:S.onDidChangeModelContent(C=>{P.current||M(R.current.getValue(),C)}))},[N,M]),v.useEffect(()=>{if(N){let G=L.current.editor.onDidChangeMarkers(S=>{var T;let C=(T=R.current.getModel())==null?void 0:T.uri;if(C&&S.find(k=>k.path===C.path)){let k=L.current.editor.getModelMarkers({resource:C});b==null||b(k)}});return()=>{G==null||G.dispose()}}return()=>{}},[N,b]);function _(){var G,S;(G=q.current)==null||G.dispose(),p?d&&Wl.set(i,R.current.saveViewState()):(S=R.current.getModel())==null||S.dispose(),R.current.dispose()}return O.createElement(wb,{width:f,height:g,isEditorReady:N,loading:s,_ref:U,className:I,wrapperProps:w})}var Dz=Nz,Az=v.memo(Dz),Sb=Az;const Cz={"policy-options":"_policy-options_pxqsa_1"},Hm=({documentationSrc:e})=>m.jsx("div",{className:`px-4 py-2 overflow-auto h-60 bg-editor prose prose-invert prose-sm max-w-full ${Cz["policy-options"]}`,dangerouslySetInnerHTML:{__html:e}}),Nb=({onConfirm:e,onCancel:t,onRequestPreviewAccess:n,isDisabled:r=!1,mustRequestAccess:o})=>{const i=m.jsxs(m.Fragment,{children:[m.jsx(Hn,{label:"Cancel",buttonType:qo.WHITE,classNames:"w-24 justify-center",onClick:t,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(Hn,{label:"OK",classNames:"w-24 justify-center",onClick:e,isDisabled:r,dataTestId:"policy-picker-footer-ok-btn"})]}),a=m.jsxs(m.Fragment,{children:[m.jsx(Hn,{label:"Cancel",buttonType:qo.WHITE,classNames:"w-24 justify-center",onClick:t,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(Hn,{label:"Request access",classNames:"w-36 justify-center",onClick:n,dataTestId:"policy-picker-footer-request-access-btn"})]});return m.jsxs("div",{className:"h-20 flex items-center",children:[m.jsx("div",{}),m.jsx("div",{className:"ml-auto space-x-2 mr-3 flex",children:o?a:i})]})},Db=({name:e,onChangeName:t,policyTypeInformation:n,validationErrorName:r,disabled:o})=>{const i=a=>{t(a.currentTarget.value)};return m.jsxs("div",{className:"grid grid-cols-8 text-sm gap-2 items-center",children:[m.jsx("label",{className:"col-span-1 text-right",children:"Name"}),m.jsxs("div",{className:"col-span-7",children:[m.jsx("input",{type:"text",id:"route-handler","data-test":"policy-picker-name-input",name:"route-handler",className:fe("shadow-sm block w-full text-sm rounded-md",{"border-2 border-red-300 text-red-600 focus:ring-red-500 focus:border-red-500":r,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!r,"bg-gray-200":o}),value:e||"",disabled:o,onChange:i,"aria-describedby":"email-description"}),r?m.jsx("span",{className:"absolute text-xs mt-1 text-red-600",children:r}):null]}),m.jsx("label",{className:"col-span-1 text-right mt-4",children:"Type"}),m.jsxs("span",{className:"col-span-7 text-gray-500 mt-4",children:[n.typeName,n.documentationUrl?m.jsxs(m.Fragment,{children:[" ","-"," ",m.jsx("a",{href:n.documentationUrl,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",children:"documentation"})]}):null]})]})},Vs=({label:e,children:t,classNameLabel:n,className:r})=>m.jsxs("div",{className:r,children:[m.jsx("span",{className:fe("text-gray-500 uppercase pb-2",n),children:e}),m.jsx("div",{className:"mt-2",children:t})]}),Tz={legacyIdMaps:{"api-auth-key-inbound-policy":"api-key-auth-inbound","auth0-jwt-inbound":"auth0-jwt-auth-inbound","basic-auth-inbound-policy":"basic-auth-inbound","basic-rate-limit-policy-inbound":"rate-limit-policy-inbound","cognito-jwt-inbound":"cognito-jwt-auth-inbound","open-id-jwt-inbound":"open-id-jwt-auth-inbound"}},Ez=[{name:"Amberflo Metering / Billing",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/amberflo-metering-inbound/",id:"amberflo-metering-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"AmberfloMeteringInboundPolicy",options:{apiKey:"YOUR_API_KEY",customerIdPropertyPath:".data.accountNumber",meterApiName:"api-calls",meterValue:1,statusCodes:"200-299, 304"}},exampleHtml:'<div><p>Amberflo is a usage metering and billing service. This policy allows you to send metering calls for each API to their meter ingest endpoint.</p></div><h3>Options</h3><ul><li><code>apiKey</code> <div><p>The API key to use when sending metering calls to Amberflo</p></div></li><li><code>meterApiName</code> <div><p>The name of the meter to use when sending metering calls to Amberflo (overridable in code)</p></div></li><li><code>meterValue</code> <div><p>The value to use when sending metering calls to Amberflo (overridable in code)</p></div></li><li><code>customerIdPropertyPath</code> <div><p>The path to the property on <code>request.user</code>contains the customer ID. For example <code>.data.accountNumber</code> would read the <code>request.user.data.accountNumber</code> property.</p></div></li><li><code>customerId</code> <div><p>The default customerId for all metering calls - overridable in code and by <code>customerIdPropertyPath</code></p></div></li><li><code>dimensions</code> <div><p>A dictionary of dimensions to be sent to Amberflo (extensible in code)</p></div></li><li><code>statusCodes</code> <div><p>A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo - defaults to <code>result.ok</code> (200-299) if not set.</p></div></li><li><code>url</code> <div><p>Optional, the URL to send metering events to (defaults to <a href="https://app.amberflo.io/ingest">https://app.amberflo.io/ingest</a>). This is useful for testing purposes.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjZweCIgaGVpZ2h0PSIyNnB4IiB2aWV3Qm94PSIwIDAgMjYgMjYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+YW1iZXJmbG9faWNvbjwvdGl0bGU+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iYW1iZXJmbG9faWNvbiI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMyw4IEMxNy45NzA1NjI3LDggMjIsMTIuMDI5NDM3MyAyMiwxNyBDMjIsMjEuOTcwNTYyNyAxNy45NzA1NjI3LDI2IDEzLDI2IEM4LjAyOTQzNzI1LDI2IDQsMjEuOTcwNTYyNyA0LDE3IEM0LDEyLjAyOTQzNzMgOC4wMjk0MzcyNSw4IDEzLDggWiBNMTMsMTEuMTA5MDkwOSBDOS43NDY1NDA3NSwxMS4xMDkwOTA5IDcuMTA5MDkwOTEsMTMuNzQ2NTQwNyA3LjEwOTA5MDkxLDE3IEM3LjEwOTA5MDkxLDIwLjI1MzQ1OTMgOS43NDY1NDA3NSwyMi44OTA5MDkxIDEzLDIyLjg5MDkwOTEgQzE2LjI1MzQ1OTMsMjIuODkwOTA5MSAxOC44OTA5MDkxLDIwLjI1MzQ1OTMgMTguODkwOTA5MSwxNyBDMTguODkwOTA5MSwxMy43NDY1NDA3IDE2LjI1MzQ1OTMsMTEuMTA5MDkwOSAxMywxMS4xMDkwOTA5IFoiIGlkPSJDb21iaW5lZC1TaGFwZSIgZmlsbD0iY3VycmVudENvbG9yIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMi41LDAgQzE2LjQzNTU1ODcsMCAxOS43ODA2MzkyLDIuNTA3Mzg2NjIgMjAuOTk5ODAxMSw1Ljk5OTMyMjQ0IEwxNy41OTgwNTk4LDUuOTk4OTQ0NzUgQzE2LjU4MDE4MTYsNC4yNTQ1NzkyOSAxNC42NzgyNzA3LDMuMDgxMDU0MTIgMTIuNSwzLjA4MTA1NDEyIEMxMC4zMjE3MjkzLDMuMDgxMDU0MTIgOC40MTk4MTg0Myw0LjI1NDU3OTI5IDcuNDAxOTQwMTUsNS45OTg5NDQ3NSBMNC4wMDAxOTg5Myw1Ljk5OTMyMjQ0IEM1LjIxOTM2MDc5LDIuNTA3Mzg2NjIgOC41NjQ0NDEyOSwwIDEyLjUsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiIGZpbGw9ImN1cnJlbnRDb2xvciI+PC9wYXRoPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjYiIGhlaWdodD0iMjYiPjwvcmVjdD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Legacy API Key Authentication (deprecated)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!0,documentationUrl:"https://zuplo.com/docs/policies/api-key-auth-inbound/",id:"api-key-auth-inbound",defaultHandler:{export:"ApiAuthKeyInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Deprecated - Please use the new 'API Key Authentication' policy instead. This policy will continue to work but will be removed in a future version of Zuplo.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgMjFhNCA0IDAgMDEtNC00VjVhMiAyIDAgMDEyLTJoNGEyIDIgMCAwMTIgMnYxMmE0IDQgMCAwMS00IDR6bTAgMGgxMmEyIDIgMCAwMDItMnYtNGEyIDIgMCAwMC0yLTJoLTIuMzQzTTExIDcuMzQzbDEuNjU3LTEuNjU3YTIgMiAwIDAxMi44MjggMGwyLjgyOSAyLjgyOWEyIDIgMCAwMTAgMi44MjhsLTguNDg2IDguNDg1TTcgMTdoLjAxIiAvPjwvc3ZnPg=="},{name:"API Key Authentication",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/api-key-inbound/",id:"api-key-inbound",defaultHandler:{export:"ApiKeyInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1}},exampleHtml:'<div><p>Authenticates requests based on API Keys using Zuplo API Management. You can learn more about the Zuplo API Key Service <a href="https://zuplo.com/docs/articles/api-key-api#buckets">here</a></p></div><h3>Options</h3><ul><li><code>authHeader</code> <div><p>The name of the header with the key. Defaults to <code>Authorization</code></p></div></li><li><code>authScheme</code> <div><p>The scheme used on the header. Defaults to <code>Bearer</code></p></div></li><li><code>bucketName</code> <div><p>Optional - The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project. You can contact <code>support@zuplo.com</code> to create a new bucket.</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>If requests should proceed even if the policy does not successfully authenticate the request. Defaults to false and rejects any request without a valid API key (returning a <code>401 - Unauthorized</code> response). Set to <code>true</code> to support multiple authentication methods or support both authenticated and anonymous requests.</p></div></li><li><code>cacheTtlSeconds</code> <div><p>The time to cache authentication results for a particular key. Higher values will decrease latency. Cached results will be valid until the cache expires even in the event the key is deleted, etc..</p></div></li><li><code>disableAutomaticallyAddingKeyHeaderToOpenApi</code> <div><p>Zuplo will automatically document your API key header within your OpenAPI specification & Developer Portal. Set this to <code>true</code> to disable this behavior.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgMjFhNCA0IDAgMDEtNC00VjVhMiAyIDAgMDEyLTJoNGEyIDIgMCAwMTIgMnYxMmE0IDQgMCAwMS00IDR6bTAgMGgxMmEyIDIgMCAwMDItMnYtNGEyIDIgMCAwMC0yLTJoLTIuMzQzTTExIDcuMzQzbDEuNjU3LTEuNjU3YTIgMiAwIDAxMi44MjggMGwyLjgyOSAyLjgyOWEyIDIgMCAwMTAgMi44MjhsLTguNDg2IDguNDg1TTcgMTdoLjAxIiAvPjwvc3ZnPg=="},{name:"Archive Request to Storage",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/archive-request-inbound/",id:"archive-request-inbound",defaultHandler:{export:"ArchiveRequestInbound",module:"$import(@zuplo/runtime)",options:{bucketName:"test-bucket-123.s3.amazonaws.com",path:"requests/",accessKeyId:"$env(AWS_ACCESS_KEY_ID)",accessKeySecret:"$env(AWS_ACCESS_KEY_SECRET)"}},exampleHtml:"<div><p>Archive incoming requests to S3 compatible storage. Works with any storage provider compatible with S3 APIs such as AWS S3, GCP Cloud Storage, and Azure Blob Storage.</p></div><h3>Options</h3><ul><li><code>bucketName</code> <div><p>The name of the storage bucket</p></div></li><li><code>path</code> <div><p>The path where requests are stored</p></div></li><li><code>accessKeyId</code> <div><p>The Access Key ID of the account authorized to write to the bucket</p></div></li><li><code>accessKeySecret</code> <div><p>The Access Key Secret of the account authorized to write to the bucket</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIj48cG9seWxpbmUgcG9pbnRzPSIxNiAxNiAxMiAxMiA4IDE2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjEyIiB4Mj0iMTIiIHkyPSIyMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMC4zOSAxOC4zOUE1IDUgMCAwIDAgMTggOWgtMS4yNkE4IDggMCAxIDAgMyAxNi4zIj48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Archive Response to Storage",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/archive-response-outbound/",id:"archive-response-outbound",defaultHandler:{export:"ArchiveResponseOutbound",module:"$import(@zuplo/runtime)",options:{bucketName:"test-bucket-123.s3.amazonaws.com",path:"responses/",accessKeyId:"$env(AWS_ACCESS_KEY_ID)",accessKeySecret:"$env(AWS_ACCESS_KEY_SECRET)"}},exampleHtml:"<div><p>Archive outgoing responses to S3 compatible storage. Works with any storage provider compatible with S3 APIs such as AWS S3, GCP Cloud Storage, and Azure Blob Storage.</p></div><h3>Options</h3><ul><li><code>bucketName</code> <div><p>The name of the storage bucket</p></div></li><li><code>path</code> <div><p>The path where requests are stored</p></div></li><li><code>accessKeyId</code> <div><p>The Access Key ID of the account authorized to write to the bucket</p></div></li><li><code>accessKeySecret</code> <div><p>The Access Key Secret of the account authorized to write to the bucket</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIj48cG9seWxpbmUgcG9pbnRzPSIxNiAxNiAxMiAxMiA4IDE2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjEyIiB4Mj0iMTIiIHkyPSIyMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMC4zOSAxOC4zOUE1IDUgMCAwIDAgMTggOWgtMS4yNkE4IDggMCAxIDAgMyAxNi4zIj48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Auth0 JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound/",id:"auth0-jwt-auth-inbound",defaultHandler:{export:"Auth0JwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,auth0Domain:"$env(AUTH0_DOMAIN)",audience:"$env(AUTH0_AUDIENCE)"}},exampleHtml:'<div><p>Authenticate users using Auth0 issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>auth0Domain</code> <div><p>Your Auth0 domain. For example, my-company.auth0.com</p></div></li><li><code>audience</code> <div><p>The Auth0 audience of your API, for example <a href="https://api.example.com/">https://api.example.com/</a></p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyMiAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTcuMjM2IDE5LjQxNSAxNC44IDEybDYuMzc4LTQuNTgyaC03Ljg4M0wxMC44NiAwaDcuODg3bDIuNDQgNy40MThhMTAuNjY4IDEwLjY2OCAwIDAgMS0zLjk1IDExLjk5N1ptLTEyLjc1OCAwTDEwLjg1NiAyNGw2LjM4LTQuNTg1LTYuMzc3LTQuNTgyLTYuMzgxIDQuNTgyWm0tMy45NDQtMTJjLTEuNDkgNC41MzguMjQgOS4zNDQgMy45MzggMTIuMDAzdi0uMDAzTDYuOTEyIDEyIC41MzYgNy40MTVsNy44ODQuMDAzTDEwLjg1NiAwSDIuOTcxTC41MzQgNy40MTVaIiBmaWxsPSIjMDAwIi8+PC9zdmc+"},{name:"Basic Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/basic-auth-inbound/",id:"basic-auth-inbound",defaultHandler:{export:"BasicAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{accounts:[{data:{number:1},password:"PASSWORD",username:"USERNAME"}],allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Authenticate requests using basic auth (i.e. username and password)</p></div><h3>Options</h3><ul><li><code>accounts</code> <div><p>An array of account objects (username, password and data properties)</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXIta2V5Ij48cGF0aCBkPSJNMjEgMmwtMiAybS03LjYxIDcuNjFhNS41IDUuNSAwIDEgMS03Ljc3OCA3Ljc3OCA1LjUgNS41IDAgMCAxIDcuNzc3LTcuNzc3em0wIDBMMTUuNSA3LjVtMCAwbDMgM0wyMiA3bC0zLTNtLTMuNSAzLjVMMTkgNCI+PC9wYXRoPjwvc3ZnPg=="},{name:"Bot Detection",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/bot-detection-inbound/",id:"bot-detection-inbound",defaultHandler:{export:"BotDetectionInbound",module:"$import(@zuplo/runtime)",options:{blockScoresBelow:40}},exampleHtml:"<div><p>Detect known and suspected bots based on sophisticated traffic analysis. The bot detection inbound policy provides a bot score for every request that can be used to determine the likelihood the request came from a bot. The policy can be configured to automatically block traffic with a set score or simply pass along the score for you to respond in other policies or handlers.</p></div><h3>Options</h3><ul><li><code>blockScoresBelow</code> <div><p>The threshold at which bots are automatically blocked</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItc3F1YXJlIj48cmVjdCB4PSIzIiB5PSIzIiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHJ4PSIyIiByeT0iMiI+PC9yZWN0Pjwvc3ZnPg=="},{name:"Brown Out",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/brown-out-inbound/",id:"brown-out-inbound",defaultHandler:{export:"BrownOutInbound",module:"$import(@zuplo/runtime)",options:{cronExpression:"0 23 * * ?",durationSeconds:60}},exampleHtml:"<div><p>Set periods of downtime based on cron schedules. Useful for alerting users of impending deprecations.</p></div><h3>Options</h3><ul><li><code>cronExpression</code> <div><p>The cron schedule for when this policy is enabled.</p></div></li><li><code>durationSeconds</code> <div><p>The length of time in seconds that the policy stays enabled after the scheduled time starts.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDl2Nm00LTZ2Nm03LTNhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6IiAvPgo8L3N2Zz4="},{name:"Caching",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/caching-inbound/",id:"caching-inbound",defaultHandler:{export:"CachingInboundPolicy",module:"$import(@zuplo/runtime)",options:{expirationSecondsTtl:60,dangerouslyIgnoreAuthorizationHeader:!1,headers:["header_used_as_part_of_cache_key"]}},exampleHtml:"<div><p>Respond to matched incoming requests with cached content</p></div><h3>Options</h3><ul><li><code>cacheId</code> <div><p>Optional, specifies an id or 'key' for this policy to store cache. This is useful for cache-busting. For example, set this property to an env var and if you change that env var value, you invalidate the cache.</p></div></li><li><code>dangerouslyIgnoreAuthorizationHeader</code> <div><p>By default, the Authorization header is always considered in the caching policy. You can disable by setting this to true</p></div></li><li><code>headers</code> <div><p>The headers to be considered when caching</p></div></li><li><code>expirationSecondsTtl</code> <div><p>The timeout of the cache in seconds</p></div></li><li><code>statusCodes</code> <div><p>Response status codes to be cached - defaults to 200, 206, 301, 302, 303, 404, 410 if none specified</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItd2luZCI+PHBhdGggZD0iTTkuNTkgNC41OUEyIDIgMCAxIDEgMTEgOEgybTEwLjU5IDExLjQxQTIgMiAwIDEgMCAxNCAxNkgybTE1LjczLTguMjdBMi41IDIuNSAwIDEgMSAxOS41IDEySDIiPjwvcGF0aD48L3N2Zz4="},{name:"Change Method",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/change-method-inbound/",id:"change-method-inbound",defaultHandler:{export:"ChangeMethodInboundPolicy",module:"$import(@zuplo/runtime)",options:{method:"POST"}},exampleHtml:"<div><p>Changes the HTTP method of the incoming request.</p></div><h3>Options</h3><ul><li><code>method</code> <div><p>The HTTP Method to be used, e.g. POST, GET, PUT, PATCH, etc</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdC0zIj48cGF0aCBkPSJNMTIgMjBoOSI+PC9wYXRoPjxwYXRoIGQ9Ik0xNi41IDMuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMNyAxOWwtNCAxIDEtNEwxNi41IDMuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Clear Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/clear-headers-inbound/",id:"clear-headers-inbound",defaultHandler:{export:"ClearHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{exclude:["HEADER_TO_LEAVE"]}},exampleHtml:"<div><p>Removes all headers from the incoming request except for those in the exclude list.</p></div><h3>Options</h3><ul><li><code>exclude</code> <div><p>The headers that should not be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Clear Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/clear-headers-outbound/",id:"clear-headers-outbound",defaultHandler:{export:"ClearHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{exclude:["HEADER_TO_LEAVE"]}},exampleHtml:"<div><p>Removes all headers from the response except for those in the exclude list.</p></div><h3>Options</h3><ul><li><code>exclude</code> <div><p>The headers that should not be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"AWS Cognito JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/cognito-jwt-auth-inbound/",id:"cognito-jwt-auth-inbound",defaultHandler:{export:"CognitoJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,region:"$env(AWS_REGION)",userPoolId:"$env(AWS_COGNITO_USER_POOL_ID)"}},exampleHtml:"<div><p>Authenticate requests with JWT tokens issued by AWS Cognito.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>region</code> <div><p>The AWS region where your Cognito instance is deployed</p></div></li><li><code>userPoolId</code> <div><p>The user pool identifier</p></div></li></ul> ",icon:"data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xOC40ODE4IDQuNjYwNDJMMjAuNTUwMyA0LjEyNzc2TDIwLjU2NTggNC4xNTA0OEwyMC42MTggMTYuNjQwN0wyMC41NTAzIDE2LjcwODZMMjAuMTI0MSAxNi43MjY4TDE4LjUwNiAxNi40NzQ5TDE4LjQ4MTggMTYuNDExMlY0LjY2MDQyTTYuNTE4MTMgMTcuNTc2M0w2LjUyNTc1IDE3LjU3NjhMMTEuOTg2MSAxOS4xNjM1TDEyIDE5LjE3NDJMMTIuMDIzOCAxOS4xOTMxTDEyLjAxNjEgMjMuOTQ3NUwxMiAyMy45Njc3TDYuNTE4MTMgMjEuMzA0NlYxNy41NzYzIiBmaWxsPSIjM0EzQTNBIi8+CjxwYXRoIGQ9Ik0xOC40ODE4IDE2LjQxMTJMMTIuMDA5IDE3Ljk2MTNMOC43NTkxMiAxNy4xNzY5TDYuNTE4MTMgMTcuNTc2M0wxMiAxOS4xNzQyTDIwLjQ2MDYgMTYuODgzNkwyMC41NTAzIDE2LjcwODZMMTguNDgxOCAxNi40MTEyIiBmaWxsPSIjNjY2NjY2Ii8+CjxwYXRoIGQ9Ik0xNy40ODE5IDYuMzkxMzhMMTcuNDI5MSA2LjMzMTI2TDEyLjA1ODkgNC43NzA4NkwxMiA0Ljc5MzU4TDExLjk0NjEgNC43NjYwNUwzLjQ5NTgyIDcuMjAyNzNMMy40NDk2NiA3LjI1OTE2TDMuNTE3NDkgNy4yOTYzMkw1LjQ0OTkzIDcuNTc5NjdMNS41MTgyNCA3LjU1NjQ3TDExLjk5MSA2LjAwNjQyTDE1LjI0MDkgNi43OTA4OEwxNy40ODE5IDYuMzkxMzgiIGZpbGw9IiM0MzQzNDMiLz4KPHBhdGggZD0iTTUuNTE4MjQgMTkuMzA3M0wzLjQ0OTY2IDE5LjgwNjdMMy40NDYwNSAxOS43OTQ3TDMuMzY0NTggNy4zNTExNEwzLjQ0OTY2IDcuMjU5MTZMNS41MTgyNCA3LjU1NjQ3VjE5LjMwNzMiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik04LjMxMDkxIDE0LjQ4MDVMMTIgMTQuOTEzMkwxMi4wMjc3IDE0Ljg3MTlMMTIuMDQyNyA5LjEwMTdMMTIgOS4wNTQ0Mkw4LjMxMDkxIDkuNDg3MjJWMTQuNDgwNSIgZmlsbD0iIzNBM0EzQSIvPgo8cGF0aCBkPSJNMTUuNjg5MSAxNC40ODA1TDEyIDE0LjkxMzJWOS4wNTQ0MkwxNS42ODkxIDkuNDg3MjJWMTQuNDgwNU0xNy40ODE5IDYuMzkxMzhMMTIgNC43OTM1OFYwTDE3LjQ4MTkgMi42NjMwNFY2LjM5MTM4IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNMTIgMEwxLjcyNTc1IDQuOTU5OTdWMTkuMDA3N0wzLjQ0OTY2IDE5LjgwNjdWNy4yNTkxNkwxMiA0Ljc5MzU4VjBaIiBmaWxsPSIjM0EzQTNBIi8+CjxwYXRoIGQ9Ik0yMC41NTAzIDQuMTI3NzZWMTYuNzA4NkwxMiAxOS4xNzQyVjIzLjk2NzdMMjIuMjc0MiAxOS4wMDc3VjQuOTU5OTdMMjAuNTUwMyA0LjEyNzc2WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+"},{name:"Composite Inbound (Group Policies)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/composite-inbound/",id:"composite-inbound",defaultHandler:{export:"CompositeInboundPolicy",module:"$import(@zuplo/runtime)",options:{policies:["POLICY_1","POLICY_2"]}},exampleHtml:"<div><p>Creates a composite, or group policy - composed of other policies. For reuse across routes.</p></div><h3>Options</h3><ul><li><code>policies</code> <div><p>The list of policy references (beware circular references)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMi4yNSA3LjEyNUMyLjI1IDYuNTA0IDIuNzU0IDYgMy4zNzUgNmg2Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2My43NWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNmExLjEyNSAxLjEyNSAwIDAxLTEuMTI1LTEuMTI1di0zLjc1ek0xNC4yNSA4LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDUuMjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY4LjI1YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC01LjI1YTEuMTI1IDEuMTI1IDAgMDEtMS4xMjUtMS4xMjV2LTguMjV6TTMuNzUgMTYuMTI1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNS4yNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djIuMjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTUuMjVhMS4xMjUgMS4xMjUgMCAwMS0xLjEyNS0xLjEyNXYtMi4yNXoiIC8+Cjwvc3ZnPgo="},{name:"Custom Code Inbound",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/custom-code-inbound/",id:"custom-code-inbound",defaultHandler:{export:"default",module:"$import(./modules/YOUR_MODULE)",options:{config1:"YOUR_VALUE",config2:!0}},exampleHtml:"<div><p>Enables a custom code policy written in TypeScript. Change YOUR_MODULE to the name of your module (without .ts extension)</p></div><h3>Options</h3><ul><li><code>*</code> <div><p>Any object your custom policy consumes</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29kZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTggMjIgMTIgMTYgNiI+PC9wb2x5bGluZT48cG9seWxpbmUgcG9pbnRzPSI4IDYgMiAxMiA4IDE4Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Custom Code Outbound",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/custom-code-outbound/",id:"custom-code-outbound",defaultHandler:{export:"default",module:"$import(./modules/YOUR_MODULE)",options:{config1:"YOUR_VALUE",config2:!0}},exampleHtml:"<div><p>A custom outbound response policy.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29kZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTggMjIgMTIgMTYgNiI+PC9wb2x5bGluZT48cG9seWxpbmUgcG9pbnRzPSI4IDYgMiAxMiA4IDE4Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Firebase JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/firebase-jwt-inbound/",id:"firebase-jwt-inbound",defaultHandler:{export:"FirebaseJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{projectId:"YOUR_PROJECT_ID",allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Authenticate users using Firebase issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>projectId</code> <div><p>Your Firebase Project ID</p></div></li><li><code>certUrl</code> <div><p>Optional - override the URL hosting the public keys used to verify the JWT.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPmZpcmViYXNlX2ljb248L3RpdGxlPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9ImZpcmViYXNlX2ljb24iPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjA0IiBoZWlnaHQ9IjIwNCI+PC9yZWN0PgogICAgICAgICAgICA8cGF0aCBkPSJNNDIuMiwxMjguOSBMNTkuNiwxNy40IEM2MC4yLDEzLjYgNjUuMywxMi43IDY3LjEsMTYuMSBMODUuOCw1MS4xIEw0Mi4yLDEyOC45IFogTTE2NS45LDE1NiBMMTQ5LjMsNTMuMyBDMTQ4LjgsNTAuMSAxNDQuOCw0OC44IDE0Mi41LDUxLjEgTDM3LjksMTU2IEw5NS44LDE4OC41IEM5OS40LDE5MC41IDEwMy45LDE5MC41IDEwNy41LDE4OC41IEwxNjUuOSwxNTYgWiBNMTE4LjksNjYuNCBMMTA1LjUsNDAuOSBDMTA0LDM4IDk5LjksMzggOTguNCw0MC45IEwzOS41LDE0NS45IEwxMTguOSw2Ni40IFoiIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Form Data to JSON",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/formdata-to-json-inbound/",id:"formdata-to-json-inbound",defaultHandler:{export:"FormDataToJsonInboundPolicy",module:"$import(@zuplo/runtime)",options:{badRequestIfNotFormData:!1,optionalHoneypotName:"HONEYPOT_FIELD_NAME"}},exampleHtml:"<div><p>Converts form data in the incoming request to JSON.</p></div><h3>Options</h3><ul><li><code>badRequestIfNotFormData</code> <div><p>Should the policy return an error if the request is not of the type form data</p></div></li><li><code>optionalHoneypotName</code> <div><p>The name of the honeypot field. Used to provide basic spam filtering.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZmlsZS10ZXh0Ij48cGF0aCBkPSJNMTQgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjh6Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTQgMiAxNCA4IDIwIDgiPjwvcG9seWxpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMTMiIHgyPSI4IiB5Mj0iMTMiPjwvbGluZT48bGluZSB4MT0iMTYiIHkxPSIxNyIgeDI9IjgiIHkyPSIxNyI+PC9saW5lPjxwb2x5bGluZSBwb2ludHM9IjEwIDkgOSA5IDggOSI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Geo-location filtering",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/geo-filter-inbound/",id:"geo-filter-inbound",defaultHandler:{export:"GeoFilterInboundPolicy",module:"$import(@zuplo/runtime)",options:{allow:{countries:"US, CA"},block:{asns:"$env(ASNS_TO_BLOCK)",regionCodes:"TX, WA"},ignoreUnknown:!0}},exampleHtml:'<div><p>Block requests based on geo-location parameters: country, region code, and ASN</p></div><h3>Options</h3><ul><li><code>block</code> <div></div><ul><li><code>countries</code> <div><p>comma separated string of country codes to block (e.g. "US, CA")</p></div></li><li><code>regionCodes</code> <div><p>comma separated string of region codes to block (e.g. "TX, WA")</p></div></li><li><code>asns</code> <div><p>comma separated string of ASNs to block (e.g. "395747, 28304")</p></div></li></ul></li><li><code>allow</code> <div></div></li><li><code>ignoreUnknown</code> <div><p>Optional, defaults to true. Specifies whether unknown geo-location parameters should be ignored (allowed through).</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZ2xvYmUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48bGluZSB4MT0iMiIgeTE9IjEyIiB4Mj0iMjIiIHkyPSIxMiI+PC9saW5lPjxwYXRoIGQ9Ik0xMiAyYTE1LjMgMTUuMyAwIDAgMSA0IDEwIDE1LjMgMTUuMyAwIDAgMS00IDEwIDE1LjMgMTUuMyAwIDAgMS00LTEwIDE1LjMgMTUuMyAwIDAgMSA0LTEweiI+PC9wYXRoPjwvc3ZnPg=="},{name:"HMAC Auth",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/hmac-auth-inbound/",id:"hmac-auth-inbound",defaultHandler:{export:"HMACAuthInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Authenticate requests using the HMAC-SHA256 authentication scheme.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGFzaCI+PGxpbmUgeDE9IjQiIHkxPSI5IiB4Mj0iMjAiIHkyPSI5Ij48L2xpbmU+PGxpbmUgeDE9IjQiIHkxPSIxNSIgeDI9IjIwIiB5Mj0iMTUiPjwvbGluZT48bGluZSB4MT0iMTAiIHkxPSIzIiB4Mj0iOCIgeTI9IjIxIj48L2xpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMyIgeDI9IjE0IiB5Mj0iMjEiPjwvbGluZT48L3N2Zz4="},{name:"IP Restriction",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ip-restriction-inbound/",id:"ip-restriction-inbound",defaultHandler:{export:"IPRestrictionInbound",module:"$import(@zuplo/runtime)",options:{ipAddresses:["1.1.1.1"]}},exampleHtml:"<div><p>Block requests based on their IP address.</p></div><h3>Options</h3><ul><li><code>ipAddresses</code> <div><p>The IP addresses or CIDR ranges to block</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItbGlzdCI+PGxpbmUgeDE9IjgiIHkxPSI2IiB4Mj0iMjEiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjgiIHkxPSIxMiIgeDI9IjIxIiB5Mj0iMTIiPjwvbGluZT48bGluZSB4MT0iOCIgeTE9IjE4IiB4Mj0iMjEiIHkyPSIxOCI+PC9saW5lPjxsaW5lIHgxPSIzIiB5MT0iNiIgeDI9IjMuMDEiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMiIgeDI9IjMuMDEiIHkyPSIxMiI+PC9saW5lPjxsaW5lIHgxPSIzIiB5MT0iMTgiIHgyPSIzLjAxIiB5Mj0iMTgiPjwvbGluZT48L3N2Zz4="},{name:"LDAP Auth",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ldap-auth-inbound/",id:"ldap-auth-inbound",defaultHandler:{export:"LDAPAuthInbound",module:"$import(@zuplo/runtime)",options:{ldapConnectorName:"my-ldap-connector"}},exampleHtml:"<div><p>Authenticate requests using an LDAP server</p></div><h3>Options</h3><ul><li><code>ldapConnectorName</code> <div><p>The name of your configured LDAP service connector</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZGF0YWJhc2UiPjxlbGxpcHNlIGN4PSIxMiIgY3k9IjUiIHJ4PSI5IiByeT0iMyI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0yMSAxMmMwIDEuNjYtNCAzLTkgM3MtOS0xLjM0LTktMyI+PC9wYXRoPjxwYXRoIGQ9Ik0zIDV2MTRjMCAxLjY2IDQgMyA5IDNzOS0xLjM0IDktM1Y1Ij48L3BhdGg+PC9zdmc+"},{name:"Mock API Response",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/mock-api-inbound/",id:"mock-api-inbound",defaultHandler:{export:"MockApiInboundPolicy",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:'<div><p>Returns example responses from the OpenAPI document associated with this route.</p></div><h3>Options</h3><ul><li><code>random</code> <div><p>Optional. Indicates whether the response should be selected randomly, from the available examples (that match any filter criteria). If <code>false</code> the first matching example is used.</p></div></li><li><code>responsePrefixFilter</code> <div><p>Optional. Specifies a prefix to match the responses to select from. Typically this is a status code like "200" or "2XX". If you want the policy to select randomly from all 2XX codes, set this property to "2" and random to <code>true</code>.</p></div></li><li><code>contentType</code> <div><p>Optional. Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).</p></div></li><li><code>exampleName</code> <div><p>Optional. Specify the name of the example to select. If not specified, the first matching response is used (or random).</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTQuOCAyNTkuOGMwIDguNi0yLjkgMTUuNy04LjYgMjEuNEwyNzQuNyA4OTIuNmMtNS43IDUuNy0xMi44IDguNi0yMS40IDguNnMtMTUuNy0yLjktMjEuNC04LjZsLTk0LjEtOTQuMWMtNS43LTUuNy04LjYtMTIuOC04LjYtMjEuNHMyLjktMTUuNyA4LjYtMjEuNGw2MTEuNS02MTEuNWM1LjctNS43IDEyLjgtOC42IDIxLjQtOC42IDguNiAwIDE1LjcgMi45IDIxLjQgOC42bDk0LjEgOTQuMWM1LjcgNS44IDguNiAxMi45IDguNiAyMS41eiBtLTY0Mi40LTkwLjRsNDYuNiAxNC4zLTQ2LjYgMTQuMy0xNC4zIDQ2LjYtMTQuMy00Ni42LTQ2LjYtMTQuMyA0Ni42LTE0LjMgMTQuMy00Ni42IDE0LjMgNDYuNnogbTE2Ni40IDc3bDkzLjIgMjguNS05My4yIDI4LjUtMjguNSA5My4yLTI4LjUtOTMuMi05My4yLTI4LjUgOTMuMi0yOC41IDI4LjUtOTMuMiAyOC41IDkzLjJ6IG0xMzcuOS03N2w0Ni42IDE0LjMtNDYuNiAxNC4zLTE0LjMgNDYuNi0xNC4zLTQ2LjYtNDYuNi0xNC4zIDQ2LjYtMTQuMyAxNC4zLTQ2LjYgMTQuMyA0Ni42eiBtMTI1LjUgMjI5LjdsMTM5LjMtMTM5LjMtNTAuOS01MC45LTEzOS4zIDEzOS4zIDUwLjkgNTAuOXpNODYxIDQ3My43bDQ2LjYgMTQuMy00Ni42IDE0LjItMTQuMyA0Ni42LTE0LjMtNDYuNi00Ni42LTE0LjMgNDYuNi0xNC4zIDE0LjMtNDYuNiAxNC4zIDQ2Ljd6IiAgLz48L3N2Zz4="},{name:"mTLS Auth",isPreview:!1,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/mtls-auth-inbound/",id:"mtls-auth-inbound",defaultHandler:{export:"MTLSAuthInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Authenticate requests based on the mTLS protocol</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTggN2gxMm0wIDBsLTQtNG00IDRsLTQgNG0wIDZING0wIDBsNCA0bS00LTRsNC00IiAvPjwvc3ZnPg=="},{name:"Okta JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound/",id:"okta-jwt-auth-inbound",defaultHandler:{export:"OktaJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,issuerUrl:"$env(OKTA_ISSUER_URL)",audience:"$env(OKTA_AUDIENCE)"}},exampleHtml:`<div><p>Authenticate users using Okta issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>issuerUrl</code> <div><p>Your Okta authorization server's issuer URL. For example, <a href="https://dev-12345.okta.com/oauth2/abc">https://dev-12345.okta.com/oauth2/abc</a></p></div></li><li><code>audience</code> <div><p>The Okta audience of your API, for example api://my-api</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PHBhdGggZD0iTTMyIDBDMTQuMzcgMCAwIDE0LjI2NyAwIDMyczE0LjI2OCAzMiAzMiAzMiAzMi0xNC4yNjggMzItMzJTNDkuNjMgMCAzMiAwem0wIDQ4Yy04Ljg2NiAwLTE2LTcuMTM0LTE2LTE2czcuMTM0LTE2IDE2LTE2IDE2IDcuMTM0IDE2IDE2LTcuMTM0IDE2LTE2IDE2eiIgZmlsbD0iIzAwMDAwMCIvPjwvc3ZnPg=="},{name:"JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/open-id-jwt-auth-inbound/",id:"open-id-jwt-auth-inbound",defaultHandler:{export:"OpenIdJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,audience:"$env(AUTH_AUDIENCE)",issuer:"$env(AUTH_ISSUER)",jwkUrl:"$env(JWK_URL)"}},exampleHtml:"<div><p>The Open ID JWT Authentication policy allows you to authenticate incoming requests using an Open ID compliant bearer token.</p></div><h3>Options</h3><ul><li><code>issuer</code> <div><p>The expected issuer claim in the JWT token.</p></div></li><li><code>audience</code> <div><p>The expected audience claim in the JWT token (optional).</p></div></li><li><code>jwkUrl</code> <div><p>the url of the JSON Web Key Set (JWKS) - this is used to validate the JWT token signature (either this or <code>secret</code> must be set).</p></div></li><li><code>secret</code> <div><p>The key used to verify the signature of the JWT token (either this or <code>jwkUrl</code> must be set)</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>indicates whether the request should continue if authentication fails. Defaults is <code>false</code> which means unauthenticated users will automatically receive a 401 response.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEyIDE1djJtLTYgNGgxMmEyIDIgMCAwMDItMnYtNmEyIDIgMCAwMC0yLTJINmEyIDIgMCAwMC0yIDJ2NmEyIDIgMCAwMDIgMnptMTAtMTBWN2E0IDQgMCAwMC04IDB2NGg4eiIgLz48L3N2Zz4="},{name:"PropelAuth JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/propel-auth-jwt-inbound/",id:"propel-auth-jwt-inbound",defaultHandler:{export:"PropelAuthJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,authUrl:"$env(PROPEL_AUTH_URL)",verifierKey:"$env(PROPEL_VERIFIER_KEY)"}},exampleHtml:`<div><p>Authenticate users using PropelAuth issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>authUrl</code> <div><p>Your PropelAuth authUrl. For example, <a href="https://6587563.propelauthtest.com">https://6587563.propelauthtest.com</a></p></div></li><li><code>verifierKey</code> <div><p>Your public (verifier) key that is used to verify access tokens. This key has a value that begins with '-----BEGIN PUBLIC KEY-----'. Make sure to remove all line breaks from the key before saving the variable.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgdmlld0JveD0iMCAwIDQwIDQwIiBmaWxsPSJub25lIj4KICA8cGF0aAogICAgZD0iTTM3LjU0NzggMTYuMjkxNEMzNy4wODc3IDE0LjA0NjUgMzYuMjE3NCAxMS45NDQxIDM0Ljk1NTEgMTAuMDMyMUwzNi4xODg1IDguMDExNEwzMS44MzY3IDMuNjU5NkwyOS44MTYgNC44OTI5NkMyNy45MDMzIDMuNjMwNjggMjUuODAxNiAyLjc2MDQ1IDIzLjU1NjcgMi4zMDAyNkwyMy4wMDA3IDBIMTYuODQ3NEwxNi4yOTE0IDIuMzAwMjZDMTQuMDQ2NSAyLjc2MDQ1IDExLjk0NDEgMy42MzA2OCAxMC4wMzIxIDQuODkyOTZMOC4wMTE0IDMuNjU5NkwzLjY1OTYgOC4wMTE0TDQuODkyOTYgMTAuMDMyMUMzLjYzMDY4IDExLjk0NDggMi43NjA0NSAxNC4wNDY1IDIuMzAwMjYgMTYuMjkxNEwwIDE2Ljg0NzRWMjMuMDAwN0wyLjMwMDI2IDIzLjU1NjdDMi43NjA0NSAyNS44MDE2IDMuNjMwNjggMjcuOTA0IDQuODkyOTYgMjkuODE2TDMuNjU5NiAzMS44MzY3TDguMDExNCAzNi4xODg1TDEwLjAzMjEgMzQuOTU1MUMxMS45NDQ4IDM2LjIxNzQgMTQuMDQ2NSAzNy4wODc3IDE2LjI5MTQgMzcuNTQ3OEwxNi44NDc0IDM5Ljg0ODFIMjMuMDAwN0wyMy41NTY3IDM3LjU0NzhDMjUuODAxNiAzNy4wODc3IDI3LjkwNCAzNi4yMTc0IDI5LjgxNiAzNC45NTUxTDMxLjgzNjcgMzYuMTg4NUwzNi4xODg1IDMxLjgzNjdMMzQuOTU1MSAyOS44MTZDMzYuMjE3NCAyNy45MDMzIDM3LjA4NzcgMjUuODAxNiAzNy41NDc4IDIzLjU1NjdMMzkuODQ4MSAyMy4wMDA3VjE2Ljg0NzRMMzcuNTQ3OCAxNi4yOTE0Wk0zOC41NjI3IDIxLjk4OTFMMzYuNDM2NiAyMi41MDMzTDM2LjM2MiAyMi45MTU5QzM1LjkzNTkgMjUuMjcyMSAzNS4wMjc4IDI3LjQ2NDMgMzMuNjYyNiAyOS40MzM2TDMzLjQyNDggMjkuNzc2OEwzNC41NjM3IDMxLjY0MzlMMzEuNjQzMyAzNC41NjQ0TDI5Ljc3NjIgMzMuNDI1NUwyOS40MzMgMzMuNjYzM0MyNy40NjQzIDM1LjAyODQgMjUuMjcxNCAzNS45MzY2IDIyLjkxNTIgMzYuMzYyN0wyMi41MDI2IDM2LjQzNzJMMjEuOTg5MSAzOC41NjI3SDE3Ljg1OUwxNy4zNDQ5IDM2LjQzNjZMMTYuOTMyMiAzNi4zNjJDMTQuNTc2MSAzNS45MzU5IDEyLjM4MzggMzUuMDI3OCAxMC40MTQ1IDMzLjY2MjZMMTAuMDcxMyAzMy40MjQ4TDguMjA0MjEgMzQuNTYzN0w1LjI4MzczIDMxLjY0MzNMNi40MjI2MSAyOS43NzYyTDYuMTg0ODEgMjkuNDMzQzQuODE5NjkgMjcuNDY0MyAzLjkxMTU0IDI1LjI3MTQgMy40ODU0MiAyMi45MTUyTDMuNDEwODcgMjIuNTAyNkwxLjI4NTQyIDIxLjk4OTFWMTcuODU5TDMuNDExNTEgMTcuMzQ0OUwzLjQ4NjA3IDE2LjkzMjJDMy45MTIxOCAxNC41NzYxIDQuODIwMzMgMTIuMzgzOCA2LjE4NTQ1IDEwLjQxNDVMNi40MjMyNiAxMC4wNzEzTDUuMjg0MzcgOC4yMDQyMUw4LjIwNDg1IDUuMjgzNzNMMTAuMDcxOSA2LjQyMjYxTDEwLjQxNTEgNi4xODQ4MUMxMi4zODM4IDQuODE5NjkgMTQuNTc2NyAzLjkxMTU0IDE2LjkzMjkgMy40ODU0MkwxNy4zNDU1IDMuNDEwODdMMTcuODU5IDEuMjg1NDJIMjEuOTg5MUwyMi41MDMzIDMuNDExNTFMMjIuOTE1OSAzLjQ4NjA3QzI1LjI3MjEgMy45MTIxOCAyNy40NjQzIDQuODIwMzMgMjkuNDMzNiA2LjE4NTQ1TDI5Ljc3NjggNi40MjMyNkwzMS42NDM5IDUuMjg0MzdMMzQuNTY0NCA4LjIwNDg1TDMzLjQyNTUgMTAuMDcxOUwzMy42NjMzIDEwLjQxNTFDMzUuMDI4NCAxMi4zODM4IDM1LjkzNjYgMTQuNTc2NyAzNi4zNjI3IDE2LjkzMjlMMzYuNDM3MiAxNy4zNDU1TDM4LjU2MzMgMTcuODU5N1YyMS45ODkxSDM4LjU2MjdaIgogICAgZmlsbD0iIzAwMDAwMCIgLz4KICA8cGF0aCBkPSJNMjAuNTY2NyAyLjU3MDg5SDE5LjI4MTJWMy44NTYzMkgyMC41NjY3VjIuNTcwODlaIiBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik04LjEwNzY1IDcuMTk5MDVMNy4xOTg3MyA4LjEwNzk3TDguMTA3NjUgOS4wMTY4OUw5LjAxNjU4IDguMTA3OTdMOC4xMDc2NSA3LjE5OTA1WiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTMuODU2MjIgMTkuMjgxNEgyLjU3MDhWMjAuNTY2OEgzLjg1NjIyVjE5LjI4MTRaIiBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik04LjEwNzY1IDMwLjgzMTNMNy4xOTg3MyAzMS43NDAzTDguMTA3NjUgMzIuNjQ5Mkw5LjAxNjU4IDMxLjc0MDNMOC4xMDc2NSAzMC44MzEzWiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTIwLjU2NjcgMzUuOTkxOUgxOS4yODEyVjM3LjI3NzNIMjAuNTY2N1YzNS45OTE5WiIgZmlsbD0iIzAwMDAwMCIgLz4KICA8cGF0aCBkPSJNMzEuNzQgMzAuODMxM0wzMC44MzExIDMxLjc0MDJMMzEuNzQgMzIuNjQ5MUwzMi42NDg5IDMxLjc0MDJMMzEuNzQgMzAuODMxM1oiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik0zNy4yNzcxIDE5LjI4MTRIMzUuOTkxN1YyMC41NjY4SDM3LjI3NzFWMTkuMjgxNFoiIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTMxLjc0IDcuMTk4OTZMMzAuODMxMSA4LjEwNzg4TDMxLjc0IDkuMDE2OEwzMi42NDg5IDguMTA3ODhMMzEuNzQgNy4xOTg5NloiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoCiAgICBkPSJNMTkuOTI0IDUuMTQxNjlDMTEuNzcyNSA1LjE0MTY5IDUuMTQxNiAxMS43NzI1IDUuMTQxNiAxOS45MjQxQzUuMTQxNiAyOC4wNzU2IDExLjc3MjUgMzQuNzA2NCAxOS45MjQgMzQuNzA2NEMyOC4wNzU1IDM0LjcwNjQgMzQuNzA2MyAyOC4wNzU2IDM0LjcwNjMgMTkuOTI0MUMzNC43MDYzIDExLjc3MjUgMjguMDc1NSA1LjE0MTY5IDE5LjkyNCA1LjE0MTY5Wk0xOS45MjQgMzMuNDIxQzEyLjQ4MiAzMy40MjEgNi40MjcwMiAyNy4zNjYgNi40MjcwMiAxOS45MjQxQzYuNDI3MDIgMTIuNDgyMSAxMi40ODIgNi40MjcxMiAxOS45MjQgNi40MjcxMkMyNy4zNjU5IDYuNDI3MTIgMzMuNDIwOSAxMi40ODIxIDMzLjQyMDkgMTkuOTI0MUMzMy40MjA5IDI3LjM2NiAyNy4zNjU5IDMzLjQyMSAxOS45MjQgMzMuNDIxWiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGgKICAgIGQ9Ik0yNS43MDgyIDE4LjExNDJWMTQuNzgyNEMyNS43MDgyIDExLjU5MjYgMjMuMTEzNiA4Ljk5Nzk5IDE5LjkyMzggOC45OTc5OUMxNi43MzQxIDguOTk3OTkgMTQuMTM5NCAxMS41OTI2IDE0LjEzOTQgMTQuNzgyNFYxOC4xMTQyQzEzLjM5MzIgMTguMzgwMyAxMi44NTQgMTkuMDg3MyAxMi44NTQgMTkuOTI0MVYyMy43ODAzQzEyLjg1NCAyNy42Nzg0IDE2LjAyNTggMzAuODUwMiAxOS45MjM4IDMwLjg1MDJDMjMuODIxOSAzMC44NTAyIDI2Ljk5MzcgMjcuNjc4NCAyNi45OTM3IDIzLjc4MDNWMTkuOTI0MUMyNi45OTM3IDE5LjA4NzMgMjYuNDU0NCAxOC4zODAzIDI1LjcwODIgMTguMTE0MlpNMTkuOTIzOCAxMC4yODM0QzIyLjQwNDEgMTAuMjgzNCAyNC40MjI4IDEyLjMwMjIgMjQuNDIyOCAxNC43ODI0VjE3Ljk5NTlIMjMuMTM3NFYxNC43ODI0QzIzLjEzNzQgMTMuMDEwNCAyMS42OTU4IDExLjU2ODggMTkuOTIzOCAxMS41Njg4QzE4LjE1MTkgMTEuNTY4OCAxNi43MTAzIDEzLjAxMDQgMTYuNzEwMyAxNC43ODI0VjE3Ljk5NTlIMTUuNDI0OFYxNC43ODI0QzE1LjQyNDggMTIuMzAyMiAxNy40NDM2IDEwLjI4MzQgMTkuOTIzOCAxMC4yODM0Wk0yMS44NTIgMTcuOTk1OUgxNy45OTU3VjE0Ljc4MjRDMTcuOTk1NyAxMy43MTkzIDE4Ljg2MDggMTIuODU0MyAxOS45MjM4IDEyLjg1NDNDMjAuOTg2OSAxMi44NTQzIDIxLjg1MiAxMy43MTkzIDIxLjg1MiAxNC43ODI0VjE3Ljk5NTlaTTI1LjcwODIgMjMuNzgwM0MyNS43MDgyIDI2Ljk3MDEgMjMuMTEzNiAyOS41NjQ4IDE5LjkyMzggMjkuNTY0OEMxNi43MzQxIDI5LjU2NDggMTQuMTM5NCAyNi45NzAxIDE0LjEzOTQgMjMuNzgwM1YxOS45MjQxQzE0LjEzOTQgMTkuNTY5MyAxNC40Mjc0IDE5LjI4MTQgMTQuNzgyMSAxOS4yODE0SDI1LjA2NTVDMjUuNDIwMyAxOS4yODE0IDI1LjcwODIgMTkuNTY5MyAyNS43MDgyIDE5LjkyNDFWMjMuNzgwM1oiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoCiAgICBkPSJNMTkuOTIzOSAyMC41NjY4QzE4LjUwNjEgMjAuNTY2OCAxNy4zNTMgMjEuNzE5OCAxNy4zNTMgMjMuMTM3NkMxNy4zNTMgMjQuMzMyNCAxOC4xNzUxIDI1LjMyOTkgMTkuMjgxMiAyNS42MTcyVjI4LjI3OTNIMjAuNTY2NlYyNS42MTcyQzIxLjY3MjcgMjUuMzI5OSAyMi40OTQ3IDI0LjMzMjQgMjIuNDk0NyAyMy4xMzc2QzIyLjQ5NDcgMjEuNzE5OCAyMS4zNDE3IDIwLjU2NjggMTkuOTIzOSAyMC41NjY4Wk0xOS45MjM5IDI0LjQyM0MxOS4yMTUgMjQuNDIzIDE4LjYzODUgMjMuODQ2NSAxOC42Mzg1IDIzLjEzNzZDMTguNjM4NSAyMi40Mjg3IDE5LjIxNSAyMS44NTIyIDE5LjkyMzkgMjEuODUyMkMyMC42MzI4IDIxLjg1MjIgMjEuMjA5MyAyMi40Mjg3IDIxLjIwOTMgMjMuMTM3NkMyMS4yMDkzIDIzLjg0NjUgMjAuNjMyOCAyNC40MjMgMTkuOTIzOSAyNC40MjNaIgogICAgZmlsbD0iIzAwMDAwMCIgLz4KPC9zdmc+"},{name:"Quota",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/quota-inbound/",id:"quota-inbound",defaultHandler:{export:"QuotaInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Enforce quota policies on requests</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTMgNmwzIDFtMCAwbC0zIDlhNS4wMDIgNS4wMDIgMCAwMDYuMDAxIDBNNiA3bDMgOU02IDdsNi0ybTYgMmwzLTFtLTMgMWwtMyA5YTUuMDAyIDUuMDAyIDAgMDA2LjAwMSAwTTE4IDdsMyA5bS0zLTlsLTYtMm0wLTJ2Mm0wIDE2VjVtMCAxNkg5bTMgMGgzIiAvPjwvc3ZnPg=="},{name:"Rate Limiting",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/rate-limit-inbound/",id:"rate-limit-inbound",defaultHandler:{export:"RateLimitInboundPolicy",module:"$import(@zuplo/runtime)",options:{rateLimitBy:"ip",requestsAllowed:2,timeWindowMinutes:1}},exampleHtml:"<div><p>The rate-limiting policy is used to limit the number of requests that can be made against your API based on a key.</p></div><h3>Options</h3><ul><li><code>rateLimitBy</code> <div><p>The identifying element of the request that enforces distinct rate limits. For example, you can limit by <code>user</code>, <code>ip</code>, <code>function</code> or <code>all</code> - function allows you to specify a simple function to create a string identifier to create a rate-limit group</p></div></li><li><code>requestsAllowed</code> <div><p>The max number of requests allowed in the given time window</p></div></li><li><code>timeWindowMinutes</code> <div><p>The time window in which the requests are rate-limited. The count restarts after each window expires</p></div></li><li><code>identifier</code> <div><p>The function that returns dynamic configuration data. Used only with <code>rateLimitBy=function</code></p></div><ul><li><code>export</code> <div><p>used only with rateLimitBy=function. Specifies the export to load your custom bucket function, e.g. <code>default</code>, <code>rateLimitIdentifier</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your custom bucket function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTExLjkzMyAxMi44YTEgMSAwIDAwMC0xLjZMNi42IDcuMkExIDEgMCAwMDUgOHY4YTEgMSAwIDAwMS42LjhsNS4zMzMtNHpNMTkuOTMzIDEyLjhhMSAxIDAgMDAwLTEuNmwtNS4zMzMtNEExIDEgMCAwMDEzIDh2OGExIDEgMCAwMDEuNi44bDUuMzMzLTR6IiAvPjwvc3ZnPg=="},{name:"Readme Metrics",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/readme-metrics-inbound/",id:"readme-metrics-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"ReadmeMetricsInboundPolicy",options:{apiKey:"YOUR_API_KEY",userLabelPropertyPath:".sub",development:!0,useFullRequestPath:!1}},exampleHtml:`<div><p>Readme is a developer documentation and API metrics company. This policy pushes logs to their API calls dashboard.</p></div><h3>Options</h3><ul><li><code>apiKey</code> <div><p>The API key to use when sending metrics calls to Readme</p></div></li><li><code>userLabelPropertyPath</code> <div><p>Optional - defaults to '.sub'. This is the path to the property on <code>request.user</code> that contains the label you want to use. For example <code>.data.accountNumber</code> would read the <code>request.user.data.accountNumber</code> property.</p></div></li><li><code>userEmailPropertyPath</code> <div><p>Optional - defaults to empty. This is the path to the property on <code>request.user</code> that contains the e-mail of the user. For example <code>.data.email</code> would read the <code>request.user.data.email</code> property.</p></div></li><li><code>development</code> <div><p>Optional. Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.</p></div></li><li><code>useFullRequestPath</code> <div><p>Optional - defaults to false. When true, Zuplo sends the full request path (which might contain sensitive information). By default, we only send the route path which should not contain sensitive information.</p></div></li><li><code>url</code> <div><p>Optional, the URL to send metering events to (defaults to <a href="https://metrics.readme.io/request">https://metrics.readme.io/request</a>). This is useful for testing purposes.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGlkPSJyZWFkbWUiPjxwYXRoIGQ9Ik0yNCwxNS41MjRWNS4yNmMwLTEuMTAzLTAuODg3LTIuMDAxLTEuOTg3LTIuMDFoLTAuMDAyaC01LjgyNWMtMi4wMDQsMC0zLjc0NiwxLjM5MS00LjE4MywzLjM1NEMxMS41NjEsNC42NDEsOS44MjQsMy4yNSw3LjgyLDMuMjVIMmMtMS4xMDQsMC0yLDAuODk4LTIsMi4wMDV2MTAuMjY5YzAsMS4xMDcsMC44OTYsMi4wMDUsMiwyLjAwNWgzLjczOGM0LjI1OCwwLDUuNTI5LDEuMDIsNi4xMzcsMy4xMzNjMC4wMjksMC4xMTcsMC4yMTcsMC4xMTcsMC4yNSwwYzAuNjEzLTIuMTE0LDEuODg0LTMuMTMzLDYuMTM4LTMuMTMzSDIyQzIzLjEwNCwxNy41MjksMjQsMTYuNjMxLDI0LDE1LjUyNHogTTEwLjA4NywxNC4zMzdoLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWMTMuMzhjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjE0LjMzN3ogTTEwLjA4NywxMS43OTNoLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZ2LTAuOTU2YzAtMC4wNzksMC4wNjItMC4xNDYsMC4xNDYtMC4xNDZoNi42ODNjMC4wNzksMCwwLjE0NiwwLjA2MiwwLjE0NiwwLjE0NlYxMS43OTN6IE0xMC4wODcsOS4yNDloLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWOC4yOTJjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjkuMjQ5eiBNMjAuODksMTQuMzMzaC0wLjAwNGMwLDAuMDc5LTAuMDYyLDAuMTQ2LTAuMTQ2LDAuMTQ2aC02LjY3OWMtMC4wNzksMC0wLjE0Ni0wLjA2Mi0wLjE0Ni0wLjE0NnYtMC45NTZjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjE0LjMzM3ogTTIwLjg5LDExLjc4OWgtMC4wMDRjMCwwLjA3OS0wLjA2MiwwLjE0Ni0wLjE0NiwwLjE0NmgtNi42NzljLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZ2LTAuOTU2YzAtMC4wNzksMC4wNjItMC4xNDYsMC4xNDYtMC4xNDZoNi42ODNjMC4wNzksMCwwLjE0NiwwLjA2MiwwLjE0NiwwLjE0NlYxMS43ODl6IE0yMC44OSw5LjI0NGgtMC4wMDRjMCwwLjA3OS0wLjA2MiwwLjE0Ni0wLjE0NiwwLjE0NmgtNi42NzljLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWOC4yOTJjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjkuMjQ0eiI+PC9wYXRoPjwvc3ZnPg=="},{name:"Remove Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-headers-inbound/",id:"remove-headers-inbound",defaultHandler:{export:"RemoveHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:["HEADER_NAME"]}},exampleHtml:"<div><p>Remove headers from the incoming request.</p></div><h3>Options</h3><ul><li><code>headers</code> <div><p>A list of headers to be removed from the incoming request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Remove Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-headers-outbound/",id:"remove-headers-outbound",defaultHandler:{export:"RemoveHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:["HEADER_NAME"]}},exampleHtml:"<div><p>Remove configured headers from the outgoing response.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Remove Query Parameters",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-query-params-inbound/",id:"remove-query-params-inbound",defaultHandler:{export:"RemoveQueryParamsInboundPolicy",module:"$import(@zuplo/runtime)",options:{params:["PARAM_NAME"]}},exampleHtml:"<div><p>Remove query parameters from the incoming request</p></div><h3>Options</h3><ul><li><code>params</code> <div><p>Array of query parameters to be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGVscC1jaXJjbGUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48cGF0aCBkPSJNOS4wOSA5YTMgMyAwIDAgMSA1LjgzIDFjMCAyLTMgMy0zIDMiPjwvcGF0aD48bGluZSB4MT0iMTIiIHkxPSIxNyIgeDI9IjEyLjAxIiB5Mj0iMTciPjwvbGluZT48L3N2Zz4="},{name:"Replace String in Response Body",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/replace-string-outbound/",id:"replace-string-outbound",defaultHandler:{export:"ReplaceStringOutboundPolicy",module:"$import(@zuplo/runtime)",options:{mode:"regexp",match:"https://example.com/api/(v1|v0)/",replaceWith:"https://my-gateway.com/v1/"}},exampleHtml:"<div><p>Replace a string in the incoming request body</p></div><h3>Options</h3><ul><li><code>mode</code> <div><p>The type of string replacement to perform</p></div></li><li><code>match</code> <div><p>The pattern to match</p></div></li><li><code>replaceWith</code> <div><p>The value to each match is replaced with</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcmVwZWF0Ij48cG9seWxpbmUgcG9pbnRzPSIxNyAxIDIxIDUgMTcgOSI+PC9wb2x5bGluZT48cGF0aCBkPSJNMyAxMVY5YTQgNCAwIDAgMSA0LTRoMTQiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSI3IDIzIDMgMTkgNyAxNSI+PC9wb2x5bGluZT48cGF0aCBkPSJNMjEgMTN2MmE0IDQgMCAwIDEtNCA0SDMiPjwvcGF0aD48L3N2Zz4="},{name:"Request Size Limit",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/request-size-limit-inbound/",id:"request-size-limit-inbound",defaultHandler:{export:"RequestSizeLimitInboundPolicy",module:"$import(@zuplo/runtime)",options:{maxSizeInBytes:4098,trustContentLengthHeader:!0}},exampleHtml:"<div><p>Enforces a maximum size on incoming requests</p></div><h3>Options</h3><ul><li><code>maxSizeInBytes</code> <div><p>The maximum size of the request in bytes</p></div></li><li><code>trustContentLengthHeader</code> <div><p>If true, the policy will reject any request with a <code>content-length</code> header in excess of <code>maxSizeInBytes</code> bytes value, but will not verify the actual size of the request. This is more efficient and offers slightly better memory usage but should only be used if you trust/control the clients calling the gateway to send an accurate content-length. If false, the gateway will actually verify the request size and reject any request with a size in excess of the stated maximum.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdHJ1Y2siPjxyZWN0IHg9IjEiIHk9IjMiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxMyI+PC9yZWN0Pjxwb2x5Z29uIHBvaW50cz0iMTYgOCAyMCA4IDIzIDExIDIzIDE2IDE2IDE2IDE2IDgiPjwvcG9seWdvbj48Y2lyY2xlIGN4PSI1LjUiIGN5PSIxOC41IiByPSIyLjUiPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjE4LjUiIGN5PSIxOC41IiByPSIyLjUiPjwvY2lyY2xlPjwvc3ZnPg=="},{name:"Request Validation",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/request-validation-inbound/",id:"request-validation-inbound",defaultHandler:{export:"RequestValidationInboundPolicy",module:"$import(@zuplo/runtime)",options:{logLevel:"info",validateBody:"log-only",includeRequestInLogs:!1}},exampleHtml:"<div><p>Validate inbound requests based on Open API specification</p></div><h3>Options</h3><ul><li><code>logLevel</code> <div><p>Optional. Specify one of the log levels: 'error | warn | info | debug'. Default: info</p></div></li><li><code>validateBody</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validateQueryParameters</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validatePathParameters</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validateHeaders</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>includeRequestInLogs</code> <div><p>Optional. Specify whether to include the request in the logs. Default: false</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIj48cG9seWxpbmUgcG9pbnRzPSI5IDExIDEyIDE0IDIyIDQiPjwvcG9seWxpbmU+PHBhdGggZD0iTTIxIDEydjdhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDExIj48L3BhdGg+PC9zdmc+"},{name:"Require Origin",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/require-origin-inbound/",id:"require-origin-inbound",defaultHandler:{export:"RequireOriginInboundPolicy",module:"$import(@zuplo/runtime)",options:{origins:"https://contoso.com, https://sub.contoso.com",failureDetail:"Invalid Request - contact support at support@contoso.com"}},exampleHtml:"<div><p>Sets an allow-list for an origin header</p></div><h3>Options</h3><ul><li><code>origins</code> <div><p>A comma separated string containing valid origins</p></div></li><li><code>failureDetail</code> <div><p>The <code>detail</code> of the HTTP Problem response, if the origin is missing or disallowed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwMDguNzE2LTYuNzQ3TTEyIDIxYTkuMDA0IDkuMDA0IDAgMDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAxNy44NDMgNC41ODJNMTIgM2E4Ljk5NyA4Ljk5NyAwIDAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwMTEyIDEwLjVjLTIuOTk4IDAtNS43NC0xLjEtNy44NDMtMi45MThtMTUuNjg2IDBBOC45NTkgOC45NTkgMCAwMTIxIDEyYzAgLjc3OC0uMDk5IDEuNTMzLS4yODQgMi4yNTNtMCAwQTE3LjkxOSAxNy45MTkgMCAwMTEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwMTMgMTJjMC0xLjYwNS40Mi0zLjExMyAxLjE1Ny00LjQxOCIgLz4KPC9zdmc+"},{name:"Set Body",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-body-inbound/",id:"set-body-inbound",defaultHandler:{export:"SetBodyInboundPolicy",module:"$import(@zuplo/runtime)",options:{body:'{ "model": "babbage", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0, "stream": true }'}},exampleHtml:"<div><p>Sets the body of the request in the inbound pipeline - make sure to convert a GET/HEAD request to another method when using this policy.</p></div><h3>Options</h3><ul><li><code>body</code> <div><p>The value to set for the body</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwMDguNzE2LTYuNzQ3TTEyIDIxYTkuMDA0IDkuMDA0IDAgMDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAxNy44NDMgNC41ODJNMTIgM2E4Ljk5NyA4Ljk5NyAwIDAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwMTEyIDEwLjVjLTIuOTk4IDAtNS43NC0xLjEtNy44NDMtMi45MThtMTUuNjg2IDBBOC45NTkgOC45NTkgMCAwMTIxIDEyYzAgLjc3OC0uMDk5IDEuNTMzLS4yODQgMi4yNTNtMCAwQTE3LjkxOSAxNy45MTkgMCAwMTEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwMTMgMTJjMC0xLjYwNS40Mi0zLjExMyAxLjE1Ny00LjQxOCIgLz4KPC9zdmc+Cg=="},{name:"Add or Set Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-headers-inbound/",id:"set-headers-inbound",defaultHandler:{export:"SetHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:[{name:"HEADER_NAME",value:"HEADER_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets headers on the incoming request.</p></div><h3>Options</h3><ul><li><code>headers</code> <div><p>An array of name and value objects (with an optional <code>overwrite</code> boolean)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Add or Set Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-headers-outbound/",id:"set-headers-outbound",defaultHandler:{export:"SetHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:[{name:"HEADER_NAME",value:"HEADER_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets headers on the on the outgoing.</p></div><h3>Options</h3><ul><li><code>headers</code> <div></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Add or Set Query Parameters",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-query-params-inbound/",id:"set-query-params-inbound",defaultHandler:{export:"SetQueryParamsInboundPolicy",module:"$import(@zuplo/runtime)",options:{params:[{name:"PARAM_NAME",value:"PARAM_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets query parameters on the incoming request.</p></div><h3>Options</h3><ul><li><code>params</code> <div><p>An array of object, with a name and value property (and optional <code>override</code> boolean)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGVscC1jaXJjbGUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48cGF0aCBkPSJNOS4wOSA5YTMgMyAwIDAgMSA1LjgzIDFjMCAyLTMgMy0zIDMiPjwvcGF0aD48bGluZSB4MT0iMTIiIHkxPSIxNyIgeDI9IjEyLjAxIiB5Mj0iMTciPjwvbGluZT48L3N2Zz4="},{name:"Set Status Code",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-status-outbound/",id:"set-status-outbound",defaultHandler:{export:"SetStatusOutboundPolicy",module:"$import(@zuplo/runtime)",options:{status:200,statusText:"OK"}},exampleHtml:"<div><p>Adds or sets headers on the on the outgoing.</p></div><h3>Options</h3><ul><li><code>status</code> <div><p>The status code to be used in the response</p></div></li><li><code>statusText</code> <div><p>The statusText to be used in the response (optional)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNNi42MzMgMTAuNWMuODA2IDAgMS41MzMtLjQ0NiAyLjAzMS0xLjA4YTkuMDQxIDkuMDQxIDAgMDEyLjg2MS0yLjRjLjcyMy0uMzg0IDEuMzUtLjk1NiAxLjY1My0xLjcxNWE0LjQ5OCA0LjQ5OCAwIDAwLjMyMi0xLjY3MlYzYS43NS43NSAwIDAxLjc1LS43NUEyLjI1IDIuMjUgMCAwMTE2LjUgNC41YzAgMS4xNTItLjI2IDIuMjQzLS43MjMgMy4yMTgtLjI2Ni41NTguMTA3IDEuMjgyLjcyNSAxLjI4MmgzLjEyNmMxLjAyNiAwIDEuOTQ1LjY5NCAyLjA1NCAxLjcxNS4wNDUuNDIyLjA2OC44NS4wNjggMS4yODVhMTEuOTUgMTEuOTUgMCAwMS0yLjY0OSA3LjUyMWMtLjM4OC40ODItLjk4Ny43MjktMS42MDUuNzI5SDEzLjQ4Yy0uNDgzIDAtLjk2NC0uMDc4LTEuNDIzLS4yM2wtMy4xMTQtMS4wNGE0LjUwMSA0LjUwMSAwIDAwLTEuNDIzLS4yM0g1LjkwNE0xNC4yNSA5aDIuMjVNNS45MDQgMTguNzVjLjA4My4yMDUuMTczLjQwNS4yNy42MDIuMTk3LjQtLjA3OC44OTgtLjUyMy44OThoLS45MDhjLS44ODkgMC0xLjcxMy0uNTE4LTEuOTcyLTEuMzY4YTEyIDEyIDAgMDEtLjUyMS0zLjUwN2MwLTEuNTUzLjI5NS0zLjAzNi44MzEtNC4zOThDMy4zODcgMTAuMjAzIDQuMTY3IDkuNzUgNSA5Ljc1aDEuMDUzYy40NzIgMCAuNzQ1LjU1Ni41Ljk2YTguOTU4IDguOTU4IDAgMDAtMS4zMDIgNC42NjVjMCAxLjE5NC4yMzIgMi4zMzMuNjU0IDMuMzc1eiIgLz4KPC9zdmc+Cg=="},{name:"Sleep / Delay",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/sleep-inbound/",id:"sleep-inbound",defaultHandler:{export:"SleepInboundPolicy",module:"$import(@zuplo/runtime)",options:{sleepInMs:1e3}},exampleHtml:"<div><p>Add a delay to the incoming request. Useful for testing.</p></div><h3>Options</h3><ul><li><code>sleepInMs</code> <div><p>The number of milliseconds to delay the request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItd2F0Y2giPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjciPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjEyIDkgMTIgMTIgMTMuNSAxMy41Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0xNi41MSAxNy4zNWwtLjM1IDMuODNhMiAyIDAgMCAxLTIgMS44Mkg5LjgzYTIgMiAwIDAgMS0yLTEuODJsLS4zNS0zLjgzbS4wMS0xMC43bC4zNS0zLjgzQTIgMiAwIDAgMSA5LjgzIDFoNC4zNWEyIDIgMCAwIDEgMiAxLjgybC4zNSAzLjgzIj48L3BhdGg+PC9zdmc+"},{name:"Supabase JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/supabase-jwt-auth-inbound/",id:"supabase-jwt-auth-inbound",defaultHandler:{export:"SupabaseJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{secret:"$env(SUPABASE_JWT_SECRET)",allowUnauthenticatedRequests:!1,requiredClaims:{claim_1:["valid_value_1","valid_value_2"],claim_2:["valid_value_1","valid_value_2"]}}},exampleHtml:"<div><p>The Supabase JWT Authentication policy supports user JWT tokens created by Supabase.</p></div><h3>Options</h3><ul><li><code>secret</code> <div><p>The key used to verify the signature of the JWT token</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>Indicates whether the request should continue if authentication fails. Default is <code>false</code> which means unauthenticated users will automatically receive a 401 response.</p></div></li><li><code>requiredClaims</code> <div><p>Any claims that must be present for authentication to succeed - multiple valid values can be specified for each claim.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTA5cHgiIGhlaWdodD0iMTEycHgiIHZpZXdCb3g9IjAgMCAxMDkgMTEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPnN1cGFiYXNlLWxvZ28taWNvbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjIwLjg2MTc0NDUlIiB5MT0iMjAuNjg2ODgxMiUiIHgyPSI2My40MjU2MDg2JSIgeTI9IjQ0LjA3MTAwNzclIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzhDOEM4QyIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjEuOTkxMTY0OTglIiB5MT0iLTEzLjE1ODQwMDglIiB4Mj0iMjEuNDAyNTA3NyUiIHkyPSIzNC43MDgwNjIlIiBpZD0ibGluZWFyR3JhZGllbnQtMiI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9InN1cGFiYXNlLWxvZ28taWNvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDAuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgPHBhdGggZD0iTTYzLjY4Mjk0MTIsMTEwLjA3MjgxOSBDNjAuODIzNDQxMiwxMTMuNjczODE5IDU1LjAyNTU0MTIsMTExLjcwMDgxOSA1NC45NTY2NDEyLDEwNy4xMDI4MTkgTDUzLjk0OTE0MTIsMzkuODUxNTE5MSBMOTkuMTY4ODQxMiwzOS44NTE1MTkxIEMxMDcuMzU5MzQxLDM5Ljg1MTUxOTEgMTExLjkyNzM0MSw0OS4zMTE2MTkxIDEwNi44MzQzNDEsNTUuNzI2MjE5MSBMNjMuNjgyOTQxMiwxMTAuMDcyODE5IFoiIGlkPSJQYXRoIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik02My42ODI5NDEyLDExMC4wNzI4MTkgQzYwLjgyMzQ0MTIsMTEzLjY3MzgxOSA1NS4wMjU1NDEyLDExMS43MDA4MTkgNTQuOTU2NjQxMiwxMDcuMTAyODE5IEw1My45NDkxNDEyLDM5Ljg1MTUxOTEgTDk5LjE2ODg0MTIsMzkuODUxNTE5MSBDMTA3LjM1OTM0MSwzOS44NTE1MTkxIDExMS45MjczNDEsNDkuMzExNjE5MSAxMDYuODM0MzQxLDU1LjcyNjIxOTEgTDYzLjY4Mjk0MTIsMTEwLjA3MjgxOSBaIiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMikiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTQ1LjI5MjM0MTIsMS44NTk4NDkwNSBDNDguMTUxODQxMiwtMS43NDE1NTA5NSA1My45NDk4NDEyLDAuMjMxNzU2MDUzIDU0LjAxODc0MTIsNC44Mjk4MTkwNSBMNTQuNDYwMjQxMiw3Mi4wODEwMTkxIEw5LjgwNjQ3MTIzLDcyLjA4MTAxOTEgQzEuNjE1NzIxMjMsNzIuMDgxMDE5MSAtMi45NTI0MDg3Nyw2Mi42MjA5MTkxIDIuMTQwODQxMjMsNTYuMjA2MzE5MSBMNDUuMjkyMzQxMiwxLjg1OTg0OTA1IFoiIGlkPSJQYXRoIiBmaWxsPSIjMDAwMDAwIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},{name:"Transform Request Body",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/transform-body-inbound/",id:"transform-body-inbound",defaultHandler:{export:"TransformBodyInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Transform the body of an incoming request.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdCI+PHBhdGggZD0iTTExIDRINGEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNyI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC41IDIuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMMTIgMTVsLTQgMSAxLTQgOS41LTkuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Transform Response Body",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,fakePolicyUrl:"https://zuplo.com/docs/policies/custom-code-outbound#writing-a-policy",documentationUrl:"https://zuplo.com/docs/policies/transform-body-outbound/",id:"transform-body-outbound",defaultHandler:{export:"TransformBodyOutbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>The best way to transform a response body is using a custom code outbound policy.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdCI+PHBhdGggZD0iTTExIDRINGEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNyI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC41IDIuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMMTIgMTVsLTQgMSAxLTQgOS41LTkuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Upstream Azure AD Service Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-azure-ad-service-auth-inbound/",id:"upstream-azure-ad-service-auth-inbound",defaultHandler:{export:"UpstreamAzureAdServiceAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{activeDirectoryTenantId:"$env(AZURE_AD_TENANT_ID)",activeDirectoryClientId:"$env(AZURE_AD_CLIENT_ID)",activeDirectoryClientSecret:"$env(AZURE_AD_CLIENT_SECRET)"}},exampleHtml:"<div><p>Uses Azure Active Directory to add an Authorization header to the request in order to authenticate requests using Azure identity.</p></div><h3>Options</h3><ul><li><code>activeDirectoryTenantId</code> <div><p>Azure Active Directory Tenant ID.</p></div></li><li><code>activeDirectoryClientId</code> <div><p>The Application (client) ID of the Azure AD App Registration.</p></div></li><li><code>activeDirectoryClientSecret</code> <div><p>The client secret of the Azure AD App Registration.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxNTAgMTUwIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xXzYpIj4KICAgIDxwYXRoIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xXzYpIgogICAgICBkPSJNNTIuMDkgMTAuMjI1aDQwLjY4NUw1MC41NDEgMTM1LjM2MWE2LjQ5IDYuNDkgMCAwMS02LjE0NiA0LjQxMkgxMi43MzNhNi40NjggNi40NjggMCAwMS01LjI2Mi0yLjY5OCA2LjQ4MyA2LjQ4MyAwIDAxLS44NzYtNS44NDhsMzkuMzQ5LTExNi41OWE2LjQ4NyA2LjQ4NyAwIDAxNi4xNDctNC40MTJ6IiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMV9kXzFfNikiPgogICAgPHBhdGggZmlsbD0iIzUyNTU1OCIKICAgICAgZD0iTTExMS4yMTEgOTQuMTU4SDQ2LjY5NWEyLjk4NSAyLjk4NSAwIDAwLTIuMDM5IDUuMTdsNDEuNDU2IDM4LjY5NGE2LjUxMyA2LjUxMyAwIDAwNC40NDcgMS43NTFoMzYuNTMybC0xNS44OC00NS42MTV6IiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMl9kXzFfNikiPgogICAgPHBhdGggZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzFfNikiCiAgICAgIGQ9Ik01Mi4wOSAxMC4yMjVhNi40MzQgNi40MzQgMCAwMC02LjE2IDQuNDk4TDYuNjQ0IDEzMS4xMmE2LjQ3MSA2LjQ3MSAwIDAwMy4xMiA3LjkzMiA2LjQ2MyA2LjQ2MyAwIDAwMi45ODYuNzIxaDMyLjQ4YTYuOTQgNi45NCAwIDAwNS4zMjgtNC41MzFsNy44MzQtMjMuMDg5IDI3Ljk4NSAyNi4xMDJhNi42MTcgNi42MTcgMCAwMDQuMTY1IDEuNTE4aDM2LjM5NWwtMTUuOTYyLTQ1LjYxNS00Ni41MzMuMDEgMjguNDgtODMuOTQzSDUyLjA5eiIKICAgICAgc2hhcGUtcmVuZGVyaW5nPSJjcmlzcEVkZ2VzIiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyM19kXzFfNikiPgogICAgPHBhdGggZmlsbD0idXJsKCNwYWludDJfbGluZWFyXzFfNikiCiAgICAgIGQ9Ik0xMDQuMDU1IDE0LjYzMWE2LjQ4MiA2LjQ4MiAwIDAwLTYuMTM4LTQuNDA2SDUyLjU3NWE2LjQ3OCA2LjQ3OCAwIDAxNi4xMzcgNC40MDZsMzkuMzUgMTE2LjU5NGE2LjQ4IDYuNDggMCAwMS0zLjE4IDcuODM1IDYuNDczIDYuNDczIDAgMDEtMi45NTcuNzE1aDQ1LjM0NGE2LjQ3MyA2LjQ3MyAwIDAwNS4yNjEtMi43MDEgNi40ODggNi40ODggMCAwMC44NzUtNS44NDlsLTM5LjM1LTExNi41OTR6IiAvPgogIDwvZz4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8xXzYiIHdpZHRoPSI5NC41MTkiIGhlaWdodD0iMTM3LjU0OCIgeD0iMi4yNTUiIHk9IjEwLjIyNSIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjFfZF8xXzYiIHdpZHRoPSI5MS4zODUiIGhlaWdodD0iNTMuNjE2IiB4PSIzOS43MDYiIHk9Ijk0LjE1OCIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjJfZF8xXzYiIHdpZHRoPSIxMjguNjc0IiBoZWlnaHQ9IjEzNy41NDgiIHg9IjIuMjY0IiB5PSIxMC4yMjUiCiAgICAgIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIC8+CiAgICAgIDxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJoYXJkQWxwaGEiCiAgICAgICAgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgLz4KICAgICAgPGZlT2Zmc2V0IGR5PSI0IiAvPgogICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIyIiAvPgogICAgICA8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiIC8+CiAgICAgIDxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNSAwIiAvPgogICAgICA8ZmVCbGVuZCBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMV82IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMV82IiByZXN1bHQ9InNoYXBlIiAvPgogICAgPC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJmaWx0ZXIzX2RfMV82IiB3aWR0aD0iOTkuMTciIGhlaWdodD0iMTM3LjU1IiB4PSI0OC41NzUiIHk9IjEwLjIyNSIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xXzYiIHgxPSI2Ni45MTkiIHgyPSIyNC42NjciIHkxPSIxOS44MjUiIHkyPSIxNDQuNjQ3IgogICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyNzI5MkMiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzVFNjA2MiIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMV82IiB4MT0iODAuMTE3IiB4Mj0iNzAuMzQ0IiB5MT0iNzcuOTk1IiB5Mj0iODEuMyIKICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBzdG9wLW9wYWNpdHk9Ii4zIiAvPgogICAgICA8c3RvcCBvZmZzZXQ9Ii4wNzEiIHN0b3Atb3BhY2l0eT0iLjIiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iLjMyMSIgc3RvcC1vcGFjaXR5PSIuMSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIuNjIzIiBzdG9wLW9wYWNpdHk9Ii4wNSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiIC8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzFfNiIgeDE9Ijc0Ljc0MiIgeDI9IjEyMS4xMjIiIHkxPSIxNi4xODQiIHkyPSIxMzkuNzQ4IgogICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM5Q0EwQTAiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzNENDA0MyIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgo8L3N2Zz4="},{name:"Upstream Firebase Admin Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-firebase-admin-auth-inbound/",id:"upstream-firebase-admin-auth-inbound",defaultHandler:{export:"UpstreamFirebaseAdminAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:"<div><p>Creates a Firebase Admin token and attaches it to the outgoing request. Useful when calling Firebase services as an administrator.</p></div><h3>Options</h3><ul><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5maXJlYmFzZV9pY29uPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJmaXJlYmFzZV9pY29uIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwNCIgaGVpZ2h0PSIyMDQiPjwvcmVjdD4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik00Mi4yLDEyOC45IEw1OS42LDE3LjQgQzYwLjIsMTMuNiA2NS4zLDEyLjcgNjcuMSwxNi4xIEw4NS44LDUxLjEgTDQyLjIsMTI4LjkgWiBNMTY1LjksMTU2IEwxNDkuMyw1My4zIEMxNDguOCw1MC4xIDE0NC44LDQ4LjggMTQyLjUsNTEuMSBMMzcuOSwxNTYgTDk1LjgsMTg4LjUgQzk5LjQsMTkwLjUgMTAzLjksMTkwLjUgMTA3LjUsMTg4LjUgTDE2NS45LDE1NiBaIE0xMTguOSw2Ni40IEwxMDUuNSw0MC45IEMxMDQsMzggOTkuOSwzOCA5OC40LDQwLjkgTDM5LjUsMTQ1LjkgTDExOC45LDY2LjQgWiIKICAgICAgICAgICAgICAgIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Upstream Firebase User Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-firebase-user-auth-inbound/",id:"upstream-firebase-user-auth-inbound",defaultHandler:{export:"UpstreamFirebaseUserAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)",webApiKey:"$env(WEB_API_KEY)",userId:"1234",developerClaims:{premium:!0}}},exampleHtml:"<div><p>Creates a Firebase custom user token and attaches it to the outgoing request. Useful when calling Firebase services as user.</p></div><h3>Options</h3><ul><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>userId</code> <div><p>The userId to use as the custom token's subject.</p></div></li><li><code>userIdPropertyPath</code> <div><p>The property on the incoming request.user object to retrieve the value of the userId</p></div></li><li><code>developerClaims</code> <div><p>Optional additional claims to include in the custom token's payload.</p></div></li><li><code>webApiKey</code> <div><p>The Firebase Web API Key (found in project settings)</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5maXJlYmFzZV9pY29uPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJmaXJlYmFzZV9pY29uIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwNCIgaGVpZ2h0PSIyMDQiPjwvcmVjdD4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik00Mi4yLDEyOC45IEw1OS42LDE3LjQgQzYwLjIsMTMuNiA2NS4zLDEyLjcgNjcuMSwxNi4xIEw4NS44LDUxLjEgTDQyLjIsMTI4LjkgWiBNMTY1LjksMTU2IEwxNDkuMyw1My4zIEMxNDguOCw1MC4xIDE0NC44LDQ4LjggMTQyLjUsNTEuMSBMMzcuOSwxNTYgTDk1LjgsMTg4LjUgQzk5LjQsMTkwLjUgMTAzLjksMTkwLjUgMTA3LjUsMTg4LjUgTDE2NS45LDE1NiBaIE0xMTguOSw2Ni40IEwxMDUuNSw0MC45IEMxMDQsMzggOTkuOSwzOCA5OC40LDQwLjkgTDM5LjUsMTQ1LjkgTDExOC45LDY2LjQgWiIKICAgICAgICAgICAgICAgIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Upstream GCP Self-Signed JWT",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-gcp-jwt-inbound/",id:"upstream-gcp-jwt-inbound",defaultHandler:{export:"UpstreamGcpJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{audience:"your_gcp_service.endpoint.com",serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:'<div><p>Creates a self-signed JWT token (generated using a Google Service Account JSON) and attaches it to the outgoing request. Useful when calling GCP services like Cloud Endpoints / ESPv2</p></div><h3>Options</h3><ul><li><code>audience</code> <div><p>The audience for the minted JWT. Refer to <a href="https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement">https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement</a>.</p></div></li><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjMiIHZpZXdCb3g9IjAgMCAyNCAyMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTUgOUg5TDggMTFMOSAxM0gxNUwxNiAxMUwxNSA5WiIgZmlsbD0iIzczNzM3MyIgLz4KICA8cGF0aCBkPSJNMTYgMTFMMTUgOUg5LjUxSDlMOCAxMUgxNloiIGZpbGw9IiM5QTlGQTgiIC8+CiAgPHBhdGggZD0iTTE4IDVIMTVMMTguOTcgMTFMMjAuNDcgOC43NUwxOCA1WiIgZmlsbD0iIzczNzM3MyIgLz4KICA8cGF0aCBkPSJNMjEuOTUgMTFMMjAuNDcgOC43NUwxOC45NyAxMUwxNSAxN0gxOEwyMS45NSAxMVoiIGZpbGw9IiM5QTlGQTgiIC8+CiAgPHBhdGggZD0iTTUuOTUgMTdIOC45NUw0Ljk4IDExTDMuNDggMTMuMjVMNS45NSAxN1oiIGZpbGw9IiM3MzczNzMiIC8+CiAgPHBhdGggZD0iTTIgMTFMMy40OCAxMy4yNUw0Ljk4IDExTDguOTUgNUg1Ljk1TDIgMTFaIiBmaWxsPSIjOUE5RkE4IiAvPgo8L3N2Zz4="},{name:"Upstream GCP Service Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-gcp-service-auth-inbound/",id:"upstream-gcp-service-auth-inbound",defaultHandler:{export:"UpstreamGcpServiceAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{audience:"https://my-service-a2ev-uc.a.run.app",serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:`<div><p>Creates an ID Token from Google's OAuth service and attaches it to the outgoing request. Useful when calling GCP services that are secured with GCP IAM.</p></div><h3>Options</h3><ul><li><code>audience</code> <div><p>The audience for the service to be called. This is typically the URL of your service endpoint like '<a href="https://my-service-a2ev-uc.a.run.app">https://my-service-a2ev-uc.a.run.app</a>'</p></div></li><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0NjEgMzcxIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzFfMikiPgogICAgPHBhdGggZmlsbD0iIzczNzM3MyIKICAgICAgZD0iTTI5Mi4yNyAxMDIuMTVoMTQuMDQzbDQwLjAyNC00MC4wMjQgMS45NjYtMTYuOTkyYTE3OS44OTcgMTc5Ljg5NyAwIDAwLTI0Ny45MTkgOS4zNjEgMTc5Ljg5OCAxNzkuODk4IDAgMDAtNDQuNzQyIDc4LjQwOSAyMS43NjYgMjEuNzY2IDAgMDExNC4wNDMtLjg0Mmw4MC4wNDYtMTMuMjAxczQuMDczLTYuNzQxIDYuMTc5LTYuMzE5YTk5Ljg1IDk5Ljg1IDAgMDExMzYuNjQxLTEwLjM5MmgtLjI4MXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjN0Q3RDdEIgogICAgICBkPSJNNDAzLjM1MiAxMzIuOTA0YTE4MC4zMDggMTgwLjMwOCAwIDAwLTU0LjM0Ny04Ny42M2wtNTYuMTczIDU2LjE3M2E5OS44NSA5OS44NSAwIDAxMzYuNjUzIDc5LjIwNHY5Ljk3MWE0OS45ODcgNDkuOTg3IDAgMDEzNS4zNTEgMTQuNjQzIDQ5Ljk5MyA0OS45OTMgMCAwMS0zNS4zNTEgODUuMzQ1aC05OS45ODhsLTkuOTcxIDEwLjExMXY1OS45NjVsOS45NzEgOS45NzFoOTkuOTg4YTEzMC4wNDQgMTMwLjA0NCAwIDAwMTI1LjE5Ny05MS40NTQgMTMwLjAzNiAxMzAuMDM2IDAgMDAtNTEuMzMtMTQ2LjI5OXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjN0Q3RDdEIgogICAgICBkPSJNMTI5LjM2OSAzNzAuMDk1aDk5Ljk4OHYtODAuMDQ3aC05OS45ODhhNDkuNzAyIDQ5LjcwMiAwIDAxLTIwLjY0NC00LjQ5NGwtMTQuMDQzIDQuMzU0LTQwLjMwNCA0MC4wMjMtMy41MTEgMTQuMDQzYTEyOS4zMzcgMTI5LjMzNyAwIDAwNzguNTAyIDI2LjEyMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQkFCQUJBIgogICAgICBkPSJNMTI5LjM2OSAxMTAuNDM1QTEzMC4wMzcgMTMwLjAzNyAwIDAwNi45MDUgMTk4Ljk3MmExMzAuMDQyIDEzMC4wNDIgMCAwMDQzLjk2MiAxNDQuNTgxbDU3Ljk5OC01Ny45OTlhNDkuOTg2IDQ5Ljk4NiAwIDAxLTI4LjU5Ny0zNi41ODMgNDkuOTk2IDQ5Ljk5NiAwIDAxNTguMTU3LTU4LjE1OCA0OS45OTIgNDkuOTkyIDAgMDEzNi41ODQgMjguNTk4bDU3Ljk5OS01Ny45OTlhMTI5LjkgMTI5LjkgMCAwMC0xMDMuNjM5LTUwLjk3N3oiIC8+CiAgPC9nPgogIDxkZWZzPgogICAgPGNsaXBQYXRoIGlkPSJjbGlwMF8xXzIiPgogICAgICA8cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDQ2MXYzNzFIMHoiIC8+CiAgICA8L2NsaXBQYXRoPgogIDwvZGVmcz4KPC9zdmc+"},{name:"JSON Body Validation (legacy)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/validate-json-schema-inbound/",id:"validate-json-schema-inbound",defaultHandler:{export:"ValidateJsonSchemaInbound",module:"$import(@zuplo/runtime)",options:{validator:"$import(./schemas/example-schema.json)"}},exampleHtml:"<div><p>Validates the body of an incoming request based on a JSON schema.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIj48cG9seWxpbmUgcG9pbnRzPSI5IDExIDEyIDE0IDIyIDQiPjwvcG9seWxpbmU+PHBhdGggZD0iTTIxIDEydjdhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDExIj48L3BhdGg+PC9zdmc+"},{name:"A/B Test Inbound",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ab-test-inbound/",id:"ab-test-inbound",defaultHandler:{export:"ABTestInbound",module:"$import(@zuplo/runtime)",options:{testKey:"${user.sub}",modifier:{module:"$import(./modules/ab-test)",export:"abTestModifier"}}},exampleHtml:"<div><p>The A/B test policy is used to handle requests differently based on parameters such as user, ip, etc.</p></div><h3>Options</h3><ul><li><code>testKey</code> <div><p>The key to use for determining the group the request belongs</p></div></li><li><code>modifier</code> <div><p>The function that modifies the request based on the test key</p></div><ul><li><code>export</code> <div><p>Specifies the export to load your function, e.g. <code>default</code>, <code>myFunction</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItc2VuZCI+PGxpbmUgeDE9IjIyIiB5MT0iMiIgeDI9IjExIiB5Mj0iMTMiPjwvbGluZT48cG9seWdvbiBwb2ludHM9IjIyIDIgMTUgMjIgMTEgMTMgMiA5IDIyIDIiPjwvcG9seWdvbj48L3N2Zz4="},{name:"Access Control List Inbound",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/acl-policy-inbound/",id:"acl-policy-inbound",defaultHandler:{export:"AClPolicyInbound",module:"$import(@zuplo/runtime)",options:{testKey:"${user.sub}",modifier:{module:"$import(./modules/ab-test)",export:"abTestModifier"}}},exampleHtml:"<div><p>The access control list inbound policy limits access to resources based on parameters of the request</p></div><h3>Options</h3><ul><li><code>policies</code> <div><p>The policies to enforce for the request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXNlci1jaGVjayI+PHBhdGggZD0iTTE2IDIxdi0yYTQgNCAwIDAgMC00LTRINWE0IDQgMCAwIDAtNCA0djIiPjwvcGF0aD48Y2lyY2xlIGN4PSI4LjUiIGN5PSI3IiByPSI0Ij48L2NpcmNsZT48cG9seWxpbmUgcG9pbnRzPSIxNyAxMSAxOSAxMyAyMyA5Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Audit Logs Inbound",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/audit-log-inbound/",id:"audit-log-inbound",defaultHandler:{export:"AuditLogsInboundPolicy",module:"$import(@zuplo/runtime)",options:{logIpAddress:!0,logUser:!0,logGeolocation:!0,logQueryParameters:!0,logRouteParameters:!0,tenant:"${params.tenantId}",metadata:{module:"$import(./modules/audit-logs)",export:"auditLogData"}}},exampleHtml:"<div><p>Capture detailed logs of requests for auditing purposes</p></div><h3>Options</h3><ul><li><code>logIpAddress</code> <div><p>if the IP address should be logged</p></div></li><li><code>logUser</code> <div><p>if the user's <code>sub</code> should be logged</p></div></li><li><code>logGeolocation</code> <div><p>if the geolocation information should be logged (i.e. state, country, longitude, latitude, etc.)</p></div></li><li><code>logQueryParameters</code> <div><p>log the values of query parameters</p></div></li><li><code>logRouteParameters</code> <div></div></li><li><code>tenant</code> <div><p>if the route parameters should be logged (i.e. the value of <code>customerId</code> in the route <code>/customers/:customerId</code>)</p></div></li><li><code>metadata</code> <div><p>A function to add additional data to the audit logs</p></div><ul><li><code>export</code> <div><p>Specifies the export to load your function, e.g. <code>default</code>, <code>myFunction</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgNHYxNk0xNyA0djE2TTMgOGg0bTEwIDBoNE0zIDEyaDE4TTMgMTZoNG0xMCAwaDRNNCAyMGgxNmExIDEgMCAwMDEtMVY1YTEgMSAwIDAwLTEtMUg0YTEgMSAwIDAwLTEgMXYxNGExIDEgMCAwMDEgMXoiIC8+PC9zdmc+"}],Ab={config:Tz,policies:Ez};function Cb(){return Ab.policies}function il(e){const t=Cb(),n=Ab.config.legacyIdMaps;return n[e]?t.find(r=>r.id===n[e]):t.find(r=>r.id===e)}const kv="-",jz="There's already a policy with this name",Pz="Policy name can't be empty",Lz=(e,t)=>{if(!t)return"";const n=e==null?void 0:e.filter(a=>a.name.startsWith(t)).sort((a,l)=>a.name.localeCompare(l.name));if(!n||n.length===0)return t;const r=n.at(-1);if(!r)return t;const o=r.name.split(kv).at(-1);if(!o)return t;let i=parseInt(o);return isNaN(i)&&(i=0),`${t}${kv}${i+1}`},Rz=(e,t)=>e?t.find(r=>r.name===e)?jz:null:Pz,Tb=e=>e.replace(/ /g,""),Oz=({existingConfig:e,onComplete:t,onCancel:n,policyManager:r})=>{const o=r.getPolicyListEnforced(),i=e.policyType,a=il(i),[l,s]=v.useState(e.name),[u,c]=v.useState(null),[d,p]=v.useState(null),f=v.useRef();if(v.useEffect(()=>{(b=>{if(b===e.name){c(null);return}c(Rz(b,o))})(l)},[e.name,l,o]),!a)return null;const g=M=>{const b={...e,handler:M,name:l};r.updatePolicy(e.name,b)},I=()=>{var b;const M=(b=f.current)==null?void 0:b.getValue();if(!(!i||!M))try{const N=JSON.parse(M);g(N),t()}catch(N){p(N.message)}},w=M=>{s(Tb(M.toLowerCase()))};function y(M){f.current=M}const h=!!u;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(Db,{name:l,onChangeName:w,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:u,disabled:!1})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Vs,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(Sb,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:fe("h-60",{"border-2 border-red-500":!!d}),width:"100%",language:"json",onMount:y,defaultValue:JSON.stringify(e.handler,void 0,NM)}),d?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:d}):null]}),m.jsx(Vs,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Hm,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[ao.COMING_SOON.icon,m.jsx("div",{children:ao.COMING_SOON.defaultTitle})]})})]}),m.jsx(Nb,{onConfirm:I,onCancel:n,isDisabled:h,mustRequestAccess:!1})]})},kz=({isReadOnly:e,policy:t,onDelete:n,index:r})=>{const o=()=>l(),i=()=>d(),a=nc(),[l,s]=Da(()=>{const I=()=>{n(r),s()};return m.jsx(Op,{hideModal:s,alertType:"REMOVE",bodyText:"Are you sure you want to remove this policy from this route? This will not delete the policy",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:I,onSecondaryButtonClick:s,primaryButtonTestID:`confirm-remove-policy-btn-${t}`})},[n,r]),c=a.getPolicyListEnforced().find(I=>I.name===t),[d,p]=Da(()=>{if(!c)throw new Error(`Cannot edit policy: ${t} - policy not found in policies config list `);return m.jsx(gb,{title:"Edit Policy",isOpen:!0,setIsOpen:p,children:m.jsx(Oz,{existingConfig:c,onComplete:p,onCancel:p,policyManager:a})})},[c]),f=c?il(c.policyType):void 0,g=!f;return m.jsxs("div",{className:fe("h-full w-full max-w-full flex bg-white rounded-md border drop-shadow-sm min-w-0",{"border-gray-200":!g,"border-red-500":g,"bg-gray-200":e}),children:[e?m.jsx("div",{className:"w-1",children:" "}):m.jsxs("div",{className:"flex bg-white rounded-l-md items-center pl-1 text-gray-400",children:[m.jsx(qc,{className:"w-4"}),m.jsx(qc,{className:"w-4 -ml-[0.7rem]"}),m.jsx(qc,{className:"w-4 -ml-[0.72rem]"})]}),m.jsxs("div",{className:"flex grow items-center self-center pr-2 col-span-1 max-w-full min-w-0",children:[!g&&m.jsx("img",{className:"w-5 h-5 mx-2 hidden 2xl:inline",src:f.icon,alt:f.name}),m.jsx("p",{"data-test":`policy-designer-policy-name-${t}`,className:fe("flex grow max-w-full text-sm h-full truncate",{"text-red-600":g}),children:g?`Invalid Policy: ${t}`:t})]}),e?m.jsx("div",{className:"rounded-r w-[1px] h-8",children:" "}):m.jsxs("div",{className:"flex bg-gray-200 h-full rounded",children:[m.jsx("button",{type:"button",disabled:g,onClick:i,"data-test":`policy-designer-edit-policy-btn-${t}`,className:fe("flex h-full px-2 bg-gray-200 border-gray-300 border-l py-2",{"cursor-not-allowed":g,"hover:bg-gray-300":!g}),children:m.jsx(sA,{className:"w-4 h-4"})}),m.jsx("button",{type:"button",disabled:e,onClick:o,"data-test":`policy-designer-remove-policy-btn-${t}`,className:fe("flex h-full px-2 bg-gray-200 border-gray-300 border-l py-2 rounded-r hover:bg-gray-300"),children:m.jsx(UD,{className:"w-4 h-4"})})]})]})};function Qp(e,t){return Qp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Qp(e,t)}function Eb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qp(e,t)}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function ja(e){"@babel/helpers - typeof";return ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ja(e)}function zz(e,t){if(ja(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ja(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uz(e){var t=zz(e,"string");return ja(t)==="symbol"?t:String(t)}function Bz(e,t,n){return t=Uz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Uv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zv(Object(n),!0).forEach(function(r){Bz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Et(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Bv=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),wd=function(){return Math.random().toString(36).substring(7).split("").join(".")},_v={INIT:"@@redux/INIT"+wd(),REPLACE:"@@redux/REPLACE"+wd(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+wd()}};function _z(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function jb(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Et(1));return n(jb)(e,t)}if(typeof e!="function")throw new Error(Et(2));var o=e,i=t,a=[],l=a,s=!1;function u(){l===a&&(l=a.slice())}function c(){if(s)throw new Error(Et(3));return i}function d(I){if(typeof I!="function")throw new Error(Et(4));if(s)throw new Error(Et(5));var w=!0;return u(),l.push(I),function(){if(w){if(s)throw new Error(Et(6));w=!1,u();var h=l.indexOf(I);l.splice(h,1),a=null}}}function p(I){if(!_z(I))throw new Error(Et(7));if(typeof I.type>"u")throw new Error(Et(8));if(s)throw new Error(Et(9));try{s=!0,i=o(i,I)}finally{s=!1}for(var w=a=l,y=0;y<w.length;y++){var h=w[y];h()}return I}function f(I){if(typeof I!="function")throw new Error(Et(10));o=I,p({type:_v.REPLACE})}function g(){var I,w=d;return I={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Et(11));function M(){h.next&&h.next(c())}M();var b=w(M);return{unsubscribe:b}}},I[Bv]=function(){return this},I}return p({type:_v.INIT}),r={dispatch:p,subscribe:d,getState:c,replaceReducer:f},r[Bv]=g,r}function $v(e,t){return function(){return t(e.apply(this,arguments))}}function Fv(e,t){if(typeof e=="function")return $v(e,t);if(typeof e!="object"||e===null)throw new Error(Et(16));var n={};for(var r in e){var o=e[r];typeof o=="function"&&(n[r]=$v(o,t))}return n}function Pb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function $z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Et(15))},a={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(s){return s(a)});return i=Pb.apply(void 0,l)(o.dispatch),Uv(Uv({},o),{},{dispatch:i})}}}var Lb=O.createContext(null);function Fz(e){e()}var Rb=Fz,Hz=function(t){return Rb=t},Wz=function(){return Rb};function Gz(){var e=Wz(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var o=t;o;)o.callback(),o=o.next})},get:function(){for(var o=[],i=t;i;)o.push(i),i=i.next;return o},subscribe:function(o){var i=!0,a=n={callback:o,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!i||t===null||(i=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var Hv={notify:function(){},get:function(){return[]}};function Ob(e,t){var n,r=Hv;function o(d){return s(),r.subscribe(d)}function i(){r.notify()}function a(){c.onStateChange&&c.onStateChange()}function l(){return!!n}function s(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Gz())}function u(){n&&(n(),n=void 0,r.clear(),r=Hv)}var c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:a,isSubscribed:l,trySubscribe:s,tryUnsubscribe:u,getListeners:function(){return r}};return c}var kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Zz(e){var t=e.store,n=e.context,r=e.children,o=v.useMemo(function(){var l=Ob(t);return{store:t,subscription:l}},[t]),i=v.useMemo(function(){return t.getState()},[t]);kb(function(){var l=o.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==t.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[o,i]);var a=n||Lb;return O.createElement(a.Provider,{value:o},r)}function Ys(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var zb={exports:{}},Se={};/** @license React v16.13.1
|
|
95
|
+
* react-is.production.min.js
|
|
96
|
+
*
|
|
97
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the MIT license found in the
|
|
100
|
+
* LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/var lt=typeof Symbol=="function"&&Symbol.for,Wm=lt?Symbol.for("react.element"):60103,Gm=lt?Symbol.for("react.portal"):60106,oc=lt?Symbol.for("react.fragment"):60107,ic=lt?Symbol.for("react.strict_mode"):60108,ac=lt?Symbol.for("react.profiler"):60114,lc=lt?Symbol.for("react.provider"):60109,sc=lt?Symbol.for("react.context"):60110,Zm=lt?Symbol.for("react.async_mode"):60111,uc=lt?Symbol.for("react.concurrent_mode"):60111,cc=lt?Symbol.for("react.forward_ref"):60112,dc=lt?Symbol.for("react.suspense"):60113,Vz=lt?Symbol.for("react.suspense_list"):60120,pc=lt?Symbol.for("react.memo"):60115,fc=lt?Symbol.for("react.lazy"):60116,Yz=lt?Symbol.for("react.block"):60121,Qz=lt?Symbol.for("react.fundamental"):60117,Jz=lt?Symbol.for("react.responder"):60118,Xz=lt?Symbol.for("react.scope"):60119;function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wm:switch(e=e.type,e){case Zm:case uc:case oc:case ac:case ic:case dc:return e;default:switch(e=e&&e.$$typeof,e){case sc:case cc:case fc:case pc:case lc:return e;default:return t}}case Gm:return t}}}function Ub(e){return Xt(e)===uc}Se.AsyncMode=Zm;Se.ConcurrentMode=uc;Se.ContextConsumer=sc;Se.ContextProvider=lc;Se.Element=Wm;Se.ForwardRef=cc;Se.Fragment=oc;Se.Lazy=fc;Se.Memo=pc;Se.Portal=Gm;Se.Profiler=ac;Se.StrictMode=ic;Se.Suspense=dc;Se.isAsyncMode=function(e){return Ub(e)||Xt(e)===Zm};Se.isConcurrentMode=Ub;Se.isContextConsumer=function(e){return Xt(e)===sc};Se.isContextProvider=function(e){return Xt(e)===lc};Se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wm};Se.isForwardRef=function(e){return Xt(e)===cc};Se.isFragment=function(e){return Xt(e)===oc};Se.isLazy=function(e){return Xt(e)===fc};Se.isMemo=function(e){return Xt(e)===pc};Se.isPortal=function(e){return Xt(e)===Gm};Se.isProfiler=function(e){return Xt(e)===ac};Se.isStrictMode=function(e){return Xt(e)===ic};Se.isSuspense=function(e){return Xt(e)===dc};Se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===oc||e===uc||e===ac||e===ic||e===dc||e===Vz||typeof e=="object"&&e!==null&&(e.$$typeof===fc||e.$$typeof===pc||e.$$typeof===lc||e.$$typeof===sc||e.$$typeof===cc||e.$$typeof===Qz||e.$$typeof===Jz||e.$$typeof===Xz||e.$$typeof===Yz)};Se.typeOf=Xt;zb.exports=Se;var qz=zb.exports,Vm=qz,Kz={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e3={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},t3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Bb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ym={};Ym[Vm.ForwardRef]=t3;Ym[Vm.Memo]=Bb;function Wv(e){return Vm.isMemo(e)?Bb:Ym[e.$$typeof]||Kz}var n3=Object.defineProperty,r3=Object.getOwnPropertyNames,Gv=Object.getOwnPropertySymbols,o3=Object.getOwnPropertyDescriptor,i3=Object.getPrototypeOf,Zv=Object.prototype;function _b(e,t,n){if(typeof t!="string"){if(Zv){var r=i3(t);r&&r!==Zv&&_b(e,r,n)}var o=r3(t);Gv&&(o=o.concat(Gv(t)));for(var i=Wv(e),a=Wv(t),l=0;l<o.length;++l){var s=o[l];if(!e3[s]&&!(n&&n[s])&&!(a&&a[s])&&!(i&&i[s])){var u=o3(t,s);try{n3(e,s,u)}catch{}}}}return e}var a3=_b;const Vv=Ua(a3);var $b={exports:{}},Ae={};/** @license React v17.0.2
|
|
102
|
+
* react-is.production.min.js
|
|
103
|
+
*
|
|
104
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the MIT license found in the
|
|
107
|
+
* LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/var mc=60103,gc=60106,al=60107,ll=60108,sl=60114,ul=60109,cl=60110,dl=60112,pl=60113,Qm=60120,fl=60115,ml=60116,Fb=60121,Hb=60122,Wb=60117,Gb=60129,Zb=60131;if(typeof Symbol=="function"&&Symbol.for){var ut=Symbol.for;mc=ut("react.element"),gc=ut("react.portal"),al=ut("react.fragment"),ll=ut("react.strict_mode"),sl=ut("react.profiler"),ul=ut("react.provider"),cl=ut("react.context"),dl=ut("react.forward_ref"),pl=ut("react.suspense"),Qm=ut("react.suspense_list"),fl=ut("react.memo"),ml=ut("react.lazy"),Fb=ut("react.block"),Hb=ut("react.server.block"),Wb=ut("react.fundamental"),Gb=ut("react.debug_trace_mode"),Zb=ut("react.legacy_hidden")}function Sn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case mc:switch(e=e.type,e){case al:case sl:case ll:case pl:case Qm:return e;default:switch(e=e&&e.$$typeof,e){case cl:case dl:case ml:case fl:case ul:return e;default:return t}}case gc:return t}}}var l3=ul,s3=mc,u3=dl,c3=al,d3=ml,p3=fl,f3=gc,m3=sl,g3=ll,h3=pl;Ae.ContextConsumer=cl;Ae.ContextProvider=l3;Ae.Element=s3;Ae.ForwardRef=u3;Ae.Fragment=c3;Ae.Lazy=d3;Ae.Memo=p3;Ae.Portal=f3;Ae.Profiler=m3;Ae.StrictMode=g3;Ae.Suspense=h3;Ae.isAsyncMode=function(){return!1};Ae.isConcurrentMode=function(){return!1};Ae.isContextConsumer=function(e){return Sn(e)===cl};Ae.isContextProvider=function(e){return Sn(e)===ul};Ae.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===mc};Ae.isForwardRef=function(e){return Sn(e)===dl};Ae.isFragment=function(e){return Sn(e)===al};Ae.isLazy=function(e){return Sn(e)===ml};Ae.isMemo=function(e){return Sn(e)===fl};Ae.isPortal=function(e){return Sn(e)===gc};Ae.isProfiler=function(e){return Sn(e)===sl};Ae.isStrictMode=function(e){return Sn(e)===ll};Ae.isSuspense=function(e){return Sn(e)===pl};Ae.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===al||e===sl||e===Gb||e===ll||e===pl||e===Qm||e===Zb||typeof e=="object"&&e!==null&&(e.$$typeof===ml||e.$$typeof===fl||e.$$typeof===ul||e.$$typeof===cl||e.$$typeof===dl||e.$$typeof===Wb||e.$$typeof===Fb||e[0]===Hb)};Ae.typeOf=Sn;$b.exports=Ae;var v3=$b.exports,y3=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],I3=["reactReduxForwardedRef"],M3=[],w3=[null,null];function b3(e,t){var n=e[1];return[t.payload,n+1]}function Yv(e,t,n){kb(function(){return e.apply(void 0,t)},n)}function x3(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function S3(e,t,n,r,o,i,a,l,s,u){if(e){var c=!1,d=null,p=function(){if(!c){var I=t.getState(),w,y;try{w=r(I,o.current)}catch(h){y=h,d=h}y||(d=null),w===i.current?a.current||s():(i.current=w,l.current=w,a.current=!0,u({type:"STORE_UPDATED",payload:{error:y}}))}};n.onStateChange=p,n.trySubscribe(),p();var f=function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d};return f}}var N3=function(){return[null,0]};function D3(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,o=r===void 0?function(M){return"ConnectAdvanced("+M+")"}:r,i=n.methodName,a=i===void 0?"connectAdvanced":i,l=n.renderCountProp,s=l===void 0?void 0:l,u=n.shouldHandleStateChanges,c=u===void 0?!0:u,d=n.storeKey,p=d===void 0?"store":d;n.withRef;var f=n.forwardRef,g=f===void 0?!1:f,I=n.context,w=I===void 0?Lb:I,y=Ys(n,y3),h=w;return function(b){var N=b.displayName||b.name||"Component",x=o(N),D=ae({},y,{getDisplayName:o,methodName:a,renderCountProp:s,shouldHandleStateChanges:c,storeKey:p,displayName:x,wrappedComponentName:N,WrappedComponent:b}),j=y.pure;function L(q){return e(q.dispatch,D)}var R=j?v.useMemo:function(q){return q()};function U(q){var Y=v.useMemo(function(){var zr=q.reactReduxForwardedRef,Ur=Ys(q,I3);return[q.context,zr,Ur]},[q]),F=Y[0],ne=Y[1],P=Y[2],z=v.useMemo(function(){return F&&F.Consumer&&v3.isContextConsumer(O.createElement(F.Consumer,null))?F:h},[F,h]),_=v.useContext(z),G=!!q.store&&!!q.store.getState&&!!q.store.dispatch;_&&_.store;var S=G?q.store:_.store,C=v.useMemo(function(){return L(S)},[S]),T=v.useMemo(function(){if(!c)return w3;var zr=Ob(S,G?null:_.subscription),Ur=zr.notifyNestedSubs.bind(zr);return[zr,Ur]},[S,G,_]),k=T[0],B=T[1],oe=v.useMemo(function(){return G?_:ae({},_,{subscription:k})},[G,_,k]),se=v.useReducer(b3,M3,N3),Q=se[0],me=Q[0],Ie=se[1];if(me&&me.error)throw me.error;var ve=v.useRef(),Ne=v.useRef(P),st=v.useRef(),qt=v.useRef(!1),Xe=R(function(){return st.current&&P===Ne.current?st.current:C(S.getState(),P)},[S,me,P]);Yv(x3,[Ne,ve,qt,P,Xe,st,B]),Yv(S3,[c,S,k,C,Ne,ve,qt,st,B,Ie],[S,k,C]);var Ve=v.useMemo(function(){return O.createElement(b,ae({},Xe,{ref:ne}))},[ne,b,Xe]),ho=v.useMemo(function(){return c?O.createElement(z.Provider,{value:oe},Ve):Ve},[z,Ve,oe]);return ho}var ee=j?O.memo(U):U;if(ee.WrappedComponent=b,ee.displayName=U.displayName=x,g){var W=O.forwardRef(function(Y,F){return O.createElement(ee,ae({},Y,{reactReduxForwardedRef:F}))});return W.displayName=x,W.WrappedComponent=b,Vv(W,b)}return Vv(ee,b)}}function Qv(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function bd(e,t){if(Qv(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Qv(e[n[o]],t[n[o]]))return!1;return!0}function A3(e,t){var n={},r=function(a){var l=e[a];typeof l=="function"&&(n[a]=function(){return t(l.apply(void 0,arguments))})};for(var o in e)r(o);return n}function Jm(e){return function(n,r){var o=e(n,r);function i(){return o}return i.dependsOnOwnProps=!1,i}}function Jv(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function Vb(e,t){return function(r,o){o.displayName;var i=function(l,s){return i.dependsOnOwnProps?i.mapToProps(l,s):i.mapToProps(l)};return i.dependsOnOwnProps=!0,i.mapToProps=function(l,s){i.mapToProps=e,i.dependsOnOwnProps=Jv(e);var u=i(l,s);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Jv(u),u=i(l,s)),u},i}}function C3(e){return typeof e=="function"?Vb(e):void 0}function T3(e){return e?void 0:Jm(function(t){return{dispatch:t}})}function E3(e){return e&&typeof e=="object"?Jm(function(t){return A3(e,t)}):void 0}const j3=[C3,T3,E3];function P3(e){return typeof e=="function"?Vb(e):void 0}function L3(e){return e?void 0:Jm(function(){return{}})}const R3=[P3,L3];function O3(e,t,n){return ae({},n,e,t)}function k3(e){return function(n,r){r.displayName;var o=r.pure,i=r.areMergedPropsEqual,a=!1,l;return function(u,c,d){var p=e(u,c,d);return a?(!o||!i(p,l))&&(l=p):(a=!0,l=p),l}}}function z3(e){return typeof e=="function"?k3(e):void 0}function U3(e){return e?void 0:function(){return O3}}const B3=[z3,U3];var _3=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function $3(e,t,n,r){return function(i,a){return n(e(i,a),t(r,a),a)}}function F3(e,t,n,r,o){var i=o.areStatesEqual,a=o.areOwnPropsEqual,l=o.areStatePropsEqual,s=!1,u,c,d,p,f;function g(M,b){return u=M,c=b,d=e(u,c),p=t(r,c),f=n(d,p,c),s=!0,f}function I(){return d=e(u,c),t.dependsOnOwnProps&&(p=t(r,c)),f=n(d,p,c),f}function w(){return e.dependsOnOwnProps&&(d=e(u,c)),t.dependsOnOwnProps&&(p=t(r,c)),f=n(d,p,c),f}function y(){var M=e(u,c),b=!l(M,d);return d=M,b&&(f=n(d,p,c)),f}function h(M,b){var N=!a(b,c),x=!i(M,u,b,c);return u=M,c=b,N&&x?I():N?w():x?y():f}return function(b,N){return s?h(b,N):g(b,N)}}function H3(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=Ys(t,_3),a=n(e,i),l=r(e,i),s=o(e,i),u=i.pure?F3:$3;return u(a,l,s,e,i)}var W3=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function xd(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(i,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function G3(e,t){return e===t}function Z3(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?D3:n,o=t.mapStateToPropsFactories,i=o===void 0?R3:o,a=t.mapDispatchToPropsFactories,l=a===void 0?j3:a,s=t.mergePropsFactories,u=s===void 0?B3:s,c=t.selectorFactory,d=c===void 0?H3:c;return function(f,g,I,w){w===void 0&&(w={});var y=w,h=y.pure,M=h===void 0?!0:h,b=y.areStatesEqual,N=b===void 0?G3:b,x=y.areOwnPropsEqual,D=x===void 0?bd:x,j=y.areStatePropsEqual,L=j===void 0?bd:j,R=y.areMergedPropsEqual,U=R===void 0?bd:R,ee=Ys(y,W3),W=xd(f,i,"mapStateToProps"),q=xd(g,l,"mapDispatchToProps"),Y=xd(I,u,"mergeProps");return r(d,ae({methodName:"connect",getDisplayName:function(ne){return"Connect("+ne+")"},shouldHandleStateChanges:!!f,initMapStateToProps:W,initMapDispatchToProps:q,initMergeProps:Y,pure:M,areStatesEqual:N,areOwnPropsEqual:D,areStatePropsEqual:L,areMergedPropsEqual:U},ee))}}const Yb=Z3();Hz(Wa.unstable_batchedUpdates);function V3(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Qb(e,t){var n=v.useState(function(){return{inputs:t,result:e()}})[0],r=v.useRef(!0),o=v.useRef(n),i=r.current||!!(t&&o.current.inputs&&V3(t,o.current.inputs)),a=i?o.current:{inputs:t,result:e()};return v.useEffect(function(){r.current=!1,o.current=a},[a]),a.result}function Y3(e,t){return Qb(function(){return e},t)}var Me=Qb,ie=Y3,Q3=!0,Sd="Invariant failed";function J3(e,t){if(!e){if(Q3)throw new Error(Sd);var n=typeof t=="function"?t():t,r=n?"".concat(Sd,": ").concat(n):Sd;throw new Error(r)}}var Mn=function(t){var n=t.top,r=t.right,o=t.bottom,i=t.left,a=r-i,l=o-n,s={top:n,right:r,bottom:o,left:i,width:a,height:l,x:i,y:n,center:{x:(r+i)/2,y:(o+n)/2}};return s},Xm=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Xv=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},X3=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Nd={top:0,right:0,bottom:0,left:0},qm=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?Nd:r,i=t.border,a=i===void 0?Nd:i,l=t.padding,s=l===void 0?Nd:l,u=Mn(Xm(n,o)),c=Mn(Xv(n,a)),d=Mn(Xv(c,s));return{marginBox:u,borderBox:Mn(n),paddingBox:c,contentBox:d,margin:o,border:a,padding:s}},tn=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&J3(!1),o},q3=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Qs=function(t,n){var r=t.borderBox,o=t.border,i=t.margin,a=t.padding,l=X3(r,n);return qm({borderBox:l,border:o,margin:i,padding:a})},Js=function(t,n){return n===void 0&&(n=q3()),Qs(t,n)},Jb=function(t,n){var r={top:tn(n.marginTop),right:tn(n.marginRight),bottom:tn(n.marginBottom),left:tn(n.marginLeft)},o={top:tn(n.paddingTop),right:tn(n.paddingRight),bottom:tn(n.paddingBottom),left:tn(n.paddingLeft)},i={top:tn(n.borderTopWidth),right:tn(n.borderRightWidth),bottom:tn(n.borderBottomWidth),left:tn(n.borderLeftWidth)};return qm({borderBox:t,margin:r,padding:o,border:i})},Xb=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Jb(n,r)},qv=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function K3(e,t){return!!(e===t||qv(e)&&qv(t))}function eU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!K3(e[n],t[n]))return!1;return!0}function it(e,t){t===void 0&&(t=eU);var n,r=[],o,i=!1;function a(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];return i&&n===this&&t(l,r)||(o=e.apply(this,l),i=!0,n=this,r=l),o}return a}var tU=function(t){var n=[],r=null,o=function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];n=l,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return o.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},o};const Pa=tU;function qb(e,t){}qb.bind(null,"warn");qb.bind(null,"error");function br(){}function nU(e,t){return ae({},e,{},t)}function sn(e,t,n){var r=t.map(function(o){var i=nU(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(function(i){i()})}}var rU="Invariant failed";function Xs(e){this.message=e}Xs.prototype.toString=function(){return this.message};function V(e,t){if(!e)throw new Xs(rU)}var oU=function(e){Eb(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.callbacks=null,r.unbind=br,r.onWindowError=function(l){var s=r.getCallbacks();s.isDragging()&&s.tryAbort();var u=l.error;u instanceof Xs&&l.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=sn(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(o){if(o instanceof Xs){this.setState({});return}throw o},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(O.Component),iU=`
|
|
109
|
+
Press space bar to start a drag.
|
|
110
|
+
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
111
|
+
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
112
|
+
`,qs=function(t){return t+1},aU=function(t){return`
|
|
113
|
+
You have lifted an item in position `+qs(t.source.index)+`
|
|
114
|
+
`},Kb=function(t,n){var r=t.droppableId===n.droppableId,o=qs(t.index),i=qs(n.index);return r?`
|
|
115
|
+
You have moved the item from position `+o+`
|
|
116
|
+
to position `+i+`
|
|
117
|
+
`:`
|
|
118
|
+
You have moved the item from position `+o+`
|
|
119
|
+
in list `+t.droppableId+`
|
|
120
|
+
to list `+n.droppableId+`
|
|
121
|
+
in position `+i+`
|
|
122
|
+
`},ex=function(t,n,r){var o=n.droppableId===r.droppableId;return o?`
|
|
123
|
+
The item `+t+`
|
|
124
|
+
has been combined with `+r.draggableId:`
|
|
125
|
+
The item `+t+`
|
|
126
|
+
in list `+n.droppableId+`
|
|
127
|
+
has been combined with `+r.draggableId+`
|
|
128
|
+
in list `+r.droppableId+`
|
|
129
|
+
`},lU=function(t){var n=t.destination;if(n)return Kb(t.source,n);var r=t.combine;return r?ex(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},Kv=function(t){return`
|
|
130
|
+
The item has returned to its starting position
|
|
131
|
+
of `+qs(t.index)+`
|
|
132
|
+
`},sU=function(t){if(t.reason==="CANCEL")return`
|
|
133
|
+
Movement cancelled.
|
|
134
|
+
`+Kv(t.source)+`
|
|
135
|
+
`;var n=t.destination,r=t.combine;return n?`
|
|
136
|
+
You have dropped the item.
|
|
137
|
+
`+Kb(t.source,n)+`
|
|
138
|
+
`:r?`
|
|
139
|
+
You have dropped the item.
|
|
140
|
+
`+ex(t.draggableId,t.source,r)+`
|
|
141
|
+
`:`
|
|
142
|
+
The item has been dropped while not over a drop area.
|
|
143
|
+
`+Kv(t.source)+`
|
|
144
|
+
`},ds={dragHandleUsageInstructions:iU,onDragStart:aU,onDragUpdate:lU,onDragEnd:sU},at={x:0,y:0},pt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Ht=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},xr=function(t,n){return t.x===n.x&&t.y===n.y},mi=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},uo=function(t,n,r){var o;return r===void 0&&(r=0),o={},o[t]=n,o[t==="x"?"y":"x"]=r,o},La=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},ey=function(t,n){return Math.min.apply(Math,n.map(function(r){return La(t,r)}))},tx=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},uU=function(e,t){var n=Mn({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},gl=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},ty=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},cU={top:0,right:0,bottom:0,left:0},dU=function(t,n){return n?gl(t,n.scroll.diff.displacement):t},pU=function(t,n,r){if(r&&r.increasedBy){var o;return ae({},t,(o={},o[n.end]=t[n.end]+r.increasedBy[n.line],o))}return t},fU=function(t,n){return n&&n.shouldClipSubject?uU(n.pageMarginBox,t):Mn(t)},oi=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=dU(t.marginBox,o),a=pU(i,r,n),l=fU(a,o);return{page:t,withPlaceholder:n,active:l}},Km=function(e,t){e.frame||V(!1);var n=e.frame,r=Ht(t,n.scroll.initial),o=mi(r),i=ae({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),a=oi({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),l=ae({},e,{frame:i,subject:a});return l};function Ks(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function eg(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function kr(e,t){if(e.find)return e.find(t);var n=eg(e,t);if(n!==-1)return e[n]}function nx(e){return Array.prototype.slice.call(e)}var rx=it(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),ox=it(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),hc=it(function(e){return Ks(e)}),mU=it(function(e){return Ks(e)}),gi=it(function(e,t){var n=mU(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,o){return r.descriptor.index-o.descriptor.index});return n});function tg(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function vc(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var yc=it(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),gU=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;var a=tg(i);if(!a)return null;function l(I){var w={type:"COMBINE",combine:{draggableId:I,droppableId:r.descriptor.id}};return ae({},i,{at:w})}var s=i.displaced.all,u=s.length?s[0]:null;if(t)return u?l(u):null;var c=yc(n,o);if(!u){if(!c.length)return null;var d=c[c.length-1];return l(d.descriptor.id)}var p=eg(c,function(I){return I.descriptor.id===u});p===-1&&V(!1);var f=p-1;if(f<0)return null;var g=c[f];return l(g.descriptor.id)},hi=function(e,t){return e.descriptor.droppableId===t.descriptor.id},ix={point:at,value:0},Ra={invisible:{},visible:{},all:[]},hU={displaced:Ra,displacedBy:ix,at:null},cn=function(e,t){return function(n){return e<=n&&n<=t}},ax=function(e){var t=cn(e.top,e.bottom),n=cn(e.left,e.right);return function(r){var o=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(o)return!0;var i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right),l=i&&a;if(l)return!0;var s=r.top<e.top&&r.bottom>e.bottom,u=r.left<e.left&&r.right>e.right,c=s&&u;if(c)return!0;var d=s&&a||u&&i;return d}},vU=function(e){var t=cn(e.top,e.bottom),n=cn(e.left,e.right);return function(r){var o=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return o}},ng={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},lx={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},yU=function(e){return function(t){var n=cn(t.top,t.bottom),r=cn(t.left,t.right);return function(o){return e===ng?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)}}},IU=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:at;return gl(t,r)},MU=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},wU=function(t,n,r){return r(n)(t)},rg=function(t){var n=t.target,r=t.destination,o=t.viewport,i=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,l=i?IU(n,r):n;return MU(l,r,a)&&wU(l,o,a)},bU=function(t){return rg(ae({},t,{isVisibleThroughFrameFn:ax}))},sx=function(t){return rg(ae({},t,{isVisibleThroughFrameFn:vU}))},xU=function(t){return rg(ae({},t,{isVisibleThroughFrameFn:yU(t.destination.axis)}))},SU=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var o=n.invisible,i=n.visible;if(o[t])return!1;var a=i[t];return a?a.shouldAnimate:!0};function NU(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Mn(Xm(n,r))}function Oa(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce(function(s,u){var c=NU(u,r),d=u.descriptor.id;s.all.push(d);var p=bU({target:c,destination:n,viewport:o,withDroppableDisplacement:!0});if(!p)return s.invisible[u.descriptor.id]=!0,s;var f=SU(d,a,i),g={draggableId:d,shouldAnimate:f};return s.visible[d]=g,s},{all:[],visible:{},invisible:{}})}function DU(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function ny(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=DU(t,{inHomeList:n});return{displaced:Ra,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function eu(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,u=hi(t,r);if(l==null)return ny({insideDestination:n,inHomeList:u,displacedBy:i,destination:r});var c=kr(n,function(I){return I.descriptor.index===l});if(!c)return ny({insideDestination:n,inHomeList:u,displacedBy:i,destination:r});var d=yc(t,n),p=n.indexOf(c),f=d.slice(p),g=Oa({afterDragging:f,destination:r,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:s});return{displaced:g,displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Cr(e,t){return!!t.effected[e]}var AU=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,o=e.combine,i=e.afterCritical;if(!n.isCombineEnabled)return null;var a=o.draggableId,l=r[a],s=l.descriptor.index,u=Cr(a,i);return u?t?s:s-1:t?s+1:s},CU=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,a=t?i+1:i-1,l=r[0].descriptor.index,s=r[r.length-1].descriptor.index,u=n?s:s+1;return a<l||a>u?null:a},TU=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,u=e.afterCritical,c=l.at;if(c||V(!1),c.type==="REORDER"){var d=CU({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:a});return d==null?null:eu({draggable:r,insideDestination:a,destination:i,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var p=AU({isMovingForward:t,destination:i,displaced:l.displaced,draggables:o,combine:c.combine,afterCritical:u});return p==null?null:eu({draggable:r,insideDestination:a,destination:i,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:p})},EU=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=!!(t.visible[r]||t.invisible[r]);return Cr(r,n)?i?at:mi(o.point):i?o.point:at},jU=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=vc(n);o||V(!1);var i=o.draggableId,a=r[i].page.borderBox.center,l=EU({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return pt(a,l)},ux=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},PU=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},og=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},ry=function(t){var n=t.axis,r=t.moveRelativeTo,o=t.isMoving;return uo(n.line,r.marginBox[n.end]+ux(n,o),og(n,r.marginBox,o))},oy=function(t){var n=t.axis,r=t.moveRelativeTo,o=t.isMoving;return uo(n.line,r.marginBox[n.start]-PU(n,o),og(n,r.marginBox,o))},LU=function(t){var n=t.axis,r=t.moveInto,o=t.isMoving;return uo(n.line,r.contentBox[n.start]+ux(n,o),og(n,r.contentBox,o))},RU=function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,a=gi(o.descriptor.id,r),l=n.page,s=o.axis;if(!a.length)return LU({axis:s,moveInto:o.page,isMoving:l});var u=t.displaced,c=t.displacedBy,d=u.all[0];if(d){var p=r[d];if(Cr(d,i))return oy({axis:s,moveRelativeTo:p.page,isMoving:l});var f=Qs(p.page,c.point);return oy({axis:s,moveRelativeTo:f,isMoving:l})}var g=a[a.length-1];if(g.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Cr(g.descriptor.id,i)){var I=Qs(g.page,mi(i.displacedBy.point));return ry({axis:s,moveRelativeTo:I,isMoving:l})}return ry({axis:s,moveRelativeTo:g.page,isMoving:l})},Jp=function(e,t){var n=e.frame;return n?pt(t,n.scroll.diff.displacement):t},OU=function(t){var n=t.impact,r=t.draggable,o=t.droppable,i=t.draggables,a=t.afterCritical,l=r.page.borderBox.center,s=n.at;return!o||!s?l:s.type==="REORDER"?RU({impact:n,draggable:r,draggables:i,droppable:o,afterCritical:a}):jU({impact:n,draggables:i,afterCritical:a})},Ic=function(e){var t=OU(e),n=e.droppable,r=n?Jp(n,t):t;return r},cx=function(e,t){var n=Ht(t,e.scroll.initial),r=mi(n),o=Mn({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return i};function iy(e,t){return e.map(function(n){return t[n]})}function kU(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var zU=function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,a=cx(n,pt(n.scroll.current,i)),l=r.frame?Km(r,pt(r.frame.scroll.current,i)):r,s=t.displaced,u=Oa({afterDragging:iy(s.all,o),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),c=Oa({afterDragging:iy(s.all,o),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),d={},p={},f=[s,u,c];s.all.forEach(function(I){var w=kU(I,f);if(w){p[I]=w;return}d[I]=!0});var g=ae({},t,{displaced:{all:s.all,invisible:d,visible:p}});return g},UU=function(e,t){return pt(e.scroll.diff.displacement,t)},ig=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,o=UU(r,t),i=Ht(o,n.page.borderBox.center);return pt(n.client.borderBox.center,i)},dx=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=a===void 0?!1:a,s=Ht(r,t.page.borderBox.center),u=gl(t.page.borderBox,s),c={target:u,destination:n,withDroppableDisplacement:i,viewport:o};return l?xU(c):sx(c)},BU=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,s=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var c=gi(r.descriptor.id,o),d=hi(n,r),p=gU({isMovingForward:t,draggable:n,destination:r,insideDestination:c,previousImpact:i})||TU({isMovingForward:t,isInHomeList:d,draggable:n,draggables:o,destination:r,insideDestination:c,previousImpact:i,viewport:a,afterCritical:u});if(!p)return null;var f=Ic({impact:p,draggable:n,droppable:r,draggables:o,afterCritical:u}),g=dx({draggable:n,destination:r,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(g){var I=ig({pageBorderBoxCenter:f,draggable:n,viewport:a});return{clientSelection:I,impact:p,scrollJumpRequest:null}}var w=Ht(f,l),y=zU({impact:p,viewport:a,destination:r,draggables:o,maxScrollChange:w});return{clientSelection:s,impact:y,scrollJumpRequest:w}},xt=function(t){var n=t.subject.active;return n||V(!1),n},_U=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,i=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,s=cn(a[l.start],a[l.end]),u=hc(o).filter(function(d){return d!==r}).filter(function(d){return d.isEnabled}).filter(function(d){return!!d.subject.active}).filter(function(d){return ax(i.frame)(xt(d))}).filter(function(d){var p=xt(d);return t?a[l.crossAxisEnd]<p[l.crossAxisEnd]:p[l.crossAxisStart]<a[l.crossAxisStart]}).filter(function(d){var p=xt(d),f=cn(p[l.start],p[l.end]);return s(p[l.start])||s(p[l.end])||f(a[l.start])||f(a[l.end])}).sort(function(d,p){var f=xt(d)[l.crossAxisStart],g=xt(p)[l.crossAxisStart];return t?f-g:g-f}).filter(function(d,p,f){return xt(d)[l.crossAxisStart]===xt(f[0])[l.crossAxisStart]});if(!u.length)return null;if(u.length===1)return u[0];var c=u.filter(function(d){var p=cn(xt(d)[l.start],xt(d)[l.end]);return p(n[l.line])});return c.length===1?c[0]:c.length>1?c.sort(function(d,p){return xt(d)[l.start]-xt(p)[l.start]})[0]:u.sort(function(d,p){var f=ey(n,ty(xt(d))),g=ey(n,ty(xt(p)));return f!==g?f-g:xt(d)[l.start]-xt(p)[l.start]})[0]},ay=function(t,n){var r=t.page.borderBox.center;return Cr(t.descriptor.id,n)?Ht(r,n.displacedBy.point):r},$U=function(t,n){var r=t.page.borderBox;return Cr(t.descriptor.id,n)?gl(r,mi(n.displacedBy.point)):r},FU=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.insideDestination,i=e.afterCritical,a=o.filter(function(l){return sx({target:$U(l,i),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,s){var u=La(t,Jp(r,ay(l,i))),c=La(t,Jp(r,ay(s,i)));return u<c?-1:c<u?1:l.descriptor.index-s.descriptor.index});return a[0]||null},hl=it(function(t,n){var r=n[t.line];return{value:r,point:uo(t.line,r)}}),HU=function(t,n,r){var o=t.axis;if(t.descriptor.mode==="virtual")return uo(o.line,n[o.line]);var i=t.subject.page.contentBox[o.size],a=gi(t.descriptor.id,r),l=a.reduce(function(c,d){return c+d.client.marginBox[o.size]},0),s=l+n[o.line],u=s-i;return u<=0?null:uo(o.line,u)},px=function(t,n){return ae({},t,{scroll:ae({},t.scroll,{max:n})})},fx=function(t,n,r){var o=t.frame;hi(n,t)&&V(!1),t.subject.withPlaceholder&&V(!1);var i=hl(t.axis,n.displaceBy).point,a=HU(t,i,r),l={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!o){var s=oi({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return ae({},t,{subject:s})}var u=a?pt(o.scroll.max,a):o.scroll.max,c=px(o,u),d=oi({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:c});return ae({},t,{subject:d,frame:c})},WU=function(t){var n=t.subject.withPlaceholder;n||V(!1);var r=t.frame;if(!r){var o=oi({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ae({},t,{subject:o})}var i=n.oldFrameMaxScroll;i||V(!1);var a=px(r,i),l=oi({page:t.subject.page,axis:t.axis,frame:a,withPlaceholder:null});return ae({},t,{subject:l,frame:a})},GU=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var u={displaced:Ra,displacedBy:ix,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},c=Ic({impact:u,draggable:o,droppable:a,draggables:i,afterCritical:s}),d=hi(o,a)?a:fx(a,o,i),p=dx({draggable:o,destination:d,newPageBorderBoxCenter:c,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return p?u:null}var f=t[a.axis.line]<=n.page.borderBox.center[a.axis.line],g=function(){var w=n.descriptor.index;return n.descriptor.id===o.descriptor.id||f?w:w+1}(),I=hl(a.axis,o.displaceBy);return eu({draggable:o,insideDestination:r,destination:a,viewport:l,displacedBy:I,last:Ra,index:g})},ZU=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,u=_U({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:l});if(!u)return null;var c=gi(u.descriptor.id,i),d=FU({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:c,afterCritical:s}),p=GU({previousPageBorderBoxCenter:n,destination:u,draggable:r,draggables:i,moveRelativeTo:d,insideDestination:c,viewport:l,afterCritical:s});if(!p)return null;var f=Ic({impact:p,draggable:r,droppable:u,draggables:i,afterCritical:s}),g=ig({pageBorderBoxCenter:f,draggable:r,viewport:l});return{clientSelection:g,impact:p,scrollJumpRequest:null}},Zt=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},VU=function(t,n){var r=Zt(t);return r?n[r]:null},YU=function(e){var t=e.state,n=e.type,r=VU(t.impact,t.dimensions.droppables),o=!!r,i=t.dimensions.droppables[t.critical.droppable.id],a=r||i,l=a.axis.direction,s=l==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||l==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(s&&!o)return null;var u=n==="MOVE_DOWN"||n==="MOVE_RIGHT",c=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,p=t.dimensions,f=p.draggables,g=p.droppables;return s?BU({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,destination:a,draggables:f,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):ZU({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,isOver:a,draggables:f,droppables:g,viewport:t.viewport,afterCritical:t.afterCritical})};function Fr(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function mx(e){var t=cn(e.top,e.bottom),n=cn(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function QU(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function JU(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,o=n.page.borderBox.center,i=r.map(function(a){var l=a.axis,s=uo(a.axis.line,t.center[l.line],a.page.borderBox.center[l.crossAxisLine]);return{id:a.descriptor.id,distance:La(o,s)}}).sort(function(a,l){return l.distance-a.distance});return i[0]?i[0].id:null}function XU(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=hc(r).filter(function(i){if(!i.isEnabled)return!1;var a=i.subject.active;if(!a||!QU(t,a))return!1;if(mx(a)(t.center))return!0;var l=i.axis,s=a.center[l.crossAxisLine],u=t[l.crossAxisStart],c=t[l.crossAxisEnd],d=cn(a[l.crossAxisStart],a[l.crossAxisEnd]),p=d(u),f=d(c);return!p&&!f?!0:p?u<s:c>s});return o.length?o.length===1?o[0].descriptor.id:JU({pageBorderBox:t,draggable:n,candidates:o}):null}var gx=function(t,n){return Mn(gl(t,n))},qU=function(e,t){var n=e.frame;return n?gx(t,n.scroll.diff.value):t};function hx(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function KU(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var eB=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,l=e.afterCritical,s=r.axis,u=hl(r.axis,n.displaceBy),c=u.value,d=t[s.start],p=t[s.end],f=yc(n,o),g=kr(f,function(w){var y=w.descriptor.id,h=w.page.borderBox.center[s.line],M=Cr(y,l),b=hx({displaced:i,id:y});return M?b?p<=h:d<h-c:b?p<=h+c:d<h}),I=KU({draggable:n,closest:g,inHomeList:hi(n,r)});return eu({draggable:n,insideDestination:o,destination:r,viewport:a,last:i,displacedBy:u,index:I})},tB=4,nB=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var l=o.axis,s=hl(o.axis,t.displaceBy),u=s.value,c=n[l.start],d=n[l.end],p=yc(t,i),f=kr(p,function(I){var w=I.descriptor.id,y=I.page.borderBox,h=y[l.size],M=h/tB,b=Cr(w,a),N=hx({displaced:r.displaced,id:w});return b?N?d>y[l.start]+M&&d<y[l.end]-M:c>y[l.start]-u+M&&c<y[l.end]-u-M:N?d>y[l.start]+u+M&&d<y[l.end]+u-M:c>y[l.start]+M&&c<y[l.end]-M});if(!f)return null;var g={displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:f.descriptor.id,droppableId:o.descriptor.id}}};return g},vx=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,l=e.afterCritical,s=gx(n.page.borderBox,t),u=XU({pageBorderBox:s,draggable:n,droppables:o});if(!u)return hU;var c=o[u],d=gi(c.descriptor.id,r),p=qU(c,s);return nB({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:i,destination:c,insideDestination:d,afterCritical:l})||eB({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:c,insideDestination:d,last:i.displaced,viewport:a,afterCritical:l})},ag=function(e,t){var n;return ae({},e,(n={},n[t.descriptor.id]=t,n))},rB=function(t){var n=t.previousImpact,r=t.impact,o=t.droppables,i=Zt(n),a=Zt(r);if(!i||i===a)return o;var l=o[i];if(!l.subject.withPlaceholder)return o;var s=WU(l);return ag(o,s)},oB=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.previousImpact,i=e.impact,a=rB({previousImpact:o,impact:i,droppables:r}),l=Zt(i);if(!l)return a;var s=r[l];if(hi(t,s)||s.subject.withPlaceholder)return a;var u=fx(s,t,n);return ag(a,u)},la=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,i=e.impact,a=e.scrollJumpRequest,l=o||t.viewport,s=r||t.dimensions,u=n||t.current.client.selection,c=Ht(u,t.initial.client.selection),d={offset:c,selection:u,borderBoxCenter:pt(t.initial.client.borderBoxCenter,c)},p={selection:pt(d.selection,l.scroll.current),borderBoxCenter:pt(d.borderBoxCenter,l.scroll.current),offset:pt(d.offset,l.scroll.diff.value)},f={client:d,page:p};if(t.phase==="COLLECTING")return ae({phase:"COLLECTING"},t,{dimensions:s,viewport:l,current:f});var g=s.draggables[t.critical.draggable.id],I=i||vx({pageOffset:p.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),w=oB({draggable:g,impact:I,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables}),y=ae({},t,{current:f,dimensions:{draggables:s.draggables,droppables:w},impact:I,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null});return y};function iB(e,t){return e.map(function(n){return t[n]})}var yx=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,i=e.forceShouldAnimate,a=t.displaced,l=iB(a.all,r),s=Oa({afterDragging:l,destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:a});return ae({},t,{displaced:s})},Ix=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.viewport,a=e.afterCritical,l=Ic({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:a});return ig({pageBorderBoxCenter:l,draggable:n,viewport:i})},Mx=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&V(!1);var o=t.impact,i=r||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,u=l[t.critical.draggable.id],c=Zt(o);c||V(!1);var d=s[c],p=yx({impact:o,viewport:i,destination:d,draggables:l}),f=Ix({impact:p,draggable:u,droppable:d,draggables:l,viewport:i,afterCritical:t.afterCritical});return la({impact:p,clientSelection:f,state:t,dimensions:a,viewport:i})},aB=function(e){return{index:e.index,droppableId:e.droppableId}},wx=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,i=hl(n.axis,t.displaceBy),a=gi(n.descriptor.id,r),l=a.indexOf(t);l===-1&&V(!1);var s=a.slice(l+1),u=s.reduce(function(f,g){return f[g.descriptor.id]=!0,f},{}),c={inVirtualList:n.descriptor.mode==="virtual",displacedBy:i,effected:u},d=Oa({afterDragging:s,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),p={displaced:d,displacedBy:i,at:{type:"REORDER",destination:aB(t.descriptor)}};return{impact:p,afterCritical:c}},lB=function(e,t){return{draggables:e.draggables,droppables:ag(e.droppables,t)}},sB=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=Qs(t.client,n),i=Js(o,r),a=ae({},t,{placeholder:ae({},t.placeholder,{client:o}),client:o,page:i});return a},uB=function(e){var t=e.frame;return t||V(!1),t},cB=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map(function(i){var a=i.descriptor.droppableId,l=n[a],s=uB(l),u=s.scroll.diff.value,c=pt(o,u),d=sB({draggable:i,offset:c,initialWindowScroll:r.scroll.initial});return d})},dB=function(e){var t=e.state,n=e.published,r=n.modified.map(function(M){var b=t.dimensions.droppables[M.droppableId],N=Km(b,M.scroll);return N}),o=ae({},t.dimensions.droppables,{},rx(r)),i=ox(cB({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),a=ae({},t.dimensions.draggables,{},i);n.removals.forEach(function(M){delete a[M]});var l={droppables:o,draggables:a},s=Zt(t.impact),u=s?l.droppables[s]:null,c=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],p=wx({draggable:c,home:d,draggables:a,viewport:t.viewport}),f=p.impact,g=p.afterCritical,I=u&&u.isCombineEnabled?t.impact:f,w=vx({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:I,viewport:t.viewport,afterCritical:g}),y=ae({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:w,onLiftImpact:f,dimensions:l,afterCritical:g,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return y;var h=ae({phase:"DROP_PENDING"},y,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return h},Xp=function(t){return t.movementMode==="SNAP"},Dd=function(t,n,r){var o=lB(t.dimensions,n);return!Xp(t)||r?la({state:t,dimensions:o}):Mx({state:t,dimensions:o})};function Ad(e){return e.isDragging&&e.movementMode==="SNAP"?ae({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var ly={phase:"IDLE",completed:null,shouldFlush:!1},pB=function(e,t){if(e===void 0&&(e=ly),t.type==="FLUSH")return ae({},ly,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&V(!1);var n=t.payload,r=n.critical,o=n.clientSelection,i=n.viewport,a=n.dimensions,l=n.movementMode,s=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],c={selection:o,borderBoxCenter:s.client.borderBox.center,offset:at},d={client:c,page:{selection:pt(c.selection,i.scroll.initial),borderBoxCenter:pt(c.selection,i.scroll.initial),offset:pt(c.selection,i.scroll.diff.value)}},p=hc(a.droppables).every(function(Ie){return!Ie.isFixedOnPage}),f=wx({draggable:s,home:u,draggables:a.draggables,viewport:i}),g=f.impact,I=f.afterCritical,w={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:d,current:d,isWindowScrollAllowed:p,impact:g,afterCritical:I,onLiftImpact:g,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null};return w}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&V(!1);var y=ae({phase:"COLLECTING"},e,{phase:"COLLECTING"});return y}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||V(!1),dB({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Fr(e)||V(!1);var h=t.payload.client;return xr(h,e.current.client.selection)?e:la({state:e,clientSelection:h,impact:Xp(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Ad(e);Fr(e)||V(!1);var M=t.payload,b=M.id,N=M.newScroll,x=e.dimensions.droppables[b];if(!x)return e;var D=Km(x,N);return Dd(e,D,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Fr(e)||V(!1);var j=t.payload,L=j.id,R=j.isEnabled,U=e.dimensions.droppables[L];U||V(!1),U.isEnabled===R&&V(!1);var ee=ae({},U,{isEnabled:R});return Dd(e,ee,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Fr(e)||V(!1);var W=t.payload,q=W.id,Y=W.isCombineEnabled,F=e.dimensions.droppables[q];F||V(!1),F.isCombineEnabled===Y&&V(!1);var ne=ae({},F,{isCombineEnabled:Y});return Dd(e,ne,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Fr(e)||V(!1),e.isWindowScrollAllowed||V(!1);var P=t.payload.newScroll;if(xr(e.viewport.scroll.current,P))return Ad(e);var z=cx(e.viewport,P);return Xp(e)?Mx({state:e,viewport:z}):la({state:e,viewport:z})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Fr(e))return e;var _=t.payload.maxScroll;if(xr(_,e.viewport.scroll.max))return e;var G=ae({},e.viewport,{scroll:ae({},e.viewport.scroll,{max:_})});return ae({phase:"DRAGGING"},e,{viewport:G})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&V(!1);var S=YU({state:e,type:t.type});return S?la({state:e,impact:S.impact,clientSelection:S.clientSelection,scrollJumpRequest:S.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var C=t.payload.reason;e.phase!=="COLLECTING"&&V(!1);var T=ae({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:C});return T}if(t.type==="DROP_ANIMATE"){var k=t.payload,B=k.completed,oe=k.dropDuration,se=k.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||V(!1);var Q={phase:"DROP_ANIMATING",completed:B,dropDuration:oe,newHomeClientOffset:se,dimensions:e.dimensions};return Q}if(t.type==="DROP_COMPLETE"){var me=t.payload.completed;return{phase:"IDLE",completed:me,shouldFlush:!1}}return e},fB=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},mB=function(t){return{type:"LIFT",payload:t}},gB=function(t){return{type:"INITIAL_PUBLISH",payload:t}},hB=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},vB=function(){return{type:"COLLECTION_STARTING",payload:null}},yB=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},IB=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},MB=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},bx=function(t){return{type:"MOVE",payload:t}},wB=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},bB=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},xB=function(){return{type:"MOVE_UP",payload:null}},SB=function(){return{type:"MOVE_DOWN",payload:null}},NB=function(){return{type:"MOVE_RIGHT",payload:null}},DB=function(){return{type:"MOVE_LEFT",payload:null}},lg=function(){return{type:"FLUSH",payload:null}},AB=function(t){return{type:"DROP_ANIMATE",payload:t}},sg=function(t){return{type:"DROP_COMPLETE",payload:t}},xx=function(t){return{type:"DROP",payload:t}},CB=function(t){return{type:"DROP_PENDING",payload:t}},Sx=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},TB=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(o){return function(i){if(i.type!=="LIFT"){o(i);return}var a=i.payload,l=a.id,s=a.clientSelection,u=a.movementMode,c=n();c.phase==="DROP_ANIMATING"&&r(sg({completed:c.completed})),n().phase!=="IDLE"&&V(!1),r(lg()),r(fB({draggableId:l,movementMode:u}));var d={shouldPublishImmediately:u==="SNAP"},p={draggableId:l,scrollOptions:d},f=e.startPublishing(p),g=f.critical,I=f.dimensions,w=f.viewport;r(gB({critical:g,dimensions:I,clientSelection:s,movementMode:u,viewport:w}))}}}},EB=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},ug={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ka={opacity:{drop:0,combining:.7},scale:{drop:.75}},cg={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Br=cg.outOfTheWay+"s "+ug.outOfTheWay,sa={fluid:"opacity "+Br,snap:"transform "+Br+", opacity "+Br,drop:function(t){var n=t+"s "+ug.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Br,placeholder:"height "+Br+", width "+Br+", margin "+Br},sy=function(t){return xr(t,at)?null:"translate("+t.x+"px, "+t.y+"px)"},qp={moveTo:sy,drop:function(t,n){var r=sy(t);return r?n?r+" scale("+ka.scale.drop+")":r:null}},Kp=cg.minDropTime,Nx=cg.maxDropTime,jB=Nx-Kp,uy=1500,PB=.6,LB=function(e){var t=e.current,n=e.destination,r=e.reason,o=La(t,n);if(o<=0)return Kp;if(o>=uy)return Nx;var i=o/uy,a=Kp+jB*i,l=r==="CANCEL"?a*PB:a;return Number(l.toFixed(2))},RB=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,i=e.afterCritical,a=r.draggables,l=r.droppables,s=Zt(t),u=s?l[s]:null,c=l[n.descriptor.droppableId],d=Ix({impact:t,draggable:n,draggables:a,afterCritical:i,droppable:u||c,viewport:o}),p=Ht(d,n.client.borderBox.center);return p},OB=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=yx({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var s=ae({},r,{displaced:Ra});return{impact:s,didDropInsideDroppable:!0}},kB=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(o){if(o.type!=="DROP"){r(o);return}var i=t(),a=o.payload.reason;if(i.phase==="COLLECTING"){n(CB({reason:a}));return}if(i.phase!=="IDLE"){var l=i.phase==="DROP_PENDING"&&i.isWaiting;l&&V(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||V(!1);var s=i.critical,u=i.dimensions,c=u.draggables[i.critical.draggable.id],d=OB({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),p=d.impact,f=d.didDropInsideDroppable,g=f?tg(p):null,I=f?vc(p):null,w={index:s.draggable.index,droppableId:s.droppable.id},y={draggableId:c.descriptor.id,type:c.descriptor.type,source:w,reason:a,mode:i.movementMode,destination:g,combine:I},h=RB({impact:p,draggable:c,dimensions:u,viewport:i.viewport,afterCritical:i.afterCritical}),M={critical:i.critical,afterCritical:i.afterCritical,result:y,impact:p},b=!xr(i.current.client.offset,h)||!!y.combine;if(!b){n(sg({completed:M}));return}var N=LB({current:i.current.client.offset,destination:h,reason:a}),x={newHomeClientOffset:h,dropDuration:N,completed:M};n(AB(x))}}}},Dx=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function zB(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function UB(e){var t=e.onWindowScroll;function n(){t(Dx())}var r=Pa(n),o=zB(r),i=br;function a(){return i!==br}function l(){a()&&V(!1),i=sn(window,[o])}function s(){a()||V(!1),r.cancel(),i(),i=br}return{start:l,stop:s,isActive:a}}var BB=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},_B=function(e){var t=UB({onWindowScroll:function(r){e.dispatch(wB({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&BB(r)&&t.stop(),n(r)}}},$B=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),o=function(a){t||n||(t=!0,e(a),clearTimeout(r))};return o.wasCalled=function(){return t},o},FB=function(){var e=[],t=function(i){var a=eg(e,function(u){return u.timerId===i});a===-1&&V(!1);var l=e.splice(a,1),s=l[0];s.callback()},n=function(i){var a=setTimeout(function(){return t(a)}),l={timerId:a,callback:i};e.push(l)},r=function(){if(e.length){var i=[].concat(e);e.length=0,i.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:n,flush:r}},HB=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},WB=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},GB=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,o=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&o},Oi=function(t,n){n()},Gl=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Cd=function(t,n,r,o){if(!t){r(o(n));return}var i=$B(r),a={announce:i};t(n,a),i.wasCalled()||r(o(n))},ZB=function(e,t){var n=FB(),r=null,o=function(p,f){r&&V(!1),Oi("onBeforeCapture",function(){var g=e().onBeforeCapture;if(g){var I={draggableId:p,mode:f};g(I)}})},i=function(p,f){r&&V(!1),Oi("onBeforeDragStart",function(){var g=e().onBeforeDragStart;g&&g(Gl(p,f))})},a=function(p,f){r&&V(!1);var g=Gl(p,f);r={mode:f,lastCritical:p,lastLocation:g.source,lastCombine:null},n.add(function(){Oi("onDragStart",function(){return Cd(e().onDragStart,g,t,ds.onDragStart)})})},l=function(p,f){var g=tg(f),I=vc(f);r||V(!1);var w=!GB(p,r.lastCritical);w&&(r.lastCritical=p);var y=!HB(r.lastLocation,g);y&&(r.lastLocation=g);var h=!WB(r.lastCombine,I);if(h&&(r.lastCombine=I),!(!w&&!y&&!h)){var M=ae({},Gl(p,r.mode),{combine:I,destination:g});n.add(function(){Oi("onDragUpdate",function(){return Cd(e().onDragUpdate,M,t,ds.onDragUpdate)})})}},s=function(){r||V(!1),n.flush()},u=function(p){r||V(!1),r=null,Oi("onDragEnd",function(){return Cd(e().onDragEnd,p,t,ds.onDragEnd)})},c=function(){if(r){var p=ae({},Gl(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});u(p)}};return{beforeCapture:o,beforeStart:i,start:a,update:l,flush:s,drop:u,abort:c}},VB=function(e,t){var n=ZB(e,t);return function(r){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var a=i.payload.critical;n.beforeStart(a,i.payload.movementMode),o(i),n.start(a,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var l=i.payload.completed.result;n.flush(),o(i),n.drop(l);return}if(o(i),i.type==="FLUSH"){n.abort();return}var s=r.getState();s.phase==="DRAGGING"&&n.update(s.critical,s.impact)}}}},YB=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&V(!1),e.dispatch(sg({completed:r.completed}))}}},QB=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&r(),o(i),i.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var s=e.getState();s.phase==="DROP_ANIMATING"&&e.dispatch(Sx())}};n=requestAnimationFrame(function(){n=null,t=sn(window,[a])})}}}},JB=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},XB=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},qB=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},KB=function(e){return function(t){return function(n){return function(r){if(qB(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var o=t.getState();o.phase!=="DRAGGING"&&V(!1),e.start(o);return}n(r),e.scroll(t.getState())}}}},e_=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(xx({reason:r.reason})))}}}},t_=Pb,n_=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return jb(pB,t_($z(EB(r),JB(t),TB(t),kB,YB,QB,e_,KB(a),_B,XB(n),VB(o,i))))},Td=function(){return{additions:{},removals:{},modified:{}}};function r_(e){var t=e.registry,n=e.callbacks,r=Td(),o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame(function(){o=null;var c=r,d=c.additions,p=c.removals,f=c.modified,g=Object.keys(d).map(function(y){return t.draggable.getById(y).getDimension(at)}).sort(function(y,h){return y.descriptor.index-h.descriptor.index}),I=Object.keys(f).map(function(y){var h=t.droppable.getById(y),M=h.callbacks.getScrollWhileDragging();return{droppableId:y,scroll:M}}),w={additions:g,removals:Object.keys(p),modified:I};r=Td(),n.publish(w)}))},a=function(c){var d=c.descriptor.id;r.additions[d]=c,r.modified[c.descriptor.droppableId]=!0,r.removals[d]&&delete r.removals[d],i()},l=function(c){var d=c.descriptor;r.removals[d.id]=!0,r.modified[d.droppableId]=!0,r.additions[d.id]&&delete r.additions[d.id],i()},s=function(){o&&(cancelAnimationFrame(o),o=null,r=Td())};return{add:a,remove:l,stop:s}}var Ax=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=Ht({x:n,y:t},{x:o,y:r}),a={x:Math.max(0,i.x),y:Math.max(0,i.y)};return a},Cx=function(){var e=document.documentElement;return e||V(!1),e},Tx=function(){var e=Cx(),t=Ax({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},o_=function(){var e=Dx(),t=Tx(),n=e.y,r=e.x,o=Cx(),i=o.clientWidth,a=o.clientHeight,l=r+i,s=n+a,u=Mn({top:n,left:r,right:l,bottom:s}),c={frame:u,scroll:{initial:e,current:e,max:t,diff:{value:at,displacement:at}}};return c},i_=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,o=o_(),i=o.scroll.current,a=t.droppable,l=r.droppable.getAllByType(a.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(i,n)}),s=r.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(i)}),u={draggables:ox(s),droppables:rx(l)},c={dimensions:u,critical:t,viewport:o};return c};function cy(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var a_=function(e,t){var n=null,r=r_({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(f,g){e.droppable.exists(f)||V(!1),n&&t.updateDroppableIsEnabled({id:f,isEnabled:g})},i=function(f,g){n&&(e.droppable.exists(f)||V(!1),t.updateDroppableIsCombineEnabled({id:f,isCombineEnabled:g}))},a=function(f,g){n&&(e.droppable.exists(f)||V(!1),t.updateDroppableScroll({id:f,newScroll:g}))},l=function(f,g){n&&e.droppable.getById(f).callbacks.scroll(g)},s=function(){if(n){r.stop();var f=n.critical.droppable;e.droppable.getAllByType(f.type).forEach(function(g){return g.callbacks.dragStopped()}),n.unsubscribe(),n=null}},u=function(f){n||V(!1);var g=n.critical.draggable;f.type==="ADDITION"&&cy(e,g,f.value)&&r.add(f.value),f.type==="REMOVAL"&&cy(e,g,f.value)&&r.remove(f.value)},c=function(f){n&&V(!1);var g=e.draggable.getById(f.draggableId),I=e.droppable.getById(g.descriptor.droppableId),w={draggable:g.descriptor,droppable:I.descriptor},y=e.subscribe(u);return n={critical:w,unsubscribe:y},i_({critical:w,registry:e,scrollOptions:f.scrollOptions})},d={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:l,updateDroppableScroll:a,startPublishing:c,stopPublishing:s};return d},Ex=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},l_=function(e){window.scrollBy(e.x,e.y)},s_=it(function(e){return hc(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),u_=function(t,n){var r=kr(s_(n),function(o){return o.frame||V(!1),mx(o.frame.pageMarginBox)(t)});return r},c_=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}var i=u_(t,r);return i},Sr={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},d_=function(e,t){var n=e[t.size]*Sr.startFromPercentage,r=e[t.size]*Sr.maxScrollAtPercentage,o={startScrollingFrom:n,maxScrollValueAt:r};return o},jx=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;if(o===0)return 0;var i=r-t,a=i/o;return a},dg=1,p_=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Sr.maxPixelScroll;if(e===t.startScrollingFrom)return dg;var n=jx({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,o=Sr.maxPixelScroll*Sr.ease(r);return Math.ceil(o)},dy=Sr.durationDampening.accelerateAt,py=Sr.durationDampening.stopDampeningAt,f_=function(e,t){var n=t,r=py,o=Date.now(),i=o-n;if(i>=py)return e;if(i<dy)return dg;var a=jx({startOfRange:dy,endOfRange:r,current:i}),l=e*Sr.ease(a);return Math.ceil(l)},fy=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,i=p_(t,n);return i===0?0:o?Math.max(f_(i,r),dg):i},my=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=d_(t,o),l=n[o.end]<n[o.start];return l?fy({distanceToEdge:n[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i}):-1*fy({distanceToEdge:n[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i})},m_=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return!i&&!o?r:i&&o?null:{x:i?0:r.x,y:o?0:r.y}},g_=tx(function(e){return e===0?0:e}),Px=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},l=my({container:n,distanceToEdges:a,dragStartTime:t,axis:ng,shouldUseTimeDampening:i}),s=my({container:n,distanceToEdges:a,dragStartTime:t,axis:lx,shouldUseTimeDampening:i}),u=g_({x:s,y:l});if(xr(u,at))return null;var c=m_({container:n,subject:r,proposedScroll:u});return c?xr(c,at)?null:c:null},h_=tx(function(e){return e===0?0:e>0?1:-1}),pg=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,o=t.change,i=pt(n,o),a={x:e(i.x,r.x),y:e(i.y,r.y)};return xr(a,at)?null:a}}(),Lx=function(t){var n=t.max,r=t.current,o=t.change,i={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},a=h_(o),l=pg({max:i,current:r,change:a});return!l||a.x!==0&&l.x===0||a.y!==0&&l.y===0},fg=function(t,n){return Lx({current:t.scroll.current,max:t.scroll.max,change:n})},v_=function(t,n){if(!fg(t,n))return null;var r=t.scroll.max,o=t.scroll.current;return pg({current:o,max:r,change:n})},mg=function(t,n){var r=t.frame;return r?Lx({current:r.scroll.current,max:r.scroll.max,change:n}):!1},y_=function(t,n){var r=t.frame;return!r||!mg(t,n)?null:pg({current:r.scroll.current,max:r.scroll.max,change:n})},I_=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=Px({dragStartTime:o,container:t.frame,subject:n,center:r,shouldUseTimeDampening:i});return a&&fg(t,a)?a:null},M_=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=Px({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return l&&mg(t,l)?l:null},gy=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],s=l.page.marginBox;if(t.isWindowScrollAllowed){var u=t.viewport,c=I_({dragStartTime:n,viewport:u,subject:s,center:a,shouldUseTimeDampening:r});if(c){o(c);return}}var d=c_({center:a,destination:Zt(t.impact),droppables:t.dimensions.droppables});if(d){var p=M_({dragStartTime:n,droppable:d,subject:s,center:a,shouldUseTimeDampening:r});p&&i(d.descriptor.id,p)}},w_=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Pa(t),o=Pa(n),i=null,a=function(c){i||V(!1);var d=i,p=d.shouldUseTimeDampening,f=d.dragStartTime;gy({state:c,scrollWindow:r,scrollDroppable:o,dragStartTime:f,shouldUseTimeDampening:p})},l=function(c){i&&V(!1);var d=Date.now(),p=!1,f=function(){p=!0};gy({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:f,scrollDroppable:f}),i={dragStartTime:d,shouldUseTimeDampening:p},p&&a(c)},s=function(){i&&(r.cancel(),o.cancel(),i=null)};return{start:l,stop:s,scroll:a}},b_=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,o=function(u,c){var d=pt(u.current.client.selection,c);t({client:d})},i=function(u,c){if(!mg(u,c))return c;var d=y_(u,c);if(!d)return n(u.descriptor.id,c),null;var p=Ht(c,d);n(u.descriptor.id,p);var f=Ht(c,p);return f},a=function(u,c,d){if(!u||!fg(c,d))return d;var p=v_(c,d);if(!p)return r(d),null;var f=Ht(d,p);r(f);var g=Ht(d,f);return g},l=function(u){var c=u.scrollJumpRequest;if(c){var d=Zt(u.impact);d||V(!1);var p=i(u.dimensions.droppables[d],c);if(p){var f=u.viewport,g=a(u.isWindowScrollAllowed,f,p);g&&o(u,g)}}};return l},x_=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=w_({scrollWindow:n,scrollDroppable:t}),i=b_({move:r,scrollWindow:n,scrollDroppable:t}),a=function(u){if(u.phase==="DRAGGING"){if(u.movementMode==="FLUID"){o.scroll(u);return}u.scrollJumpRequest&&i(u)}},l={scroll:a,start:o.start,stop:o.stop};return l},ii="data-rbd",ai=function(){var e=ii+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),ef=function(){var e=ii+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),S_=function(){var e=ii+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),hy={contextId:ii+"-scroll-container-context-id"},N_=function(t){return function(n){return"["+n+'="'+t+'"]'}},ki=function(t,n){return t.map(function(r){var o=r.styles[n];return o?r.selector+" { "+o+" }":""}).join(" ")},D_="pointer-events: none;",A_=function(e){var t=N_(e),n=function(){var l=`
|
|
145
|
+
cursor: -webkit-grab;
|
|
146
|
+
cursor: grab;
|
|
147
|
+
`;return{selector:t(ai.contextId),styles:{always:`
|
|
148
|
+
-webkit-touch-callout: none;
|
|
149
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
150
|
+
touch-action: manipulation;
|
|
151
|
+
`,resting:l,dragging:D_,dropAnimating:l}}}(),r=function(){var l=`
|
|
152
|
+
transition: `+sa.outOfTheWay+`;
|
|
153
|
+
`;return{selector:t(ef.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}}(),o={selector:t(S_.contextId),styles:{always:"overflow-anchor: none;"}},i={selector:"body",styles:{dragging:`
|
|
154
|
+
cursor: grabbing;
|
|
155
|
+
cursor: -webkit-grabbing;
|
|
156
|
+
user-select: none;
|
|
157
|
+
-webkit-user-select: none;
|
|
158
|
+
-moz-user-select: none;
|
|
159
|
+
-ms-user-select: none;
|
|
160
|
+
overflow-anchor: none;
|
|
161
|
+
`}},a=[r,n,o,i];return{always:ki(a,"always"),resting:ki(a,"resting"),dragging:ki(a,"dragging"),dropAnimating:ki(a,"dropAnimating"),userCancel:ki(a,"userCancel")}},Vt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,Ed=function(){var t=document.querySelector("head");return t||V(!1),t},vy=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function C_(e,t){var n=Me(function(){return A_(e)},[e]),r=v.useRef(null),o=v.useRef(null),i=ie(it(function(d){var p=o.current;p||V(!1),p.textContent=d}),[]),a=ie(function(d){var p=r.current;p||V(!1),p.textContent=d},[]);Vt(function(){!r.current&&!o.current||V(!1);var d=vy(t),p=vy(t);return r.current=d,o.current=p,d.setAttribute(ii+"-always",e),p.setAttribute(ii+"-dynamic",e),Ed().appendChild(d),Ed().appendChild(p),a(n.always),i(n.resting),function(){var f=function(I){var w=I.current;w||V(!1),Ed().removeChild(w),I.current=null};f(r),f(o)}},[t,a,i,n.always,n.resting,e]);var l=ie(function(){return i(n.dragging)},[i,n.dragging]),s=ie(function(d){if(d==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),u=ie(function(){o.current&&i(n.resting)},[i,n.resting]),c=Me(function(){return{dragging:l,dropping:s,resting:u}},[l,s,u]);return c}var Rx=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Mc(e){return e instanceof Rx(e).HTMLElement}function T_(e,t){var n="["+ai.contextId+'="'+e+'"]',r=nx(document.querySelectorAll(n));if(!r.length)return null;var o=kr(r,function(i){return i.getAttribute(ai.draggableId)===t});return!o||!Mc(o)?null:o}function E_(e){var t=v.useRef({}),n=v.useRef(null),r=v.useRef(null),o=v.useRef(!1),i=ie(function(p,f){var g={id:p,focus:f};return t.current[p]=g,function(){var w=t.current,y=w[p];y!==g&&delete w[p]}},[]),a=ie(function(p){var f=T_(e,p);f&&f!==document.activeElement&&f.focus()},[e]),l=ie(function(p,f){n.current===p&&(n.current=f)},[]),s=ie(function(){r.current||o.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&a(p)}))},[a]),u=ie(function(p){n.current=null;var f=document.activeElement;f&&f.getAttribute(ai.draggableId)===p&&(n.current=p)},[]);Vt(function(){return o.current=!0,function(){o.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var c=Me(function(){return{register:i,tryRecordFocus:u,tryRestoreFocusRecorded:s,tryShiftRecord:l}},[i,u,s,l]);return c}function j_(){var e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){var f=t.indexOf(d);f!==-1&&t.splice(f,1)}}function r(d){t.length&&t.forEach(function(p){return p(d)})}function o(d){return e.draggables[d]||null}function i(d){var p=o(d);return p||V(!1),p}var a={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,f){var g=e.draggables[f.descriptor.id];g&&g.uniqueId===p.uniqueId&&(delete e.draggables[f.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var f=p.descriptor.id,g=o(f);g&&p.uniqueId===g.uniqueId&&(delete e.draggables[f],r({type:"REMOVAL",value:p}))},getById:i,findById:o,exists:function(p){return!!o(p)},getAllByType:function(p){return Ks(e.draggables).filter(function(f){return f.descriptor.type===p})}};function l(d){return e.droppables[d]||null}function s(d){var p=l(d);return p||V(!1),p}var u={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var f=l(p.descriptor.id);f&&p.uniqueId===f.uniqueId&&delete e.droppables[p.descriptor.id]},getById:s,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return Ks(e.droppables).filter(function(f){return f.descriptor.type===p})}};function c(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:u,subscribe:n,clean:c}}function P_(){var e=Me(j_,[]);return v.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var gg=O.createContext(null),tu=function(){var e=document.body;return e||V(!1),e},L_={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},R_=function(t){return"rbd-announcement-"+t};function O_(e){var t=Me(function(){return R_(e)},[e]),n=v.useRef(null);v.useEffect(function(){var i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),ae(i.style,L_),tu().appendChild(i),function(){setTimeout(function(){var s=tu();s.contains(i)&&s.removeChild(i),i===n.current&&(n.current=null)})}},[t]);var r=ie(function(o){var i=n.current;if(i){i.textContent=o;return}},[]);return r}var k_=0,z_={separator:"::"};function hg(e,t){return t===void 0&&(t=z_),Me(function(){return""+e+t.separator+k_++},[t.separator,e])}function U_(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function B_(e){var t=e.contextId,n=e.text,r=hg("hidden-text",{separator:"-"}),o=Me(function(){return U_({contextId:t,uniqueId:r})},[r,t]);return v.useEffect(function(){var a=document.createElement("div");return a.id=o,a.textContent=n,a.style.display="none",tu().appendChild(a),function(){var s=tu();s.contains(a)&&s.removeChild(a)}},[o,n]),o}var wc=O.createContext(null);function Ox(e){var t=v.useRef(e);return v.useEffect(function(){t.current=e}),t}function __(){var e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&V(!1);var l={abandon:a};return e=l,l}function o(){e||V(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}var $_=9,F_=13,vg=27,kx=32,H_=33,W_=34,G_=35,Z_=36,V_=37,Y_=38,Q_=39,J_=40,Zl,X_=(Zl={},Zl[F_]=!0,Zl[$_]=!0,Zl),zx=function(e){X_[e.keyCode]&&e.preventDefault()},bc=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=kr(t,function(r){return"on"+r in document});return n||e}(),Ux=0,yy=5;function q_(e,t){return Math.abs(t.x-e.x)>=yy||Math.abs(t.y-e.y)>=yy}var Iy={type:"IDLE"};function K_(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(a){var l=a.button,s=a.clientX,u=a.clientY;if(l===Ux){var c={x:s,y:u},d=r();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(c);return}d.type!=="PENDING"&&V(!1);var p=d.point;if(q_(p,c)){a.preventDefault();var f=d.actions.fluidLift(c);o({type:"DRAGGING",actions:f})}}}},{eventName:"mouseup",fn:function(a){var l=r();if(l.type!=="DRAGGING"){t();return}a.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(a){r().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var l=r();if(l.type==="PENDING"){t();return}if(a.keyCode===vg){a.preventDefault(),t();return}zx(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var l=r();if(l.type==="IDLE"&&V(!1),l.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:bc,fn:t}]}function e5(e){var t=v.useRef(Iy),n=v.useRef(br),r=Me(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===Ux&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var p=e.findClosestDraggableId(d);if(p){var f=e.tryGetLock(p,a,{sourceEvent:d});if(f){d.preventDefault();var g={x:d.clientX,y:d.clientY};n.current(),u(f,g)}}}}}},[e]),o=Me(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var p=e.findClosestDraggableId(d);if(p){var f=e.findOptionsForDraggable(p);f&&(f.shouldRespectForcePress||e.canGetLock(p)&&d.preventDefault())}}}}},[e]),i=ie(function(){var d={passive:!1,capture:!0};n.current=sn(window,[o,r],d)},[o,r]),a=ie(function(){var c=t.current;c.type!=="IDLE"&&(t.current=Iy,n.current(),i())},[i]),l=ie(function(){var c=t.current;a(),c.type==="DRAGGING"&&c.actions.cancel({shouldBlockNextClick:!0}),c.type==="PENDING"&&c.actions.abort()},[a]),s=ie(function(){var d={capture:!0,passive:!1},p=K_({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(g){t.current=g}});n.current=sn(window,p,d)},[l,a]),u=ie(function(d,p){t.current.type!=="IDLE"&&V(!1),t.current={type:"PENDING",point:p,actions:d},s()},[s]);Vt(function(){return i(),function(){n.current()}},[i])}var wo;function t5(){}var n5=(wo={},wo[W_]=!0,wo[H_]=!0,wo[Z_]=!0,wo[G_]=!0,wo);function r5(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===vg){i.preventDefault(),n();return}if(i.keyCode===kx){i.preventDefault(),r();return}if(i.keyCode===J_){i.preventDefault(),e.moveDown();return}if(i.keyCode===Y_){i.preventDefault(),e.moveUp();return}if(i.keyCode===Q_){i.preventDefault(),e.moveRight();return}if(i.keyCode===V_){i.preventDefault(),e.moveLeft();return}if(n5[i.keyCode]){i.preventDefault();return}zx(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:bc,fn:n}]}function o5(e){var t=v.useRef(t5),n=Me(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==kx)return;var a=e.findClosestDraggableId(i);if(!a)return;var l=e.tryGetLock(a,c,{sourceEvent:i});if(!l)return;i.preventDefault();var s=!0,u=l.snapLift();t.current();function c(){s||V(!1),s=!1,t.current(),r()}t.current=sn(window,r5(u,c),{capture:!0,passive:!1})}}},[e]),r=ie(function(){var i={passive:!1,capture:!0};t.current=sn(window,[n],i)},[n]);Vt(function(){return r(),function(){t.current()}},[r])}var jd={type:"IDLE"},i5=120,a5=.15;function l5(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.keyCode===vg&&o.preventDefault(),t()}},{eventName:bc,fn:t}]}function s5(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var a=r();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var l=i.touches[0],s=l.clientX,u=l.clientY,c={x:s,y:u};i.preventDefault(),a.actions.move(c)}},{eventName:"touchend",fn:function(i){var a=r();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(i){if(r().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var a=r();a.type==="IDLE"&&V(!1);var l=i.touches[0];if(l){var s=l.force>=a5;if(s){var u=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){u&&t();return}if(u){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:bc,fn:t}]}function u5(e){var t=v.useRef(jd),n=v.useRef(br),r=ie(function(){return t.current},[]),o=ie(function(f){t.current=f},[]),i=Me(function(){return{eventName:"touchstart",fn:function(f){if(!f.defaultPrevented){var g=e.findClosestDraggableId(f);if(g){var I=e.tryGetLock(g,l,{sourceEvent:f});if(I){var w=f.touches[0],y=w.clientX,h=w.clientY,M={x:y,y:h};n.current(),d(I,M)}}}}}},[e]),a=ie(function(){var f={capture:!0,passive:!1};n.current=sn(window,[i],f)},[i]),l=ie(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),o(jd),n.current(),a())},[a,o]),s=ie(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),u=ie(function(){var f={capture:!0,passive:!1},g={cancel:s,completed:l,getPhase:r},I=sn(window,s5(g),f),w=sn(window,l5(g),f);n.current=function(){I(),w()}},[s,r,l]),c=ie(function(){var f=r();f.type!=="PENDING"&&V(!1);var g=f.actions.fluidLift(f.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[r,o]),d=ie(function(f,g){r().type!=="IDLE"&&V(!1);var I=setTimeout(c,i5);o({type:"PENDING",point:g,actions:f,longPressTimerId:I}),u()},[u,r,o,c]);Vt(function(){return a(),function(){n.current();var g=r();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(jd))}},[r,a,o]),Vt(function(){var f=sn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return f},[])}var c5={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Bx(e,t){if(t==null)return!1;var n=!!c5[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Bx(e,t.parentElement)}function d5(e,t){var n=t.target;return Mc(n)?Bx(e,n):!1}var p5=function(e){return Mn(e.getBoundingClientRect()).center};function f5(e){return e instanceof Rx(e).Element}var m5=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=kr(t,function(r){return r in Element.prototype});return n||e}();function _x(e,t){return e==null?null:e[m5](t)?e:_x(e.parentElement,t)}function g5(e,t){return e.closest?e.closest(t):_x(e,t)}function h5(e){return"["+ai.contextId+'="'+e+'"]'}function v5(e,t){var n=t.target;if(!f5(n))return null;var r=h5(e),o=g5(n,r);return!o||!Mc(o)?null:o}function y5(e,t){var n=v5(e,t);return n?n.getAttribute(ai.draggableId):null}function I5(e,t){var n="["+ef.contextId+'="'+e+'"]',r=nx(document.querySelectorAll(n)),o=kr(r,function(i){return i.getAttribute(ef.id)===t});return!o||!Mc(o)?null:o}function M5(e){e.preventDefault()}function Vl(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function $x(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!(!i||!i.options.isEnabled||!Ex(n.getState(),o))}function w5(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent,s=$x({lockAPI:t,store:r,registry:o,draggableId:i});if(!s)return null;var u=o.draggable.getById(i),c=I5(n,u.descriptor.id);if(!c||l&&!u.options.canDragInteractiveElements&&d5(c,l))return null;var d=t.claim(a||br),p="PRE_DRAG";function f(){return u.options.shouldRespectForcePress}function g(){return t.isActive(d)}function I(x,D){Vl({expected:x,phase:p,isLockActive:g,shouldWarn:!0})&&r.dispatch(D())}var w=I.bind(null,"DRAGGING");function y(x){function D(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(D(),p!=="PRE_DRAG"&&V(!1)),r.dispatch(mB(x.liftActionArgs)),p="DRAGGING";function j(L,R){if(R===void 0&&(R={shouldBlockNextClick:!1}),x.cleanup(),R.shouldBlockNextClick){var U=sn(window,[{eventName:"click",fn:M5,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(U)}D(),r.dispatch(xx({reason:L}))}return ae({isActive:function(){return Vl({expected:"DRAGGING",phase:p,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(R){return j("DROP",R)},cancel:function(R){return j("CANCEL",R)}},x.actions)}function h(x){var D=Pa(function(L){w(function(){return bx({client:L})})}),j=y({liftActionArgs:{id:i,clientSelection:x,movementMode:"FLUID"},cleanup:function(){return D.cancel()},actions:{move:D}});return ae({},j,{move:D})}function M(){var x={moveUp:function(){return w(xB)},moveRight:function(){return w(NB)},moveDown:function(){return w(SB)},moveLeft:function(){return w(DB)}};return y({liftActionArgs:{id:i,clientSelection:p5(c),movementMode:"SNAP"},cleanup:br,actions:x})}function b(){var x=Vl({expected:"PRE_DRAG",phase:p,isLockActive:g,shouldWarn:!0});x&&t.release()}var N={isActive:function(){return Vl({expected:"PRE_DRAG",phase:p,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:h,snapLift:M,abort:b};return N}var b5=[e5,o5,u5];function x5(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?b5:[],o||[]),l=v.useState(function(){return __()})[0],s=ie(function(h,M){h.isDragging&&!M.isDragging&&l.tryAbandon()},[l]);Vt(function(){var h=n.getState(),M=n.subscribe(function(){var b=n.getState();s(h,b),h=b});return M},[l,n,s]),Vt(function(){return l.tryAbandon},[l.tryAbandon]);for(var u=ie(function(y){return $x({lockAPI:l,registry:r,store:n,draggableId:y})},[l,r,n]),c=ie(function(y,h,M){return w5({lockAPI:l,registry:r,contextId:t,store:n,draggableId:y,forceSensorStop:h,sourceEvent:M&&M.sourceEvent?M.sourceEvent:null})},[t,l,r,n]),d=ie(function(y){return y5(t,y)},[t]),p=ie(function(y){var h=r.draggable.findById(y);return h?h.options:null},[r.draggable]),f=ie(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(lg()))},[l,n]),g=ie(l.isClaimed,[l]),I=Me(function(){return{canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:g}},[u,c,d,p,f,g]),w=0;w<a.length;w++)a[w](I)}var S5=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function zi(e){return e.current||V(!1),e.current}function N5(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,a=v.useRef(null),l=Ox(e),s=ie(function(){return S5(l.current)},[l]),u=O_(t),c=B_({contextId:t,text:i}),d=C_(t,o),p=ie(function(L){zi(a).dispatch(L)},[]),f=Me(function(){return Fv({publishWhileDragging:hB,updateDroppableScroll:yB,updateDroppableIsEnabled:IB,updateDroppableIsCombineEnabled:MB,collectionStarting:vB},p)},[p]),g=P_(),I=Me(function(){return a_(g,f)},[g,f]),w=Me(function(){return x_(ae({scrollWindow:l_,scrollDroppable:I.scrollDroppable},Fv({move:bx},p)))},[I.scrollDroppable,p]),y=E_(t),h=Me(function(){return n_({announce:u,autoScroller:w,dimensionMarshal:I,focusMarshal:y,getResponders:s,styleMarshal:d})},[u,w,I,y,s,d]);a.current=h;var M=ie(function(){var L=zi(a),R=L.getState();R.phase!=="IDLE"&&L.dispatch(lg())},[]),b=ie(function(){var L=zi(a).getState();return L.isDragging||L.phase==="DROP_ANIMATING"},[]),N=Me(function(){return{isDragging:b,tryAbort:M}},[b,M]);n(N);var x=ie(function(L){return Ex(zi(a).getState(),L)},[]),D=ie(function(){return Fr(zi(a).getState())},[]),j=Me(function(){return{marshal:I,focus:y,contextId:t,canLift:x,isMovementAllowed:D,dragHandleUsageInstructionsId:c,registry:g}},[t,I,c,y,x,D,g]);return x5({contextId:t,store:h,registry:g,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(function(){return M},[M]),O.createElement(wc.Provider,{value:j},O.createElement(Zz,{context:gg,store:h},e.children))}var D5=0;function A5(){return Me(function(){return""+D5++},[])}function C5(e){var t=A5(),n=e.dragHandleUsageInstructions||ds.dragHandleUsageInstructions;return O.createElement(oU,null,function(r){return O.createElement(N5,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var Fx=function(t){return function(n){return t===n}},T5=Fx("scroll"),E5=Fx("auto"),My=function(t,n){return n(t.overflowX)||n(t.overflowY)},j5=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return My(r,T5)||My(r,E5)},P5=function(){return!1},L5=function e(t){return t==null?null:t===document.body?P5()?t:null:t===document.documentElement?null:j5(t)?t:e(t.parentElement)},tf=function(e){return{x:e.scrollLeft,y:e.scrollTop}},R5=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},O5=function(e){var t=L5(e),n=R5(e);return{closestScrollable:t,isFixedOnPage:n}},k5=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,l=e.page,s=e.closest,u=function(){if(!s)return null;var f=s.scrollSize,g=s.client,I=Ax({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:g.paddingBox.height,width:g.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:g,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:I,diff:{value:at,displacement:at}}}}(),c=i==="vertical"?ng:lx,d=oi({page:l,withPlaceholder:null,axis:c,frame:u}),p={descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:c,isEnabled:n,client:a,page:l,frame:u,subject:d};return p},z5=function(t,n){var r=Xb(t);if(!n||t!==n)return r;var o=r.paddingBox.top-n.scrollTop,i=r.paddingBox.left-n.scrollLeft,a=o+n.scrollHeight,l=i+n.scrollWidth,s={top:o,right:l,bottom:a,left:i},u=Xm(s,r.border),c=qm({borderBox:u,margin:r.margin,border:r.border,padding:r.padding});return c},U5=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,u=r.closestScrollable,c=z5(t,u),d=Js(c,o),p=function(){if(!u)return null;var g=Xb(u),I={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:g,page:Js(g,o),scroll:tf(u),scrollSize:I,shouldClipSubject:s}}(),f=k5({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:i,client:c,page:d,closest:p});return f},B5={passive:!1},_5={passive:!0},wy=function(e){return e.shouldPublishImmediately?B5:_5};function nu(e){var t=v.useContext(e);return t||V(!1),t}var Yl=function(t){return t&&t.env.closestScrollable||null};function $5(e){var t=v.useRef(null),n=nu(wc),r=hg("droppable"),o=n.registry,i=n.marshal,a=Ox(e),l=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),s=v.useRef(l),u=Me(function(){return it(function(b,N){t.current||V(!1);var x={x:b,y:N};i.updateDroppableScroll(l.id,x)})},[l.id,i]),c=ie(function(){var b=t.current;return!b||!b.env.closestScrollable?at:tf(b.env.closestScrollable)},[]),d=ie(function(){var b=c();u(b.x,b.y)},[c,u]),p=Me(function(){return Pa(d)},[d]),f=ie(function(){var b=t.current,N=Yl(b);b&&N||V(!1);var x=b.scrollOptions;if(x.shouldPublishImmediately){d();return}p()},[p,d]),g=ie(function(b,N){t.current&&V(!1);var x=a.current,D=x.getDroppableRef();D||V(!1);var j=O5(D),L={ref:D,descriptor:l,env:j,scrollOptions:N};t.current=L;var R=U5({ref:D,descriptor:l,env:j,windowScroll:b,direction:x.direction,isDropDisabled:x.isDropDisabled,isCombineEnabled:x.isCombineEnabled,shouldClipSubject:!x.ignoreContainerClipping}),U=j.closestScrollable;return U&&(U.setAttribute(hy.contextId,n.contextId),U.addEventListener("scroll",f,wy(L.scrollOptions))),R},[n.contextId,l,f,a]),I=ie(function(){var b=t.current,N=Yl(b);return b&&N||V(!1),tf(N)},[]),w=ie(function(){var b=t.current;b||V(!1);var N=Yl(b);t.current=null,N&&(p.cancel(),N.removeAttribute(hy.contextId),N.removeEventListener("scroll",f,wy(b.scrollOptions)))},[f,p]),y=ie(function(b){var N=t.current;N||V(!1);var x=Yl(N);x||V(!1),x.scrollTop+=b.y,x.scrollLeft+=b.x},[]),h=Me(function(){return{getDimensionAndWatchScroll:g,getScrollWhileDragging:I,dragStopped:w,scroll:y}},[w,g,I,y]),M=Me(function(){return{uniqueId:r,descriptor:l,callbacks:h}},[h,l,r]);Vt(function(){return s.current=M.descriptor,o.droppable.register(M),function(){t.current&&w(),o.droppable.unregister(M)}},[h,l,w,M,i,o.droppable]),Vt(function(){t.current&&i.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Vt(function(){t.current&&i.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function Pd(){}var by={width:0,height:0,margin:cU},F5=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,o=t.animate;return n||o==="close"?by:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},H5=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,o=t.animate,i=F5({isAnimatingOpenOnMount:n,placeholder:r,animate:o});return{display:r.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:o!=="none"?sa.placeholder:null}};function W5(e){var t=v.useRef(null),n=ie(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,o=e.onTransitionEnd,i=e.onClose,a=e.contextId,l=v.useState(e.animate==="open"),s=l[0],u=l[1];v.useEffect(function(){return s?r!=="open"?(n(),u(!1),Pd):t.current?Pd:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):Pd},[r,s,n]);var c=ie(function(p){p.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),d=H5({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return O.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})}var G5=O.memo(W5),yg=O.createContext(null),Z5=function(e){Eb(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(o,i){return o.shouldAnimate?o.on?{isVisible:!0,data:o.on,animate:"open"}:i.isVisible?{isVisible:!0,data:i.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!o.on,data:o.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var o={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(o)},t}(O.PureComponent),xy={dragging:5e3,dropAnimating:4500},V5=function(t,n){return n?sa.drop(n.duration):t?sa.snap:sa.fluid},Y5=function(t,n){return t?n?ka.opacity.drop:ka.opacity.combining:null},Q5=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function J5(e){var t=e.dimension,n=t.client,r=e.offset,o=e.combineWith,i=e.dropping,a=!!o,l=Q5(e),s=!!i,u=s?qp.drop(r,a):qp.moveTo(r),c={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:V5(l,i),transform:u,opacity:Y5(a,s),zIndex:s?xy.dropAnimating:xy.dragging,pointerEvents:"none"};return c}function X5(e){return{transform:qp.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function q5(e){return e.type==="DRAGGING"?J5(e):X5(e)}function K5(e,t,n){n===void 0&&(n=at);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Jb(o,r),a=Js(i,n),l={client:i,tagName:t.tagName.toLowerCase(),display:r.display},s={x:i.marginBox.width,y:i.marginBox.height},u={descriptor:e,placeholder:l,displaceBy:s,client:i,page:a};return u}function e$(e){var t=hg("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,s=Me(function(){return{canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:l}},[i,l,a]),u=ie(function(f){var g=o();return g||V(!1),K5(n,g,f)},[n,o]),c=Me(function(){return{uniqueId:t,descriptor:n,options:s,getDimension:u}},[n,u,s,t]),d=v.useRef(c),p=v.useRef(!0);Vt(function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}},[r.draggable]),Vt(function(){if(p.current){p.current=!1;return}var f=d.current;d.current=c,r.draggable.update(c,f)},[c,r.draggable])}function t$(e){e.preventDefault()}function n$(e){var t=v.useRef(null),n=ie(function(L){t.current=L},[]),r=ie(function(){return t.current},[]),o=nu(wc),i=o.contextId,a=o.dragHandleUsageInstructionsId,l=o.registry,s=nu(yg),u=s.type,c=s.droppableId,d=Me(function(){return{id:e.draggableId,index:e.index,type:u,droppableId:c}},[e.draggableId,e.index,u,c]),p=e.children,f=e.draggableId,g=e.isEnabled,I=e.shouldRespectForcePress,w=e.canDragInteractiveElements,y=e.isClone,h=e.mapped,M=e.dropAnimationFinished;if(!y){var b=Me(function(){return{descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:w,shouldRespectForcePress:I,isEnabled:g}},[d,l,r,w,I,g]);e$(b)}var N=Me(function(){return g?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:t$}:null},[i,a,f,g]),x=ie(function(L){h.type==="DRAGGING"&&h.dropping&&L.propertyName==="transform"&&M()},[M,h]),D=Me(function(){var L=q5(h),R=h.type==="DRAGGING"&&h.dropping?x:null,U={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":f,style:L,onTransitionEnd:R},dragHandleProps:N};return U},[i,N,f,h,x,n]),j=Me(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return p(D,h.snapshot,j)}var Hx=function(e,t){return e===t},Wx=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},r$=function(t){return t.combine?t.combine.draggableId:null},o$=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function i$(){var e=it(function(o,i){return{x:o,y:i}}),t=it(function(o,i,a,l,s){return{isDragging:!0,isClone:i,isDropAnimating:!!s,dropAnimation:s,mode:o,draggingOver:a,combineWith:l,combineTargetFor:null}}),n=it(function(o,i,a,l,s,u,c){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:s,combineWith:u,mode:i,offset:o,dimension:a,forceShouldAnimate:c,snapshot:t(i,l,s,u,null)}}}),r=function(i,a){if(i.isDragging){if(i.critical.draggable.id!==a.draggableId)return null;var l=i.current.client.offset,s=i.dimensions.draggables[a.draggableId],u=Zt(i.impact),c=o$(i.impact),d=i.forceShouldAnimate;return n(e(l.x,l.y),i.movementMode,s,a.isClone,u,c,d)}if(i.phase==="DROP_ANIMATING"){var p=i.completed;if(p.result.draggableId!==a.draggableId)return null;var f=a.isClone,g=i.dimensions.draggables[a.draggableId],I=p.result,w=I.mode,y=Wx(I),h=r$(I),M=i.dropDuration,b={duration:M,curve:ug.drop,moveTo:i.newHomeClientOffset,opacity:h?ka.opacity.drop:null,scale:h?ka.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:g,dropping:b,draggingOver:y,combineWith:h,mode:w,forceShouldAnimate:null,snapshot:t(w,f,y,h,b)}}}return null};return r}function Gx(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var a$={mapped:{type:"SECONDARY",offset:at,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Gx(null)}};function l$(){var e=it(function(a,l){return{x:a,y:l}}),t=it(Gx),n=it(function(a,l,s){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:l,shouldAnimateDisplacement:s,snapshot:t(l)}}}),r=function(l){return l?n(at,l,!0):null},o=function(l,s,u,c){var d=u.displaced.visible[l],p=!!(c.inVirtualList&&c.effected[l]),f=vc(u),g=f&&f.draggableId===l?s:null;if(!d){if(!p)return r(g);if(u.displaced.invisible[l])return null;var I=mi(c.displacedBy.point),w=e(I.x,I.y);return n(w,g,!0)}if(p)return r(g);var y=u.displacedBy.point,h=e(y.x,y.y);return n(h,g,d.shouldAnimate)},i=function(l,s){if(l.isDragging)return l.critical.draggable.id===s.draggableId?null:o(s.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var u=l.completed;return u.result.draggableId===s.draggableId?null:o(s.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null};return i}var s$=function(){var t=i$(),n=l$(),r=function(i,a){return t(i,a)||n(i,a)||a$};return r},u$={dropAnimationFinished:Sx},c$=Yb(s$,u$,null,{context:gg,pure:!0,areStatePropsEqual:Hx})(n$);function Zx(e){var t=nu(yg),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:O.createElement(c$,e)}function d$(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return O.createElement(Zx,ae({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function p$(e){var t=v.useContext(wc);t||V(!1);var n=t.contextId,r=t.isMovementAllowed,o=v.useRef(null),i=v.useRef(null),a=e.children,l=e.droppableId,s=e.type,u=e.mode,c=e.direction,d=e.ignoreContainerClipping,p=e.isDropDisabled,f=e.isCombineEnabled,g=e.snapshot,I=e.useClone,w=e.updateViewportMaxScroll,y=e.getContainerForClone,h=ie(function(){return o.current},[]),M=ie(function(U){o.current=U},[]);ie(function(){return i.current},[]);var b=ie(function(U){i.current=U},[]),N=ie(function(){r()&&w({maxScroll:Tx()})},[r,w]);$5({droppableId:l,type:s,mode:u,direction:c,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:d,getDroppableRef:h});var x=O.createElement(Z5,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(U){var ee=U.onClose,W=U.data,q=U.animate;return O.createElement(G5,{placeholder:W,onClose:ee,innerRef:b,animate:q,contextId:n,onTransitionEnd:N})}),D=Me(function(){return{innerRef:M,placeholder:x,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}},[n,l,x,M]),j=I?I.dragging.draggableId:null,L=Me(function(){return{droppableId:l,type:s,isUsingCloneFor:j}},[l,j,s]);function R(){if(!I)return null;var U=I.dragging,ee=I.render,W=O.createElement(Zx,{draggableId:U.draggableId,index:U.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(q,Y){return ee(q,Y,U)});return $0.createPortal(W,y())}return O.createElement(yg.Provider,{value:L},a(D,g),R())}var Ld=function(t,n){return t===n.droppable.type},Sy=function(t,n){return n.draggables[t.draggable.id]},f$=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ae({},t,{shouldAnimatePlaceholder:!1}),r=it(function(a){return{draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}}}),o=it(function(a,l,s,u,c,d){var p=c.descriptor.id,f=c.descriptor.droppableId===a;if(f){var g=d?{render:d,dragging:r(c.descriptor)}:null,I={isDraggingOver:s,draggingOverWith:s?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:I,useClone:g}}if(!l)return n;if(!u)return t;var w={isDraggingOver:s,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:w,useClone:null}}),i=function(l,s){var u=s.droppableId,c=s.type,d=!s.isDropDisabled,p=s.renderClone;if(l.isDragging){var f=l.critical;if(!Ld(c,f))return n;var g=Sy(f,l.dimensions),I=Zt(l.impact)===u;return o(u,d,I,I,g,p)}if(l.phase==="DROP_ANIMATING"){var w=l.completed;if(!Ld(c,w.critical))return n;var y=Sy(w.critical,l.dimensions);return o(u,d,Wx(w.result)===u,Zt(w.impact)===u,y,p)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var h=l.completed;if(!Ld(c,h.critical))return n;var M=Zt(h.impact)===u,b=!!(h.impact.at&&h.impact.at.type==="COMBINE"),N=h.critical.droppable.id===u;return M?b?t:n:N?t:n}return n};return i},m$={updateViewportMaxScroll:bB};function g$(){return document.body||V(!1),document.body}var h$={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:g$},Vx=Yb(f$,m$,null,{context:gg,pure:!0,areStatePropsEqual:Hx})(p$);Vx.defaultProps=h$;const v$=3,y$=({onClick:e,stackType:t,policyManager:n})=>{var s;const[r,o]=v.useState(!1),i=()=>{o(!r)},a=((s=n.policiesUsageInfo)==null?void 0:s.filter(u=>Ro(u.policyType)===t).sort((u,c)=>c.operations.length-u.operations.length))??[];let l=a;return r||(l=a.slice(0,v$)),l.length===0?null:m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md pb-2",children:"EXISTING POLICIES"}),m.jsx("div",{className:"grid grid-cols-3 gap-2 h-fit max-h-40 overflow-y-auto",children:l.map(u=>{const c=il(u.policyType),d=()=>e(u,u.policyType),p=u.operations.length;return m.jsxs("button",{type:"button",onClick:d,className:"flex flex-col items-center justify-content-center h-16 border border-gray-300 shadow-sm rounded bg-gray-50 hover:bg-gray-200 p-3",children:[m.jsxs("div",{className:"h-full flex flex-row items-center justify-content-center",children:[m.jsx("img",{className:"w-6 h-6 mr-2",src:c==null?void 0:c.icon,alt:u.policyType}),m.jsx("div",{className:"text-md font-semibold truncate w-64",children:u.name})]}),m.jsx("p",{className:"w-full text-sm text-gray-400",children:`Used in ${p} ${p>1?"routes":"route"}`})]},u.name)})}),a.length>l.length&&!r&&m.jsx("div",{className:"pt-2",children:m.jsx("button",{onClick:i,type:"button",className:"border border-gray-300 shadow-sm rounded-md bg-gray-50 hover:bg-gray-200 w-full self-center px-3 py-1",children:"See All"})})]})},I$=({onClick:e,id:t,name:n,icon:r})=>{const o=()=>e(t);return m.jsxs("button",{type:"button","data-test":t,className:"h-32 border border-gray-300 shadow-sm flex flex-col items-center justify-content-center rounded bg-gray-50 hover:bg-gray-200 p-3",onClick:o,children:[m.jsx("div",{className:"m-3",children:m.jsx("img",{className:"w-12 h-12",src:r,alt:n})}),m.jsx("div",{className:"font-bold",children:n})]})},M$=({onClick:e,stackType:t})=>{const[n,r]=v.useState(),o=l=>{r(l.currentTarget.value)},i=v.useRef(null);v.useEffect(()=>{var l;(l=i.current)==null||l.focus()},[]);const a=Cb().filter(l=>!l.isDeprecated).filter(l=>n?l.name.toLowerCase().includes(n.toLowerCase()):!0).filter(l=>l.id.endsWith(`-${t}`)).sort((l,s)=>l.name<s.name?1:l.name>s.name?-1:0).sort(l=>l.isPaidAddOn||l.isPreview?1:-1);return m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md",children:"ADD A NEW POLICY"}),m.jsxs("div",{className:"mt-2 relative rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:m.jsx(H0,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),m.jsx("input",{ref:i,defaultValue:n,className:"focus:ring-indigo-500 focus:border-indigo-500 block w-full h-8 pl-10 sm:text-sm border border-gray-300 shadow-sm rounded",placeholder:"Search for a Policy",onChange:o})]}),m.jsx("div",{className:"h-55vh overflow-y-auto",children:m.jsx("div",{className:"mt-2 pb-10 grid grid-cols-3 gap-2 h-fit max-h-55vh",children:a.map(l=>m.jsx(I$,{onClick:e,...l},l.id))})})]})};function w$({stackType:e,shouldHideExistingPolicies:t=!1,policyManager:n,onPolicySelected:r,onExistingPolicySelected:o}){const i=l=>{r(l)},a=l=>{o(l)};return m.jsxs("div",{className:"flex flex-col w-full pl-8 pr-6 mt-2",children:[t?null:m.jsx("div",{className:"pb-4",children:m.jsx(y$,{onClick:a,policyManager:n,stackType:e})}),m.jsx("div",{className:"mt-2",children:m.jsx(M$,{onClick:i,stackType:e})})]})}const b$=({fakePolicyUrl:e,designConfig:t,onCancel:n})=>{const r=()=>{window.open(e,"_blank")};return m.jsxs("div",{className:"flex flex-col w-[600px] gap-y-4",children:[m.jsx("div",{className:"pt-4 pl-8 text-lg text-gray-500",children:t.name}),m.jsx("div",{className:"w-full",children:t.exampleHtml?m.jsx(Hm,{documentationSrc:t.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[ao.COMING_SOON.icon,m.jsx("div",{children:ao.COMING_SOON.defaultTitle})]})}),m.jsxs("div",{className:"flex w-full gap-x-4 justify-end pr-6 pb-4",children:[m.jsx(Hn,{label:"Cancel",buttonType:qo.WHITE,classNames:"w-24 justify-center",onClick:n,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(Hn,{label:"Open Guide",classNames:"w-36 justify-center",onClick:r,dataTestId:"policy-picker-footer-request-access-btn"})]})]})},x$="There's already a policy with this name",S$="Policy name can't be empty",N$=({policyID:e,operation:t,onComplete:n,onCancel:r,policyManager:o})=>{const i=o.getPolicyListEnforced(),a=il(e),l=!!(a!=null&&a.isPreview)||!!(a!=null&&a.isPaidAddOn),[s,u]=v.useState(Lz(i,e)),[c,d]=v.useState(null),[p,f]=v.useState(null),g=v.useRef();if(v.useEffect(()=>{(N=>{if(!N){d(S$);return}if(i.find(D=>D.name===N)){d(x$);return}d(null)})(s)},[s,i]),!a)return null;if(a.fakePolicyUrl)return m.jsx(b$,{fakePolicyUrl:a.fakePolicyUrl,designConfig:a,onCancel:r});const I=(b,N)=>{const x={handler:N,name:s,policyType:b};o.createPolicy(x,t?[t]:void 0)},w=()=>{var N;const b=(N=g.current)==null?void 0:N.getValue();if(!(!e||!b))try{const x=JSON.parse(b);I(e,x),n()}catch(x){f(x.message)}},y=b=>{u(Tb(b.toLowerCase()))};function h(b){g.current=b}const M=!!c;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(Db,{name:s,onChangeName:y,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:c,disabled:l})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Vs,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(Sb,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:fe("h-60",{"border-2 border-red-500":!!p}),width:"100%",language:"json",onMount:h,defaultValue:JSON.stringify(a.defaultHandler,void 0,NM)}),p?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:p}):null]}),m.jsx(Vs,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Hm,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[ao.COMING_SOON.icon,m.jsx("div",{children:ao.COMING_SOON.defaultTitle})]})})]}),m.jsx(Nb,{onConfirm:w,onCancel:r,isDisabled:M,mustRequestAccess:l})]})},D$=e=>{switch(e){case"policy-picker":return"Choose Policy";case"policy-access-requested":return"Access Requested";case"policy-configurator":return"Create Policy"}},A$=({isOpen:e,setIsOpen:t,stackType:n,operation:r,shouldHideExistingPolicies:o=!1,policyManager:i})=>{const[a,l]=v.useState("policy-picker"),[s,u]=v.useState(),c=()=>{t(!1)},d=w=>{u(w),l("policy-configurator")},p=r?{filePath:r.additionalOperationContext.oasFilePath,path:r.additionalOperationContext.path,method:r.additionalOperationContext.method}:void 0,f=w=>{if(r==null||p==null)throw new Error("Operation config not found to add policy to");i.applyPolicy(w.name,[p]),c()};let g,I=!1;if(s&&a==="policy-configurator"){const w=il(s);g=w!=null&&w.isPaidAddOn?"Paid Add On":w!=null&&w.isPreview&&!w.fakePolicyUrl?"Private Preview":void 0,I=(w==null?void 0:w.fakePolicyUrl)!=null}return m.jsxs(gb,{title:D$(a),isOpen:e,badgeTitle:g,setIsOpen:t,matchWidth:I,children:[a==="policy-picker"?m.jsx(w$,{stackType:n,shouldHideExistingPolicies:o,policyManager:i,onPolicySelected:d,onExistingPolicySelected:f}):null,a==="policy-configurator"&&s!=null?m.jsx(N$,{policyID:s,operation:p,onComplete:c,onCancel:c,policyManager:i}):null]})},Ny=({policies:e,stackType:t,operation:n})=>{const r=nc(),o={filePath:n.additionalOperationContext.oasFilePath,path:n.additionalOperationContext.path,method:n.additionalOperationContext.method},[i,a]=Da(()=>m.jsx(A$,{isOpen:!0,setIsOpen:a,stackType:t,operation:n,policyManager:r}),[t,n,r]),l=u=>{const c=e[u];r.removePolicy(c,t,[o])},s=u=>{u.destination&&u.destination.index!==u.source.index&&r.movePolicy(e,u.source.index,u.destination.index,t,o)};return m.jsx(C5,{onDragEnd:s,children:m.jsxs("div",{className:"flex flex-col w-full max-w-full items-center gap-y-2 px-3",children:[m.jsx(Vx,{droppableId:"list",children:u=>m.jsxs("div",{className:"w-full max-w-full xl:w-fit flex flex-col items-stretch",ref:u.innerRef,...u.droppableProps,children:[e.map((c,d)=>m.jsx(d$,{draggableId:`${c}-${d}`,index:d,isDragDisabled:!1,children:p=>m.jsx("div",{className:"flex w-full max-w-full py-2",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:m.jsx(kz,{isReadOnly:!1,index:d,policy:c,stackType:t,onDelete:l})})},`${c}-${d}`)),u.placeholder]})}),m.jsx("div",{className:"flex flex-row justify-center",children:m.jsx(Hn,{dataTestId:`add-${t}-policy`,buttonType:qo.GRAY,onClick:()=>{i()},label:"Add Policy",icon:m.jsx(dA,{className:"w-5 h-auto text-gray-500"}),iconAlignment:"left"})})]})})},Dy=({children:e,direction:t})=>m.jsxs("div",{className:"grid h-full w-full max-w-full",children:[m.jsxs("div",{className:"w-full max-w-full flex flex-col items-center col-start-1 row-start-1",children:[t==="up"?m.jsx("div",{className:"flex-none pl-[0.06rem]",children:m.jsx("img",{src:"/icons/arrow_head_up.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{}),m.jsx("div",{className:"flex-grow",children:m.jsx("img",{className:"h-full w-3",src:"/icons/arrow_line.svg",alt:"arrow-line"})}),t==="down"?m.jsx("div",{className:"flex-none",children:m.jsx("img",{src:"/icons/arrow_head_down.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{})]}),m.jsx("div",{className:"w-full max-w-full min-w-0 col-start-1 row-start-1 pt-4 pb-6",children:e})]}),C$=({children:e,isPoliciesExpanded:t,onPoliciesExpandedChange:n,inboundPolicies:r,outboundPolicies:o,operation:i})=>m.jsxs("div",{className:"w-full 2xl:col-span-12 flex flex-col justify-start",children:[m.jsx("div",{className:fe("rounded-t absolute h-12 right-0 ",{"bg-gray-100":t}),children:" "}),m.jsx("button",{type:"button","data-test":"policy-designer-expand-collapse",onClick:()=>{n()},className:fe("text-sm flex text-center px-3 py-2 z-5 w-full text-black bg-gray-100 hover:bg-gray-200",t?"rounded-t":"rounded"),children:m.jsxs("span",{className:"inline-flex items-center text-lg",children:[t?m.jsx(bu,{className:"w-5 h-auto"}):m.jsx(GD,{className:"w-5 h-auto"})," Policies"]})}),t?m.jsxs("div",{className:"flex flex-col pb-4 bg-gray-100 rounded-b",children:[m.jsx("div",{className:"flex flex-col",children:m.jsxs("div",{className:"grid grid-cols-2 pb-4",children:[m.jsxs("div",{className:"flex flex-col items-center h-auto",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Request"}),m.jsx(Dy,{direction:"down",children:m.jsx(Ny,{operation:i,policies:r,stackType:"inbound"})})]}),m.jsxs("div",{className:"flex-grow flex flex-col",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Response"}),m.jsx(Dy,{direction:"up",children:m.jsx(Ny,{operation:i,policies:o,stackType:"outbound"})})]})]})}),e]}):null]});function T$({operationData:e}){return e?m.jsx("div",{className:"w-full h-fit flex flex-col",children:m.jsx(E$,{operationData:e})}):m.jsx("div",{className:"m-auto flex text-center",children:m.jsxs("h1",{className:"text-gray-400 text-xl mb-5",children:["No operation selected ",m.jsx("br",{}),"Select an operation to start editing"]})})}const E$=({operationData:e})=>{var F,ne,P,z,_,G;const t=$m().get("path");if(!t)throw new Error("Open API file path not found in URL");const n=G4(t),{path:r,method:o}=e.additionalOperationContext,{additionalOperationContext:i,...a}=e,l=Fm(),s=nc(),u="",[c,d]=v.useState(),[p,f]=v.useState(),[g,I]=v.useState(),[w,y]=v.useState(!1),h=(P=(ne=(F=l.openApiData)==null?void 0:F.servers)==null?void 0:ne.at(0))==null?void 0:P.url,M=a[pr]??ru(h??Ca),b=a[Fh]===!0;v.useEffect(()=>{d(void 0),f(void 0)},[e.operationId]);const N=()=>{y(!w)},x=S=>{const C={...S},T={...M,handler:C};l.updateOperation({path:r,method:o,newOperationObject:{...a,[pr]:T}}),d(void 0)},D=S=>{l.updateOperation({path:r,method:o,newOperationObject:{...a,summary:S}}),d(void 0)},j=S=>{l.updateOperation({path:r,method:o,newOperationObject:{...a,[Fh]:S}})},L=S=>{let{newPath:C}=S;const{newMethod:T}=S;g!=null&&C==null&&(C=g);try{l.updateOperation({path:r,newPath:C,method:o,newMethod:T,newOperationObject:a}),f(void 0),d(void 0),I(void 0)}catch(k){k instanceof Error&&(C!=null&&(I(C),f(k.message)),T!=null&&d(k.message))}},R=S=>{if(S===r){f(void 0),d(void 0),I(void 0);return}const C=S.startsWith("/")?S:"/"+S;L({newPath:C})},U=({value:S})=>{const C=S;if(C===o){d(void 0);return}L({newMethod:C})},ee=S=>{const C={...M,corsPolicy:S};l.updateOperation({path:r,method:o,newOperationObject:{...a,[pr]:C}}),d(void 0)},W=S=>{const C={...e.additionalOperationContext.pathZuploConfig,pathMode:S},k=l.getOpenApiDataEnforced().paths;if(!k)throw new Error("Property 'paths' is undefined");const B=k[r];if(!B)throw new Error(`Path Item '${r}' is undefined`);l.updatePathItem(r,{...B,[xM]:C}),d(void 0)},q=()=>{n(Ja.modified)},Y=m.jsx("div",{className:`${w?"mx-4":""}`,children:m.jsx(KE,{isOpenApi:!0,routeHandler:(e[pr]??ru(h??Ca)).handler,onRequestHandlerChange:x})});return m.jsxs("div",{className:"m-2 p-3 pt-3 rounded","data-test":"route-handling-section",children:[m.jsxs("div",{className:"flex items-center mb-4",children:[m.jsx("span",{className:"pr-3 text-lg font-medium text-gray-900 whitespace-nowrap flex-none",children:"Request Handling"}),m.jsx("div",{className:"border-t border-gray-300 flex-grow"})]}),m.jsxs("div",{className:"flex flex-col gap-y-3 pb-4",children:[m.jsx(EE,{initialSummary:a.summary,span:4,onSummaryChange:D,onFieldModified:q}),m.jsxs("div",{className:"flex flex-col",children:[m.jsx(TE,{initialPath:r,method:o,summary:e.summary,span:6,pathMode:(z=e.additionalOperationContext.pathZuploConfig)==null?void 0:z.pathMode,hasError:p!=null,onPathChange:R,onPathModeChange:W,operationData:e,onFieldModified:q}),p?m.jsx("p",{"data-test":"path-error",className:"text-sm text-red-600 pt-1 ml-10",children:p}):null]}),m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-start gap-x-3 xl:gap-x-8 w-full items-center flex-wrap gap-y-3 lg:gap-y-0 lg:flex-nowrap",children:[m.jsx(CE,{selectedMethod:o,onSelectionChanged:U,versionPathPrefix:u,span:4}),m.jsx(NE,{selectedCorsPolicy:M.corsPolicy,corsPolicies:s.corsPolicyList??[],span:3,onCORSSelectionChanged:ee}),m.jsx(DE,{shouldExcludeFromDocs:b,span:3,onSelectionChanged:j})]}),c?m.jsx("p",{"data-test":"method-error",className:"text-sm text-red-600 pt-1 w-full",children:c}):null]}),m.jsx(C$,{inboundPolicies:((_=M.policies)==null?void 0:_.inbound)??[],outboundPolicies:((G=M.policies)==null?void 0:G.outbound)??[],operation:e,isPoliciesExpanded:w,onPoliciesExpandedChange:N,children:w?Y:null})]}),w?null:m.jsx("div",{className:"w-full col-span-12",children:Y})]})};let Ql;const j$=new Uint8Array(16);function P$(){if(!Ql&&(Ql=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ql))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ql(j$)}const ct=[];for(let e=0;e<256;++e)ct.push((e+256).toString(16).slice(1));function L$(e,t=0){return(ct[e[t+0]]+ct[e[t+1]]+ct[e[t+2]]+ct[e[t+3]]+"-"+ct[e[t+4]]+ct[e[t+5]]+"-"+ct[e[t+6]]+ct[e[t+7]]+"-"+ct[e[t+8]]+ct[e[t+9]]+"-"+ct[e[t+10]]+ct[e[t+11]]+ct[e[t+12]]+ct[e[t+13]]+ct[e[t+14]]+ct[e[t+15]]).toLowerCase()}const R$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ay={randomUUID:R$};function O$(e,t,n){if(Ay.randomUUID&&!t&&!e)return Ay.randomUUID();e=e||{};const r=e.random||(e.rng||P$)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return L$(r)}const k$="Document Order",z$=["Document Order","Path","Summary"],Rd="Untagged";function U$(e){return{summary:"New Route",description:"Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do `eiusmod tempor` incididunt ut labore et dolore magna aliqua.",[pr]:ru(e),operationId:O$()}}function ru(e){return{corsPolicy:"none",handler:{export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:e}},policies:{inbound:[]}}}const B$=()=>{var ne;const[e,t]=v.useState(),[n,r]=v.useState([]),[o,i]=v.useState(),[a,l]=v.useState(void 0),[s,u]=v.useState(k$),[c,d]=v.useState(void 0),p=Fm(),[f,g]=v.useState(),[I,w]=v.useState(),[y,h]=Da(()=>{if(o==null)throw new Error("Invalid state, operationToDelete should not be undefined");const P=()=>{try{j(o.path,o.method)}catch(_){_ instanceof Error&&(d(_.message),M())}i(void 0),h()},z=()=>{i(void 0),h()};return m.jsx(Op,{hideModal:h,alertType:"DELETE",bodyText:"Are you sure you want to delete this operation?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:P,onSecondaryButtonClick:z,primaryButtonTestID:"confirm-delete-btn"})},[o,i]),[M,b]=Da(()=>{const P=()=>{d(void 0),b()};return m.jsx(Op,{alertType:"ERROR",bodyText:c??"",onPrimaryButtonClick:()=>{},onSecondaryButtonClick:P,primaryButtonText:"Edit file directly",secondaryButtonText:"Cancel",hideModal:P,title:"Error"})},[c]);if(!p.openApiData)throw new Error("Invalid State - no OpenApiData");const N=(ne=p.openApiData.tags)==null?void 0:ne.map(P=>({value:P.name,label:P.name,shouldSupportOnly:!0}));N==null||N.push({value:Rd,label:Rd,shouldSupportOnly:!0});const x=n.reduce((P,z)=>(P.set(z,!0),P),new Map),D=p.operationArray,j=(P,z)=>{p.deleteOperation(P,z)},L=()=>{var C,T,k,B;const P=(k=(T=(C=p.openApiData)==null?void 0:C.servers)==null?void 0:T.at(0))==null?void 0:k.url,z=U$(P??Ca),G=`/path-${((B=p.operationArray)==null?void 0:B.length)??0}`,S=An.OpenAPIV3.HttpMethods.GET;try{p.addOperation(G,S,z)}catch(oe){oe instanceof Error&&(d(oe.message),M())}l(z.operationId)},R=(P,z,_)=>{i({path:P,method:z,operationId:_}),y()},U=P=>{t(P)},ee=P=>{r(P)},W=P=>{u(P.value)},q=P=>{var _;if(!e||e==="")return!0;const z=e.toLowerCase();return P.additionalOperationContext.path.includes(z)||((_=P.summary)==null?void 0:_.toLowerCase().includes(z))},Y=P=>{if(n.length===0)return!0;const z=P.tags;return z?z.some(_=>x.has(_)):n.includes(Rd)},F=(P,z)=>{var _;switch(s){case"Document Order":return 0;case"Path":return P.additionalOperationContext.path.localeCompare(z.additionalOperationContext.path);case"Summary":return!P.summary&&!z.summary?0:!P.summary&&z.summary?1:P.summary&&!z.summary?-1:((_=P.summary)==null?void 0:_.localeCompare(z.summary??""))??0}};return!D||D.length===0&&(!e||e.trim().length===0)?m.jsx(yE,{addRoute:L}):m.jsx(m.Fragment,{children:m.jsxs("div",{className:"mx-2 grid grid-cols-3 h-full flex-grow",children:[m.jsxs("div",{className:"flex flex-col justify-start col-span-1 h-full py-6",children:[m.jsx("div",{className:"flex w-full mr-3 pb-5",children:m.jsx(wE,{onSearch:U})}),m.jsxs("div",{className:"flex flex-wrap w-full justify-between gap-x-4 gap-y-2 mr-3 pb-5",children:[m.jsx(Lr,{labelPrefixElement:m.jsx("span",{className:"hidden 2xl:inline mr-1",children:"Sort:"}),selected:{label:s,value:s},onChange:W,options:z$.map(P=>({label:P,value:P}))}),m.jsx(sE,{filterPrefixClassName:"hidden 2xl:inline",filterName:n.length===1?"Tag":"Tags",activeFilters:n,options:N??[],onFilterChange:ee,isDisabled:!N})]}),m.jsx("div",{className:"relative max-h-[calc(100vh-250px)] overflow-auto w-full mb-2",children:D.filter(q).filter(Y).sort(F).map(({additionalOperationContext:P,...z})=>{const _=z.operationId===a,G=_&&f?f:P.path,S=_&&I?I:z.summary;return m.jsx("div",{className:"flex w-full items-center",children:m.jsx(ME,{path:G,method:P.method,summary:S,operationId:z.operationId,isSelected:z.operationId===a,onOperationSelected:C=>{l(C),g(""),w("")},onDelete:R})},z.operationId)})}),m.jsx("div",{className:"flex justify-center",children:m.jsxs("button",{type:"button",onClick:L,className:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500","data-test":"add-route-btn",children:[m.jsx(mA,{className:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),m.jsx("span",{children:"Add Route"})]})})]}),m.jsx("div",{className:"col-span-2 flex flex-col",children:m.jsx(pm.Provider,{value:{setPath:g,setSummary:w},children:m.jsx(T$,{operationData:D.find(P=>P.operationId===a)})})})]})})},_$=({url:e,surfaceResponse:t})=>{const n=$m().get("path"),[r,o]=v.useState(!1),i=Fm(),a=nc();i.openApiData;const l=async()=>{try{if(!n)throw new Error("You must pick a file before saving");o(!0);const s=await fetch(`${e}/save-open-api-updates`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify([{filePath:n,content:i.openApiData},{filePath:a.policyListFileModel.path,content:a.policyListFileModel.content?JSON.parse(a.policyListFileModel.content):a.policyListFileModel.content}])}),u=await s.json();if(t(u.message,s.status===200?"success":"error"),s.status===200)return}catch(s){t(`Error: ${s.message}`,"error")}finally{o(!1)}};return m.jsx("div",{className:"mt-5",children:m.jsx("div",{className:"inline-block ml-3",children:r?m.jsx(Lu,{className:"w-4 h-4 mr-4 float-right"}):m.jsx("button",{type:"button",onClick:()=>l(),className:"inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500 bg-zuplo-pink hover:bg-zuplo-pink-hover",disabled:r,children:"Save Changes"})})})},$$=({url:e,handleErrors:t})=>{const[n,r]=v.useState(null),[o,i]=v.useState([]),a=[],[l,s]=hk(),[u,c]=v.useState(!0),d=f=>{const g=f.value;r(f),p("path",g)},p=(f,g)=>{let I=new URLSearchParams(l);I.set(f,g),s(I)};return v.useEffect(()=>{o&&o.length>0&&(r({label:o[0],value:o[0]}),p("path",o[0]))},[o]),v.useEffect(()=>{async function f(){try{c(!0);const g=await fetch(`${e}/open-api-files`,{method:"GET"});if(g.status!==200){const w=await g.json();t(w.message);return}const I=await g.json();i(I),c(!1)}catch(g){t(g.message)}finally{c(!1)}}f()},[e]),o.forEach(f=>{a.push({label:f,value:f})}),m.jsx("div",{className:"mt-5 justify-end pl-3 pr-6",children:m.jsx("div",{className:"inline-block w-1/5 ",children:m.jsx(Lr,{testId:"file-selector",placeholder:"Select Open API file",options:a,selected:n,onChange:d,className:"inline-block w-full text-base max-w-sm md:max-w-xs mr-4 h-[42px] text-slate-600",classNameOptions:"w-full",isLoadingData:u})})})},F$=({message:e,type:t,className:n})=>m.jsx(m.Fragment,{children:m.jsx(Pn,{show:e!=="",enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:fe("col-span-12 rounded-md p-5",{"bg-pink-100":t==="error","bg-green-100 ":t==="success"},n),children:m.jsx("span",{className:"text-sm text-gray-500",children:e})})}),H$=5e3;function W$(){const[e,t]=v.useState(null),n=i=>{t({message:i,type:"error"})},r=(i,a)=>{t({message:i,type:a}),setTimeout(()=>{t(null)},H$)},o="http://localhost:5500";return m.jsx(gk,{children:m.jsxs(LD,{children:[m.jsxs("div",{className:"flex flex-row text-slate-500 rounded-md w-auto gap-5 mt-5",children:[m.jsx("div",{className:"inline-block w-1/5",children:m.jsx($$,{url:o,handleErrors:n})}),m.jsx("div",{className:"text-left inline-block w-3/5",children:e!==null&&m.jsx(F$,{message:e.message,type:e.type})})]}),m.jsx(W2,{children:m.jsx(vk,{url:o,handleErrors:n,children:m.jsx(wk,{children:m.jsxs(m.Fragment,{children:[m.jsx(_$,{url:o,surfaceResponse:r}),m.jsx(B$,{})]})})})})]})})}Od.createRoot(document.getElementById("root")).render(m.jsx(O.StrictMode,{children:m.jsx(W$,{})}));
|