@skybridge/devtools 0.0.0-dev.f857ffc → 0.0.0-dev.f9be176

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.
@@ -0,0 +1,183 @@
1
+ var $U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YEe=$U((Yo,Zo)=>{function PU(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();var f1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $x={exports:{}},Sv={};var P5;function IU(){if(P5)return Sv;P5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return Sv.Fragment=t,Sv.jsx=r,Sv.jsxs=r,Sv}var I5;function LU(){return I5||(I5=1,$x.exports=IU()),$x.exports}var k=LU(),Px={exports:{}},Wt={};var L5;function UU(){if(L5)return Wt;L5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function S(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function R(N,I,U){this.props=N,this.context=I,this.refs=E,this.updater=U||b}R.prototype.isReactComponent={},R.prototype.setState=function(N,I){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,I,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function w(){}w.prototype=R.prototype;function T(N,I,U){this.props=N,this.context=I,this.refs=E,this.updater=U||b}var x=T.prototype=new w;x.constructor=T,_(x,R.prototype),x.isPureReactComponent=!0;var O=Array.isArray;function C(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function $(N,I,U){var P=U.ref;return{$$typeof:e,type:N,key:I,ref:P!==void 0?P:null,props:U}}function q(N,I){return $(N.type,I,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function V(N){var I={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(U){return I[U]})}var F=/\/+/g;function re(N,I){return typeof N=="object"&&N!==null&&N.key!=null?V(""+N.key):I.toString(36)}function ae(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(C,C):(N.status="pending",N.then(function(I){N.status==="pending"&&(N.status="fulfilled",N.value=I)},function(I){N.status==="pending"&&(N.status="rejected",N.reason=I)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function K(N,I,U,P,G){var ee=typeof N;(ee==="undefined"||ee==="boolean")&&(N=null);var ue=!1;if(N===null)ue=!0;else switch(ee){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(N.$$typeof){case e:case t:ue=!0;break;case m:return ue=N._init,K(ue(N._payload),I,U,P,G)}}if(ue)return G=G(N),ue=P===""?"."+re(N,0):P,O(G)?(U="",ue!=null&&(U=ue.replace(F,"$&/")+"/"),K(G,I,U,"",function(Oe){return Oe})):G!=null&&(L(G)&&(G=q(G,U+(G.key==null||N&&N.key===G.key?"":(""+G.key).replace(F,"$&/")+"/")+ue)),I.push(G)),1;ue=0;var ve=P===""?".":P+":";if(O(N))for(var Ee=0;Ee<N.length;Ee++)P=N[Ee],ee=ve+re(P,Ee),ue+=K(P,I,U,ee,G);else if(Ee=S(N),typeof Ee=="function")for(N=Ee.call(N),Ee=0;!(P=N.next()).done;)P=P.value,ee=ve+re(P,Ee++),ue+=K(P,I,U,ee,G);else if(ee==="object"){if(typeof N.then=="function")return K(ae(N),I,U,P,G);throw I=String(N),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ue}function B(N,I,U){if(N==null)return N;var P=[],G=0;return K(N,P,"","",function(ee){return I.call(U,ee,G++)}),P}function Y(N){if(N._status===-1){var I=N._result;I=I(),I.then(function(U){(N._status===0||N._status===-1)&&(N._status=1,N._result=U)},function(U){(N._status===0||N._status===-1)&&(N._status=2,N._result=U)}),N._status===-1&&(N._status=0,N._result=I)}if(N._status===1)return N._result.default;throw N._result}var fe=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ie={map:B,forEach:function(N,I,U){B(N,function(){I.apply(this,arguments)},U)},count:function(N){var I=0;return B(N,function(){I++}),I},toArray:function(N){return B(N,function(I){return I})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Wt.Activity=g,Wt.Children=ie,Wt.Component=R,Wt.Fragment=r,Wt.Profiler=s,Wt.PureComponent=T,Wt.StrictMode=i,Wt.Suspense=d,Wt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Wt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return M.H.useMemoCache(N)}},Wt.cache=function(N){return function(){return N.apply(null,arguments)}},Wt.cacheSignal=function(){return null},Wt.cloneElement=function(N,I,U){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=_({},N.props),G=N.key;if(I!=null)for(ee in I.key!==void 0&&(G=""+I.key),I)!D.call(I,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&I.ref===void 0||(P[ee]=I[ee]);var ee=arguments.length-2;if(ee===1)P.children=U;else if(1<ee){for(var ue=Array(ee),ve=0;ve<ee;ve++)ue[ve]=arguments[ve+2];P.children=ue}return $(N.type,G,P)},Wt.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},Wt.createElement=function(N,I,U){var P,G={},ee=null;if(I!=null)for(P in I.key!==void 0&&(ee=""+I.key),I)D.call(I,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(G[P]=I[P]);var ue=arguments.length-2;if(ue===1)G.children=U;else if(1<ue){for(var ve=Array(ue),Ee=0;Ee<ue;Ee++)ve[Ee]=arguments[Ee+2];G.children=ve}if(N&&N.defaultProps)for(P in ue=N.defaultProps,ue)G[P]===void 0&&(G[P]=ue[P]);return $(N,ee,G)},Wt.createRef=function(){return{current:null}},Wt.forwardRef=function(N){return{$$typeof:f,render:N}},Wt.isValidElement=L,Wt.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Y}},Wt.memo=function(N,I){return{$$typeof:h,type:N,compare:I===void 0?null:I}},Wt.startTransition=function(N){var I=M.T,U={};M.T=U;try{var P=N(),G=M.S;G!==null&&G(U,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(C,fe)}catch(ee){fe(ee)}finally{I!==null&&U.types!==null&&(I.types=U.types),M.T=I}},Wt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Wt.use=function(N){return M.H.use(N)},Wt.useActionState=function(N,I,U){return M.H.useActionState(N,I,U)},Wt.useCallback=function(N,I){return M.H.useCallback(N,I)},Wt.useContext=function(N){return M.H.useContext(N)},Wt.useDebugValue=function(){},Wt.useDeferredValue=function(N,I){return M.H.useDeferredValue(N,I)},Wt.useEffect=function(N,I){return M.H.useEffect(N,I)},Wt.useEffectEvent=function(N){return M.H.useEffectEvent(N)},Wt.useId=function(){return M.H.useId()},Wt.useImperativeHandle=function(N,I,U){return M.H.useImperativeHandle(N,I,U)},Wt.useInsertionEffect=function(N,I){return M.H.useInsertionEffect(N,I)},Wt.useLayoutEffect=function(N,I){return M.H.useLayoutEffect(N,I)},Wt.useMemo=function(N,I){return M.H.useMemo(N,I)},Wt.useOptimistic=function(N,I){return M.H.useOptimistic(N,I)},Wt.useReducer=function(N,I,U){return M.H.useReducer(N,I,U)},Wt.useRef=function(N){return M.H.useRef(N)},Wt.useState=function(N){return M.H.useState(N)},Wt.useSyncExternalStore=function(N,I,U){return M.H.useSyncExternalStore(N,I,U)},Wt.useTransition=function(){return M.H.useTransition()},Wt.version="19.2.4",Wt}var U5;function bm(){return U5||(U5=1,Px.exports=UU()),Px.exports}var j=bm();const Bo=$l(j),jb=PU({__proto__:null,default:Bo},[j]);var Ix={exports:{}},wv={},Lx={exports:{}},Ux={};var q5;function qU(){return q5||(q5=1,(function(e){function t(K,B){var Y=K.length;K.push(B);e:for(;0<Y;){var fe=Y-1>>>1,ie=K[fe];if(0<s(ie,B))K[fe]=B,K[Y]=ie,Y=fe;else break e}}function r(K){return K.length===0?null:K[0]}function i(K){if(K.length===0)return null;var B=K[0],Y=K.pop();if(Y!==B){K[0]=Y;e:for(var fe=0,ie=K.length,N=ie>>>1;fe<N;){var I=2*(fe+1)-1,U=K[I],P=I+1,G=K[P];if(0>s(U,Y))P<ie&&0>s(G,U)?(K[fe]=G,K[P]=Y,fe=P):(K[fe]=U,K[I]=Y,fe=I);else if(P<ie&&0>s(G,Y))K[fe]=G,K[P]=Y,fe=P;else break e}}return B}function s(K,B){var Y=K.sortIndex-B.sortIndex;return Y!==0?Y:K.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],m=1,g=null,v=3,S=!1,b=!1,_=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function x(K){for(var B=r(h);B!==null;){if(B.callback===null)i(h);else if(B.startTime<=K)i(h),B.sortIndex=B.expirationTime,t(d,B);else break;B=r(h)}}function O(K){if(_=!1,x(K),!b)if(r(d)!==null)b=!0,C||(C=!0,V());else{var B=r(h);B!==null&&ae(O,B.startTime-K)}}var C=!1,M=-1,D=5,$=-1;function q(){return E?!0:!(e.unstable_now()-$<D)}function L(){if(E=!1,C){var K=e.unstable_now();$=K;var B=!0;try{e:{b=!1,_&&(_=!1,w(M),M=-1),S=!0;var Y=v;try{t:{for(x(K),g=r(d);g!==null&&!(g.expirationTime>K&&q());){var fe=g.callback;if(typeof fe=="function"){g.callback=null,v=g.priorityLevel;var ie=fe(g.expirationTime<=K);if(K=e.unstable_now(),typeof ie=="function"){g.callback=ie,x(K),B=!0;break t}g===r(d)&&i(d),x(K)}else i(d);g=r(d)}if(g!==null)B=!0;else{var N=r(h);N!==null&&ae(O,N.startTime-K),B=!1}}break e}finally{g=null,v=Y,S=!1}B=void 0}}finally{B?V():C=!1}}}var V;if(typeof T=="function")V=function(){T(L)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,re=F.port2;F.port1.onmessage=L,V=function(){re.postMessage(null)}}else V=function(){R(L,0)};function ae(K,B){M=R(function(){K(e.unstable_now())},B)}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(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(K){switch(v){case 1:case 2:case 3:var B=3;break;default:B=v}var Y=v;v=B;try{return K()}finally{v=Y}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(K,B){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Y=v;v=K;try{return B()}finally{v=Y}},e.unstable_scheduleCallback=function(K,B,Y){var fe=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?fe+Y:fe):Y=fe,K){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=Y+ie,K={id:m++,callback:B,priorityLevel:K,startTime:Y,expirationTime:ie,sortIndex:-1},Y>fe?(K.sortIndex=Y,t(h,K),r(d)===null&&K===r(h)&&(_?(w(M),M=-1):_=!0,ae(O,Y-fe))):(K.sortIndex=ie,t(d,K),b||S||(b=!0,C||(C=!0,V()))),K},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(K){var B=v;return function(){var Y=v;v=B;try{return K.apply(this,arguments)}finally{v=Y}}}})(Ux)),Ux}var V5;function LN(){return V5||(V5=1,Lx.exports=qU()),Lx.exports}var qx={exports:{}},xi={};var F5;function VU(){if(F5)return xi;F5=1;var e=bm();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,xi.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(d,h,null,m)},xi.flushSync=function(d){var h=c.T,m=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=m,i.d.f()}},xi.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},xi.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},xi.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:S}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xi.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},xi.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},xi.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},xi.requestFormReset=function(d){i.d.r(d)},xi.unstable_batchedUpdates=function(d,h){return d(h)},xi.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},xi.useFormStatus=function(){return c.H.useHostTransitionStatus()},xi.version="19.2.4",xi}var B5;function UN(){if(B5)return qx.exports;B5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qx.exports=VU(),qx.exports}var H5;function FU(){if(H5)return wv;H5=1;var e=LN(),t=bm(),r=UN();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(l(n)!==n)throw Error(i(188))}function h(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===u)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=y;else{for(var A=!1,z=p.child;z;){if(z===o){A=!0,o=p,u=y;break}if(z===u){A=!0,u=p,o=y;break}z=z.sibling}if(!A){for(z=y.child;z;){if(z===o){A=!0,o=y,u=p;break}if(z===u){A=!0,u=y,o=p;break}z=z.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function m(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=m(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),T=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var F=Symbol.for("react.client.reference");function re(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===F?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case C:return"SuspenseList";case $:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case T:return n.displayName||"Context";case w:return(n._context.displayName||"Context")+".Consumer";case x:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return a=n.displayName||null,a!==null?a:re(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return re(n(a))}catch{}}return null}var ae=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},fe=[],ie=-1;function N(n){return{current:n}}function I(n){0>ie||(n.current=fe[ie],fe[ie]=null,ie--)}function U(n,a){ie++,fe[ie]=n.current,n.current=a}var P=N(null),G=N(null),ee=N(null),ue=N(null);function ve(n,a){switch(U(ee,a),U(G,n),U(P,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?F0(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=F0(a),n=B0(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(P),U(P,n)}function Ee(){I(P),I(G),I(ee)}function Oe(n){n.memoizedState!==null&&U(ue,n);var a=P.current,o=B0(a,n.type);a!==o&&(U(G,n),U(P,o))}function de(n){G.current===n&&(I(P),I(G)),ue.current===n&&(I(ue),nl._currentValue=Y)}var te,Se;function we(n){if(te===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",Se=-1<o.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+te+n+Se}var $e=!1;function Te(n,a){if(!n||$e)return"";$e=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ce){var le=ce}Reflect.construct(n,[],me)}else{try{me.call()}catch(ce){le=ce}n.call(me.prototype)}}else{try{throw Error()}catch(ce){le=ce}(me=n())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),A=y[0],z=y[1];if(A&&z){var H=A.split(`
4
+ `),se=z.split(`
5
+ `);for(p=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(u===H.length||p===se.length)for(u=H.length-1,p=se.length-1;1<=u&&0<=p&&H[u]!==se[p];)p--;for(;1<=u&&0<=p;u--,p--)if(H[u]!==se[p]){if(u!==1||p!==1)do if(u--,p--,0>p||H[u]!==se[p]){var he=`
6
+ `+H[u].replace(" at new "," at ");return n.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",n.displayName)),he}while(1<=u&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?we(o):""}function Pe(n,a){switch(n.tag){case 26:case 27:case 5:return we(n.type);case 16:return we("Lazy");case 13:return n.child!==a&&a!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Te(n.type,!1);case 11:return Te(n.type.render,!1);case 1:return Te(n.type,!0);case 31:return we("Activity");default:return""}}function Ge(n){try{var a="",o=null;do a+=Pe(n,o),o=n,n=n.return;while(n);return a}catch(u){return`
7
+ Error generating stack: `+u.message+`
8
+ `+u.stack}}var Ce=Object.prototype.hasOwnProperty,Be=e.unstable_scheduleCallback,Fe=e.unstable_cancelCallback,Je=e.unstable_shouldYield,ke=e.unstable_requestPaint,Ue=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Mt=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,vt=e.log,Xt=e.unstable_setDisableYieldValue,Vt=null,wt=null;function Ht(n){if(typeof vt=="function"&&Xt(n),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(Vt,n)}catch{}}var Rt=Math.clz32?Math.clz32:Gt,Qt=Math.log,_n=Math.LN2;function Gt(n){return n>>>=0,n===0?32:31-(Qt(n)/_n|0)|0}var Tn=256,En=262144,Pn=4194304;function Dt(n){var a=n&42;if(a!==0)return a;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function xn(n,a,o){var u=n.pendingLanes;if(u===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var z=u&134217727;return z!==0?(u=z&~y,u!==0?p=Dt(u):(A&=z,A!==0?p=Dt(A):o||(o=z&~n,o!==0&&(p=Dt(o))))):(z=u&~y,z!==0?p=Dt(z):A!==0?p=Dt(A):o||(o=u&~n,o!==0&&(p=Dt(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function Kt(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function sr(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32: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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sr(){var n=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),n}function qr(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function ft(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function tn(n,a,o,u,p,y){var A=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var z=n.entanglements,H=n.expirationTimes,se=n.hiddenUpdates;for(o=A&~o;0<o;){var he=31-Rt(o),me=1<<he;z[he]=0,H[he]=-1;var le=se[he];if(le!==null)for(se[he]=null,he=0;he<le.length;he++){var ce=le[he];ce!==null&&(ce.lane&=-536870913)}o&=~me}u!==0&&Fn(n,u,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function Fn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-Rt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function on(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var u=31-Rt(o),p=1<<u;p&a|n[u]&a&&(n[u]|=a),o&=~p}}function Cn(n,a){var o=a&-a;return o=(o&42)!==0?1:Ft(o),(o&(n.suspendedLanes|a))!==0?0:o}function Ft(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Vr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Pr(){var n=B.p;return n!==0?n:(n=window.event,n===void 0?32:hv(n.type))}function $a(n,a){var o=B.p;try{return B.p=n,a()}finally{B.p=o}}var tr=Math.random().toString(36).slice(2),$t="__reactFiber$"+tr,sn="__reactProps$"+tr,Ir="__reactContainer$"+tr,Ua="__reactEvents$"+tr,ts="__reactListeners$"+tr,gf="__reactHandles$"+tr,gl="__reactResources$"+tr,co="__reactMarker$"+tr;function Vl(n){delete n[$t],delete n[sn],delete n[Ua],delete n[ts],delete n[gf]}function Oi(n){var a=n[$t];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Ir]||o[$t]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Q0(n);n!==null;){if(o=n[$t])return o;n=Q0(n)}return a}n=o,o=n.parentNode}return null}function Ri(n){if(n=n[$t]||n[Ir]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function fo(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Ai(n){var a=n[gl];return a||(a=n[gl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function yn(n){n[co]=!0}var bc=new Set,Fl={};function qa(n,a){wi(n,a),wi(n+"Capture",a)}function wi(n,a){for(Fl[n]=a,n=0;n<a.length;n++)bc.add(a[n])}var Fm=RegExp("^[: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]*$"),Bl={},Pa={};function fp(n){return Ce.call(Pa,n)?!0:Ce.call(Bl,n)?!1:Fm.test(n)?Pa[n]=!0:(Bl[n]=!0,!1)}function ws(n,a,o){if(fp(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function ns(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function Wr(n,a,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+u)}}function nr(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Sc(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Bm(n,a,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){o=""+A,y.call(this,A)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function yl(n){if(!n._valueTracker){var a=Sc(n)?"checked":"value";n._valueTracker=Bm(n,a,""+n[a])}}function yf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return n&&(u=Sc(n)?n.checked?"true":"false":n.value),n=u,n!==o?(a.setValue(n),!0):!1}function ho(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Hm=/[\n"\\]/g;function Bn(n){return n.replace(Hm,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Hl(n,a,o,u,p,y,A,z){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),a!=null?A==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+nr(a)):n.value!==""+nr(a)&&(n.value=""+nr(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?Gl(n,A,nr(a)):o!=null?Gl(n,A,nr(o)):u!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?n.name=""+nr(z):n.removeAttribute("name")}function vf(n,a,o,u,p,y,A,z){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){yl(n);return}o=o!=null?""+nr(o):"",a=a!=null?""+nr(a):o,z||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=z?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),yl(n)}function Gl(n,a,o){a==="number"&&ho(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Mi(n,a,o,u){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&u&&(n[o].defaultSelected=!0)}else{for(o=""+nr(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function vl(n,a,o){if(a!=null&&(a=""+nr(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+nr(o):""}function bf(n,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=nr(a),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),yl(n)}function ne(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Z=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function X(n,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,o):typeof o!="number"||o===0||Z.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function W(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&X(n,p,u)}else for(var y in a)a.hasOwnProperty(y)&&X(n,y,a[y])}function ge(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Re=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_e=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ye(n){return _e.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Me(){}var Ie=null;function Ye(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var He=null,lt=null;function We(n){var a=Ri(n);if(a&&(n=a.stateNode)){var o=n[sn]||null;e:switch(n=a.stateNode,a.type){case"input":if(Hl(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Bn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==n&&u.form===n.form){var p=u[sn]||null;if(!p)throw Error(i(90));Hl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===n.form&&yf(u)}break e;case"textarea":vl(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Mi(n,!!o.multiple,a,!1)}}}var Bt=!1;function hn(n,a,o){if(Bt)return n(a,o);Bt=!0;try{var u=n(a);return u}finally{if(Bt=!1,(He!==null||lt!==null)&&(Mu(),He&&(a=He,n=lt,lt=He=null,We(a),n)))for(a=0;a<n.length;a++)We(n[a])}}function bt(n,a){var o=n.stateNode;if(o===null)return null;var u=o[sn]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wr=!1;if(jt)try{var An={};Object.defineProperty(An,"passive",{get:function(){wr=!0}}),window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch{wr=!1}var rr=null,Jr=null,ji=null;function rs(){if(ji)return ji;var n,a=Jr,o=a.length,u,p="value"in rr?rr.value:rr.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(u=1;u<=A&&a[o-u]===p[y-u];u++);return ji=p.slice(n,1<u?1-u:void 0)}function Ei(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function la(){return!0}function wc(){return!1}function Ln(n){function a(o,u,p,y,A){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var z in n)n.hasOwnProperty(z)&&(o=n[z],this[z]=o?o(y):y[z]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?la:wc,this.isPropagationStopped=wc,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=la)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),a}var Ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=Ln(Ia),Di=g({},Ia,{view:0,detail:0}),Sf=Ln(Di),Es,Kl,no,Yl=g({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ef,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==no&&(no&&n.type==="mousemove"?(Es=n.screenX-no.screenX,Kl=n.screenY-no.screenY):Kl=Es=0,no=n),Es)},movementY:function(n){return"movementY"in n?n.movementY:Kl}}),Gm=Ln(Yl),z2=g({},Yl,{dataTransfer:0}),$2=Ln(z2),P2=g({},Di,{relatedTarget:0}),wf=Ln(P2),I2=g({},Ia,{animationName:0,elapsedTime:0,pseudoElement:0}),L2=Ln(I2),U2=g({},Ia,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),q2=Ln(U2),V2=g({},Ia,{data:0}),Km=Ln(V2),F2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},B2={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"},H2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G2(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=H2[n])?!!a[n]:!1}function Ef(){return G2}var K2=g({},Di,{key:function(n){if(n.key){var a=F2[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ei(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?B2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ef,charCode:function(n){return n.type==="keypress"?Ei(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ei(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Y2=Ln(K2),Z2=g({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ym=Ln(Z2),X2=g({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ef}),Q2=Ln(X2),W2=g({},Ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),J2=Ln(W2),eE=g({},Yl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),tE=Ln(eE),nE=g({},Ia,{newState:0,oldState:0}),rE=Ln(nE),aE=[9,13,27,32],xf=jt&&"CompositionEvent"in window,xs=null;jt&&"documentMode"in document&&(xs=document.documentMode);var iE=jt&&"TextEvent"in window&&!xs,Zm=jt&&(!xf||xs&&8<xs&&11>=xs),Xm=" ",Qm=!1;function Wm(n,a){switch(n){case"keyup":return aE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jm(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var po=!1;function oE(n,a){switch(n){case"compositionend":return Jm(a);case"keypress":return a.which!==32?null:(Qm=!0,Xm);case"textInput":return n=a.data,n===Xm&&Qm?null:n;default:return null}}function sE(n,a){if(po)return n==="compositionend"||!xf&&Wm(n,a)?(n=rs(),ji=Jr=rr=null,po=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Zm&&a.locale!=="ko"?null:a.data;default:return null}}var lE={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 eg(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!lE[n.type]:a==="textarea"}function tg(n,a,o,u){He?lt?lt.push(u):lt=[u]:He=u,a=Pu(a,"onChange"),0<a.length&&(o=new ki("onChange","change",null,o,u),n.push({event:o,listeners:a}))}var _s=null,Ts=null;function uE(n){P0(n,0)}function Zl(n){var a=fo(n);if(yf(a))return n}function ng(n,a){if(n==="change")return a}var rg=!1;if(jt){var _f;if(jt){var Tf="oninput"in document;if(!Tf){var ag=document.createElement("div");ag.setAttribute("oninput","return;"),Tf=typeof ag.oninput=="function"}_f=Tf}else _f=!1;rg=_f&&(!document.documentMode||9<document.documentMode)}function ig(){_s&&(_s.detachEvent("onpropertychange",og),Ts=_s=null)}function og(n){if(n.propertyName==="value"&&Zl(Ts)){var a=[];tg(a,Ts,n,Ye(n)),hn(uE,a)}}function cE(n,a,o){n==="focusin"?(ig(),_s=a,Ts=o,_s.attachEvent("onpropertychange",og)):n==="focusout"&&ig()}function fE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Zl(Ts)}function dE(n,a){if(n==="click")return Zl(a)}function hE(n,a){if(n==="input"||n==="change")return Zl(a)}function pE(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var lr=typeof Object.is=="function"?Object.is:pE;function Cs(n,a){if(lr(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!Ce.call(a,p)||!lr(n[p],a[p]))return!1}return!0}function sg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function lg(n,a){var o=sg(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=a&&u>=a)return{node:o,offset:a-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=sg(o)}}function ug(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?ug(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function cg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=ho(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=ho(n.document)}return a}function Cf(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var mE=jt&&"documentMode"in document&&11>=document.documentMode,mo=null,Of=null,Os=null,Rf=!1;function fg(n,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Rf||mo==null||mo!==ho(u)||(u=mo,"selectionStart"in u&&Cf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Os&&Cs(Os,u)||(Os=u,u=Pu(Of,"onSelect"),0<u.length&&(a=new ki("onSelect","select",null,a,o),n.push({event:a,listeners:u}),a.target=mo)))}function Ni(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var go={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},Af={},dg={};jt&&(dg=document.createElement("div").style,"AnimationEvent"in window||(delete go.animationend.animation,delete go.animationiteration.animation,delete go.animationstart.animation),"TransitionEvent"in window||delete go.transitionend.transition);function zi(n){if(Af[n])return Af[n];if(!go[n])return n;var a=go[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in dg)return Af[n]=a[o];return n}var hg=zi("animationend"),pg=zi("animationiteration"),mg=zi("animationstart"),gE=zi("transitionrun"),yE=zi("transitionstart"),vE=zi("transitioncancel"),gg=zi("transitionend"),yg=new Map,Mf="abort auxClick beforeToggle 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(" ");Mf.push("scrollEnd");function Fr(n,a){yg.set(n,a),qa(a,[n])}var Xl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Er=[],yo=0,jf=0;function Ql(){for(var n=yo,a=jf=yo=0;a<n;){var o=Er[a];Er[a++]=null;var u=Er[a];Er[a++]=null;var p=Er[a];Er[a++]=null;var y=Er[a];if(Er[a++]=null,u!==null&&p!==null){var A=u.pending;A===null?p.next=p:(p.next=A.next,A.next=p),u.pending=p}y!==0&&vg(o,p,y)}}function Wl(n,a,o,u){Er[yo++]=n,Er[yo++]=a,Er[yo++]=o,Er[yo++]=u,jf|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function kf(n,a,o,u){return Wl(n,a,o,u),Jl(n)}function $i(n,a){return Wl(n,null,null,a),Jl(n)}function vg(n,a,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&a!==null&&(p=31-Rt(o),n=y.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function Jl(n){if(50<Zs)throw Zs=0,qd=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var vo={};function bE(n,a,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(n,a,o,u){return new bE(n,a,o,u)}function Df(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pa(n,a){var o=n.alternate;return o===null?(o=ur(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function bg(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function eu(n,a,o,u,p,y){var A=0;if(u=n,typeof n=="function")Df(n)&&(A=1);else if(typeof n=="string")A=_x(n,o,P.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case $:return n=ur(31,o,a,p),n.elementType=$,n.lanes=y,n;case _:return Pi(o.children,p,y,a);case E:A=8,p|=24;break;case R:return n=ur(12,o,a,p|2),n.elementType=R,n.lanes=y,n;case O:return n=ur(13,o,a,p),n.elementType=O,n.lanes=y,n;case C:return n=ur(19,o,a,p),n.elementType=C,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:A=10;break e;case w:A=9;break e;case x:A=11;break e;case M:A=14;break e;case D:A=16,u=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=ur(A,o,a,p),a.elementType=n,a.type=u,a.lanes=y,a}function Pi(n,a,o,u){return n=ur(7,n,u,a),n.lanes=o,n}function Nf(n,a,o){return n=ur(6,n,null,a),n.lanes=o,n}function Sg(n){var a=ur(18,null,null,0);return a.stateNode=n,a}function zf(n,a,o){return a=ur(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var wg=new WeakMap;function xr(n,a){if(typeof n=="object"&&n!==null){var o=wg.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Ge(a)},wg.set(n,a),a)}return{value:n,source:a,stack:Ge(a)}}var bo=[],So=0,tu=null,Rs=0,_r=[],Tr=0,Va=null,na=1,ra="";function ma(n,a){bo[So++]=Rs,bo[So++]=tu,tu=n,Rs=a}function Eg(n,a,o){_r[Tr++]=na,_r[Tr++]=ra,_r[Tr++]=Va,Va=n;var u=na;n=ra;var p=32-Rt(u)-1;u&=~(1<<p),o+=1;var y=32-Rt(a)+p;if(30<y){var A=p-p%5;y=(u&(1<<A)-1).toString(32),u>>=A,p-=A,na=1<<32-Rt(a)+p|o<<p|u,ra=y+n}else na=1<<y|o<<p|u,ra=n}function $f(n){n.return!==null&&(ma(n,1),Eg(n,1,0))}function Pf(n){for(;n===tu;)tu=bo[--So],bo[So]=null,Rs=bo[--So],bo[So]=null;for(;n===Va;)Va=_r[--Tr],_r[Tr]=null,ra=_r[--Tr],_r[Tr]=null,na=_r[--Tr],_r[Tr]=null}function xg(n,a){_r[Tr++]=na,_r[Tr++]=ra,_r[Tr++]=Va,na=a.id,ra=a.overflow,Va=n}var jn=null,Nt=null,st=!1,Fa=null,Cr=!1,If=Error(i(519));function Ba(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw As(xr(a,n)),If}function _g(n){var a=n.stateNode,o=n.type,u=n.memoizedProps;switch(a[$t]=n,a[sn]=u,o){case"dialog":nt("cancel",a),nt("close",a);break;case"iframe":case"object":case"embed":nt("load",a);break;case"video":case"audio":for(o=0;o<Qs.length;o++)nt(Qs[o],a);break;case"source":nt("error",a);break;case"img":case"image":case"link":nt("error",a),nt("load",a);break;case"details":nt("toggle",a);break;case"input":nt("invalid",a),vf(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":nt("invalid",a);break;case"textarea":nt("invalid",a),bf(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||q0(a.textContent,o)?(u.popover!=null&&(nt("beforetoggle",a),nt("toggle",a)),u.onScroll!=null&&nt("scroll",a),u.onScrollEnd!=null&&nt("scrollend",a),u.onClick!=null&&(a.onclick=Me),a=!0):a=!1,a||Ba(n,!0)}function Tg(n){for(jn=n.return;jn;)switch(jn.tag){case 5:case 31:case 13:Cr=!1;return;case 27:case 3:Cr=!0;return;default:jn=jn.return}}function wo(n){if(n!==jn)return!1;if(!st)return Tg(n),st=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||nh(n.type,n.memoizedProps)),o=!o),o&&Nt&&Ba(n),Tg(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=X0(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=X0(n)}else a===27?(a=Nt,ai(n.type)?(n=sh,sh=null,Nt=n):Nt=a):Nt=jn?Rr(n.stateNode.nextSibling):null;return!0}function Ii(){Nt=jn=null,st=!1}function Lf(){var n=Fa;return n!==null&&(Wn===null?Wn=n:Wn.push.apply(Wn,n),Fa=null),n}function As(n){Fa===null?Fa=[n]:Fa.push(n)}var Uf=N(null),Li=null,ga=null;function Ha(n,a,o){U(Uf,a._currentValue),a._currentValue=o}function ya(n){n._currentValue=Uf.current,I(Uf)}function qf(n,a,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===o)break;n=n.return}}function Vf(n,a,o,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var A=p.child;y=y.firstContext;e:for(;y!==null;){var z=y;y=p;for(var H=0;H<a.length;H++)if(z.context===a[H]){y.lanes|=o,z=y.alternate,z!==null&&(z.lanes|=o),qf(y.return,o,n),u||(A=null);break e}y=z.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(i(341));A.lanes|=o,y=A.alternate,y!==null&&(y.lanes|=o),qf(A,o,n),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===n){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function Eo(n,a,o,u){n=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var z=p.type;lr(p.pendingProps.value,A.value)||(n!==null?n.push(z):n=[z])}}else if(p===ue.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(nl):n=[nl])}p=p.return}n!==null&&Vf(a,n,o,u),a.flags|=262144}function nu(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ui(n){Li=n,ga=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kn(n){return Cg(Li,n)}function ru(n,a){return Li===null&&Ui(n),Cg(n,a)}function Cg(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ga===null){if(n===null)throw Error(i(308));ga=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ga=ga.next=a;return o}var SE=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},wE=e.unstable_scheduleCallback,EE=e.unstable_NormalPriority,ln={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new SE,data:new Map,refCount:0}}function Ms(n){n.refCount--,n.refCount===0&&wE(EE,function(){n.controller.abort()})}var js=null,Bf=0,xo=0,_o=null;function xE(n,a){if(js===null){var o=js=[];Bf=0,xo=Kd(),_o={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Bf++,a.then(Og,Og),a}function Og(){if(--Bf===0&&js!==null){_o!==null&&(_o.status="fulfilled");var n=js;js=null,xo=0,_o=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function _E(n,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Rg=K.S;K.S=function(n,a){f0=Ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&xE(n,a),Rg!==null&&Rg(n,a)};var qi=N(null);function Hf(){var n=qi.current;return n!==null?n:At.pooledCache}function au(n,a){a===null?U(qi,qi.current):U(qi,a.pool)}function Ag(){var n=Hf();return n===null?null:{parent:ln._currentValue,pool:n}}var To=Error(i(460)),Gf=Error(i(474)),iu=Error(i(542)),ou={then:function(){}};function Mg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function jg(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Me,Me),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Dg(n),n;default:if(typeof a.status=="string")a.then(Me,Me);else{if(n=At,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Dg(n),n}throw Fi=a,To}}function Vi(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Fi=o,To):o}}var Fi=null;function kg(){if(Fi===null)throw Error(i(459));var n=Fi;return Fi=null,n}function Dg(n){if(n===To||n===iu)throw Error(i(483))}var Co=null,ks=0;function su(n){var a=ks;return ks+=1,Co===null&&(Co=[]),jg(Co,n,a)}function Ds(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function lu(n,a){throw a.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function Ng(n){function a(J,Q){if(n){var oe=J.deletions;oe===null?(J.deletions=[Q],J.flags|=16):oe.push(Q)}}function o(J,Q){if(!n)return null;for(;Q!==null;)a(J,Q),Q=Q.sibling;return null}function u(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function p(J,Q){return J=pa(J,Q),J.index=0,J.sibling=null,J}function y(J,Q,oe){return J.index=oe,n?(oe=J.alternate,oe!==null?(oe=oe.index,oe<Q?(J.flags|=67108866,Q):oe):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function A(J){return n&&J.alternate===null&&(J.flags|=67108866),J}function z(J,Q,oe,pe){return Q===null||Q.tag!==6?(Q=Nf(oe,J.mode,pe),Q.return=J,Q):(Q=p(Q,oe),Q.return=J,Q)}function H(J,Q,oe,pe){var Le=oe.type;return Le===_?he(J,Q,oe.props.children,pe,oe.key):Q!==null&&(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type)?(Q=p(Q,oe.props),Ds(Q,oe),Q.return=J,Q):(Q=eu(oe.type,oe.key,oe.props,null,J.mode,pe),Ds(Q,oe),Q.return=J,Q)}function se(J,Q,oe,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==oe.containerInfo||Q.stateNode.implementation!==oe.implementation?(Q=zf(oe,J.mode,pe),Q.return=J,Q):(Q=p(Q,oe.children||[]),Q.return=J,Q)}function he(J,Q,oe,pe,Le){return Q===null||Q.tag!==7?(Q=Pi(oe,J.mode,pe,Le),Q.return=J,Q):(Q=p(Q,oe),Q.return=J,Q)}function me(J,Q,oe){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Nf(""+Q,J.mode,oe),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case S:return oe=eu(Q.type,Q.key,Q.props,null,J.mode,oe),Ds(oe,Q),oe.return=J,oe;case b:return Q=zf(Q,J.mode,oe),Q.return=J,Q;case D:return Q=Vi(Q),me(J,Q,oe)}if(ae(Q)||V(Q))return Q=Pi(Q,J.mode,oe,null),Q.return=J,Q;if(typeof Q.then=="function")return me(J,su(Q),oe);if(Q.$$typeof===T)return me(J,ru(J,Q),oe);lu(J,Q)}return null}function le(J,Q,oe,pe){var Le=Q!==null?Q.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Le!==null?null:z(J,Q,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return oe.key===Le?H(J,Q,oe,pe):null;case b:return oe.key===Le?se(J,Q,oe,pe):null;case D:return oe=Vi(oe),le(J,Q,oe,pe)}if(ae(oe)||V(oe))return Le!==null?null:he(J,Q,oe,pe,null);if(typeof oe.then=="function")return le(J,Q,su(oe),pe);if(oe.$$typeof===T)return le(J,Q,ru(J,oe),pe);lu(J,oe)}return null}function ce(J,Q,oe,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(oe)||null,z(Q,J,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:return J=J.get(pe.key===null?oe:pe.key)||null,H(Q,J,pe,Le);case b:return J=J.get(pe.key===null?oe:pe.key)||null,se(Q,J,pe,Le);case D:return pe=Vi(pe),ce(J,Q,oe,pe,Le)}if(ae(pe)||V(pe))return J=J.get(oe)||null,he(Q,J,pe,Le,null);if(typeof pe.then=="function")return ce(J,Q,oe,su(pe),Le);if(pe.$$typeof===T)return ce(J,Q,oe,ru(Q,pe),Le);lu(Q,pe)}return null}function je(J,Q,oe,pe){for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null;ze!==null&&Qe<oe.length;Qe++){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ht=le(J,ze,oe[Qe],pe);if(ht===null){ze===null&&(ze=it);break}n&&ze&&ht.alternate===null&&a(J,ze),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht,ze=it}if(Qe===oe.length)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;Qe<oe.length;Qe++)ze=me(J,oe[Qe],pe),ze!==null&&(Q=y(ze,Q,Qe),dt===null?Le=ze:dt.sibling=ze,dt=ze);return st&&ma(J,Qe),Le}for(ze=u(ze);Qe<oe.length;Qe++)it=ce(ze,J,Qe,oe[Qe],pe),it!==null&&(n&&it.alternate!==null&&ze.delete(it.key===null?Qe:it.key),Q=y(it,Q,Qe),dt===null?Le=it:dt.sibling=it,dt=it);return n&&ze.forEach(function(ui){return a(J,ui)}),st&&ma(J,Qe),Le}function qe(J,Q,oe,pe){if(oe==null)throw Error(i(151));for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null,ht=oe.next();ze!==null&&!ht.done;Qe++,ht=oe.next()){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ui=le(J,ze,ht.value,pe);if(ui===null){ze===null&&(ze=it);break}n&&ze&&ui.alternate===null&&a(J,ze),Q=y(ui,Q,Qe),dt===null?Le=ui:dt.sibling=ui,dt=ui,ze=it}if(ht.done)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;!ht.done;Qe++,ht=oe.next())ht=me(J,ht.value,pe),ht!==null&&(Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return st&&ma(J,Qe),Le}for(ze=u(ze);!ht.done;Qe++,ht=oe.next())ht=ce(ze,J,Qe,ht.value,pe),ht!==null&&(n&&ht.alternate!==null&&ze.delete(ht.key===null?Qe:ht.key),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return n&&ze.forEach(function(zx){return a(J,zx)}),st&&ma(J,Qe),Le}function Ot(J,Q,oe,pe){if(typeof oe=="object"&&oe!==null&&oe.type===_&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:e:{for(var Le=oe.key;Q!==null;){if(Q.key===Le){if(Le=oe.type,Le===_){if(Q.tag===7){o(J,Q.sibling),pe=p(Q,oe.props.children),pe.return=J,J=pe;break e}}else if(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type){o(J,Q.sibling),pe=p(Q,oe.props),Ds(pe,oe),pe.return=J,J=pe;break e}o(J,Q);break}else a(J,Q);Q=Q.sibling}oe.type===_?(pe=Pi(oe.props.children,J.mode,pe,oe.key),pe.return=J,J=pe):(pe=eu(oe.type,oe.key,oe.props,null,J.mode,pe),Ds(pe,oe),pe.return=J,J=pe)}return A(J);case b:e:{for(Le=oe.key;Q!==null;){if(Q.key===Le)if(Q.tag===4&&Q.stateNode.containerInfo===oe.containerInfo&&Q.stateNode.implementation===oe.implementation){o(J,Q.sibling),pe=p(Q,oe.children||[]),pe.return=J,J=pe;break e}else{o(J,Q);break}else a(J,Q);Q=Q.sibling}pe=zf(oe,J.mode,pe),pe.return=J,J=pe}return A(J);case D:return oe=Vi(oe),Ot(J,Q,oe,pe)}if(ae(oe))return je(J,Q,oe,pe);if(V(oe)){if(Le=V(oe),typeof Le!="function")throw Error(i(150));return oe=Le.call(oe),qe(J,Q,oe,pe)}if(typeof oe.then=="function")return Ot(J,Q,su(oe),pe);if(oe.$$typeof===T)return Ot(J,Q,ru(J,oe),pe);lu(J,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,Q!==null&&Q.tag===6?(o(J,Q.sibling),pe=p(Q,oe),pe.return=J,J=pe):(o(J,Q),pe=Nf(oe,J.mode,pe),pe.return=J,J=pe),A(J)):o(J,Q)}return function(J,Q,oe,pe){try{ks=0;var Le=Ot(J,Q,oe,pe);return Co=null,Le}catch(ze){if(ze===To||ze===iu)throw ze;var dt=ur(29,ze,null,J.mode);return dt.lanes=pe,dt.return=J,dt}}}var Bi=Ng(!0),zg=Ng(!1),Ga=!1;function Kf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yf(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ka(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ya(n,a,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(yt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=Jl(n),vg(n,null,o),a}return Wl(n,u,a,o),Jl(n)}function Ns(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}function Zf(n,a){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var A={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=A:y=y.next=A,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Xf=!1;function zs(){if(Xf){var n=_o;if(n!==null)throw n}}function $s(n,a,o,u){Xf=!1;var p=n.updateQueue;Ga=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var H=z,se=H.next;H.next=null,A===null?y=se:A.next=se,A=H;var he=n.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==A&&(z===null?he.firstBaseUpdate=se:z.next=se,he.lastBaseUpdate=H))}if(y!==null){var me=p.baseState;A=0,he=se=H=null,z=y;do{var le=z.lane&-536870913,ce=le!==z.lane;if(ce?(at&le)===le:(u&le)===le){le!==0&&le===xo&&(Xf=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var je=n,qe=z;le=a;var Ot=o;switch(qe.tag){case 1:if(je=qe.payload,typeof je=="function"){me=je.call(Ot,me,le);break e}me=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=qe.payload,le=typeof je=="function"?je.call(Ot,me,le):je,le==null)break e;me=g({},me,le);break e;case 2:Ga=!0}}le=z.callback,le!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(se=he=ce,H=me):he=he.next=ce,A|=le;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;ce=z,z=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);he===null&&(H=me),p.baseState=H,p.firstBaseUpdate=se,p.lastBaseUpdate=he,y===null&&(p.shared.lanes=0),Ja|=A,n.lanes=A,n.memoizedState=me}}function $g(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function Pg(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)$g(o[n],a)}var Oo=N(null),uu=N(0);function Ig(n,a){n=Ca,U(uu,n),U(Oo,a),Ca=n|a.baseLanes}function Qf(){U(uu,Ca),U(Oo,Oo.current)}function Wf(){Ca=uu.current,I(Oo),I(uu)}var cr=N(null),Or=null;function Za(n){var a=n.alternate;U(nn,nn.current&1),U(cr,n),Or===null&&(a===null||Oo.current!==null||a.memoizedState!==null)&&(Or=n)}function Jf(n){U(nn,nn.current),U(cr,n),Or===null&&(Or=n)}function Lg(n){n.tag===22?(U(nn,nn.current),U(cr,n),Or===null&&(Or=n)):Xa()}function Xa(){U(nn,nn.current),U(cr,cr.current)}function fr(n){I(cr),Or===n&&(Or=null),I(nn)}var nn=N(0);function cu(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||ih(o)||oh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var va=0,Ze=null,Tt=null,un=null,fu=!1,Ro=!1,Hi=!1,du=0,Ps=0,Ao=null,TE=0;function Yt(){throw Error(i(321))}function ed(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!lr(n[o],a[o]))return!1;return!0}function td(n,a,o,u,p,y){return va=y,Ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?Ey:gd,Hi=!1,y=o(u,p),Hi=!1,Ro&&(y=qg(a,o,u,p)),Ug(n),y}function Ug(n){K.H=Us;var a=Tt!==null&&Tt.next!==null;if(va=0,un=Tt=Ze=null,fu=!1,Ps=0,Ao=null,a)throw Error(i(300));n===null||cn||(n=n.dependencies,n!==null&&nu(n)&&(cn=!0))}function qg(n,a,o,u){Ze=n;var p=0;do{if(Ro&&(Ao=null),Ps=0,Ro=!1,25<=p)throw Error(i(301));if(p+=1,un=Tt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}K.H=xy,y=a(o,u)}while(Ro);return y}function CE(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?Is(a):a,n=n.useState()[0],(Tt!==null?Tt.memoizedState:null)!==n&&(Ze.flags|=1024),a}function nd(){var n=du!==0;return du=0,n}function rd(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function ad(n){if(fu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}fu=!1}va=0,un=Tt=Ze=null,Ro=!1,Ps=du=0,Ao=null}function Vn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Ze.memoizedState=un=n:un=un.next=n,un}function rn(){if(Tt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=Tt.next;var a=un===null?Ze.memoizedState:un.next;if(a!==null)un=a,Tt=n;else{if(n===null)throw Ze.alternate===null?Error(i(467)):Error(i(310));Tt=n,n={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},un===null?Ze.memoizedState=un=n:un=un.next=n}return un}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Is(n){var a=Ps;return Ps+=1,Ao===null&&(Ao=[]),n=jg(Ao,n,a),a=Ze,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?Ey:gd),n}function pu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Is(n);if(n.$$typeof===T)return kn(n)}throw Error(i(438,String(n)))}function id(n){var a=null,o=Ze.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=hu(),Ze.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),u=0;u<n;u++)o[u]=q;return a.index++,o}function ba(n,a){return typeof a=="function"?a(n):a}function mu(n){var a=rn();return od(a,Tt,n)}function od(n,a,o){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=n.baseQueue,y=u.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,u.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var z=A=null,H=null,se=a,he=!1;do{var me=se.lane&-536870913;if(me!==se.lane?(at&me)===me:(va&me)===me){var le=se.revertLane;if(le===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),me===xo&&(he=!0);else if((va&le)===le){se=se.next,le===xo&&(he=!0);continue}else me={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},H===null?(z=H=me,A=y):H=H.next=me,Ze.lanes|=le,Ja|=le;me=se.action,Hi&&o(y,me),y=se.hasEagerState?se.eagerState:o(y,me)}else le={lane:me,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},H===null?(z=H=le,A=y):H=H.next=le,Ze.lanes|=me,Ja|=me;se=se.next}while(se!==null&&se!==a);if(H===null?A=y:H.next=z,!lr(y,n.memoizedState)&&(cn=!0,he&&(o=_o,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=H,u.lastRenderedState=y}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function sd(n){var a=rn(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var A=p=p.next;do y=n(y,A.action),A=A.next;while(A!==p);lr(y,a.memoizedState)||(cn=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function Vg(n,a,o){var u=Ze,p=rn(),y=st;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!lr((Tt||p).memoizedState,o);if(A&&(p.memoizedState=o,cn=!0),p=p.queue,cd(Hg.bind(null,u,p,n),[n]),p.getSnapshot!==a||A||un!==null&&un.memoizedState.tag&1){if(u.flags|=2048,Mo(9,{destroy:void 0},Bg.bind(null,u,p,o,a),null),At===null)throw Error(i(349));y||(va&127)!==0||Fg(u,a,o)}return o}function Fg(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Ze.updateQueue,a===null?(a=hu(),Ze.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Bg(n,a,o,u){a.value=o,a.getSnapshot=u,Gg(a)&&Kg(n)}function Hg(n,a,o){return o(function(){Gg(a)&&Kg(n)})}function Gg(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!lr(n,o)}catch{return!0}}function Kg(n){var a=$i(n,2);a!==null&&Jn(a,n,2)}function ld(n){var a=Vn();if(typeof n=="function"){var o=n;if(n=o(),Hi){Ht(!0);try{o()}finally{Ht(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},a}function Yg(n,a,o,u){return n.baseState=o,od(n,Tt,typeof u=="function"?u:ba)}function OE(n,a,o,u,p){if(vu(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};K.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,Zg(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Zg(n,a){var o=a.action,u=a.payload,p=n.state;if(a.isTransition){var y=K.T,A={};K.T=A;try{var z=o(p,u),H=K.S;H!==null&&H(A,z),Xg(n,a,z)}catch(se){ud(n,a,se)}finally{y!==null&&A.types!==null&&(y.types=A.types),K.T=y}}else try{y=o(p,u),Xg(n,a,y)}catch(se){ud(n,a,se)}}function Xg(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Qg(n,a,u)},function(u){return ud(n,a,u)}):Qg(n,a,o)}function Qg(n,a,o){a.status="fulfilled",a.value=o,Wg(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Zg(n,o)))}function ud(n,a,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Wg(a),a=a.next;while(a!==u)}n.action=null}function Wg(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Jg(n,a){return a}function ey(n,a){if(st){var o=At.formState;if(o!==null){e:{var u=Ze;if(st){if(Nt){t:{for(var p=Nt,y=Cr;p.nodeType!==8;){if(!y){p=null;break t}if(p=Rr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Nt=Rr(p.nextSibling),u=p.data==="F!";break e}}Ba(u)}u=!1}u&&(a=o[0])}}return o=Vn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jg,lastRenderedState:a},o.queue=u,o=by.bind(null,Ze,u),u.dispatch=o,u=ld(!1),y=md.bind(null,Ze,!1,u.queue),u=Vn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,o=OE.bind(null,Ze,p,y,o),p.dispatch=o,u.memoizedState=n,[a,o,!1]}function ty(n){var a=rn();return ny(a,Tt,n)}function ny(n,a,o){if(a=od(n,a,Jg)[0],n=mu(ba)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Is(a)}catch(A){throw A===To?iu:A}else u=a;a=rn();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Ze.flags|=2048,Mo(9,{destroy:void 0},RE.bind(null,p,o),null)),[u,y,n]}function RE(n,a){n.action=a}function ry(n){var a=rn(),o=Tt;if(o!==null)return ny(a,o,n);rn(),a=a.memoizedState,o=rn();var u=o.queue.dispatch;return o.memoizedState=n,[a,u,!1]}function Mo(n,a,o,u){return n={tag:n,create:o,deps:u,inst:a,next:null},a=Ze.updateQueue,a===null&&(a=hu(),Ze.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,a.lastEffect=n),n}function ay(){return rn().memoizedState}function gu(n,a,o,u){var p=Vn();Ze.flags|=n,p.memoizedState=Mo(1|a,{destroy:void 0},o,u===void 0?null:u)}function yu(n,a,o,u){var p=rn();u=u===void 0?null:u;var y=p.memoizedState.inst;Tt!==null&&u!==null&&ed(u,Tt.memoizedState.deps)?p.memoizedState=Mo(a,y,o,u):(Ze.flags|=n,p.memoizedState=Mo(1|a,y,o,u))}function iy(n,a){gu(8390656,8,n,a)}function cd(n,a){yu(2048,8,n,a)}function AE(n){Ze.flags|=4;var a=Ze.updateQueue;if(a===null)a=hu(),Ze.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function oy(n){var a=rn().memoizedState;return AE({ref:a,nextImpl:n}),function(){if((yt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function sy(n,a){return yu(4,2,n,a)}function ly(n,a){return yu(4,4,n,a)}function uy(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function cy(n,a,o){o=o!=null?o.concat([n]):null,yu(4,4,uy.bind(null,a,n),o)}function fd(){}function fy(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&ed(a,u[1])?u[0]:(o.memoizedState=[n,a],n)}function dy(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&ed(a,u[1]))return u[0];if(u=n(),Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u}function dd(n,a,o){return o===void 0||(va&1073741824)!==0&&(at&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=h0(),Ze.lanes|=n,Ja|=n,o)}function hy(n,a,o,u){return lr(o,a)?o:Oo.current!==null?(n=dd(n,o,u),lr(n,a)||(cn=!0),n):(va&42)===0||(va&1073741824)!==0&&(at&261930)===0?(cn=!0,n.memoizedState=o):(n=h0(),Ze.lanes|=n,Ja|=n,a)}function py(n,a,o,u,p){var y=B.p;B.p=y!==0&&8>y?y:8;var A=K.T,z={};K.T=z,md(n,!1,a,o);try{var H=p(),se=K.S;if(se!==null&&se(z,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var he=_E(H,u);Ls(n,a,he,pr(n))}else Ls(n,a,u,pr(n))}catch(me){Ls(n,a,{then:function(){},status:"rejected",reason:me},pr())}finally{B.p=y,A!==null&&z.types!==null&&(A.types=z.types),K.T=A}}function ME(){}function hd(n,a,o,u){if(n.tag!==5)throw Error(i(476));var p=my(n).queue;py(n,p,a,Y,o===null?ME:function(){return gy(n),o(u)})}function my(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:Y},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function gy(n){var a=my(n);a.next===null&&(a=n.alternate.memoizedState),Ls(n,a.next.queue,{},pr())}function pd(){return kn(nl)}function yy(){return rn().memoizedState}function vy(){return rn().memoizedState}function jE(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=pr();n=Ka(o);var u=Ya(a,n,o);u!==null&&(Jn(u,a,o),Ns(u,a,o)),a={cache:Ff()},n.payload=a;return}a=a.return}}function kE(n,a,o){var u=pr();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},vu(n)?Sy(a,o):(o=kf(n,a,o,u),o!==null&&(Jn(o,n,u),wy(o,a,u)))}function by(n,a,o){var u=pr();Ls(n,a,o,u)}function Ls(n,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(vu(n))Sy(a,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var A=a.lastRenderedState,z=y(A,o);if(p.hasEagerState=!0,p.eagerState=z,lr(z,A))return Wl(n,a,p,0),At===null&&Ql(),!1}catch{}if(o=kf(n,a,p,u),o!==null)return Jn(o,n,u),wy(o,a,u),!0}return!1}function md(n,a,o,u){if(u={lane:2,revertLane:Kd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},vu(n)){if(a)throw Error(i(479))}else a=kf(n,o,u,2),a!==null&&Jn(a,n,2)}function vu(n){var a=n.alternate;return n===Ze||a!==null&&a===Ze}function Sy(n,a){Ro=fu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function wy(n,a,o){if((o&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}var Us={readContext:kn,use:pu,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};Us.useEffectEvent=Yt;var Ey={readContext:kn,use:pu,useCallback:function(n,a){return Vn().memoizedState=[n,a===void 0?null:a],n},useContext:kn,useEffect:iy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,gu(4194308,4,uy.bind(null,a,n),o)},useLayoutEffect:function(n,a){return gu(4194308,4,n,a)},useInsertionEffect:function(n,a){gu(4,2,n,a)},useMemo:function(n,a){var o=Vn();a=a===void 0?null:a;var u=n();if(Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u},useReducer:function(n,a,o){var u=Vn();if(o!==void 0){var p=o(a);if(Hi){Ht(!0);try{o(a)}finally{Ht(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=kE.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var a=Vn();return n={current:n},a.memoizedState=n},useState:function(n){n=ld(n);var a=n.queue,o=by.bind(null,Ze,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:fd,useDeferredValue:function(n,a){var o=Vn();return dd(o,n,a)},useTransition:function(){var n=ld(!1);return n=py.bind(null,Ze,n.queue,!0,!1),Vn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var u=Ze,p=Vn();if(st){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),At===null)throw Error(i(349));(at&127)!==0||Fg(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,iy(Hg.bind(null,u,y,n),[n]),u.flags|=2048,Mo(9,{destroy:void 0},Bg.bind(null,u,y,o,a),null),o},useId:function(){var n=Vn(),a=At.identifierPrefix;if(st){var o=ra,u=na;o=(u&~(1<<32-Rt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=du++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=TE++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:pd,useFormState:ey,useActionState:ey,useOptimistic:function(n){var a=Vn();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=md.bind(null,Ze,!0,o),o.dispatch=a,[n,a]},useMemoCache:id,useCacheRefresh:function(){return Vn().memoizedState=jE.bind(null,Ze)},useEffectEvent:function(n){var a=Vn(),o={impl:n};return a.memoizedState=o,function(){if((yt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},gd={readContext:kn,use:pu,useCallback:fy,useContext:kn,useEffect:cd,useImperativeHandle:cy,useInsertionEffect:sy,useLayoutEffect:ly,useMemo:dy,useReducer:mu,useRef:ay,useState:function(){return mu(ba)},useDebugValue:fd,useDeferredValue:function(n,a){var o=rn();return hy(o,Tt.memoizedState,n,a)},useTransition:function(){var n=mu(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Is(n),a]},useSyncExternalStore:Vg,useId:yy,useHostTransitionStatus:pd,useFormState:ty,useActionState:ty,useOptimistic:function(n,a){var o=rn();return Yg(o,Tt,n,a)},useMemoCache:id,useCacheRefresh:vy};gd.useEffectEvent=oy;var xy={readContext:kn,use:pu,useCallback:fy,useContext:kn,useEffect:cd,useImperativeHandle:cy,useInsertionEffect:sy,useLayoutEffect:ly,useMemo:dy,useReducer:sd,useRef:ay,useState:function(){return sd(ba)},useDebugValue:fd,useDeferredValue:function(n,a){var o=rn();return Tt===null?dd(o,n,a):hy(o,Tt.memoizedState,n,a)},useTransition:function(){var n=sd(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Is(n),a]},useSyncExternalStore:Vg,useId:yy,useHostTransitionStatus:pd,useFormState:ry,useActionState:ry,useOptimistic:function(n,a){var o=rn();return Tt!==null?Yg(o,Tt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:id,useCacheRefresh:vy};xy.useEffectEvent=oy;function yd(n,a,o,u){a=n.memoizedState,o=o(u,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var vd={enqueueSetState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ns(a,n,u))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ns(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=pr(),u=Ka(o);u.tag=2,a!=null&&(u.callback=a),a=Ya(n,u,o),a!==null&&(Jn(a,n,o),Ns(a,n,o))}};function _y(n,a,o,u,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,A):a.prototype&&a.prototype.isPureReactComponent?!Cs(o,u)||!Cs(p,y):!0}function Ty(n,a,o,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==n&&vd.enqueueReplaceState(a,a.state,null)}function Gi(n,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function Cy(n){Xl(n)}function Oy(n){console.error(n)}function Ry(n){Xl(n)}function bu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function Ay(n,a,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function bd(n,a,o){return o=Ka(o),o.tag=3,o.payload={element:null},o.callback=function(){bu(n,a)},o}function My(n){return n=Ka(n),n.tag=3,n}function jy(n,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;n.payload=function(){return p(y)},n.callback=function(){Ay(a,o,u)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){Ay(a,o,u),typeof p!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var z=u.stack;this.componentDidCatch(u.value,{componentStack:z!==null?z:""})})}function DE(n,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&Eo(a,o,p,!0),o=cr.current,o!==null){switch(o.tag){case 31:case 13:return Or===null?ju():o.alternate===null&&Zt===0&&(Zt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===ou?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Bd(n,u,p)),!1;case 22:return o.flags|=65536,u===ou?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Bd(n,u,p)),!1}throw Error(i(435,o.tag))}return Bd(n,u,p),ju(),!1}if(st)return a=cr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==If&&(n=Error(i(422),{cause:u}),As(xr(n,o)))):(u!==If&&(a=Error(i(423),{cause:u}),As(xr(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=xr(u,o),p=bd(n.stateNode,u,p),Zf(n,p),Zt!==4&&(Zt=2)),!1;var y=Error(i(520),{cause:u});if(y=xr(y,o),Ys===null?Ys=[y]:Ys.push(y),Zt!==4&&(Zt=2),a===null)return!0;u=xr(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=bd(o.stateNode,u,n),Zf(o,n),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ei===null||!ei.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=My(p),jy(p,n,o,u),Zf(o,p),!1}o=o.return}while(o!==null);return!1}var Sd=Error(i(461)),cn=!1;function Dn(n,a,o,u){a.child=n===null?zg(a,null,o,u):Bi(a,n.child,o,u)}function ky(n,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var A={};for(var z in u)z!=="ref"&&(A[z]=u[z])}else A=u;return Ui(a),u=td(n,a,o,A,y,p),z=nd(),n!==null&&!cn?(rd(n,a,p),Sa(n,a,p)):(st&&z&&$f(a),a.flags|=1,Dn(n,a,u,p),a.child)}function Dy(n,a,o,u,p){if(n===null){var y=o.type;return typeof y=="function"&&!Df(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,Ny(n,a,y,u,p)):(n=eu(o.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!Rd(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:Cs,o(A,u)&&n.ref===a.ref)return Sa(n,a,p)}return a.flags|=1,n=pa(y,u),n.ref=a.ref,n.return=a,a.child=n}function Ny(n,a,o,u,p){if(n!==null){var y=n.memoizedProps;if(Cs(y,u)&&n.ref===a.ref)if(cn=!1,a.pendingProps=u=y,Rd(n,p))(n.flags&131072)!==0&&(cn=!0);else return a.lanes=n.lanes,Sa(n,a,p)}return wd(n,a,o,u,p)}function zy(n,a,o,u){var p=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return $y(n,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&au(a,y!==null?y.cachePool:null),y!==null?Ig(a,y):Qf(),Lg(a);else return u=a.lanes=536870912,$y(n,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(au(a,y.cachePool),Ig(a,y),Xa(),a.memoizedState=null):(n!==null&&au(a,null),Qf(),Xa());return Dn(n,a,p,o),a.child}function qs(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function $y(n,a,o,u,p){var y=Hf();return y=y===null?null:{parent:ln._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&au(a,null),Qf(),Lg(a),n!==null&&Eo(n,a,u,!0),a.childLanes=p,null}function Su(n,a){return a=Eu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function Py(n,a,o){return Bi(a,n.child,null,o),n=Su(a,a.pendingProps),n.flags|=2,fr(a),a.memoizedState=null,n}function NE(n,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(st){if(u.mode==="hidden")return n=Su(a,u),a.lanes=536870912,qs(null,n);if(Jf(a),(n=Nt)?(n=Z0(n,Cr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Sg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return a.lanes=536870912,null}return Su(a,u)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(Jf(a),p)if(a.flags&256)a.flags&=-257,a=Py(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(cn||Eo(n,a,o,!1),p=(o&n.childLanes)!==0,cn||p){if(u=At,u!==null&&(A=Cn(u,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,$i(n,A),Jn(u,n,A),Sd;ju(),a=Py(n,a,o)}else n=y.treeContext,Nt=Rr(A.nextSibling),jn=a,st=!0,Fa=null,Cr=!1,n!==null&&xg(a,n),a=Su(a,u),a.flags|=4096;return a}return n=pa(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function wu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function wd(n,a,o,u,p){return Ui(a),o=td(n,a,o,u,void 0,p),u=nd(),n!==null&&!cn?(rd(n,a,p),Sa(n,a,p)):(st&&u&&$f(a),a.flags|=1,Dn(n,a,o,p),a.child)}function Iy(n,a,o,u,p,y){return Ui(a),a.updateQueue=null,o=qg(a,u,o,p),Ug(n),u=nd(),n!==null&&!cn?(rd(n,a,y),Sa(n,a,y)):(st&&u&&$f(a),a.flags|=1,Dn(n,a,o,y),a.child)}function Ly(n,a,o,u,p){if(Ui(a),a.stateNode===null){var y=vo,A=o.contextType;typeof A=="object"&&A!==null&&(y=kn(A)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=vd,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},Kf(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?kn(A):vo,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(yd(a,o,A,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&vd.enqueueReplaceState(y,y.state,null),$s(a,u,y,p),zs(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var z=a.memoizedProps,H=Gi(o,z);y.props=H;var se=y.context,he=o.contextType;A=vo,typeof he=="object"&&he!==null&&(A=kn(he));var me=o.getDerivedStateFromProps;he=typeof me=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,he||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||se!==A)&&Ty(a,y,u,A),Ga=!1;var le=a.memoizedState;y.state=le,$s(a,u,y,p),zs(),se=a.memoizedState,z||le!==se||Ga?(typeof me=="function"&&(yd(a,o,me,u),se=a.memoizedState),(H=Ga||_y(a,o,H,u,le,se,A))?(he||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=se),y.props=u,y.state=se,y.context=A,u=H):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,Yf(n,a),A=a.memoizedProps,he=Gi(o,A),y.props=he,me=a.pendingProps,le=y.context,se=o.contextType,H=vo,typeof se=="object"&&se!==null&&(H=kn(se)),z=o.getDerivedStateFromProps,(se=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==me||le!==H)&&Ty(a,y,u,H),Ga=!1,le=a.memoizedState,y.state=le,$s(a,u,y,p),zs();var ce=a.memoizedState;A!==me||le!==ce||Ga||n!==null&&n.dependencies!==null&&nu(n.dependencies)?(typeof z=="function"&&(yd(a,o,z,u),ce=a.memoizedState),(he=Ga||_y(a,o,he,u,le,ce,H)||n!==null&&n.dependencies!==null&&nu(n.dependencies))?(se||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ce,H),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ce,H)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ce),y.props=u,y.state=ce,y.context=H,u=he):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,wu(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Bi(a,n.child,null,p),a.child=Bi(a,null,o,p)):Dn(n,a,o,p),a.memoizedState=y.state,n=a.child):n=Sa(n,a,p),n}function Uy(n,a,o,u){return Ii(),a.flags|=256,Dn(n,a,o,u),a.child}var Ed={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(n){return{baseLanes:n,cachePool:Ag()}}function _d(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=hr),n}function qy(n,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(nn.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(st){if(p?Za(a):Xa(),(n=Nt)?(n=Z0(n,Cr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Sg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return oh(n)?a.lanes=32:a.lanes=536870912,null}var z=u.children;return u=u.fallback,p?(Xa(),p=a.mode,z=Eu({mode:"hidden",children:z},p),u=Pi(u,p,o,null),z.return=a,u.return=a,z.sibling=u,a.child=z,u=a.child,u.memoizedState=xd(o),u.childLanes=_d(n,A,o),a.memoizedState=Ed,qs(null,u)):(Za(a),Td(a,z))}var H=n.memoizedState;if(H!==null&&(z=H.dehydrated,z!==null)){if(y)a.flags&256?(Za(a),a.flags&=-257,a=Cd(n,a,o)):a.memoizedState!==null?(Xa(),a.child=n.child,a.flags|=128,a=null):(Xa(),z=u.fallback,p=a.mode,u=Eu({mode:"visible",children:u.children},p),z=Pi(z,p,o,null),z.flags|=2,u.return=a,z.return=a,u.sibling=z,a.child=u,Bi(a,n.child,null,o),u=a.child,u.memoizedState=xd(o),u.childLanes=_d(n,A,o),a.memoizedState=Ed,a=qs(null,u));else if(Za(a),oh(z)){if(A=z.nextSibling&&z.nextSibling.dataset,A)var se=A.dgst;A=se,u=Error(i(419)),u.stack="",u.digest=A,As({value:u,source:null,stack:null}),a=Cd(n,a,o)}else if(cn||Eo(n,a,o,!1),A=(o&n.childLanes)!==0,cn||A){if(A=At,A!==null&&(u=Cn(A,o),u!==0&&u!==H.retryLane))throw H.retryLane=u,$i(n,u),Jn(A,n,u),Sd;ih(z)||ju(),a=Cd(n,a,o)}else ih(z)?(a.flags|=192,a.child=n.child,a=null):(n=H.treeContext,Nt=Rr(z.nextSibling),jn=a,st=!0,Fa=null,Cr=!1,n!==null&&xg(a,n),a=Td(a,u.children),a.flags|=4096);return a}return p?(Xa(),z=u.fallback,p=a.mode,H=n.child,se=H.sibling,u=pa(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,se!==null?z=pa(se,z):(z=Pi(z,p,o,null),z.flags|=2),z.return=a,u.return=a,u.sibling=z,a.child=u,qs(null,u),u=a.child,z=n.child.memoizedState,z===null?z=xd(o):(p=z.cachePool,p!==null?(H=ln._currentValue,p=p.parent!==H?{parent:H,pool:H}:p):p=Ag(),z={baseLanes:z.baseLanes|o,cachePool:p}),u.memoizedState=z,u.childLanes=_d(n,A,o),a.memoizedState=Ed,qs(n.child,u)):(Za(a),o=n.child,n=o.sibling,o=pa(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,n!==null&&(A=a.deletions,A===null?(a.deletions=[n],a.flags|=16):A.push(n)),a.child=o,a.memoizedState=null,o)}function Td(n,a){return a=Eu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Eu(n,a){return n=ur(22,n,null,a),n.lanes=0,n}function Cd(n,a,o){return Bi(a,n.child,null,o),n=Td(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function Vy(n,a,o){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),qf(n.return,a,o)}function Od(n,a,o,u,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function Fy(n,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var A=nn.current,z=(A&2)!==0;if(z?(A=A&1|2,a.flags|=128):A&=1,U(nn,A),Dn(n,a,u,o),u=st?Rs:0,!z&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Vy(n,o,a);else if(n.tag===19)Vy(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&cu(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Od(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&cu(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Od(a,!0,o,null,y,u);break;case"together":Od(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Sa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),Ja|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(Eo(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=pa(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=pa(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function Rd(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&nu(n)))}function zE(n,a,o){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),Ha(a,ln,n.memoizedState.cache),Ii();break;case 27:case 5:Oe(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:Ha(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Jf(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Za(a),a.flags|=128,null):(o&a.child.childLanes)!==0?qy(n,a,o):(Za(a),n=Sa(n,a,o),n!==null?n.sibling:null);Za(a);break;case 19:var p=(n.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(Eo(n,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return Fy(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),U(nn,nn.current),u)break;return null;case 22:return a.lanes=0,zy(n,a,o,a.pendingProps);case 24:Ha(a,ln,n.memoizedState.cache)}return Sa(n,a,o)}function By(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)cn=!0;else{if(!Rd(n,o)&&(a.flags&128)===0)return cn=!1,zE(n,a,o);cn=(n.flags&131072)!==0}else cn=!1,st&&(a.flags&1048576)!==0&&Eg(a,Rs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Vi(a.elementType),a.type=n,typeof n=="function")Df(n)?(u=Gi(n,u),a.tag=1,a=Ly(null,a,n,u,o)):(a.tag=0,a=wd(null,a,n,u,o));else{if(n!=null){var p=n.$$typeof;if(p===x){a.tag=11,a=ky(null,a,n,u,o);break e}else if(p===M){a.tag=14,a=Dy(null,a,n,u,o);break e}}throw a=re(n)||n,Error(i(306,a,""))}}return a;case 0:return wd(n,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Gi(u,a.pendingProps),Ly(n,a,u,p,o);case 3:e:{if(ve(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,Yf(n,a),$s(a,u,null,o);var A=a.memoizedState;if(u=A.cache,Ha(a,ln,u),u!==y.cache&&Vf(a,[ln],o,!0),zs(),u=A.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=Uy(n,a,u,o);break e}else if(u!==p){p=xr(Error(i(424)),a),As(p),a=Uy(n,a,u,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Nt=Rr(n.firstChild),jn=a,st=!0,Fa=null,Cr=!0,o=zg(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ii(),u===p){a=Sa(n,a,o);break e}Dn(n,a,u,o)}a=a.child}return a;case 26:return wu(n,a),n===null?(o=tv(a.type,null,a.pendingProps,null))?a.memoizedState=o:st||(o=a.type,n=a.pendingProps,u=Iu(ee.current).createElement(o),u[$t]=a,u[sn]=n,Nn(u,o,n),yn(u),a.stateNode=u):a.memoizedState=tv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Oe(a),n===null&&st&&(u=a.stateNode=W0(a.type,a.pendingProps,ee.current),jn=a,Cr=!0,p=Nt,ai(a.type)?(sh=p,Nt=Rr(u.firstChild)):Nt=p),Dn(n,a,a.pendingProps.children,o),wu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&st&&((p=u=Nt)&&(u=fx(u,a.type,a.pendingProps,Cr),u!==null?(a.stateNode=u,jn=a,Nt=Rr(u.firstChild),Cr=!1,p=!0):p=!1),p||Ba(a)),Oe(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,u=y.children,nh(p,y)?u=null:A!==null&&nh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=td(n,a,CE,null,null,o),nl._currentValue=p),wu(n,a),Dn(n,a,u,o),a.child;case 6:return n===null&&st&&((n=o=Nt)&&(o=dx(o,a.pendingProps,Cr),o!==null?(a.stateNode=o,jn=a,Nt=null,n=!0):n=!1),n||Ba(a)),null;case 13:return qy(n,a,o);case 4:return ve(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Bi(a,null,u,o):Dn(n,a,u,o),a.child;case 11:return ky(n,a,a.type,a.pendingProps,o);case 7:return Dn(n,a,a.pendingProps,o),a.child;case 8:return Dn(n,a,a.pendingProps.children,o),a.child;case 12:return Dn(n,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,Ha(a,a.type,u.value),Dn(n,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ui(a),p=kn(p),u=u(p),a.flags|=1,Dn(n,a,u,o),a.child;case 14:return Dy(n,a,a.type,a.pendingProps,o);case 15:return Ny(n,a,a.type,a.pendingProps,o);case 19:return Fy(n,a,o);case 31:return NE(n,a,o);case 22:return zy(n,a,o,a.pendingProps);case 24:return Ui(a),u=kn(ln),n===null?(p=Hf(),p===null&&(p=At,y=Ff(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},Kf(a),Ha(a,ln,p)):((n.lanes&o)!==0&&(Yf(n,a),$s(a,null,null,o),zs()),p=n.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ha(a,ln,u)):(u=y.cache,Ha(a,ln,u),u!==p.cache&&Vf(a,[ln],o,!0))),Dn(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function wa(n){n.flags|=4}function Ad(n,a,o,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(y0())n.flags|=8192;else throw Fi=ou,Gf}else n.flags&=-16777217}function Hy(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ov(a))if(y0())n.flags|=8192;else throw Fi=ou,Gf}function xu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Sr():536870912,n.lanes|=a,No|=a)}function Vs(n,a){if(!st)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function zt(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=o,a}function $E(n,a,o){var u=a.pendingProps;switch(Pf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(a),null;case 1:return zt(a),null;case 3:return o=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ya(ln),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wo(a)?wa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Lf())),zt(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(wa(a),y!==null?(zt(a),Hy(a,y)):(zt(a),Ad(a,p,null,u,o))):y?y!==n.memoizedState?(wa(a),zt(a),Hy(a,y)):(zt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&wa(a),zt(a),Ad(a,p,n,u,o)),null;case 27:if(de(a),o=ee.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}n=P.current,wo(a)?_g(a):(n=W0(p,u,o),a.stateNode=n,wa(a))}return zt(a),null;case 5:if(de(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}if(y=P.current,wo(a))_g(a);else{var A=Iu(ee.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?A.createElement(p,{is:u.is}):A.createElement(p)}}y[$t]=a,y[sn]=u;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=y;e:switch(Nn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&wa(a)}}return zt(a),Ad(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=ee.current,wo(a)){if(n=a.stateNode,o=a.memoizedProps,u=null,p=jn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[$t]=a,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||q0(n.nodeValue,o)),n||Ba(a,!0)}else n=Iu(n).createTextNode(u),n[$t]=a,a.stateNode=n}return zt(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(u=wo(a),o!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),n=!1}else o=Lf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(fr(a),a):(fr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return zt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=wo(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),p=!1}else p=Lf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(fr(a),a):(fr(a),null)}return fr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),xu(a,a.updateQueue),zt(a),null);case 4:return Ee(),n===null&&Qd(a.stateNode.containerInfo),zt(a),null;case 10:return ya(a.type),zt(a),null;case 19:if(I(nn),u=a.memoizedState,u===null)return zt(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)Vs(u,!1);else{if(Zt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=cu(n),y!==null){for(a.flags|=128,Vs(u,!1),n=y.updateQueue,a.updateQueue=n,xu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)bg(o,n),o=o.sibling;return U(nn,nn.current&1|2),st&&ma(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&Ue()>Ru&&(a.flags|=128,p=!0,Vs(u,!1),a.lanes=4194304)}else{if(!p)if(n=cu(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,xu(a,n),Vs(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!st)return zt(a),null}else 2*Ue()-u.renderingStartTime>Ru&&o!==536870912&&(a.flags|=128,p=!0,Vs(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ue(),n.sibling=null,o=nn.current,U(nn,p?o&1|2:o&1),st&&ma(a,u.treeForkCount),n):(zt(a),null);case 22:case 23:return fr(a),Wf(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(zt(a),a.subtreeFlags&6&&(a.flags|=8192)):zt(a),o=a.updateQueue,o!==null&&xu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),n!==null&&I(qi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ya(ln),zt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function PE(n,a){switch(Pf(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ya(ln),Ee(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return de(a),null;case 31:if(a.memoizedState!==null){if(fr(a),a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(fr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return I(nn),null;case 4:return Ee(),null;case 10:return ya(a.type),null;case 22:case 23:return fr(a),Wf(),n!==null&&I(qi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ya(ln),null;case 25:return null;default:return null}}function Gy(n,a){switch(Pf(a),a.tag){case 3:ya(ln),Ee();break;case 26:case 27:case 5:de(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&fr(a);break;case 13:fr(a);break;case 19:I(nn);break;case 10:ya(a.type);break;case 22:case 23:fr(a),Wf(),n!==null&&I(qi);break;case 24:ya(ln)}}function Fs(n,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&n)===n){u=void 0;var y=o.create,A=o.inst;u=y(),A.destroy=u}o=o.next}while(o!==p)}}catch(z){xt(a,a.return,z)}}function Qa(n,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&n)===n){var A=u.inst,z=A.destroy;if(z!==void 0){A.destroy=void 0,p=a;var H=o,se=z;try{se()}catch(he){xt(p,H,he)}}}u=u.next}while(u!==y)}}catch(he){xt(a,a.return,he)}}function Ky(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{Pg(a,o)}catch(u){xt(n,n.return,u)}}}function Yy(n,a,o){o.props=Gi(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){xt(n,a,u)}}function Bs(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(p){xt(n,a,p)}}function aa(n,a){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){xt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){xt(n,a,p)}else o.current=null}function Zy(n){var a=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){xt(n,n.return,p)}}function Md(n,a,o){try{var u=n.stateNode;ix(u,n.type,o,a),u[sn]=a}catch(p){xt(n,n.return,p)}}function Xy(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ai(n.type)||n.tag===4}function jd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Xy(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ai(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function kd(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Me));else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(kd(n,a,o),n=n.sibling;n!==null;)kd(n,a,o),n=n.sibling}function _u(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(_u(n,a,o),n=n.sibling;n!==null;)_u(n,a,o),n=n.sibling}function Qy(n){var a=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Nn(a,u,o),a[$t]=n,a[sn]=o}catch(y){xt(n,n.return,y)}}var Ea=!1,fn=!1,Dd=!1,Wy=typeof WeakSet=="function"?WeakSet:Set,On=null;function IE(n,a){if(n=n.containerInfo,eh=Hu,n=cg(n),Cf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,z=-1,H=-1,se=0,he=0,me=n,le=null;t:for(;;){for(var ce;me!==o||p!==0&&me.nodeType!==3||(z=A+p),me!==y||u!==0&&me.nodeType!==3||(H=A+u),me.nodeType===3&&(A+=me.nodeValue.length),(ce=me.firstChild)!==null;)le=me,me=ce;for(;;){if(me===n)break t;if(le===o&&++se===p&&(z=A),le===y&&++he===u&&(H=A),(ce=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ce}o=z===-1||H===-1?null:{start:z,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(th={focusedElem:n,selectionRange:o},Hu=!1,On=a;On!==null;)if(a=On,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,On=n;else for(;On!==null;){switch(a=On,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var je=Gi(o.type,p);n=u.getSnapshotBeforeUpdate(je,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(qe){xt(o,o.return,qe)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)ah(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,On=n;break}On=a.return}}function Jy(n,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_a(n,o),u&4&&Fs(5,o);break;case 1:if(_a(n,o),u&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){xt(o,o.return,A)}else{var p=Gi(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){xt(o,o.return,A)}}u&64&&Ky(o),u&512&&Bs(o,o.return);break;case 3:if(_a(n,o),u&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Pg(n,a)}catch(A){xt(o,o.return,A)}}break;case 27:a===null&&u&4&&Qy(o);case 26:case 5:_a(n,o),a===null&&u&4&&Zy(o),u&512&&Bs(o,o.return);break;case 12:_a(n,o);break;case 31:_a(n,o),u&4&&n0(n,o);break;case 13:_a(n,o),u&4&&r0(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=KE.bind(null,o),hx(n,o))));break;case 22:if(u=o.memoizedState!==null||Ea,!u){a=a!==null&&a.memoizedState!==null||fn,p=Ea;var y=fn;Ea=u,(fn=a)&&!y?Ta(n,o,(o.subtreeFlags&8772)!==0):_a(n,o),Ea=p,fn=y}break;case 30:break;default:_a(n,o)}}function e0(n){var a=n.alternate;a!==null&&(n.alternate=null,e0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Vl(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pt=null,Zn=!1;function xa(n,a,o){for(o=o.child;o!==null;)t0(n,a,o),o=o.sibling}function t0(n,a,o){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Vt,o)}catch{}switch(o.tag){case 26:fn||aa(o,a),xa(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:fn||aa(o,a);var u=Pt,p=Zn;ai(o.type)&&(Pt=o.stateNode,Zn=!1),xa(n,a,o),Js(o.stateNode),Pt=u,Zn=p;break;case 5:fn||aa(o,a);case 6:if(u=Pt,p=Zn,Pt=null,xa(n,a,o),Pt=u,Zn=p,Pt!==null)if(Zn)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(o.stateNode)}catch(y){xt(o,a,y)}else try{Pt.removeChild(o.stateNode)}catch(y){xt(o,a,y)}break;case 18:Pt!==null&&(Zn?(n=Pt,K0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Vo(n)):K0(Pt,o.stateNode));break;case 4:u=Pt,p=Zn,Pt=o.stateNode.containerInfo,Zn=!0,xa(n,a,o),Pt=u,Zn=p;break;case 0:case 11:case 14:case 15:Qa(2,o,a),fn||Qa(4,o,a),xa(n,a,o);break;case 1:fn||(aa(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Yy(o,a,u)),xa(n,a,o);break;case 21:xa(n,a,o);break;case 22:fn=(u=fn)||o.memoizedState!==null,xa(n,a,o),fn=u;break;default:xa(n,a,o)}}function n0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Vo(n)}catch(o){xt(a,a.return,o)}}}function r0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Vo(n)}catch(o){xt(a,a.return,o)}}function LE(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Wy),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Wy),a;default:throw Error(i(435,n.tag))}}function Tu(n,a){var o=LE(n);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=YE.bind(null,n,u);u.then(p,p)}})}function Xn(n,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=n,A=a,z=A;e:for(;z!==null;){switch(z.tag){case 27:if(ai(z.type)){Pt=z.stateNode,Zn=!1;break e}break;case 5:Pt=z.stateNode,Zn=!1;break e;case 3:case 4:Pt=z.stateNode.containerInfo,Zn=!0;break e}z=z.return}if(Pt===null)throw Error(i(160));t0(y,A,p),Pt=null,Zn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)a0(a,n),a=a.sibling}var Br=null;function a0(n,a){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Xn(a,n),Qn(n),u&4&&(Qa(3,n,n.return),Fs(3,n),Qa(5,n,n.return));break;case 1:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&64&&Ea&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Br;if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[co]||y[$t]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),Nn(y,u,o),y[$t]=n,yn(y),u=y;break e;case"link":var A=av("link","href",p).get(u+(o.href||""));if(A){for(var z=0;z<A.length;z++)if(y=A[z],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;case"meta":if(A=av("meta","content",p).get(u+(o.content||""))){for(z=0;z<A.length;z++)if(y=A[z],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;default:throw Error(i(468,u))}y[$t]=n,yn(y),u=y}n.stateNode=u}else iv(p,n.type,n.stateNode);else n.stateNode=rv(p,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?iv(p,n.type,n.stateNode):rv(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Md(n,n.memoizedProps,o.memoizedProps)}break;case 27:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),o!==null&&u&4&&Md(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),n.flags&32){p=n.stateNode;try{ne(p,"")}catch(je){xt(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,Md(n,p,o!==null?o.memoizedProps:p)),u&1024&&(Dd=!0);break;case 6:if(Xn(a,n),Qn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(je){xt(n,n.return,je)}}break;case 3:if(qu=null,p=Br,Br=Lu(a.containerInfo),Xn(a,n),Br=p,Qn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Vo(a.containerInfo)}catch(je){xt(n,n.return,je)}Dd&&(Dd=!1,i0(n));break;case 4:u=Br,Br=Lu(n.stateNode.containerInfo),Xn(a,n),Qn(n),Br=u;break;case 12:Xn(a,n),Qn(n);break;case 31:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Tu(n,u)));break;case 13:Xn(a,n),Qn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ou=Ue()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Tu(n,u)));break;case 22:p=n.memoizedState!==null;var H=o!==null&&o.memoizedState!==null,se=Ea,he=fn;if(Ea=se||p,fn=he||H,Xn(a,n),fn=he,Ea=se,Qn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||H||Ea||fn||Ki(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){H=o=a;try{if(y=H.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{z=H.stateNode;var me=H.memoizedProps.style,le=me!=null&&me.hasOwnProperty("display")?me.display:null;z.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(je){xt(H,H.return,je)}}}else if(a.tag===6){if(o===null){H=a;try{H.stateNode.nodeValue=p?"":H.memoizedProps}catch(je){xt(H,H.return,je)}}}else if(a.tag===18){if(o===null){H=a;try{var ce=H.stateNode;p?Y0(ce,!0):Y0(H.stateNode,!1)}catch(je){xt(H,H.return,je)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Tu(n,o))));break;case 19:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Tu(n,u)));break;case 30:break;case 21:break;default:Xn(a,n),Qn(n)}}function Qn(n){var a=n.flags;if(a&2){try{for(var o,u=n.return;u!==null;){if(Xy(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=jd(n);_u(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(ne(A,""),o.flags&=-33);var z=jd(n);_u(n,z,A);break;case 3:case 4:var H=o.stateNode.containerInfo,se=jd(n);kd(n,se,H);break;default:throw Error(i(161))}}catch(he){xt(n,n.return,he)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function i0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;i0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function _a(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Jy(n,a.alternate,a),a=a.sibling}function Ki(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Qa(4,a,a.return),Ki(a);break;case 1:aa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Yy(a,a.return,o),Ki(a);break;case 27:Js(a.stateNode);case 26:case 5:aa(a,a.return),Ki(a);break;case 22:a.memoizedState===null&&Ki(a);break;case 30:Ki(a);break;default:Ki(a)}n=n.sibling}}function Ta(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(p,y,o),Fs(4,y);break;case 1:if(Ta(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(se){xt(u,u.return,se)}if(u=y,p=u.updateQueue,p!==null){var z=u.stateNode;try{var H=p.shared.hiddenCallbacks;if(H!==null)for(p.shared.hiddenCallbacks=null,p=0;p<H.length;p++)$g(H[p],z)}catch(se){xt(u,u.return,se)}}o&&A&64&&Ky(y),Bs(y,y.return);break;case 27:Qy(y);case 26:case 5:Ta(p,y,o),o&&u===null&&A&4&&Zy(y),Bs(y,y.return);break;case 12:Ta(p,y,o);break;case 31:Ta(p,y,o),o&&A&4&&n0(p,y);break;case 13:Ta(p,y,o),o&&A&4&&r0(p,y);break;case 22:y.memoizedState===null&&Ta(p,y,o),Bs(y,y.return);break;case 30:break;default:Ta(p,y,o)}a=a.sibling}}function Nd(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Ms(o))}function zd(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Ms(n))}function Hr(n,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)o0(n,a,o,u),a=a.sibling}function o0(n,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Hr(n,a,o,u),p&2048&&Fs(9,a);break;case 1:Hr(n,a,o,u);break;case 3:Hr(n,a,o,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Ms(n)));break;case 12:if(p&2048){Hr(n,a,o,u),n=a.stateNode;try{var y=a.memoizedProps,A=y.id,z=y.onPostCommit;typeof z=="function"&&z(A,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(H){xt(a,a.return,H)}}else Hr(n,a,o,u);break;case 31:Hr(n,a,o,u);break;case 13:Hr(n,a,o,u);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?Hr(n,a,o,u):Hs(n,a):y._visibility&2?Hr(n,a,o,u):(y._visibility|=2,jo(n,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Nd(A,a);break;case 24:Hr(n,a,o,u),p&2048&&zd(a.alternate,a);break;default:Hr(n,a,o,u)}}function jo(n,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,z=o,H=u,se=A.flags;switch(A.tag){case 0:case 11:case 15:jo(y,A,z,H,p),Fs(8,A);break;case 23:break;case 22:var he=A.stateNode;A.memoizedState!==null?he._visibility&2?jo(y,A,z,H,p):Hs(y,A):(he._visibility|=2,jo(y,A,z,H,p)),p&&se&2048&&Nd(A.alternate,A);break;case 24:jo(y,A,z,H,p),p&&se&2048&&zd(A.alternate,A);break;default:jo(y,A,z,H,p)}a=a.sibling}}function Hs(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,u=a,p=u.flags;switch(u.tag){case 22:Hs(o,u),p&2048&&Nd(u.alternate,u);break;case 24:Hs(o,u),p&2048&&zd(u.alternate,u);break;default:Hs(o,u)}a=a.sibling}}var Gs=8192;function ko(n,a,o){if(n.subtreeFlags&Gs)for(n=n.child;n!==null;)s0(n,a,o),n=n.sibling}function s0(n,a,o){switch(n.tag){case 26:ko(n,a,o),n.flags&Gs&&n.memoizedState!==null&&Tx(o,Br,n.memoizedState,n.memoizedProps);break;case 5:ko(n,a,o);break;case 3:case 4:var u=Br;Br=Lu(n.stateNode.containerInfo),ko(n,a,o),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Gs,Gs=16777216,ko(n,a,o),Gs=u):ko(n,a,o));break;default:ko(n,a,o)}}function l0(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Ks(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,c0(u,n)}l0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)u0(n),n=n.sibling}function u0(n){switch(n.tag){case 0:case 11:case 15:Ks(n),n.flags&2048&&Qa(9,n,n.return);break;case 3:Ks(n);break;case 12:Ks(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Cu(n)):Ks(n);break;default:Ks(n)}}function Cu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,c0(u,n)}l0(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Qa(8,a,a.return),Cu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Cu(a));break;default:Cu(a)}n=n.sibling}}function c0(n,a){for(;On!==null;){var o=On;switch(o.tag){case 0:case 11:case 15:Qa(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ms(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,On=u;else e:for(o=n;On!==null;){u=On;var p=u.sibling,y=u.return;if(e0(u),u===o){On=null;break e}if(p!==null){p.return=y,On=p;break e}On=y}}}var UE={getCacheForType:function(n){var a=kn(ln),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return kn(ln).controller.signal}},qE=typeof WeakMap=="function"?WeakMap:Map,yt=0,At=null,tt=null,at=0,Et=0,dr=null,Wa=!1,Do=!1,$d=!1,Ca=0,Zt=0,Ja=0,Yi=0,Pd=0,hr=0,No=0,Ys=null,Wn=null,Id=!1,Ou=0,f0=0,Ru=1/0,Au=null,ei=null,vn=0,ti=null,zo=null,Oa=0,Ld=0,Ud=null,d0=null,Zs=0,qd=null;function pr(){return(yt&2)!==0&&at!==0?at&-at:K.T!==null?Kd():Pr()}function h0(){if(hr===0)if((at&536870912)===0||st){var n=En;En<<=1,(En&3932160)===0&&(En=262144),hr=n}else hr=536870912;return n=cr.current,n!==null&&(n.flags|=32),hr}function Jn(n,a,o){(n===At&&(Et===2||Et===9)||n.cancelPendingCommit!==null)&&($o(n,0),ni(n,at,hr,!1)),ft(n,o),((yt&2)===0||n!==At)&&(n===At&&((yt&2)===0&&(Yi|=o),Zt===4&&ni(n,at,hr,!1)),ia(n))}function p0(n,a,o){if((yt&6)!==0)throw Error(i(327));var u=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Kt(n,a),p=u?BE(n,a):Fd(n,a,!0),y=u;do{if(p===0){Do&&!u&&ni(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!VE(o)){p=Fd(n,a,!1),y=!1;continue}if(p===2){if(y=a,n.errorRecoveryDisabledLanes&y)var A=0;else A=n.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var z=n;p=Ys;var H=z.current.memoizedState.isDehydrated;if(H&&($o(z,A).flags|=256),A=Fd(z,A,!1),A!==2){if($d&&!H){z.errorRecoveryDisabledLanes|=y,Yi|=y,p=4;break e}y=Wn,Wn=p,y!==null&&(Wn===null?Wn=y:Wn.push.apply(Wn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){$o(n,0),ni(n,a,0,!0);break}e:{switch(u=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ni(u,a,hr,!Wa);break e;case 2:Wn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Ou+300-Ue(),10<p)){if(ni(u,a,hr,!Wa),xn(u,0,!0)!==0)break e;Oa=a,u.timeoutHandle=H0(m0.bind(null,u,o,Wn,Au,Id,a,hr,Yi,No,Wa,y,"Throttled",-0,0),p);break e}m0(u,o,Wn,Au,Id,a,hr,Yi,No,Wa,y,null,-0,0)}}break}while(!0);ia(n)}function m0(n,a,o,u,p,y,A,z,H,se,he,me,le,ce){if(n.timeoutHandle=-1,me=a.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Me},s0(a,y,me);var je=(y&62914560)===y?Ou-Ue():(y&4194048)===y?f0-Ue():0;if(je=Cx(me,je),je!==null){Oa=y,n.cancelPendingCommit=je(x0.bind(null,n,a,y,o,u,p,A,z,H,he,me,null,le,ce)),ni(n,y,A,!se);return}}x0(n,a,y,o,u,p,A,z,H)}function VE(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!lr(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ni(n,a,o,u){a&=~Pd,a&=~Yi,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var y=31-Rt(p),A=1<<y;u[y]=-1,p&=~A}o!==0&&Fn(n,o,a)}function Mu(){return(yt&6)===0?(Xs(0),!1):!0}function Vd(){if(tt!==null){if(Et===0)var n=tt.return;else n=tt,ga=Li=null,ad(n),Co=null,ks=0,n=tt;for(;n!==null;)Gy(n.alternate,n),n=n.return;tt=null}}function $o(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,lx(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Oa=0,Vd(),At=n,tt=o=pa(n.current,null),at=a,Et=0,dr=null,Wa=!1,Do=Kt(n,a),$d=!1,No=hr=Pd=Yi=Ja=Zt=0,Wn=Ys=null,Id=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-Rt(u),y=1<<p;a|=n[p],u&=~y}return Ca=a,Ql(),o}function g0(n,a){Ze=null,K.H=Us,a===To||a===iu?(a=kg(),Et=3):a===Gf?(a=kg(),Et=4):Et=a===Sd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,dr=a,tt===null&&(Zt=1,bu(n,xr(a,n.current)))}function y0(){var n=cr.current;return n===null?!0:(at&4194048)===at?Or===null:(at&62914560)===at||(at&536870912)!==0?n===Or:!1}function v0(){var n=K.H;return K.H=Us,n===null?Us:n}function b0(){var n=K.A;return K.A=UE,n}function ju(){Zt=4,Wa||(at&4194048)!==at&&cr.current!==null||(Do=!0),(Ja&134217727)===0&&(Yi&134217727)===0||At===null||ni(At,at,hr,!1)}function Fd(n,a,o){var u=yt;yt|=2;var p=v0(),y=b0();(At!==n||at!==a)&&(Au=null,$o(n,a)),a=!1;var A=Zt;e:do try{if(Et!==0&&tt!==null){var z=tt,H=dr;switch(Et){case 8:Vd(),A=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(a=!0);var se=Et;if(Et=0,dr=null,Po(n,z,H,se),o&&Do){A=0;break e}break;default:se=Et,Et=0,dr=null,Po(n,z,H,se)}}FE(),A=Zt;break}catch(he){g0(n,he)}while(!0);return a&&n.shellSuspendCounter++,ga=Li=null,yt=u,K.H=p,K.A=y,tt===null&&(At=null,at=0,Ql()),A}function FE(){for(;tt!==null;)S0(tt)}function BE(n,a){var o=yt;yt|=2;var u=v0(),p=b0();At!==n||at!==a?(Au=null,Ru=Ue()+500,$o(n,a)):Do=Kt(n,a);e:do try{if(Et!==0&&tt!==null){a=tt;var y=dr;t:switch(Et){case 1:Et=0,dr=null,Po(n,a,y,1);break;case 2:case 9:if(Mg(y)){Et=0,dr=null,w0(a);break}a=function(){Et!==2&&Et!==9||At!==n||(Et=7),ia(n)},y.then(a,a);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:Mg(y)?(Et=0,dr=null,w0(a)):(Et=0,dr=null,Po(n,a,y,7));break;case 5:var A=null;switch(tt.tag){case 26:A=tt.memoizedState;case 5:case 27:var z=tt;if(A?ov(A):z.stateNode.complete){Et=0,dr=null;var H=z.sibling;if(H!==null)tt=H;else{var se=z.return;se!==null?(tt=se,ku(se)):tt=null}break t}}Et=0,dr=null,Po(n,a,y,5);break;case 6:Et=0,dr=null,Po(n,a,y,6);break;case 8:Vd(),Zt=6;break e;default:throw Error(i(462))}}HE();break}catch(he){g0(n,he)}while(!0);return ga=Li=null,K.H=u,K.A=p,yt=o,tt!==null?0:(At=null,at=0,Ql(),Zt)}function HE(){for(;tt!==null&&!Je();)S0(tt)}function S0(n){var a=By(n.alternate,n,Ca);n.memoizedProps=n.pendingProps,a===null?ku(n):tt=a}function w0(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=Iy(o,a,a.pendingProps,a.type,void 0,at);break;case 11:a=Iy(o,a,a.pendingProps,a.type.render,a.ref,at);break;case 5:ad(a);default:Gy(o,a),a=tt=bg(a,Ca),a=By(o,a,Ca)}n.memoizedProps=n.pendingProps,a===null?ku(n):tt=a}function Po(n,a,o,u){ga=Li=null,ad(a),Co=null,ks=0;var p=a.return;try{if(DE(n,p,a,o,at)){Zt=1,bu(n,xr(o,n.current)),tt=null;return}}catch(y){if(p!==null)throw tt=p,y;Zt=1,bu(n,xr(o,n.current)),tt=null;return}a.flags&32768?(st||u===1?n=!0:Do||(at&536870912)!==0?n=!1:(Wa=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),E0(a,n)):ku(a)}function ku(n){var a=n;do{if((a.flags&32768)!==0){E0(a,Wa);return}n=a.return;var o=$E(a.alternate,a,Ca);if(o!==null){tt=o;return}if(a=a.sibling,a!==null){tt=a;return}tt=a=n}while(a!==null);Zt===0&&(Zt=5)}function E0(n,a){do{var o=PE(n.alternate,n);if(o!==null){o.flags&=32767,tt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){tt=n;return}tt=n=o}while(n!==null);Zt=6,tt=null}function x0(n,a,o,u,p,y,A,z,H){n.cancelPendingCommit=null;do Du();while(vn!==0);if((yt&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=jf,tn(n,o,y,A,z,H),n===At&&(tt=At=null,at=0),zo=a,ti=n,Oa=o,Ld=y,Ud=p,d0=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,ZE(xe,function(){return R0(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=B.p,B.p=2,A=yt,yt|=4;try{IE(n,a,o)}finally{yt=A,B.p=p,K.T=u}}vn=1,_0(),T0(),C0()}}function _0(){if(vn===1){vn=0;var n=ti,a=zo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{a0(a,n);var y=th,A=cg(n.containerInfo),z=y.focusedElem,H=y.selectionRange;if(A!==z&&z&&z.ownerDocument&&ug(z.ownerDocument.documentElement,z)){if(H!==null&&Cf(z)){var se=H.start,he=H.end;if(he===void 0&&(he=se),"selectionStart"in z)z.selectionStart=se,z.selectionEnd=Math.min(he,z.value.length);else{var me=z.ownerDocument||document,le=me&&me.defaultView||window;if(le.getSelection){var ce=le.getSelection(),je=z.textContent.length,qe=Math.min(H.start,je),Ot=H.end===void 0?qe:Math.min(H.end,je);!ce.extend&&qe>Ot&&(A=Ot,Ot=qe,qe=A);var J=lg(z,qe),Q=lg(z,Ot);if(J&&Q&&(ce.rangeCount!==1||ce.anchorNode!==J.node||ce.anchorOffset!==J.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var oe=me.createRange();oe.setStart(J.node,J.offset),ce.removeAllRanges(),qe>Ot?(ce.addRange(oe),ce.extend(Q.node,Q.offset)):(oe.setEnd(Q.node,Q.offset),ce.addRange(oe))}}}}for(me=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&me.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<me.length;z++){var pe=me[z];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Hu=!!eh,th=eh=null}finally{yt=p,B.p=u,K.T=o}}n.current=a,vn=2}}function T0(){if(vn===2){vn=0;var n=ti,a=zo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{Jy(n,a.alternate,a)}finally{yt=p,B.p=u,K.T=o}}vn=3}}function C0(){if(vn===4||vn===3){vn=0,ke();var n=ti,a=zo,o=Oa,u=d0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vn=5:(vn=0,zo=ti=null,O0(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ei=null),Vr(o),a=a.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(Vt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=B.p,B.p=2,K.T=null;try{for(var y=n.onRecoverableError,A=0;A<u.length;A++){var z=u[A];y(z.value,{componentStack:z.stack})}}finally{K.T=a,B.p=p}}(Oa&3)!==0&&Du(),ia(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===qd?Zs++:(Zs=0,qd=n):Zs=0,Xs(0)}}function O0(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,Ms(a)))}function Du(){return _0(),T0(),C0(),R0()}function R0(){if(vn!==5)return!1;var n=ti,a=Ld;Ld=0;var o=Vr(Oa),u=K.T,p=B.p;try{B.p=32>o?32:o,K.T=null,o=Ud,Ud=null;var y=ti,A=Oa;if(vn=0,zo=ti=null,Oa=0,(yt&6)!==0)throw Error(i(331));var z=yt;if(yt|=4,u0(y.current),o0(y,y.current,A,o),yt=z,Xs(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Vt,y)}catch{}return!0}finally{B.p=p,K.T=u,O0(n,a)}}function A0(n,a,o){a=xr(o,a),a=bd(n.stateNode,a,2),n=Ya(n,a,2),n!==null&&(ft(n,2),ia(n))}function xt(n,a,o){if(n.tag===3)A0(n,n,o);else for(;a!==null;){if(a.tag===3){A0(a,n,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ei===null||!ei.has(u))){n=xr(o,n),o=My(2),u=Ya(a,o,2),u!==null&&(jy(o,u,a,n),ft(u,2),ia(u));break}}a=a.return}}function Bd(n,a,o){var u=n.pingCache;if(u===null){u=n.pingCache=new qE;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||($d=!0,p.add(o),n=GE.bind(null,n,a,o),a.then(n,n))}function GE(n,a,o){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,At===n&&(at&o)===o&&(Zt===4||Zt===3&&(at&62914560)===at&&300>Ue()-Ou?(yt&2)===0&&$o(n,0):Pd|=o,No===at&&(No=0)),ia(n)}function M0(n,a){a===0&&(a=Sr()),n=$i(n,a),n!==null&&(ft(n,a),ia(n))}function KE(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),M0(n,o)}function YE(n,a){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),M0(n,o)}function ZE(n,a){return Be(n,a)}var Nu=null,Io=null,Hd=!1,zu=!1,Gd=!1,ri=0;function ia(n){n!==Io&&n.next===null&&(Io===null?Nu=Io=n:Io=Io.next=n),zu=!0,Hd||(Hd=!0,QE())}function Xs(n,a){if(!Gd&&zu){Gd=!0;do for(var o=!1,u=Nu;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var A=u.suspendedLanes,z=u.pingedLanes;y=(1<<31-Rt(42|n)+1)-1,y&=p&~(A&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,N0(u,y))}else y=at,y=xn(u,u===At?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||Kt(u,y)||(o=!0,N0(u,y));u=u.next}while(o);Gd=!1}}function XE(){j0()}function j0(){zu=Hd=!1;var n=0;ri!==0&&sx()&&(n=ri);for(var a=Ue(),o=null,u=Nu;u!==null;){var p=u.next,y=k0(u,a);y===0?(u.next=null,o===null?Nu=p:o.next=p,p===null&&(Io=o)):(o=u,(n!==0||(y&3)!==0)&&(zu=!0)),u=p}vn!==0&&vn!==5||Xs(n),ri!==0&&(ri=0)}function k0(n,a){for(var o=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Rt(y),z=1<<A,H=p[A];H===-1?((z&o)===0||(z&u)!==0)&&(p[A]=sr(z,a)):H<=a&&(n.expiredLanes|=z),y&=~z}if(a=At,o=at,o=xn(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===a&&(Et===2||Et===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Fe(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Kt(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(u!==null&&Fe(u),Vr(o)){case 2:case 8:o=Ae;break;case 32:o=xe;break;case 268435456:o=Ke;break;default:o=xe}return u=D0.bind(null,n),o=Be(o,u),n.callbackPriority=a,n.callbackNode=o,a}return u!==null&&u!==null&&Fe(u),n.callbackPriority=2,n.callbackNode=null,2}function D0(n,a){if(vn!==0&&vn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(Du()&&n.callbackNode!==o)return null;var u=at;return u=xn(n,n===At?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(p0(n,u,a),k0(n,Ue()),n.callbackNode!=null&&n.callbackNode===o?D0.bind(null,n):null)}function N0(n,a){if(Du())return null;p0(n,a,!0)}function QE(){ux(function(){(yt&6)!==0?Be(Mt,XE):j0()})}function Kd(){if(ri===0){var n=xo;n===0&&(n=Tn,Tn<<=1,(Tn&261888)===0&&(Tn=256)),ri=n}return ri}function z0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ye(""+n)}function $0(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function WE(n,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=z0((p[sn]||null).action),A=u.submitter;A&&(a=(a=A[sn]||null)?z0(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var z=new ki("action","action",null,u,p);n.push({event:z,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ri!==0){var H=A?$0(p,A):new FormData(p);hd(o,{pending:!0,data:H,method:p.method,action:y},null,H)}}else typeof y=="function"&&(z.preventDefault(),H=A?$0(p,A):new FormData(p),hd(o,{pending:!0,data:H,method:p.method,action:y},y,H))},currentTarget:p}]})}}for(var Yd=0;Yd<Mf.length;Yd++){var Zd=Mf[Yd],JE=Zd.toLowerCase(),ex=Zd[0].toUpperCase()+Zd.slice(1);Fr(JE,"on"+ex)}Fr(hg,"onAnimationEnd"),Fr(pg,"onAnimationIteration"),Fr(mg,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(gE,"onTransitionRun"),Fr(yE,"onTransitionStart"),Fr(vE,"onTransitionCancel"),Fr(gg,"onTransitionEnd"),wi("onMouseEnter",["mouseout","mouseover"]),wi("onMouseLeave",["mouseout","mouseover"]),wi("onPointerEnter",["pointerout","pointerover"]),wi("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qs="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(" "),tx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qs));function P0(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var A=u.length-1;0<=A;A--){var z=u[A],H=z.instance,se=z.currentTarget;if(z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=se;try{y(p)}catch(he){Xl(he)}p.currentTarget=null,y=H}else for(A=0;A<u.length;A++){if(z=u[A],H=z.instance,se=z.currentTarget,z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=se;try{y(p)}catch(he){Xl(he)}p.currentTarget=null,y=H}}}}function nt(n,a){var o=a[Ua];o===void 0&&(o=a[Ua]=new Set);var u=n+"__bubble";o.has(u)||(I0(a,n,2,!1),o.add(u))}function Xd(n,a,o){var u=0;a&&(u|=4),I0(o,n,u,a)}var $u="_reactListening"+Math.random().toString(36).slice(2);function Qd(n){if(!n[$u]){n[$u]=!0,bc.forEach(function(o){o!=="selectionchange"&&(tx.has(o)||Xd(o,!1,n),Xd(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[$u]||(a[$u]=!0,Xd("selectionchange",!1,a))}}function I0(n,a,o,u){switch(hv(a)){case 2:var p=Ax;break;case 8:p=Mx;break;default:p=dh}o=p.bind(null,a,o,n),p=void 0,!wr||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Wd(n,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var z=u.stateNode.containerInfo;if(z===p)break;if(A===4)for(A=u.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;z!==null;){if(A=Oi(z),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){u=y=A;continue e}z=z.parentNode}}u=u.return}hn(function(){var se=y,he=Ye(o),me=[];e:{var le=yg.get(n);if(le!==void 0){var ce=ki,je=n;switch(n){case"keypress":if(Ei(o)===0)break e;case"keydown":case"keyup":ce=Y2;break;case"focusin":je="focus",ce=wf;break;case"focusout":je="blur",ce=wf;break;case"beforeblur":case"afterblur":ce=wf;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Gm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=$2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=Q2;break;case hg:case pg:case mg:ce=L2;break;case gg:ce=J2;break;case"scroll":case"scrollend":ce=Sf;break;case"wheel":ce=tE;break;case"copy":case"cut":case"paste":ce=q2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Ym;break;case"toggle":case"beforetoggle":ce=rE}var qe=(a&4)!==0,Ot=!qe&&(n==="scroll"||n==="scrollend"),J=qe?le!==null?le+"Capture":null:le;qe=[];for(var Q=se,oe;Q!==null;){var pe=Q;if(oe=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||oe===null||J===null||(pe=bt(Q,J),pe!=null&&qe.push(Ws(Q,pe,oe))),Ot)break;Q=Q.return}0<qe.length&&(le=new ce(le,je,null,o,he),me.push({event:le,listeners:qe}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",le&&o!==Ie&&(je=o.relatedTarget||o.fromElement)&&(Oi(je)||je[Ir]))break e;if((ce||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(je=o.relatedTarget||o.toElement,ce=se,je=je?Oi(je):null,je!==null&&(Ot=l(je),qe=je.tag,je!==Ot||qe!==5&&qe!==27&&qe!==6)&&(je=null)):(ce=null,je=se),ce!==je)){if(qe=Gm,pe="onMouseLeave",J="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(qe=Ym,pe="onPointerLeave",J="onPointerEnter",Q="pointer"),Ot=ce==null?le:fo(ce),oe=je==null?le:fo(je),le=new qe(pe,Q+"leave",ce,o,he),le.target=Ot,le.relatedTarget=oe,pe=null,Oi(he)===se&&(qe=new qe(J,Q+"enter",je,o,he),qe.target=oe,qe.relatedTarget=Ot,pe=qe),Ot=pe,ce&&je)t:{for(qe=nx,J=ce,Q=je,oe=0,pe=J;pe;pe=qe(pe))oe++;pe=0;for(var Le=Q;Le;Le=qe(Le))pe++;for(;0<oe-pe;)J=qe(J),oe--;for(;0<pe-oe;)Q=qe(Q),pe--;for(;oe--;){if(J===Q||Q!==null&&J===Q.alternate){qe=J;break t}J=qe(J),Q=qe(Q)}qe=null}else qe=null;ce!==null&&L0(me,le,ce,qe,!1),je!==null&&Ot!==null&&L0(me,Ot,je,qe,!0)}}e:{if(le=se?fo(se):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var dt=ng;else if(eg(le))if(rg)dt=hE;else{dt=fE;var ze=cE}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&ge(se.elementType)&&(dt=ng):dt=dE;if(dt&&(dt=dt(n,se))){tg(me,dt,o,he);break e}ze&&ze(n,le,se),n==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Gl(le,"number",le.value)}switch(ze=se?fo(se):window,n){case"focusin":(eg(ze)||ze.contentEditable==="true")&&(mo=ze,Of=se,Os=null);break;case"focusout":Os=Of=mo=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,fg(me,o,he);break;case"selectionchange":if(mE)break;case"keydown":case"keyup":fg(me,o,he)}var Qe;if(xf)e:{switch(n){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else po?Wm(n,o)&&(it="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(it="onCompositionStart");it&&(Zm&&o.locale!=="ko"&&(po||it!=="onCompositionStart"?it==="onCompositionEnd"&&po&&(Qe=rs()):(rr=he,Jr="value"in rr?rr.value:rr.textContent,po=!0)),ze=Pu(se,it),0<ze.length&&(it=new Km(it,n,null,o,he),me.push({event:it,listeners:ze}),Qe?it.data=Qe:(Qe=Jm(o),Qe!==null&&(it.data=Qe)))),(Qe=iE?oE(n,o):sE(n,o))&&(it=Pu(se,"onBeforeInput"),0<it.length&&(ze=new Km("onBeforeInput","beforeinput",null,o,he),me.push({event:ze,listeners:it}),ze.data=Qe)),WE(me,n,se,o,he)}P0(me,a)})}function Ws(n,a,o){return{instance:n,listener:a,currentTarget:o}}function Pu(n,a){for(var o=a+"Capture",u=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=bt(n,o),p!=null&&u.unshift(Ws(n,p,y)),p=bt(n,a),p!=null&&u.push(Ws(n,p,y))),n.tag===3)return u;n=n.return}return[]}function nx(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function L0(n,a,o,u,p){for(var y=a._reactName,A=[];o!==null&&o!==u;){var z=o,H=z.alternate,se=z.stateNode;if(z=z.tag,H!==null&&H===u)break;z!==5&&z!==26&&z!==27||se===null||(H=se,p?(se=bt(o,y),se!=null&&A.unshift(Ws(o,se,H))):p||(se=bt(o,y),se!=null&&A.push(Ws(o,se,H)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var rx=/\r\n?/g,ax=/\u0000|\uFFFD/g;function U0(n){return(typeof n=="string"?n:""+n).replace(rx,`
9
+ `).replace(ax,"")}function q0(n,a){return a=U0(a),U0(n)===a}function Ct(n,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||ne(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&ne(n,""+u);break;case"className":ns(n,"class",u);break;case"tabIndex":ns(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ns(n,o,u);break;case"style":W(n,u,y);break;case"data":if(a!=="object"){ns(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(o==="formAction"?(a!=="input"&&Ct(n,a,"name",p.name,p,null),Ct(n,a,"formEncType",p.formEncType,p,null),Ct(n,a,"formMethod",p.formMethod,p,null),Ct(n,a,"formTarget",p.formTarget,p,null)):(Ct(n,a,"encType",p.encType,p,null),Ct(n,a,"method",p.method,p,null),Ct(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=Me);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=ye(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":nt("beforetoggle",n),nt("toggle",n),ws(n,"popover",u);break;case"xlinkActuate":Wr(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Wr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Wr(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Wr(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Wr(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Wr(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ws(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Re.get(o)||o,ws(n,o,u))}}function Jd(n,a,o,u,p,y){switch(o){case"style":W(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof u=="string"?ne(n,u):(typeof u=="number"||typeof u=="bigint")&&ne(n,""+u);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Me);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=n[sn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,u,p);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):ws(n,o,u)}}}function Nn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",n),nt("load",n);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,y,A,o,null)}}p&&Ct(n,a,"srcSet",o.srcSet,o,null),u&&Ct(n,a,"src",o.src,o,null);return;case"input":nt("invalid",n);var z=y=A=p=null,H=null,se=null;for(u in o)if(o.hasOwnProperty(u)){var he=o[u];if(he!=null)switch(u){case"name":p=he;break;case"type":A=he;break;case"checked":H=he;break;case"defaultChecked":se=he;break;case"value":y=he;break;case"defaultValue":z=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,a));break;default:Ct(n,a,u,he,o,null)}}vf(n,y,z,H,se,A,p,!1);return;case"select":nt("invalid",n),u=A=y=null;for(p in o)if(o.hasOwnProperty(p)&&(z=o[p],z!=null))switch(p){case"value":y=z;break;case"defaultValue":A=z;break;case"multiple":u=z;default:Ct(n,a,p,z,o,null)}a=y,o=A,n.multiple=!!u,a!=null?Mi(n,!!u,a,!1):o!=null&&Mi(n,!!u,o,!0);return;case"textarea":nt("invalid",n),y=p=u=null;for(A in o)if(o.hasOwnProperty(A)&&(z=o[A],z!=null))switch(A){case"value":u=z;break;case"defaultValue":p=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(91));break;default:Ct(n,a,A,z,o,null)}bf(n,u,p,y);return;case"option":for(H in o)o.hasOwnProperty(H)&&(u=o[H],u!=null)&&(H==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":Ct(n,a,H,u,o,null));return;case"dialog":nt("beforetoggle",n),nt("toggle",n),nt("cancel",n),nt("close",n);break;case"iframe":case"object":nt("load",n);break;case"video":case"audio":for(u=0;u<Qs.length;u++)nt(Qs[u],n);break;case"image":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"embed":case"source":case"link":nt("error",n),nt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in o)if(o.hasOwnProperty(se)&&(u=o[se],u!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,se,u,o,null)}return;default:if(ge(a)){for(he in o)o.hasOwnProperty(he)&&(u=o[he],u!==void 0&&Jd(n,a,he,u,o,void 0));return}}for(z in o)o.hasOwnProperty(z)&&(u=o[z],u!=null&&Ct(n,a,z,u,o,null))}function ix(n,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,A=null,z=null,H=null,se=null,he=null;for(ce in o){var me=o[ce];if(o.hasOwnProperty(ce)&&me!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":H=me;default:u.hasOwnProperty(ce)||Ct(n,a,ce,null,u,me)}}for(var le in u){var ce=u[le];if(me=o[le],u.hasOwnProperty(le)&&(ce!=null||me!=null))switch(le){case"type":y=ce;break;case"name":p=ce;break;case"checked":se=ce;break;case"defaultChecked":he=ce;break;case"value":A=ce;break;case"defaultValue":z=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==me&&Ct(n,a,le,ce,u,me)}}Hl(n,A,z,H,se,he,y,p);return;case"select":ce=A=z=le=null;for(y in o)if(H=o[y],o.hasOwnProperty(y)&&H!=null)switch(y){case"value":break;case"multiple":ce=H;default:u.hasOwnProperty(y)||Ct(n,a,y,null,u,H)}for(p in u)if(y=u[p],H=o[p],u.hasOwnProperty(p)&&(y!=null||H!=null))switch(p){case"value":le=y;break;case"defaultValue":z=y;break;case"multiple":A=y;default:y!==H&&Ct(n,a,p,y,u,H)}a=z,o=A,u=ce,le!=null?Mi(n,!!o,le,!1):!!u!=!!o&&(a!=null?Mi(n,!!o,a,!0):Mi(n,!!o,o?[]:"",!1));return;case"textarea":ce=le=null;for(z in o)if(p=o[z],o.hasOwnProperty(z)&&p!=null&&!u.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Ct(n,a,z,null,u,p)}for(A in u)if(p=u[A],y=o[A],u.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&Ct(n,a,A,p,u,y)}vl(n,le,ce);return;case"option":for(var je in o)le=o[je],o.hasOwnProperty(je)&&le!=null&&!u.hasOwnProperty(je)&&(je==="selected"?n.selected=!1:Ct(n,a,je,null,u,le));for(H in u)le=u[H],ce=o[H],u.hasOwnProperty(H)&&le!==ce&&(le!=null||ce!=null)&&(H==="selected"?n.selected=le&&typeof le!="function"&&typeof le!="symbol":Ct(n,a,H,le,u,ce));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var qe in o)le=o[qe],o.hasOwnProperty(qe)&&le!=null&&!u.hasOwnProperty(qe)&&Ct(n,a,qe,null,u,le);for(se in u)if(le=u[se],ce=o[se],u.hasOwnProperty(se)&&le!==ce&&(le!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:Ct(n,a,se,le,u,ce)}return;default:if(ge(a)){for(var Ot in o)le=o[Ot],o.hasOwnProperty(Ot)&&le!==void 0&&!u.hasOwnProperty(Ot)&&Jd(n,a,Ot,void 0,u,le);for(he in u)le=u[he],ce=o[he],!u.hasOwnProperty(he)||le===ce||le===void 0&&ce===void 0||Jd(n,a,he,le,u,ce);return}}for(var J in o)le=o[J],o.hasOwnProperty(J)&&le!=null&&!u.hasOwnProperty(J)&&Ct(n,a,J,null,u,le);for(me in u)le=u[me],ce=o[me],!u.hasOwnProperty(me)||le===ce||le==null&&ce==null||Ct(n,a,me,le,u,ce)}function V0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ox(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,A=p.initiatorType,z=p.duration;if(y&&z&&V0(A)){for(A=0,z=p.responseEnd,u+=1;u<o.length;u++){var H=o[u],se=H.startTime;if(se>z)break;var he=H.transferSize,me=H.initiatorType;he&&V0(me)&&(H=H.responseEnd,A+=he*(H<z?1:(z-se)/(H-se)))}if(--u,a+=8*(y+A)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var eh=null,th=null;function Iu(n){return n.nodeType===9?n:n.ownerDocument}function F0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function B0(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function nh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var rh=null;function sx(){var n=window.event;return n&&n.type==="popstate"?n===rh?!1:(rh=n,!0):(rh=null,!1)}var H0=typeof setTimeout=="function"?setTimeout:void 0,lx=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,ux=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(n){return G0.resolve(null).then(n).catch(cx)}:H0;function cx(n){setTimeout(function(){throw n})}function ai(n){return n==="head"}function K0(n,a){var o=a,u=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(p),Vo(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Js(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Js(o);for(var y=o.firstChild;y;){var A=y.nextSibling,z=y.nodeName;y[co]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=A}}else o==="body"&&Js(n.ownerDocument.body);o=p}while(o);Vo(a)}function Y0(n,a){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function ah(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":ah(o),Vl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function fx(n,a,o,u){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[co])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Rr(n.nextSibling),n===null)break}return null}function dx(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Rr(n.nextSibling),n===null))return null;return n}function Z0(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Rr(n.nextSibling),n===null))return null;return n}function ih(n){return n.data==="$?"||n.data==="$~"}function oh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function hx(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Rr(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var sh=null;function X0(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Rr(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Q0(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function W0(n,a,o){switch(a=Iu(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Js(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Vl(n)}var Ar=new Map,J0=new Set;function Lu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ra=B.d;B.d={f:px,r:mx,D:gx,C:yx,L:vx,m:bx,X:wx,S:Sx,M:Ex};function px(){var n=Ra.f(),a=Mu();return n||a}function mx(n){var a=Ri(n);a!==null&&a.tag===5&&a.type==="form"?gy(a):Ra.r(n)}var Lo=typeof document>"u"?null:document;function ev(n,a,o){var u=Lo;if(u&&typeof a=="string"&&a){var p=Bn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),J0.has(p)||(J0.add(p),n={rel:n,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function gx(n){Ra.D(n),ev("dns-prefetch",n,null)}function yx(n,a){Ra.C(n,a),ev("preconnect",n,a)}function vx(n,a,o){Ra.L(n,a,o);var u=Lo;if(u&&n&&a){var p='link[rel="preload"][as="'+Bn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Bn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Bn(o.imageSizes)+'"]')):p+='[href="'+Bn(n)+'"]';var y=p;switch(a){case"style":y=Uo(n);break;case"script":y=qo(n)}Ar.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Ar.set(y,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(el(y))||a==="script"&&u.querySelector(tl(y))||(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function bx(n,a){Ra.m(n,a);var o=Lo;if(o&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Bn(u)+'"][href="'+Bn(n)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=qo(n)}if(!Ar.has(y)&&(n=g({rel:"modulepreload",href:n},a),Ar.set(y,n),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(tl(y)))return}u=o.createElement("link"),Nn(u,"link",n),yn(u),o.head.appendChild(u)}}}function Sx(n,a,o){Ra.S(n,a,o);var u=Lo;if(u&&n){var p=Ai(u).hoistableStyles,y=Uo(n);a=a||"default";var A=p.get(y);if(!A){var z={loading:0,preload:null};if(A=u.querySelector(el(y)))z.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Ar.get(y))&&lh(n,o);var H=A=u.createElement("link");yn(H),Nn(H,"link",n),H._p=new Promise(function(se,he){H.onload=se,H.onerror=he}),H.addEventListener("load",function(){z.loading|=1}),H.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Uu(A,a,u)}A={type:"stylesheet",instance:A,count:1,state:z},p.set(y,A)}}}function wx(n,a){Ra.X(n,a);var o=Lo;if(o&&n){var u=Ai(o).hoistableScripts,p=qo(n),y=u.get(p);y||(y=o.querySelector(tl(p)),y||(n=g({src:n,async:!0},a),(a=Ar.get(p))&&uh(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Ex(n,a){Ra.M(n,a);var o=Lo;if(o&&n){var u=Ai(o).hoistableScripts,p=qo(n),y=u.get(p);y||(y=o.querySelector(tl(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=Ar.get(p))&&uh(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function tv(n,a,o,u){var p=(p=ee.current)?Lu(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Uo(o.href),o=Ai(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Uo(o.href);var y=Ai(p).hoistableStyles,A=y.get(n);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,A),(y=p.querySelector(el(n)))&&!y._p&&(A.instance=y,A.state.loading=5),Ar.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Ar.set(n,o),y||xx(p,n,o,A.state))),a&&u===null)throw Error(i(528,""));return A}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=qo(o),o=Ai(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Uo(n){return'href="'+Bn(n)+'"'}function el(n){return'link[rel="stylesheet"]['+n+"]"}function nv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function xx(n,a,o,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Nn(a,"link",o),yn(a),n.head.appendChild(a))}function qo(n){return'[src="'+Bn(n)+'"]'}function tl(n){return"script[async]"+n}function rv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Bn(o.href)+'"]');if(u)return a.instance=u,yn(u),u;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),yn(u),Nn(u,"style",p),Uu(u,o.precedence,n),a.instance=u;case"stylesheet":p=Uo(o.href);var y=n.querySelector(el(p));if(y)return a.state.loading|=4,a.instance=y,yn(y),y;u=nv(o),(p=Ar.get(p))&&lh(u,p),y=(n.ownerDocument||n).createElement("link"),yn(y);var A=y;return A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),a.state.loading|=4,Uu(y,o.precedence,n),a.instance=y;case"script":return y=qo(o.src),(p=n.querySelector(tl(y)))?(a.instance=p,yn(p),p):(u=o,(p=Ar.get(y))&&(u=g({},o),uh(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),yn(p),Nn(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Uu(u,o.precedence,n));return a.instance}function Uu(n,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,A=0;A<u.length;A++){var z=u[A];if(z.dataset.precedence===a)y=z;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function lh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function uh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var qu=null;function av(n,a,o){if(qu===null){var u=new Map,p=qu=new Map;p.set(o,u)}else p=qu,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[co]||y[$t]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var z=u.get(A);z?z.push(y):u.set(A,[y])}}return u}function iv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function _x(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function ov(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Tx(n,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Uo(u.href),y=a.querySelector(el(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Vu.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,yn(y);return}y=a.ownerDocument||a,u=nv(u),(p=Ar.get(p))&&lh(u,p),y=y.createElement("link"),yn(y);var A=y;A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Vu.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var ch=0;function Cx(n,a){return n.stylesheets&&n.count===0&&Bu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&Bu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&ch===0&&(ch=62500*ox());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Bu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>ch?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Fu=null;function Bu(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Fu=new Map,a.forEach(Ox,n),Fu=null,Vu.call(n))}function Ox(n,a){if(!(a.state.loading&4)){var o=Fu.get(n);if(o)var u=o.get(null);else{o=new Map,Fu.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var A=p[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(o.set(A.dataset.precedence,A),u=A)}u&&o.set(null,u)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||u,y===u&&o.set(null,p),o.set(A,p),this.count++,u=Vu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var nl={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Rx(n,a,o,u,p,y,A,z,H){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qr(0),this.hiddenUpdates=qr(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function sv(n,a,o,u,p,y,A,z,H,se,he,me){return n=new Rx(n,a,o,A,H,se,he,me,z),a=1,y===!0&&(a|=24),y=ur(3,null,null,a),n.current=y,y.stateNode=n,a=Ff(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},Kf(y),n}function lv(n){return n?(n=vo,n):vo}function uv(n,a,o,u,p,y){p=lv(p),u.context===null?u.context=p:u.pendingContext=p,u=Ka(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Ya(n,u,a),o!==null&&(Jn(o,n,a),Ns(o,n,a))}function cv(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function fh(n,a){cv(n,a),(n=n.alternate)&&cv(n,a)}function fv(n){if(n.tag===13||n.tag===31){var a=$i(n,67108864);a!==null&&Jn(a,n,67108864),fh(n,67108864)}}function dv(n){if(n.tag===13||n.tag===31){var a=pr();a=Ft(a);var o=$i(n,a);o!==null&&Jn(o,n,a),fh(n,a)}}var Hu=!0;function Ax(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=2,dh(n,a,o,u)}finally{B.p=y,K.T=p}}function Mx(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=8,dh(n,a,o,u)}finally{B.p=y,K.T=p}}function dh(n,a,o,u){if(Hu){var p=hh(u);if(p===null)Wd(n,a,u,Gu,o),pv(n,u);else if(kx(p,n,a,o,u))u.stopPropagation();else if(pv(n,u),a&4&&-1<jx.indexOf(n)){for(;p!==null;){var y=Ri(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Dt(y.pendingLanes);if(A!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;A;){var H=1<<31-Rt(A);z.entanglements[1]|=H,A&=~H}ia(y),(yt&6)===0&&(Ru=Ue()+500,Xs(0))}}break;case 31:case 13:z=$i(y,2),z!==null&&Jn(z,y,2),Mu(),fh(y,2)}if(y=hh(u),y===null&&Wd(n,a,u,Gu,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else Wd(n,a,u,null,o)}}function hh(n){return n=Ye(n),ph(n)}var Gu=null;function ph(n){if(Gu=null,n=Oi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=c(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Gu=n,null}function hv(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xe()){case Mt:return 2;case Ae:return 8;case xe:case Ne:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var mh=!1,ii=null,oi=null,si=null,rl=new Map,al=new Map,li=[],jx="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".split(" ");function pv(n,a){switch(n){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":rl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":al.delete(a.pointerId)}}function il(n,a,o,u,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=Ri(a),a!==null&&fv(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function kx(n,a,o,u,p){switch(a){case"focusin":return ii=il(ii,n,a,o,u,p),!0;case"dragenter":return oi=il(oi,n,a,o,u,p),!0;case"mouseover":return si=il(si,n,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return rl.set(y,il(rl.get(y)||null,n,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,al.set(y,il(al.get(y)||null,n,a,o,u,p)),!0}return!1}function mv(n){var a=Oi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){n.blockedOn=a,$a(n.priority,function(){dv(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,$a(n.priority,function(){dv(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Ku(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=hh(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);Ie=u,o.target.dispatchEvent(u),Ie=null}else return a=Ri(o),a!==null&&fv(a),n.blockedOn=o,!1;a.shift()}return!0}function gv(n,a,o){Ku(n)&&o.delete(a)}function Dx(){mh=!1,ii!==null&&Ku(ii)&&(ii=null),oi!==null&&Ku(oi)&&(oi=null),si!==null&&Ku(si)&&(si=null),rl.forEach(gv),al.forEach(gv)}function Yu(n,a){n.blockedOn===a&&(n.blockedOn=null,mh||(mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Dx)))}var Zu=null;function yv(n){Zu!==n&&(Zu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zu===n&&(Zu=null);for(var a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(ph(u||o)===null)continue;break}var y=Ri(o);y!==null&&(n.splice(a,3),a-=3,hd(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function Vo(n){function a(H){return Yu(H,n)}ii!==null&&Yu(ii,n),oi!==null&&Yu(oi,n),si!==null&&Yu(si,n),rl.forEach(a),al.forEach(a);for(var o=0;o<li.length;o++){var u=li[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<li.length&&(o=li[0],o.blockedOn===null);)mv(o),o.blockedOn===null&&li.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],A=p[sn]||null;if(typeof y=="function")A||yv(o);else if(A){var z=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[sn]||null)z=A.formAction;else if(ph(p)!==null)continue}else z=A.action;typeof z=="function"?o[u+1]=z:(o.splice(u,3),u-=3),yv(o)}}}function vv(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function gh(n){this._internalRoot=n}Xu.prototype.render=gh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=pr();uv(o,u,n,a,null,null)},Xu.prototype.unmount=gh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;uv(n.current,2,null,n,null,null),Mu(),a[Ir]=null}};function Xu(n){this._internalRoot=n}Xu.prototype.unstable_scheduleHydration=function(n){if(n){var a=Pr();n={blockedOn:null,target:n,priority:a};for(var o=0;o<li.length&&a!==0&&a<li[o].priority;o++);li.splice(o,0,n),o===0&&mv(n)}};var bv=t.version;if(bv!=="19.2.4")throw Error(i(527,bv,"19.2.4"));B.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=h(a),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var Nx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qu.isDisabled&&Qu.supportsFiber)try{Vt=Qu.inject(Nx),wt=Qu}catch{}}return wv.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,u="",p=Cy,y=Oy,A=Ry;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=sv(n,1,!1,null,null,o,u,null,p,y,A,vv),n[Ir]=a.current,Qd(n),new gh(a)},wv.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var u=!1,p="",y=Cy,A=Oy,z=Ry,H=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(z=o.onRecoverableError),o.formState!==void 0&&(H=o.formState)),a=sv(n,1,!0,a,o??null,u,p,H,y,A,z,vv),a.context=lv(null),o=a.current,u=pr(),u=Ft(u),p=Ka(u),p.callback=null,Ya(o,p,u),o=u,a.current.lanes=o,ft(a,o),ia(a),n[Ir]=a.current,Qd(n),new Xu(a)},wv.version="19.2.4",wv}var G5;function BU(){if(G5)return Ix.exports;G5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ix.exports=FU(),Ix.exports}var HU=BU(),Sm=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},GU={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},KU=class{#e=GU;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ah=new KU;function YU(e){setTimeout(e,0)}var Ih=typeof window>"u"||"Deno"in globalThis;function Qi(){}function ZU(e,t){return typeof e=="function"?e(t):e}function LT(e){return typeof e=="number"&&e>=0&&e!==1/0}function qN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zc(e,t){return typeof e=="function"?e(t):e}function os(e,t){return typeof e=="function"?e(t):e}function K5(e,t){const{type:r="all",exact:i,fetchStatus:s,predicate:l,queryKey:c,stale:f}=e;if(c){if(i){if(t.queryHash!==DO(c,t.options))return!1}else if(!nb(t.queryKey,c))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||l&&!l(t))}function Y5(e,t){const{exact:r,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Lh(t.options.mutationKey)!==Lh(l))return!1}else if(!nb(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function DO(e,t){return(t?.queryKeyHashFn||Lh)(e)}function Lh(e){return JSON.stringify(e,(t,r)=>UT(r)?Object.keys(r).sort().reduce((i,s)=>(i[s]=r[s],i),{}):r)}function nb(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>nb(e[r],t[r])):!1}var XU=Object.prototype.hasOwnProperty;function VN(e,t,r=0){if(e===t)return e;if(r>500)return t;const i=Z5(e)&&Z5(t);if(!i&&!(UT(e)&&UT(t)))return t;const l=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),f=c.length,d=i?new Array(f):{};let h=0;for(let m=0;m<f;m++){const g=i?m:c[m],v=e[g],S=t[g];if(v===S){d[g]=v,(i?m<l:XU.call(e,g))&&h++;continue}if(v===null||S===null||typeof v!="object"||typeof S!="object"){d[g]=S;continue}const b=VN(v,S,r+1);d[g]=b,b===v&&h++}return l===f&&h===l?e:d}function JS(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Z5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function UT(e){if(!X5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!X5(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function X5(e){return Object.prototype.toString.call(e)==="[object Object]"}function QU(e){return new Promise(t=>{Ah.setTimeout(t,e)})}function qT(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?VN(e,t):t}function WU(e,t,r=0){const i=[...e,t];return r&&i.length>r?i.slice(1):i}function JU(e,t,r=0){const i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var NO=Symbol();function FN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===NO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function zO(e,t){return typeof e=="function"?e(...t):!!e}function eq(e,t,r){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var tq=class extends Sm{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ih&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},$O=new tq;function VT(){let e,t;const r=new Promise((s,l)=>{e=s,t=l});r.status="pending",r.catch(()=>{});function i(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},r.reject=s=>{i({status:"rejected",reason:s}),t(s)},r}var nq=YU;function rq(){let e=[],t=0,r=f=>{f()},i=f=>{f()},s=nq;const l=f=>{t?e.push(f):s(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{i(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{l(()=>{f(...d)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{s=f}}}var ja=rq(),aq=class extends Sm{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ih&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},ew=new aq;function iq(e){return Math.min(1e3*2**e,3e4)}function BN(e){return(e??"online")==="online"?ew.isOnline():!0}var FT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function HN(e){let t=!1,r=0,i;const s=VT(),l=()=>s.status!=="pending",c=_=>{if(!l()){const E=new FT(_);v(E),e.onCancel?.(E)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>$O.isFocused()&&(e.networkMode==="always"||ew.isOnline())&&e.canRun(),m=()=>BN(e.networkMode)&&e.canRun(),g=_=>{l()||(i?.(),s.resolve(_))},v=_=>{l()||(i?.(),s.reject(_))},S=()=>new Promise(_=>{i=E=>{(l()||h())&&_(E)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),b=()=>{if(l())return;let _;const E=r===0?e.initialPromise:void 0;try{_=E??e.fn()}catch(R){_=Promise.reject(R)}Promise.resolve(_).then(g).catch(R=>{if(l())return;const w=e.retry??(Ih?0:3),T=e.retryDelay??iq,x=typeof T=="function"?T(r,R):T,O=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,R);if(t||!O){v(R);return}r++,e.onFail?.(r,R),QU(x).then(()=>h()?void 0:S()).then(()=>{t?v(R):b()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(i?.(),s),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?b():S().then(b),s)}}var GN=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),LT(this.gcTime)&&(this.#e=Ah.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ih?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ah.clearTimeout(this.#e),this.#e=void 0)}},oq=class extends GN{#e;#t;#n;#a;#r;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=W5(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=W5(this.options);t.data!==void 0&&(this.setState(Q5(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=qT(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Qi).catch(Qi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>os(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===NO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>zc(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!qN(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},s=()=>{const f=FN(this.options,t),h=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#s=!1,this.options.persister?this.options.persister(f,h,this):f(h)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:s};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=HN({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof FT&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,d)=>{this.#i({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof FT){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...KN(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...Q5(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),ja.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function KN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:BN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Q5(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function W5(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var sq=class extends Sm{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#s=VT(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#o;#s;#i;#m;#d;#h;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),J5(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return BT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return BT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof os(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!JS(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&eM(this.#t,r,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#t!==r||os(this.options.enabled,this.#t)!==os(t.enabled,this.#t)||zc(this.options.staleTime,this.#t)!==zc(t.staleTime,this.#t))&&this.#g();const s=this.#y();i&&(this.#t!==r||os(this.options.enabled,this.#t)!==os(t.enabled,this.#t)||s!==this.#l)&&this.#v(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return uq(this,r)&&(this.#a=r,this.#o=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Qi)),t}#g(){this.#S();const e=zc(this.options.staleTime,this.#t);if(Ih||this.#a.isStale||!LT(e))return;const r=qN(this.#a.dataUpdatedAt,e)+1;this.#u=Ah.setTimeout(()=>{this.#a.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Ih||os(this.options.enabled,this.#t)===!1||!LT(this.#l)||this.#l===0)&&(this.#c=Ah.setInterval(()=>{(this.options.refetchIntervalInBackground||$O.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#u&&(Ah.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Ah.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#t,i=this.options,s=this.#a,l=this.#r,c=this.#o,d=e!==r?e.state:this.#n,{state:h}=e;let m={...h},g=!1,v;if(t._optimisticResults){const D=this.hasListeners(),$=!D&&J5(e,t),q=D&&eM(e,r,t,i);($||q)&&(m={...m,...KN(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:b,status:_}=m;v=m.data;let E=!1;if(t.placeholderData!==void 0&&v===void 0&&_==="pending"){let D;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=s.data,E=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(_="success",v=qT(s?.data,D,t),g=!0)}if(t.select&&v!==void 0&&!E)if(s&&v===l?.data&&t.select===this.#m)v=this.#d;else try{this.#m=t.select,v=t.select(v),v=qT(s?.data,v,t),this.#d=v,this.#i=null}catch(D){this.#i=D}this.#i&&(S=this.#i,v=this.#d,b=Date.now(),_="error");const R=m.fetchStatus==="fetching",w=_==="pending",T=_==="error",x=w&&R,O=v!==void 0,M={status:_,fetchStatus:m.fetchStatus,isPending:w,isSuccess:_==="success",isError:T,isInitialLoading:x,isLoading:x,data:v,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!w,isLoadingError:T&&!O,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&O,isStale:PO(e,t),refetch:this.refetch,promise:this.#s,isEnabled:os(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,$=M.status==="error"&&!D,q=F=>{$?F.reject(M.error):D&&F.resolve(M.data)},L=()=>{const F=this.#s=M.promise=VT();q(F)},V=this.#s;switch(V.status){case"pending":e.queryHash===r.queryHash&&q(V);break;case"fulfilled":($||M.data!==V.value)&&L();break;case"rejected":(!$||M.error!==V.reason)&&L();break}}return M}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),JS(t,e))return;this.#a=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(c=>{const f=c;return this.#a[f]!==e[f]&&l.has(f)})};this.#x({listeners:r()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(e){ja.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function lq(e,t){return os(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function J5(e,t){return lq(e,t)||e.state.data!==void 0&&BT(e,t,t.refetchOnMount)}function BT(e,t,r){if(os(t.enabled,e)!==!1&&zc(t.staleTime,e)!=="static"){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&PO(e,t)}return!1}function eM(e,t,r,i){return(e!==t||os(i.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&PO(e,r)}function PO(e,t){return os(t.enabled,e)!==!1&&e.isStaleByTime(zc(t.staleTime,e))}function uq(e,t){return!JS(e.getCurrentResult(),t)}function tM(e){return{onFetch:(t,r)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let m=!1;const g=b=>{eq(b,()=>t.signal,()=>m=!0)},v=FN(t.options,t.fetchOptions),S=async(b,_,E)=>{if(m)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const w=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:_,direction:E?"backward":"forward",meta:t.options.meta};return g(C),C})(),T=await v(w),{maxPages:x}=t.options,O=E?JU:WU;return{pages:O(b.pages,T,x),pageParams:O(b.pageParams,_,x)}};if(s&&l.length){const b=s==="backward",_=b?cq:nM,E={pages:l,pageParams:c},R=_(i,E);f=await S(E,R,b)}else{const b=e??l.length;do{const _=d===0?c[0]??i.initialPageParam:nM(i,f);if(d>0&&_==null)break;f=await S(f,_),d++}while(d<b)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function nM(e,{pages:t,pageParams:r}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,r[i],r):void 0}function cq(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var fq=class extends GN{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||YN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=HN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#a.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:s})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,r),await this.options.onSuccess?.(l,e,this.state.context,r),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(l,null,e,this.state.context,r),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ja.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function YN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dq=class extends Sm{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const i=new fq({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){this.#e.add(e);const t=d1(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=d1(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=d1(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=d1(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ja.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Y5(t,r))}findAll(e={}){return this.getAll().filter(t=>Y5(e,t))}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ja.batch(()=>Promise.all(e.map(t=>t.continue().catch(Qi))))}};function d1(e){return e.options.scope?.id}var hq=class extends Sm{#e;#t=void 0;#n;#a;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),JS(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Lh(r.mutationKey)!==Lh(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,r){return this.#a=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??YN();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){ja.batch(()=>{if(this.#a&&this.hasListeners()){const r=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,r,i,s)}catch(l){Promise.reject(l)}try{this.#a.onSettled?.(t.data,null,r,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,r,i,s)}catch(l){Promise.reject(l)}try{this.#a.onSettled?.(void 0,t.error,r,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(r=>{r(this.#t)})})}},pq=class extends Sm{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const i=t.queryKey,s=t.queryHash??DO(i,t);let l=this.get(s);return l||(l=new oq({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ja.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>K5(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>K5(e,r)):t}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ja.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ja.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},mq=class{#e;#t;#n;#a;#r;#o;#s;#i;constructor(e={}){this.#e=e.queryCache||new pq,this.#t=e.mutationCache||new dq,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=$O.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=ew.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const i=r.data;return[t,i]})}setQueryData(e,t,r){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,c=ZU(t,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ja.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;ja.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return ja.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},i=ja.batch(()=>this.#e.findAll(e).map(s=>s.cancel(r)));return Promise.all(i).then(Qi).catch(Qi)}invalidateQueries(e,t={}){return ja.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},i=ja.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,r);return r.throwOnError||(l=l.catch(Qi)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Qi)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(zc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qi).catch(Qi)}fetchInfiniteQuery(e){return e.behavior=tM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qi).catch(Qi)}ensureInfiniteQueryData(e){return e.behavior=tM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ew.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(Lh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],r={};return t.forEach(i=>{nb(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Lh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(i=>{nb(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=DO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===NO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ZN=j.createContext(void 0),XN=e=>{const t=j.useContext(ZN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},gq=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(ZN.Provider,{value:e,children:t})),QN=j.createContext(!1),yq=()=>j.useContext(QN);QN.Provider;function vq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bq=j.createContext(vq()),Sq=()=>j.useContext(bq),wq=(e,t,r)=>{const i=r?.state.error&&typeof e.throwOnError=="function"?zO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},Eq=e=>{j.useEffect(()=>{e.clearReset()},[e])},xq=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||zO(r,[e.error,i])),_q=(e,t)=>t.state.data===void 0,Tq=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>r(i(...s)):r(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Cq=(e,t)=>e.isLoading&&e.isFetching&&!t,Oq=(e,t)=>e?.suspense&&t.isPending,rM=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Rq(e,t,r){const i=yq(),s=Sq(),l=XN(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",Tq(c),wq(c,s,f),Eq(s);const d=!l.getQueryCache().get(c.queryHash),[h]=j.useState(()=>new t(l,c)),m=h.getOptimisticResult(c),g=!i&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(v=>{const S=g?h.subscribe(ja.batchCalls(v)):Qi;return h.updateResult(),S},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(c)},[c,h]),Oq(c,m))throw rM(c,h,s);if(xq({result:m,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw m.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!Ih&&Cq(m,i)&&(d?rM(c,h,s):f?.promise)?.catch(Qi).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?m:h.trackResult(m)}function WN(e,t){return Rq({...e,enabled:!0,suspense:!0,throwOnError:_q,placeholderData:void 0},sq)}function Aq(e,t){const r=XN(),[i]=j.useState(()=>new hq(r,e));j.useEffect(()=>{i.setOptions(e)},[i,e]);const s=j.useSyncExternalStore(j.useCallback(c=>i.subscribe(ja.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=j.useCallback((c,f)=>{i.mutate(c,f).catch(Qi)},[i]);if(s.error&&zO(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const IO=kq();function Lr(e,...t){if(!IO)return;const r=jq(e,...t);performance.mark(r);try{console.log(e,...t)}catch{console.log(r)}}function Mq(e,...t){IO&&console.warn(e,...t)}function jq(e,...t){return e.replace(/%[sfdO]/g,r=>{const i=t.shift();return r==="%O"&&i?JSON.stringify(i).replace(/"([^"]+)":/g,"$1:"):String(i)})}function kq(){try{const e="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(e,e);const t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const Dq={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function kb(e){return`[nuqs] ${Dq[e]}
10
+ See https://nuqs.dev/NUQS-${e}`}function Nq(e){if(e.size===0)return"";const t=[];for(const[i,s]of e.entries()){const l=i.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${l}=${zq(s)}`)}return"?"+t.join("&")}function zq(e){return e.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,t=>encodeURIComponent(t))}const Uh=j.createContext({useAdapter(){throw new Error(kb(404))}});Uh.displayName="NuqsAdapterContext";IO&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Uh&&console.error(kb(303)),window.__NuqsAdapterContext=Uh);function $q(e){return({children:t,defaultOptions:r,processUrlSearchParams:i,...s})=>j.createElement(Uh.Provider,{...s,value:{useAdapter:e,defaultOptions:r,processUrlSearchParams:i}},t)}function Pq(e){const t=j.useContext(Uh);if(!("useAdapter"in t))throw new Error(kb(404));return t.useAdapter(e)}const Iq=()=>j.useContext(Uh).defaultOptions,Lq=()=>j.useContext(Uh).processUrlSearchParams;function Uq(){if(typeof window>"u"||!window.GestureEvent)return 50;try{const e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function qq(e){return{method:"throttle",timeMs:e}}const Fv=qq(Uq());function Vq(e){return e===null||Array.isArray(e)&&e.length===0}function Fq(e,t,r){if(typeof e=="string")r.set(t,e);else{r.delete(t);for(const i of e)r.append(t,i);r.has(t)||r.set(t,"")}return r}function LO(){const e=new Map;return{on(t,r){const i=e.get(t)||[];return i.push(r),e.set(t,i),()=>this.off(t,r)},off(t,r){const i=e.get(t);i&&e.set(t,i.filter(s=>s!==r))},emit(t,r){e.get(t)?.forEach(i=>i(r))}}}function HT(e,t,r){function i(){e(),r.removeEventListener("abort",l)}const s=setTimeout(i,t);function l(){clearTimeout(s),r.removeEventListener("abort",l)}r.addEventListener("abort",l)}function GT(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},r=()=>{};return{promise:new e((i,s)=>{t=i,r=s}),resolve:t,reject:r}}function Bq(e,t){let r=t;for(let i=e.length-1;i>=0;i--){const s=e[i];if(!s)continue;const l=r;r=()=>s(l)}r()}function KT(){return new URLSearchParams(location.search)}var JN=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=Fv.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:r},i=Fv.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Lr("[nuqs gtq] Enqueueing %s=%s %O",e,t,r),this.updateMap.set(e,t),r.history==="push"&&(this.options.history="push"),r.scroll&&(this.options.scroll=!0),r.shallow===!1&&(this.options.shallow=!1),r.startTransition&&this.transitions.add(r.startTransition),(!Number.isFinite(this.timeMs)||i>this.timeMs)&&(this.timeMs=i)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=KT}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=KT,rateLimitFactor:t=1,...r},i){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Lr("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=GT();const s=()=>{this.lastFlushedAt=performance.now();const[c,f]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},i);f===null?(this.resolvers.resolve(c),this.resetQueueOnNextPush=!0):this.resolvers.reject(c),this.resolvers=null};return HT(()=>{const c=performance.now()-this.lastFlushedAt,f=this.timeMs,d=t*Math.max(0,f-c);Lr("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",d,f,t),d===0?s():HT(s,d,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const e=Array.from(this.updateMap.keys());return Lr("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=Fv.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:r,getSearchParamsSnapshot:i}=e;let s=i();if(Lr("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,s.toString()),this.updateMap.size===0)return[s,null];const l=Array.from(this.updateMap.entries()),c={...this.options},f=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Lr("[nuqs gtq] Flushing queue %O with options %O",l,c);for(const[d,h]of l)h===null?s.delete(d):s=Fq(h,d,s);t&&(s=t(s));try{return Bq(f,()=>{r(s,c)}),[s,null]}catch(d){return console.error(kb(429),l.map(([h])=>h).join(),d),[s,d]}}};const jS=new JN;function Hq(e,t,r){const i=j.useCallback(()=>{const l=Object.fromEntries(e.map(c=>[c,r(c)]));return[JSON.stringify(l),l]},[e.join(","),r]),s=j.useRef(null);return s.current===null&&(s.current=i()),j.useSyncExternalStore(j.useCallback(l=>{const c=e.map(f=>t(f,l));return()=>c.forEach(f=>f())},[e.join(","),t]),()=>{const[l,c]=i();return s.current[0]===l?s.current[1]:(s.current=[l,c],c)},()=>s.current[1])}var Gq=class{callback;resolvers=GT();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,HT(()=>{const r=this.resolvers;try{Lr("[nuqs dq] Flushing debounce queue",e);const i=this.callback(e);Lr("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=GT(),i.then(s=>r.resolve(s)).catch(s=>r.reject(s))}catch(i){this.queuedValue=void 0,r.reject(i)}},t,this.controller.signal),this.resolvers.promise}},Kq=class{throttleQueue;queues=new Map;queuedQuerySync=LO();constructor(e=new JN){this.throttleQueue=e}useQueuedQueries(e){return Hq(e,(t,r)=>this.queuedQuerySync.on(t,r),t=>this.getQueuedQuery(t))}push(e,t,r,i){if(!Number.isFinite(t)){const c=r.getSearchParamsSnapshot??KT;return Promise.resolve(c())}const s=e.key;if(!this.queues.has(s)){Lr("[nuqs dqc] Creating debounce queue for `%s`",s);const c=new Gq(f=>(this.throttleQueue.push(f),this.throttleQueue.flush(r,i).finally(()=>{this.queues.get(f.key)?.queuedValue===void 0&&(Lr("[nuqs dqc] Cleaning up empty queue for `%s`",f.key),this.queues.delete(f.key)),this.queuedQuerySync.emit(f.key)})));this.queues.set(s,c)}Lr("[nuqs dqc] Enqueueing debounce update %O",e);const l=this.queues.get(s).push(e,t);return this.queuedQuerySync.emit(s),l}abort(e){const t=this.queues.get(e);return t?(Lr("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),r=>(r.then(t.resolvers.resolve,t.resolvers.reject),r)):r=>r}abortAll(){for(const[e,t]of this.queues.entries())Lr("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){const t=this.queues.get(e)?.queuedValue?.query;return t!==void 0?t:this.throttleQueue.getQueuedQuery(e)}};const Vx=new Kq(jS);function ez(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((r,i)=>r===t[i])}function aM(e,t,r){return i=>{if(!(t.length===0||t.some(l=>!ez(i.getAll(l),e.getAll(l)))))return Lr("[nuqs `%s`] no change, returning previous",t.join(","),i),i;const s=tz(e,t,r);return Lr("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),i,s),s}}function tz(e,t,r){if(t.length===0)return e;const i=r?new URLSearchParams(e):e;for(const s of e.keys())t.includes(s)||i.delete(s);return i}const Yq="__nuqs__",YT=LO();function Zq(e){return function(r,i){const s=new URL(location.href);s.search=Nq(r),Lr("[nuqs react] Updating url: %s",s),e&&i.shallow===!1?(i.history==="push"?location.assign:location.replace).call(location,s):(i.history==="push"?history.pushState:history.replaceState).call(history,history.state,Yq,s),YT.emit("update",r),i.scroll===!0&&window.scrollTo({top:0})}}const nz=j.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function Xq(e){const{fullPageNavigationOnShallowFalseUpdates:t}=j.useContext(nz),[r,i]=j.useState(()=>typeof location>"u"?new URLSearchParams:tz(new URLSearchParams(location.search),e,!1));return j.useEffect(()=>{const s=()=>{i(aM(new URLSearchParams(location.search),e,!1))},l=c=>{i(aM(c,e,!0))};return YT.on("update",l),window.addEventListener("popstate",s),()=>{YT.off("update",l),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:r,updateUrl:j.useMemo(()=>Zq(t),[t])}}const Qq=$q(Xq);function Wq({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...r}){return j.createElement(nz.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},j.createElement(Qq,{...r,children:e}))}function ar(e,t="Assertion error"){if(!e)throw Error(t)}function Jp({group:e}){const{orientation:t,panels:r}=e;return r.reduce((i,s)=>(i+=t==="horizontal"?s.element.offsetWidth:s.element.offsetHeight,i),0)}function ZT(e,t){return Array.from(t).sort(e==="horizontal"?Jq:eV)}function Jq(e,t){const r=e.element.offsetLeft-t.element.offsetLeft;return r!==0?r:e.element.offsetWidth-t.element.offsetWidth}function eV(e,t){const r=e.element.offsetTop-t.element.offsetTop;return r!==0?r:e.element.offsetHeight-t.element.offsetHeight}function rz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function az(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function tV({orientation:e,rects:t,targetRect:r}){const i={x:r.x+r.width/2,y:r.y+r.height/2};let s,l=Number.MAX_VALUE;for(const c of t){const{x:f,y:d}=az(i,c),h=e==="horizontal"?f:d;h<l&&(l=h,s=c)}return ar(s,"No rect found"),s}let h1;function nV(){return h1===void 0&&(typeof matchMedia=="function"?h1=!!matchMedia("(pointer:coarse)").matches:h1=!1),h1}function iz(e){const{element:t,orientation:r,panels:i,separators:s}=e,l=ZT(r,Array.from(t.children).filter(rz).map(m=>({element:m}))).map(({element:m})=>m),c=[];let f=!1,d,h=[];for(const m of l)if(m.hasAttribute("data-panel")){const g=i.find(v=>v.element===m);if(g){if(d){const v=d.element.getBoundingClientRect(),S=m.getBoundingClientRect();let b;if(f){const _=r==="horizontal"?new DOMRect(v.right,v.top,0,v.height):new DOMRect(v.left,v.bottom,v.width,0),E=r==="horizontal"?new DOMRect(S.left,S.top,0,S.height):new DOMRect(S.left,S.top,S.width,0);switch(h.length){case 0:{b=[_,E];break}case 1:{const R=h[0],w=tV({orientation:r,rects:[v,S],targetRect:R.element.getBoundingClientRect()});b=[R,w===v?E:_];break}default:{b=h;break}}}else h.length?b=h:b=[r==="horizontal"?new DOMRect(v.right,S.top,S.left-v.right,S.height):new DOMRect(S.left,v.bottom,S.width,S.top-v.bottom)];for(const _ of b){let E="width"in _?_:_.element.getBoundingClientRect();const R=nV()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(E.width<R){const w=R-E.width;E=new DOMRect(E.x-w/2,E.y,E.width+w,E.height)}if(E.height<R){const w=R-E.height;E=new DOMRect(E.x,E.y-w/2,E.width,E.height+w)}c.push({group:e,groupSize:Jp({group:e}),panels:[d,g],separator:"width"in _?void 0:_,rect:E})}}f=!1,d=g,h=[]}}else if(m.hasAttribute("data-separator")){const g=s.find(v=>v.element===m);g?h.push(g):(d=void 0,h=[])}else f=!0;return c}function rV(e,t){const r=getComputedStyle(e),i=parseFloat(r.fontSize);return t*i}function aV(e,t){const r=getComputedStyle(e.ownerDocument.body),i=parseFloat(r.fontSize);return t*i}function iV(e){return e/100*window.innerHeight}function oV(e){return e/100*window.innerWidth}function sV(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function p1({groupSize:e,panelElement:t,styleProp:r}){let i;const[s,l]=sV(r);switch(l){case"%":{i=s/100*e;break}case"px":{i=s;break}case"rem":{i=aV(t,s);break}case"em":{i=rV(t,s);break}case"vh":{i=iV(s);break}case"vw":{i=oV(s);break}}return i}function fl(e){return parseFloat(e.toFixed(3))}function iM(e){const{panels:t}=e,r=Jp({group:e});return r===0?t.map(i=>({collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:s,panelConstraints:l}=i;let c=0;if(l.collapsedSize!==void 0){const m=p1({groupSize:r,panelElement:s,styleProp:l.collapsedSize});c=fl(m/r*100)}let f;if(l.defaultSize!==void 0){const m=p1({groupSize:r,panelElement:s,styleProp:l.defaultSize});f=fl(m/r*100)}let d=0;if(l.minSize!==void 0){const m=p1({groupSize:r,panelElement:s,styleProp:l.minSize});d=fl(m/r*100)}let h=100;if(l.maxSize!==void 0){const m=p1({groupSize:r,panelElement:s,styleProp:l.maxSize});h=fl(m/r*100)}return{collapsedSize:c,collapsible:l.collapsible===!0,defaultSize:f,minSize:d,maxSize:h,panelId:i.id}})}class lV{#e={};addListener(t,r){const i=this.#e[t];return i===void 0?this.#e[t]=[r]:i.includes(r)||i.push(r),()=>{this.removeListener(t,r)}}emit(t,r){const i=this.#e[t];if(i!==void 0)if(i.length===1)i[0].call(null,r);else{let s=!1,l=null;const c=Array.from(i);for(let f=0;f<c.length;f++){const d=c[f];try{d.call(null,r)}catch(h){l===null&&(s=!0,l=h)}}if(s)throw l}}removeAllListeners(){this.#e={}}removeListener(t,r){const i=this.#e[t];if(i!==void 0){const s=i.indexOf(r);s>=0&&i.splice(s,1)}}}function Wi(e,t,r=0){return Math.abs(fl(e)-fl(t))<=r}let as={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Nh=new lV;function Xo(){return as}function ao(e){const t=typeof e=="function"?e(as):e;if(as===t)return as;const r=as;return as={...as,...t},t.cursorFlags!==void 0&&Nh.emit("cursorFlagsChange",as.cursorFlags),t.interactionState!==void 0&&Nh.emit("interactionStateChange",as.interactionState),t.mountedGroups!==void 0&&(as.mountedGroups.forEach((i,s)=>{i.derivedPanelConstraints.forEach(l=>{if(l.collapsible){const{layout:c}=r.mountedGroups.get(s)??{};if(c){const f=Wi(l.collapsedSize,i.layout[l.panelId]),d=Wi(l.collapsedSize,c[l.panelId]);f&&!d&&(s.inMemoryLastExpandedPanelSizes[l.panelId]=c[l.panelId])}}})}),Nh.emit("mountedGroupsChange",as.mountedGroups)),as}function uV(e,t,r){let i,s={x:1/0,y:1/0};for(const l of t){const c=az(r,l.rect);switch(e){case"horizontal":{c.x<=s.x&&(i=l,s=c);break}case"vertical":{c.y<=s.y&&(i=l,s=c);break}}}return i?{distance:s,hitRegion:i}:void 0}function cV(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function fV(e,t){if(e===t)throw new Error("Cannot compare node with itself");const r={a:lM(e),b:lM(t)};let i;for(;r.a.at(-1)===r.b.at(-1);)i=r.a.pop(),r.b.pop();ar(i,"Stacking order can only be calculated for elements with a common ancestor");const s={a:sM(oM(r.a)),b:sM(oM(r.b))};if(s.a===s.b){const l=i.childNodes,c={a:r.a.at(-1),b:r.b.at(-1)};let f=l.length;for(;f--;){const d=l[f];if(d===c.a)return 1;if(d===c.b)return-1}}return Math.sign(s.a-s.b)}const dV=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function hV(e){const t=getComputedStyle(oz(e)??e).display;return t==="flex"||t==="inline-flex"}function pV(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||hV(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||dV.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function oM(e){let t=e.length;for(;t--;){const r=e[t];if(ar(r,"Missing node"),pV(r))return r}return null}function sM(e){return e&&Number(getComputedStyle(e).zIndex)||0}function lM(e){const t=[];for(;e;)t.push(e),e=oz(e);return t}function oz(e){const{parentNode:t}=e;return cV(t)?t.host:t}function mV(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function gV({groupElement:e,hitRegion:t,pointerEventTarget:r}){if(!rz(r)||r.contains(e)||e.contains(r))return!0;if(fV(r,e)>0){let i=r;for(;i;){if(i.contains(e))return!0;if(mV(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function UO(e,t){const r=[];return t.forEach((i,s)=>{if(s.disabled)return;const l=iz(s),c=uV(s.orientation,l,{x:e.clientX,y:e.clientY});c&&c.distance.x<=0&&c.distance.y<=0&&gV({groupElement:s.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&r.push(c.hitRegion)}),r}function yV(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function ac(e,t){return Wi(e,t)?0:e>t?1:-1}function Rp({panelConstraints:e,size:t}){const{collapsedSize:r=0,collapsible:i,maxSize:s=100,minSize:l=0}=e;if(ac(t,l)<0)if(i){const c=(r+l)/2;ac(t,c)<0?t=r:t=l}else t=l;return t=Math.min(s,t),t=fl(t),t}function rb({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:i,prevLayout:s,trigger:l}){if(Wi(e,0))return t;const c=Object.values(t),f=Object.values(s),d=[...c],[h,m]=i;ar(h!=null,"Invalid first pivot index"),ar(m!=null,"Invalid second pivot index");let g=0;switch(l){case"keyboard":{{const b=e<0?m:h,_=r[b];ar(_,`Panel constraints not found for index ${b}`);const{collapsedSize:E=0,collapsible:R,minSize:w=0}=_;if(R){const T=c[b];if(ar(T!=null,`Previous layout not found for panel index ${b}`),Wi(T,E)){const x=w-T;ac(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}{const b=e<0?h:m,_=r[b];ar(_,`No panel constraints found for index ${b}`);const{collapsedSize:E=0,collapsible:R,minSize:w=0}=_;if(R){const T=c[b];if(ar(T!=null,`Previous layout not found for panel index ${b}`),Wi(T,w)){const x=T-E;ac(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}break}default:{const b=e<0?m:h,_=r[b];ar(_,`Panel constraints not found for index ${b}`);const{collapsible:E,collapsedSize:R,minSize:w}=_;if(E)if(e>0){const T=w-R,x=T/2;ac(e,w)<0&&(e=ac(e,x)<=0?0:T)}else{const T=w-R,x=100-T/2;ac(100+e,w)>0&&(e=ac(100+e,x)>0?0:-T)}break}}{const b=e<0?1:-1;let _=e<0?m:h,E=0;for(;;){const w=c[_];ar(w!=null,`Previous layout not found for panel index ${_}`);const T=Rp({panelConstraints:r[_],size:100})-w;if(E+=T,_+=b,_<0||_>=r.length)break}const R=Math.min(Math.abs(e),Math.abs(E));e=e<0?0-R:R}{let b=e<0?h:m;for(;b>=0&&b<r.length;){const _=Math.abs(e)-Math.abs(g),E=c[b];ar(E!=null,`Previous layout not found for panel index ${b}`);const R=E-_,w=Rp({panelConstraints:r[b],size:R});if(!Wi(E,w)&&(g+=E-w,d[b]=w,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?b--:b++}}if(yV(f,d))return s;{const b=e<0?m:h,_=c[b];ar(_!=null,`Previous layout not found for panel index ${b}`);const E=_+g,R=Rp({panelConstraints:r[b],size:E});if(d[b]=R,!Wi(R,E)){let w=E-R,T=e<0?m:h;for(;T>=0&&T<r.length;){const x=d[T];ar(x!=null,`Previous layout not found for panel index ${T}`);const O=x+w,C=Rp({panelConstraints:r[T],size:O});if(Wi(x,C)||(w-=C-x,d[T]=C),Wi(w,0))break;e>0?T--:T++}}}const v=Object.values(d).reduce((b,_)=>_+b,0);if(!Wi(v,100,.1))return s;const S=Object.keys(s);return d.reduce((b,_,E)=>(b[S[E]]=_,b),{})}function qh(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(t[r]===void 0||ac(e[r],t[r])!==0)return!1;return!0}function Vh({layout:e,panelConstraints:t}){const r=[...Object.values(e)],i=r.reduce((c,f)=>c+f,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(c=>`${c}%`).join(", ")}`);if(!Wi(i,100)&&r.length>0)for(let c=0;c<t.length;c++){const f=r[c];ar(f!=null,`No layout data found for index ${c}`);const d=100/i*f;r[c]=d}let s=0;for(let c=0;c<t.length;c++){const f=r[c];ar(f!=null,`No layout data found for index ${c}`);const d=Rp({panelConstraints:t[c],size:f});f!=d&&(s+=f-d,r[c]=d)}if(!Wi(s,0))for(let c=0;c<t.length;c++){const f=r[c];ar(f!=null,`No layout data found for index ${c}`);const d=f+s,h=Rp({panelConstraints:t[c],size:d});if(f!==h&&(s-=h-f,r[c]=h,Wi(s,0)))break}const l=Object.keys(e);return r.reduce((c,f,d)=>(c[l[d]]=f,c),{})}function sz({groupId:e,panelId:t}){const r=()=>{const{mountedGroups:f}=Xo();for(const[d,{defaultLayoutDeferred:h,derivedPanelConstraints:m,layout:g,separatorToPanels:v}]of f)if(d.id===e)return{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:d,layout:g,separatorToPanels:v};throw Error(`Group ${e} not found`)},i=()=>{const f=r().derivedPanelConstraints.find(d=>d.panelId===t);if(f!==void 0)return f;throw Error(`Panel constraints not found for Panel ${t}`)},s=()=>{const f=r().group.panels.find(d=>d.id===t);if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},l=()=>{const f=r().layout[t];if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},c=f=>{const d=l();if(f===d)return;const{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:g,layout:v,separatorToPanels:S}=r(),b=g.panels.findIndex(w=>w.id===t),_=b===g.panels.length-1,E=rb({delta:_?d-f:f-d,initialLayout:v,panelConstraints:m,pivotIndices:_?[b-1,b]:[b,b+1],prevLayout:v,trigger:"imperative-api"}),R=Vh({layout:E,panelConstraints:m});qh(v,R)||ao(w=>({mountedGroups:new Map(w.mountedGroups).set(g,{defaultLayoutDeferred:h,derivedPanelConstraints:m,layout:R,separatorToPanels:S})}))};return{collapse:()=>{const{collapsible:f,collapsedSize:d}=i(),{mutableValues:h}=s(),m=l();f&&m!==d&&(h.expandToSize=m,c(d))},expand:()=>{const{collapsible:f,collapsedSize:d,minSize:h}=i(),{mutableValues:m}=s(),g=l();if(f&&g===d){let v=m.expandToSize??h;v===0&&(v=1),c(v)}},getSize:()=>{const{group:f}=r(),d=l(),{element:h}=s(),m=f.orientation==="horizontal"?h.offsetWidth:h.offsetHeight;return{asPercentage:d,inPixels:m}},isCollapsed:()=>{const{collapsible:f,collapsedSize:d}=i(),h=l();return f&&Wi(d,h)},resize:f=>{if(l()!==f){let d;switch(typeof f){case"number":{const{group:h}=r(),m=Jp({group:h});d=fl(f/m*100);break}case"string":{d=parseFloat(f);break}}c(d)}}}}function uM(e){if(e.defaultPrevented)return;const{mountedGroups:t}=Xo();UO(e,t).forEach(r=>{if(r.separator){const i=r.panels.find(s=>s.panelConstraints.defaultSize!==void 0);if(i){const s=i.panelConstraints.defaultSize,l=sz({groupId:r.group.id,panelId:i.id});l&&s!==void 0&&(l.resize(s),e.preventDefault())}}})}function kS(e){const{mountedGroups:t}=Xo();for(const[r]of t)if(r.separators.some(i=>i.element===e))return r;throw Error("Could not find parent Group for separator element")}function lz({groupId:e}){const t=()=>{const{mountedGroups:r}=Xo();for(const[i,s]of r)if(i.id===e)return{group:i,...s};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:r,layout:i}=t();return r?{}:i},setLayout(r){const{defaultLayoutDeferred:i,derivedPanelConstraints:s,group:l,layout:c,separatorToPanels:f}=t(),d=Vh({layout:r,panelConstraints:s});return i?c:(qh(c,d)||ao(h=>({mountedGroups:new Map(h.mountedGroups).set(l,{defaultLayoutDeferred:i,derivedPanelConstraints:s,layout:d,separatorToPanels:f})})),d)}}}function uz(e){const{mountedGroups:t}=Xo(),r=t.get(e);return ar(r,`Mounted Group ${e.id} not found`),r}function yh(e,t){const r=kS(e),i=uz(r),s=r.separators.find(m=>m.element===e);ar(s,"Matching separator not found");const l=i.separatorToPanels.get(s);ar(l,"Matching panels not found");const c=l.map(m=>r.panels.indexOf(m)),f=lz({groupId:r.id}).getLayout(),d=rb({delta:t,initialLayout:f,panelConstraints:i.derivedPanelConstraints,pivotIndices:c,prevLayout:f,trigger:"keyboard"}),h=Vh({layout:d,panelConstraints:i.derivedPanelConstraints});qh(f,h)||ao(m=>({mountedGroups:new Map(m.mountedGroups).set(r,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,layout:h,separatorToPanels:i.separatorToPanels})}))}function cM(e){if(e.defaultPrevented)return;const t=e.currentTarget,r=kS(t);if(!r.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),r.orientation==="vertical"&&yh(t,5);break}case"ArrowLeft":{e.preventDefault(),r.orientation==="horizontal"&&yh(t,-5);break}case"ArrowRight":{e.preventDefault(),r.orientation==="horizontal"&&yh(t,5);break}case"ArrowUp":{e.preventDefault(),r.orientation==="vertical"&&yh(t,-5);break}case"End":{e.preventDefault(),yh(t,100);break}case"Enter":{e.preventDefault();const i=kS(t),{derivedPanelConstraints:s,layout:l,separatorToPanels:c}=uz(i),f=i.separators.find(g=>g.element===t);ar(f,"Matching separator not found");const d=c.get(f);ar(d,"Matching panels not found");const h=d[0],m=s.find(g=>g.panelId===h.id);if(ar(m,"Panel metadata not found"),m.collapsible){const g=l[h.id],v=m.collapsedSize===g?i.inMemoryLastExpandedPanelSizes[h.id]??m.minSize:m.collapsedSize;yh(t,v-g)}break}case"F6":{e.preventDefault();const i=kS(t).separators.map(c=>c.element),s=Array.from(i).findIndex(c=>c===e.currentTarget);ar(s!==null,"Index not found");const l=e.shiftKey?s>0?s-1:i.length-1:s+1<i.length?s+1:0;i[l].focus();break}case"Home":{e.preventDefault(),yh(t,-100);break}}}function fM(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=Xo(),r=UO(e,t),i=new Map;let s=!1;r.forEach(l=>{l.separator&&(s||(s=!0,l.separator.element.focus()));const c=t.get(l.group);c&&i.set(l.group,c.layout)}),ao({interactionState:{hitRegions:r,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),r.length&&e.preventDefault()}const vV=e=>e,Fx=()=>{},cz=1,fz=2,dz=4,hz=8,dM=3,hM=12;let m1;function pM(){return m1===void 0&&(m1=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(m1=!0)),m1}function bV({cursorFlags:e,groups:t,state:r}){let i=0,s=0;switch(r){case"active":case"hover":t.forEach(l=>{if(!l.disableCursor)switch(l.orientation){case"horizontal":{i++;break}case"vertical":{s++;break}}})}if(i===0&&s===0)return null;switch(r){case"active":{if(e&&pM()){const l=(e&cz)!==0,c=(e&fz)!==0,f=(e&dz)!==0,d=(e&hz)!==0;if(l)return f?"se-resize":d?"ne-resize":"e-resize";if(c)return f?"sw-resize":d?"nw-resize":"w-resize";if(f)return"s-resize";if(d)return"n-resize"}break}}return pM()?i>0&&s>0?"move":i>0?"ew-resize":"ns-resize":i>0&&s>0?"grab":i>0?"col-resize":"row-resize"}const mM=new WeakMap;function qO(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:r}=mM.get(e)??{};r===void 0&&(r=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(r));const{cursorFlags:i,interactionState:s}=Xo();switch(s.state){case"active":case"hover":{const l=bV({cursorFlags:i,groups:s.hitRegions.map(f=>f.group),state:s.state}),c=`*, *:hover {cursor: ${l} !important; ${s.state==="active"?"touch-action: none;":""} }`;if(t===c)return;t=c,l?r.cssRules.length===0?r.insertRule(c):r.replaceSync(c):r.cssRules.length===1&&r.deleteRule(0);break}case"inactive":{t=void 0,r.cssRules.length===1&&r.deleteRule(0);break}}mM.set(e,{prevStyle:t,styleSheet:r})}function pz({document:e,event:t,hitRegions:r,initialLayoutMap:i,mountedGroups:s,pointerDownAtPoint:l,prevCursorFlags:c}){let f=0;const d=new Map(s);r.forEach(m=>{const{group:g,groupSize:v}=m,{disableCursor:S,orientation:b,panels:_}=g;let E=0;l?b==="horizontal"?E=(t.clientX-l.x)/v*100:E=(t.clientY-l.y)/v*100:b==="horizontal"?E=t.clientX<0?-100:100:E=t.clientY<0?-100:100;const R=i.get(g),{defaultLayoutDeferred:w,derivedPanelConstraints:T,layout:x,separatorToPanels:O}=s.get(g)??{defaultLayoutDeferred:!1};if(T&&R&&x&&O){const C=rb({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:m.panels.map(M=>_.indexOf(M)),prevLayout:x,trigger:"mouse-or-touch"});if(qh(C,x)){if(E!==0&&!S)switch(b){case"horizontal":{f|=E<0?cz:fz;break}case"vertical":{f|=E<0?dz:hz;break}}}else{d.set(m.group,{defaultLayoutDeferred:w,derivedPanelConstraints:T,layout:C,separatorToPanels:O});const M=m.group.panels.map(({id:D})=>D).join(",");m.group.inMemoryLayouts[M]=C}}});let h=0;t.movementX===0?h|=c&dM:h|=f&dM,t.movementY===0?h|=c&hM:h|=f&hM,ao({cursorFlags:h,mountedGroups:d}),qO(e)}function gM(e){const{cursorFlags:t,interactionState:r,mountedGroups:i}=Xo();r.state==="active"&&pz({document:e.currentTarget,event:e,hitRegions:r.hitRegions,initialLayoutMap:r.initialLayoutMap,mountedGroups:i,prevCursorFlags:t})}function yM(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:r,mountedGroups:i}=Xo();switch(r.state){case"active":{if(e.buttons===0){ao(s=>s.interactionState.state==="inactive"?s:{cursorFlags:0,interactionState:{state:"inactive"}}),ao(s=>({mountedGroups:new Map(s.mountedGroups)}));return}pz({document:e.currentTarget,event:e,hitRegions:r.hitRegions,initialLayoutMap:r.initialLayoutMap,mountedGroups:i,pointerDownAtPoint:r.pointerDownAtPoint,prevCursorFlags:t});break}default:{const s=UO(e,i);s.length===0?r.state!=="inactive"&&ao({interactionState:{state:"inactive"}}):ao({interactionState:{hitRegions:s,state:"hover"}}),qO(e.currentTarget);break}}}function vM(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=Xo();t.state==="active"&&(ao({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(qO(e.currentTarget),ao(r=>({mountedGroups:new Map(r.mountedGroups)})),e.preventDefault()))}function bM(e){let t=0,r=0;const i={};for(const l of e)if(l.defaultSize!==void 0){t++;const c=fl(l.defaultSize);r+=c,i[l.panelId]=c}else i[l.panelId]=void 0;const s=e.length-t;if(s!==0){const l=fl((100-r)/s);for(const c of e)c.defaultSize===void 0&&(i[c.panelId]=l)}return i}function SV(e,t,r){if(!r[0])return;const i=e.panels.find(d=>d.element===t);if(!i||!i.onResize)return;const s=Jp({group:e}),l=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,c=i.mutableValues.prevSize,f={asPercentage:fl(l/s*100),inPixels:l};i.mutableValues.prevSize=f,i.onResize(f,i.id,c)}function wV(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function EV(e,t){const r=e.map(s=>s.id),i=Object.keys(t);if(r.length!==i.length)return!1;for(const s of r)if(!i.includes(s))return!1;return!0}const dp=new Map;function xV(e){let t=!0;ar(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const r=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,s=new Set,l=new r(b=>{for(const _ of b){const{borderBoxSize:E,target:R}=_;if(R===e.element){if(t){if(Jp({group:e})===0)return;ao(w=>{const T=w.mountedGroups.get(e);if(T){const x=iM(e),O=T.defaultLayoutDeferred?bM(x):T.layout,C=Vh({layout:O,panelConstraints:x});return!T.defaultLayoutDeferred&&qh(O,C)&&wV(T.derivedPanelConstraints,x)?w:{mountedGroups:new Map(w.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:x,layout:C,separatorToPanels:T.separatorToPanels})}}return w})}}else SV(e,R,E)}});l.observe(e.element),e.panels.forEach(b=>{ar(!i.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.onResize&&l.observe(b.element)});const c=Jp({group:e}),f=iM(e),d=e.panels.map(({id:b})=>b).join(",");let h=e.defaultLayout;h&&(EV(e.panels,h)||(h=void 0));const m=e.inMemoryLayouts[d]??h??bM(f),g=Vh({layout:m,panelConstraints:f}),v=iz(e),S=e.element.ownerDocument;return ao(b=>{const _=new Map;return dp.set(S,(dp.get(S)??0)+1),v.forEach(E=>{E.separator&&_.set(E.separator,E.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:c===0,derivedPanelConstraints:f,layout:g,separatorToPanels:_})}}),e.separators.forEach(b=>{ar(!s.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),s.add(b.id),b.element.addEventListener("keydown",cM)}),dp.get(S)===1&&(S.addEventListener("dblclick",uM,!0),S.addEventListener("pointerdown",fM,!0),S.addEventListener("pointerleave",gM),S.addEventListener("pointermove",yM),S.addEventListener("pointerup",vM,!0)),function(){t=!1,dp.set(S,Math.max(0,(dp.get(S)??0)-1)),ao(b=>{const _=new Map(b.mountedGroups);return _.delete(e),{mountedGroups:_}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",cM)}),dp.get(S)||(S.removeEventListener("dblclick",uM,!0),S.removeEventListener("pointerdown",fM,!0),S.removeEventListener("pointerleave",gM),S.removeEventListener("pointermove",yM),S.removeEventListener("pointerup",vM,!0)),l.disconnect()}}function mz(){const[e,t]=j.useState({}),r=j.useCallback(()=>t({}),[]);return[e,r]}function VO(e){const t=j.useId();return`${e??t}`}const Qh=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Bv(e){const t=j.useRef(e);return Qh(()=>{t.current=e},[e]),j.useCallback((...r)=>t.current?.(...r),[t])}function FO(...e){return Bv(t=>{e.forEach(r=>{if(r)switch(typeof r){case"function":{r(t);break}case"object":{r.current=t;break}}})})}function _V(e){const t=j.useRef({...e});return Qh(()=>{for(const r in e)t.current[r]=e[r]},[e]),t.current}const gz=j.createContext(null);function TV(e,t){const r=j.useRef({getLayout:()=>({}),setLayout:vV});j.useImperativeHandle(t,()=>r.current,[]),Qh(()=>{Object.assign(r.current,lz({groupId:e}))})}function Ap({children:e,className:t,defaultLayout:r,disableCursor:i,disabled:s,elementRef:l,groupRef:c,id:f,onLayoutChange:d,onLayoutChanged:h,orientation:m="horizontal",resizeTargetMinimumSize:g={coarse:20,fine:10},style:v,...S}){const b=j.useRef({onLayoutChange:{},onLayoutChanged:{}}),_=Bv(L=>{qh(b.current.onLayoutChange,L)||(b.current.onLayoutChange=L,d?.(L))}),E=Bv(L=>{qh(b.current.onLayoutChanged,L)||(b.current.onLayoutChanged=L,h?.(L))}),R=VO(f),w=j.useRef(null),[T,x]=mz(),O=j.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:g,separators:[]}),C=FO(w,l);TV(R,c);const M=Bv((L,V)=>{const{interactionState:F,mountedGroups:re}=Xo();for(const ae of re.keys())if(ae.id===L){const K=re.get(ae);if(K){let B=!1;return F.state==="active"&&(B=F.hitRegions.some(Y=>Y.group===ae)),{flexGrow:K.layout[V]??1,pointerEvents:B?"none":void 0}}}return{flexGrow:r?.[V]??1}}),D=j.useMemo(()=>({getPanelStyles:M,id:R,orientation:m,registerPanel:L=>{const V=O.current;return V.panels=ZT(m,[...V.panels,L]),x(),()=>{V.panels=V.panels.filter(F=>F!==L),x()}},registerSeparator:L=>{const V=O.current;return V.separators=ZT(m,[...V.separators,L]),x(),()=>{V.separators=V.separators.filter(F=>F!==L),x()}}}),[M,R,x,m]),$=_V({defaultLayout:r,disableCursor:i}),q=j.useRef(null);return Qh(()=>{const L=w.current;if(L===null)return;const V=O.current,F={defaultLayout:$.defaultLayout,disableCursor:!!$.disableCursor,disabled:!!s,element:L,id:R,inMemoryLastExpandedPanelSizes:O.current.lastExpandedPanelSizes,inMemoryLayouts:O.current.layouts,orientation:m,panels:V.panels,resizeTargetMinimumSize:V.resizeTargetMinimumSize,separators:V.separators};q.current=F;const re=xV(F),ae=Xo().mountedGroups.get(F);if(ae){const{defaultLayoutDeferred:fe,derivedPanelConstraints:ie,layout:N}=ae;!fe&&ie.length>0&&(_(N),E(N),V.panels.forEach(I=>{I.scheduleUpdate()}))}let K=!1;const B=Nh.addListener("interactionStateChange",fe=>{const ie=fe.state==="active";K!==ie&&(K=ie,V.panels.forEach(N=>{N.scheduleUpdate()}))}),Y=Nh.addListener("mountedGroupsChange",fe=>{const ie=fe.get(F);if(ie){const{defaultLayoutDeferred:N,derivedPanelConstraints:I,layout:U}=ie;if(N||I.length===0)return;const{interactionState:P}=Xo(),G=P.state!=="active";_(U),G&&E(U),V.panels.forEach(ee=>{ee.scheduleUpdate()})}});return()=>{q.current=null,re(),B(),Y()}},[s,R,E,_,m,T,$]),j.useEffect(()=>{const L=q.current;L&&(L.defaultLayout=r,L.disableCursor=!!i)}),k.jsx(gz.Provider,{value:D,children:k.jsx("div",{...S,"aria-orientation":m,className:t,"data-group":!0,"data-testid":R,id:R,ref:C,style:{height:"100%",width:"100%",overflow:"hidden",...v,display:"flex",flexDirection:m==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}Ap.displayName="Group";function Bx(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function Nv({debounceSaveMs:e=100,panelIds:t,storage:r=localStorage,...i}){const s=t!==void 0,l="id"in i?i.id:i.groupId,c=Bx(l,t??[]),f=j.useSyncExternalStore(CV,()=>r.getItem(c),()=>r.getItem(c)),d=j.useMemo(()=>f?JSON.parse(f):void 0,[f]),h=j.useRef(null),m=j.useCallback(()=>{const S=h.current;S&&(h.current=null,clearTimeout(S))},[]);j.useLayoutEffect(()=>()=>{m()},[m]);const g=j.useCallback(S=>{m();let b;s?b=Bx(l,Object.keys(S)):b=Bx(l,[]);try{r.setItem(b,JSON.stringify(S))}catch(_){console.error(_)}},[m,s,l,r]),v=j.useCallback(S=>{m(),e===0?g(S):h.current=setTimeout(()=>{g(S)},e)},[m,e,g]);return{defaultLayout:d,onLayoutChange:v,onLayoutChanged:g}}function CV(){return function(){}}function BO(){const e=j.useContext(gz);return ar(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function OV(e,t){const{id:r}=BO(),i=j.useRef({collapse:Fx,expand:Fx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Fx});j.useImperativeHandle(t,()=>i.current,[]),Qh(()=>{Object.assign(i.current,sz({groupId:r,panelId:e}))})}function cl({children:e,className:t,collapsedSize:r="0%",collapsible:i=!1,defaultSize:s,elementRef:l,id:c,maxSize:f="100%",minSize:d="0%",onResize:h,panelRef:m,style:g,...v}){const S=!!c,b=VO(c),_=j.useRef(null),E=FO(_,l),[,R]=mz(),{getPanelStyles:w,id:T,registerPanel:x}=BO(),O=h!==null,C=Bv((D,$,q)=>{h?.(D,c,q)});Qh(()=>{const D=_.current;if(D!==null)return x({element:D,id:b,idIsStable:S,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:O?C:void 0,panelConstraints:{collapsedSize:r,collapsible:i,defaultSize:s,maxSize:f,minSize:d},scheduleUpdate:R})},[r,i,s,R,O,b,S,f,d,C,x]),OV(b,m);const M=w(T,b);return k.jsx("div",{...v,"data-panel":!0,"data-testid":b,id:b,ref:E,style:{...RV,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...M},children:k.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...g},children:e})})}cl.displayName="Panel";const RV={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function AV({layout:e,panelConstraints:t,panelId:r,panelIndex:i}){let s,l;const c=e[r],f=t.find(d=>d.panelId===r);if(f){const d=f.maxSize,h=f.collapsible?f.collapsedSize:f.minSize,m=[i,i+1];l=Vh({layout:rb({delta:h-c,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r],s=Vh({layout:rb({delta:d-c,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r]}return{valueControls:r,valueMax:s,valueMin:l,valueNow:c}}function Mp({children:e,className:t,elementRef:r,id:i,style:s,...l}){const c=VO(i),[f,d]=j.useState({}),[h,m]=j.useState("inactive"),g=j.useRef(null),v=FO(g,r),{id:S,orientation:b,registerSeparator:_}=BO(),E=b==="horizontal"?"vertical":"horizontal";return Qh(()=>{const R=g.current;if(R!==null){const w={element:R,id:c},T=_(w),x=Nh.addListener("interactionStateChange",C=>{m(C.state!=="inactive"&&C.hitRegions.some(M=>M.separator===w)?C.state:"inactive")}),O=Nh.addListener("mountedGroupsChange",C=>{C.forEach(({derivedPanelConstraints:M,layout:D,separatorToPanels:$},q)=>{if(q.id===S){const L=$.get(w);if(L){const V=L[0],F=q.panels.indexOf(V);d(AV({layout:D,panelConstraints:M,panelId:V.id,panelIndex:F}))}}})});return()=>{x(),O(),T()}}},[S,c,_]),k.jsx("div",{...l,"aria-controls":f.valueControls,"aria-orientation":E,"aria-valuemax":f.valueMax,"aria-valuemin":f.valueMin,"aria-valuenow":f.valueNow,children:e,className:t,"data-separator":h,"data-testid":c,id:c,ref:v,role:"separator",style:{flexBasis:"auto",...s,flexGrow:0,flexShrink:0},tabIndex:0})}Mp.displayName="Separator";var yz=typeof global=="object"&&global&&global.Object===Object&&global,MV=typeof self=="object"&&self&&self.Object===Object&&self,Pl=yz||MV||Function("return this")(),ds=Pl.Symbol,vz=Object.prototype,jV=vz.hasOwnProperty,kV=vz.toString,Ev=ds?ds.toStringTag:void 0;function DV(e){var t=jV.call(e,Ev),r=e[Ev];try{e[Ev]=void 0;var i=!0}catch{}var s=kV.call(e);return i&&(t?e[Ev]=r:delete e[Ev]),s}var NV=Object.prototype,zV=NV.toString;function $V(e){return zV.call(e)}var PV="[object Null]",IV="[object Undefined]",SM=ds?ds.toStringTag:void 0;function pc(e){return e==null?e===void 0?IV:PV:SM&&SM in Object(e)?DV(e):$V(e)}function hs(e){return e!=null&&typeof e=="object"}var LV="[object Symbol]";function Db(e){return typeof e=="symbol"||hs(e)&&pc(e)==LV}function wm(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var za=Array.isArray,wM=ds?ds.prototype:void 0,EM=wM?wM.toString:void 0;function bz(e){if(typeof e=="string")return e;if(za(e))return wm(e,bz)+"";if(Db(e))return EM?EM.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var UV=/\s/;function qV(e){for(var t=e.length;t--&&UV.test(e.charAt(t)););return t}var VV=/^\s+/;function FV(e){return e&&e.slice(0,qV(e)+1).replace(VV,"")}function In(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xM=NaN,BV=/^[-+]0x[0-9a-f]+$/i,HV=/^0b[01]+$/i,GV=/^0o[0-7]+$/i,KV=parseInt;function YV(e){if(typeof e=="number")return e;if(Db(e))return xM;if(In(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=In(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=FV(e);var r=HV.test(e);return r||GV.test(e)?KV(e.slice(2),r?2:8):BV.test(e)?xM:+e}var _M=1/0,ZV=17976931348623157e292;function XV(e){if(!e)return e===0?e:0;if(e=YV(e),e===_M||e===-_M){var t=e<0?-1:1;return t*ZV}return e===e?e:0}function Sz(e){var t=XV(e),r=t%1;return t===t?r?t-r:t:0}function Lw(e){return e}var QV="[object AsyncFunction]",WV="[object Function]",JV="[object GeneratorFunction]",eF="[object Proxy]";function Nb(e){if(!In(e))return!1;var t=pc(e);return t==WV||t==JV||t==QV||t==eF}var Hx=Pl["__core-js_shared__"],TM=(function(){var e=/[^.]+$/.exec(Hx&&Hx.keys&&Hx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function tF(e){return!!TM&&TM in e}var nF=Function.prototype,rF=nF.toString;function Wh(e){if(e!=null){try{return rF.call(e)}catch{}try{return e+""}catch{}}return""}var aF=/[\\^$.*+?()[\]{}|]/g,iF=/^\[object .+?Constructor\]$/,oF=Function.prototype,sF=Object.prototype,lF=oF.toString,uF=sF.hasOwnProperty,cF=RegExp("^"+lF.call(uF).replace(aF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fF(e){if(!In(e)||tF(e))return!1;var t=Nb(e)?cF:iF;return t.test(Wh(e))}function dF(e,t){return e?.[t]}function Jh(e,t){var r=dF(e,t);return fF(r)?r:void 0}var XT=Jh(Pl,"WeakMap"),CM=Object.create,wz=(function(){function e(){}return function(t){if(!In(t))return{};if(CM)return CM(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function hF(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function DS(){}function HO(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var pF=800,mF=16,gF=Date.now;function yF(e){var t=0,r=0;return function(){var i=gF(),s=mF-(i-r);if(r=i,s>0){if(++t>=pF)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function vF(e){return function(){return e}}var tw=(function(){try{var e=Jh(Object,"defineProperty");return e({},"",{}),e}catch{}})(),bF=tw?function(e,t){return tw(e,"toString",{configurable:!0,enumerable:!1,value:vF(t),writable:!0})}:Lw,Ez=yF(bF);function GO(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function SF(e,t,r,i){for(var s=e.length,l=r+-1;++l<s;)if(t(e[l],l,e))return l;return-1}function wF(e){return e!==e}function EF(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function xz(e,t,r){return t===t?EF(e,t,r):SF(e,wF,r)}function KO(e,t){var r=e==null?0:e.length;return!!r&&xz(e,t,0)>-1}var xF=9007199254740991,_F=/^(?:0|[1-9]\d*)$/;function Uw(e,t){var r=typeof e;return t=t??xF,!!t&&(r=="number"||r!="symbol"&&_F.test(e))&&e>-1&&e%1==0&&e<t}function YO(e,t,r){t=="__proto__"&&tw?tw(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function zb(e,t){return e===t||e!==e&&t!==t}var TF=Object.prototype,CF=TF.hasOwnProperty;function qw(e,t,r){var i=e[t];(!(CF.call(e,t)&&zb(i,r))||r===void 0&&!(t in e))&&YO(e,t,r)}function ep(e,t,r,i){var s=!r;r||(r={});for(var l=-1,c=t.length;++l<c;){var f=t[l],d=void 0;d===void 0&&(d=e[f]),s?YO(r,f,d):qw(r,f,d)}return r}var OM=Math.max;function _z(e,t,r){return t=OM(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,l=OM(i.length-t,0),c=Array(l);++s<l;)c[s]=i[t+s];s=-1;for(var f=Array(t+1);++s<t;)f[s]=i[s];return f[t]=r(c),hF(e,this,f)}}function Vw(e,t){return Ez(_z(e,t,Lw),e+"")}var OF=9007199254740991;function ZO(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=OF}function sf(e){return e!=null&&ZO(e.length)&&!Nb(e)}function RF(e,t,r){if(!In(r))return!1;var i=typeof t;return(i=="number"?sf(r)&&Uw(t,r.length):i=="string"&&t in r)?zb(r[t],e):!1}function Tz(e){return Vw(function(t,r){var i=-1,s=r.length,l=s>1?r[s-1]:void 0,c=s>2?r[2]:void 0;for(l=e.length>3&&typeof l=="function"?(s--,l):void 0,c&&RF(r[0],r[1],c)&&(l=s<3?void 0:l,s=1),t=Object(t);++i<s;){var f=r[i];f&&e(t,f,i,l)}return t})}var AF=Object.prototype;function $b(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AF;return e===r}function Cz(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var MF="[object Arguments]";function RM(e){return hs(e)&&pc(e)==MF}var Oz=Object.prototype,jF=Oz.hasOwnProperty,kF=Oz.propertyIsEnumerable,em=RM((function(){return arguments})())?RM:function(e){return hs(e)&&jF.call(e,"callee")&&!kF.call(e,"callee")};function DF(){return!1}var Rz=typeof Yo=="object"&&Yo&&!Yo.nodeType&&Yo,AM=Rz&&typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,NF=AM&&AM.exports===Rz,MM=NF?Pl.Buffer:void 0,zF=MM?MM.isBuffer:void 0,Fh=zF||DF,$F="[object Arguments]",PF="[object Array]",IF="[object Boolean]",LF="[object Date]",UF="[object Error]",qF="[object Function]",VF="[object Map]",FF="[object Number]",BF="[object Object]",HF="[object RegExp]",GF="[object Set]",KF="[object String]",YF="[object WeakMap]",ZF="[object ArrayBuffer]",XF="[object DataView]",QF="[object Float32Array]",WF="[object Float64Array]",JF="[object Int8Array]",eB="[object Int16Array]",tB="[object Int32Array]",nB="[object Uint8Array]",rB="[object Uint8ClampedArray]",aB="[object Uint16Array]",iB="[object Uint32Array]",Mr={};Mr[QF]=Mr[WF]=Mr[JF]=Mr[eB]=Mr[tB]=Mr[nB]=Mr[rB]=Mr[aB]=Mr[iB]=!0;Mr[$F]=Mr[PF]=Mr[ZF]=Mr[IF]=Mr[XF]=Mr[LF]=Mr[UF]=Mr[qF]=Mr[VF]=Mr[FF]=Mr[BF]=Mr[HF]=Mr[GF]=Mr[KF]=Mr[YF]=!1;function oB(e){return hs(e)&&ZO(e.length)&&!!Mr[pc(e)]}function XO(e){return function(t){return e(t)}}var Az=typeof Yo=="object"&&Yo&&!Yo.nodeType&&Yo,Hv=Az&&typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,sB=Hv&&Hv.exports===Az,Gx=sB&&yz.process,tm=(function(){try{var e=Hv&&Hv.require&&Hv.require("util").types;return e||Gx&&Gx.binding&&Gx.binding("util")}catch{}})(),jM=tm&&tm.isTypedArray,Pb=jM?XO(jM):oB,lB=Object.prototype,uB=lB.hasOwnProperty;function Mz(e,t){var r=za(e),i=!r&&em(e),s=!r&&!i&&Fh(e),l=!r&&!i&&!s&&Pb(e),c=r||i||s||l,f=c?Cz(e.length,String):[],d=f.length;for(var h in e)(t||uB.call(e,h))&&!(c&&(h=="length"||s&&(h=="offset"||h=="parent")||l&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Uw(h,d)))&&f.push(h);return f}function jz(e,t){return function(r){return e(t(r))}}var cB=jz(Object.keys,Object),fB=Object.prototype,dB=fB.hasOwnProperty;function kz(e){if(!$b(e))return cB(e);var t=[];for(var r in Object(e))dB.call(e,r)&&r!="constructor"&&t.push(r);return t}function ls(e){return sf(e)?Mz(e):kz(e)}var hB=Object.prototype,pB=hB.hasOwnProperty,mB=Tz(function(e,t){if($b(t)||sf(t)){ep(t,ls(t),e);return}for(var r in t)pB.call(t,r)&&qw(e,r,t[r])});function gB(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var yB=Object.prototype,vB=yB.hasOwnProperty;function bB(e){if(!In(e))return gB(e);var t=$b(e),r=[];for(var i in e)i=="constructor"&&(t||!vB.call(e,i))||r.push(i);return r}function Ib(e){return sf(e)?Mz(e,!0):bB(e)}var SB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wB=/^\w*$/;function QO(e,t){if(za(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Db(e)?!0:wB.test(e)||!SB.test(e)||t!=null&&e in Object(t)}var ab=Jh(Object,"create");function EB(){this.__data__=ab?ab(null):{},this.size=0}function xB(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _B="__lodash_hash_undefined__",TB=Object.prototype,CB=TB.hasOwnProperty;function OB(e){var t=this.__data__;if(ab){var r=t[e];return r===_B?void 0:r}return CB.call(t,e)?t[e]:void 0}var RB=Object.prototype,AB=RB.hasOwnProperty;function MB(e){var t=this.__data__;return ab?t[e]!==void 0:AB.call(t,e)}var jB="__lodash_hash_undefined__";function kB(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ab&&t===void 0?jB:t,this}function Bh(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Bh.prototype.clear=EB;Bh.prototype.delete=xB;Bh.prototype.get=OB;Bh.prototype.has=MB;Bh.prototype.set=kB;function DB(){this.__data__=[],this.size=0}function Fw(e,t){for(var r=e.length;r--;)if(zb(e[r][0],t))return r;return-1}var NB=Array.prototype,zB=NB.splice;function $B(e){var t=this.__data__,r=Fw(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():zB.call(t,r,1),--this.size,!0}function PB(e){var t=this.__data__,r=Fw(t,e);return r<0?void 0:t[r][1]}function IB(e){return Fw(this.__data__,e)>-1}function LB(e,t){var r=this.__data__,i=Fw(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function mc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}mc.prototype.clear=DB;mc.prototype.delete=$B;mc.prototype.get=PB;mc.prototype.has=IB;mc.prototype.set=LB;var ib=Jh(Pl,"Map");function UB(){this.size=0,this.__data__={hash:new Bh,map:new(ib||mc),string:new Bh}}function qB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Bw(e,t){var r=e.__data__;return qB(t)?r[typeof t=="string"?"string":"hash"]:r.map}function VB(e){var t=Bw(this,e).delete(e);return this.size-=t?1:0,t}function FB(e){return Bw(this,e).get(e)}function BB(e){return Bw(this,e).has(e)}function HB(e,t){var r=Bw(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function gc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}gc.prototype.clear=UB;gc.prototype.delete=VB;gc.prototype.get=FB;gc.prototype.has=BB;gc.prototype.set=HB;var GB="Expected a function";function WO(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(GB);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],l=r.cache;if(l.has(s))return l.get(s);var c=e.apply(this,i);return r.cache=l.set(s,c)||l,c};return r.cache=new(WO.Cache||gc),r}WO.Cache=gc;var KB=500;function YB(e){var t=WO(e,function(i){return r.size===KB&&r.clear(),i}),r=t.cache;return t}var ZB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XB=/\\(\\)?/g,Dz=YB(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZB,function(r,i,s,l){t.push(s?l.replace(XB,"$1"):i||r)}),t});function JO(e){return e==null?"":bz(e)}function Em(e,t){return za(e)?e:QO(e,t)?[e]:Dz(JO(e))}function tp(e){if(typeof e=="string"||Db(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Hw(e,t){t=Em(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[tp(t[r++])];return r&&r==i?e:void 0}function Ve(e,t,r){var i=e==null?void 0:Hw(e,t);return i===void 0?r:i}function eR(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var kM=ds?ds.isConcatSpreadable:void 0;function QB(e){return za(e)||em(e)||!!(kM&&e&&e[kM])}function Lb(e,t,r,i,s){var l=-1,c=e.length;for(r||(r=QB),s||(s=[]);++l<c;){var f=e[l];t>0&&r(f)?t>1?Lb(f,t-1,r,i,s):eR(s,f):i||(s[s.length]=f)}return s}function QT(e){var t=e==null?0:e.length;return t?Lb(e,1):[]}function Nz(e){return Ez(_z(e,void 0,QT),e+"")}var Gw=jz(Object.getPrototypeOf,Object),WB="[object Object]",JB=Function.prototype,eH=Object.prototype,zz=JB.toString,tH=eH.hasOwnProperty,nH=zz.call(Object);function Gc(e){if(!hs(e)||pc(e)!=WB)return!1;var t=Gw(e);if(t===null)return!0;var r=tH.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&zz.call(r)==nH}function rH(e,t,r){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),r=r>s?s:r,r<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var l=Array(s);++i<s;)l[i]=e[i+t];return l}function aH(e,t,r,i){var s=-1,l=e==null?0:e.length;for(i&&l&&(r=e[++s]);++s<l;)r=t(r,e[s],s,e);return r}function iH(){this.__data__=new mc,this.size=0}function oH(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function sH(e){return this.__data__.get(e)}function lH(e){return this.__data__.has(e)}var uH=200;function cH(e,t){var r=this.__data__;if(r instanceof mc){var i=r.__data__;if(!ib||i.length<uH-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new gc(i)}return r.set(e,t),this.size=r.size,this}function dl(e){var t=this.__data__=new mc(e);this.size=t.size}dl.prototype.clear=iH;dl.prototype.delete=oH;dl.prototype.get=sH;dl.prototype.has=lH;dl.prototype.set=cH;function fH(e,t){return e&&ep(t,ls(t),e)}function dH(e,t){return e&&ep(t,Ib(t),e)}var $z=typeof Yo=="object"&&Yo&&!Yo.nodeType&&Yo,DM=$z&&typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,hH=DM&&DM.exports===$z,NM=hH?Pl.Buffer:void 0,zM=NM?NM.allocUnsafe:void 0;function Pz(e,t){if(t)return e.slice();var r=e.length,i=zM?zM(r):new e.constructor(r);return e.copy(i),i}function pH(e,t){for(var r=-1,i=e==null?0:e.length,s=0,l=[];++r<i;){var c=e[r];t(c,r,e)&&(l[s++]=c)}return l}function Iz(){return[]}var mH=Object.prototype,gH=mH.propertyIsEnumerable,$M=Object.getOwnPropertySymbols,tR=$M?function(e){return e==null?[]:(e=Object(e),pH($M(e),function(t){return gH.call(e,t)}))}:Iz;function yH(e,t){return ep(e,tR(e),t)}var vH=Object.getOwnPropertySymbols,Lz=vH?function(e){for(var t=[];e;)eR(t,tR(e)),e=Gw(e);return t}:Iz;function bH(e,t){return ep(e,Lz(e),t)}function Uz(e,t,r){var i=t(e);return za(e)?i:eR(i,r(e))}function WT(e){return Uz(e,ls,tR)}function nR(e){return Uz(e,Ib,Lz)}var JT=Jh(Pl,"DataView"),eC=Jh(Pl,"Promise"),qp=Jh(Pl,"Set"),PM="[object Map]",SH="[object Object]",IM="[object Promise]",LM="[object Set]",UM="[object WeakMap]",qM="[object DataView]",wH=Wh(JT),EH=Wh(ib),xH=Wh(eC),_H=Wh(qp),TH=Wh(XT),ss=pc;(JT&&ss(new JT(new ArrayBuffer(1)))!=qM||ib&&ss(new ib)!=PM||eC&&ss(eC.resolve())!=IM||qp&&ss(new qp)!=LM||XT&&ss(new XT)!=UM)&&(ss=function(e){var t=pc(e),r=t==SH?e.constructor:void 0,i=r?Wh(r):"";if(i)switch(i){case wH:return qM;case EH:return PM;case xH:return IM;case _H:return LM;case TH:return UM}return t});var CH=Object.prototype,OH=CH.hasOwnProperty;function RH(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&OH.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var nw=Pl.Uint8Array;function rR(e){var t=new e.constructor(e.byteLength);return new nw(t).set(new nw(e)),t}function AH(e,t){var r=t?rR(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var MH=/\w*$/;function jH(e){var t=new e.constructor(e.source,MH.exec(e));return t.lastIndex=e.lastIndex,t}var VM=ds?ds.prototype:void 0,FM=VM?VM.valueOf:void 0;function kH(e){return FM?Object(FM.call(e)):{}}function qz(e,t){var r=t?rR(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var DH="[object Boolean]",NH="[object Date]",zH="[object Map]",$H="[object Number]",PH="[object RegExp]",IH="[object Set]",LH="[object String]",UH="[object Symbol]",qH="[object ArrayBuffer]",VH="[object DataView]",FH="[object Float32Array]",BH="[object Float64Array]",HH="[object Int8Array]",GH="[object Int16Array]",KH="[object Int32Array]",YH="[object Uint8Array]",ZH="[object Uint8ClampedArray]",XH="[object Uint16Array]",QH="[object Uint32Array]";function WH(e,t,r){var i=e.constructor;switch(t){case qH:return rR(e);case DH:case NH:return new i(+e);case VH:return AH(e,r);case FH:case BH:case HH:case GH:case KH:case YH:case ZH:case XH:case QH:return qz(e,r);case zH:return new i;case $H:case LH:return new i(e);case PH:return jH(e);case IH:return new i;case UH:return kH(e)}}function Vz(e){return typeof e.constructor=="function"&&!$b(e)?wz(Gw(e)):{}}var JH="[object Map]";function eG(e){return hs(e)&&ss(e)==JH}var BM=tm&&tm.isMap,tG=BM?XO(BM):eG,nG="[object Set]";function rG(e){return hs(e)&&ss(e)==nG}var HM=tm&&tm.isSet,aG=HM?XO(HM):rG,iG=1,oG=2,sG=4,Fz="[object Arguments]",lG="[object Array]",uG="[object Boolean]",cG="[object Date]",fG="[object Error]",Bz="[object Function]",dG="[object GeneratorFunction]",hG="[object Map]",pG="[object Number]",Hz="[object Object]",mG="[object RegExp]",gG="[object Set]",yG="[object String]",vG="[object Symbol]",bG="[object WeakMap]",SG="[object ArrayBuffer]",wG="[object DataView]",EG="[object Float32Array]",xG="[object Float64Array]",_G="[object Int8Array]",TG="[object Int16Array]",CG="[object Int32Array]",OG="[object Uint8Array]",RG="[object Uint8ClampedArray]",AG="[object Uint16Array]",MG="[object Uint32Array]",gr={};gr[Fz]=gr[lG]=gr[SG]=gr[wG]=gr[uG]=gr[cG]=gr[EG]=gr[xG]=gr[_G]=gr[TG]=gr[CG]=gr[hG]=gr[pG]=gr[Hz]=gr[mG]=gr[gG]=gr[yG]=gr[vG]=gr[OG]=gr[RG]=gr[AG]=gr[MG]=!0;gr[fG]=gr[Bz]=gr[bG]=!1;function Gv(e,t,r,i,s,l){var c,f=t&iG,d=t&oG,h=t&sG;if(r&&(c=s?r(e,i,s,l):r(e)),c!==void 0)return c;if(!In(e))return e;var m=za(e);if(m){if(c=RH(e),!f)return HO(e,c)}else{var g=ss(e),v=g==Bz||g==dG;if(Fh(e))return Pz(e,f);if(g==Hz||g==Fz||v&&!s){if(c=d||v?{}:Vz(e),!f)return d?bH(e,dH(c,e)):yH(e,fH(c,e))}else{if(!gr[g])return s?e:{};c=WH(e,g,f)}}l||(l=new dl);var S=l.get(e);if(S)return S;l.set(e,c),aG(e)?e.forEach(function(E){c.add(Gv(E,t,r,E,e,l))}):tG(e)&&e.forEach(function(E,R){c.set(R,Gv(E,t,r,R,e,l))});var b=h?d?nR:WT:d?Ib:ls,_=m?void 0:b(e);return GO(_||e,function(E,R){_&&(R=E,E=e[R]),qw(c,R,Gv(E,t,r,R,e,l))}),c}var jG=1,kG=4;function Ub(e){return Gv(e,jG|kG)}var DG="__lodash_hash_undefined__";function NG(e){return this.__data__.set(e,DG),this}function zG(e){return this.__data__.has(e)}function Hh(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new gc;++t<r;)this.add(e[t])}Hh.prototype.add=Hh.prototype.push=NG;Hh.prototype.has=zG;function $G(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function ob(e,t){return e.has(t)}var PG=1,IG=2;function Gz(e,t,r,i,s,l){var c=r&PG,f=e.length,d=t.length;if(f!=d&&!(c&&d>f))return!1;var h=l.get(e),m=l.get(t);if(h&&m)return h==t&&m==e;var g=-1,v=!0,S=r&IG?new Hh:void 0;for(l.set(e,t),l.set(t,e);++g<f;){var b=e[g],_=t[g];if(i)var E=c?i(_,b,g,t,e,l):i(b,_,g,e,t,l);if(E!==void 0){if(E)continue;v=!1;break}if(S){if(!$G(t,function(R,w){if(!ob(S,w)&&(b===R||s(b,R,r,i,l)))return S.push(w)})){v=!1;break}}else if(!(b===_||s(b,_,r,i,l))){v=!1;break}}return l.delete(e),l.delete(t),v}function LG(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function aR(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var UG=1,qG=2,VG="[object Boolean]",FG="[object Date]",BG="[object Error]",HG="[object Map]",GG="[object Number]",KG="[object RegExp]",YG="[object Set]",ZG="[object String]",XG="[object Symbol]",QG="[object ArrayBuffer]",WG="[object DataView]",GM=ds?ds.prototype:void 0,Kx=GM?GM.valueOf:void 0;function JG(e,t,r,i,s,l,c){switch(r){case WG:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case QG:return!(e.byteLength!=t.byteLength||!l(new nw(e),new nw(t)));case VG:case FG:case GG:return zb(+e,+t);case BG:return e.name==t.name&&e.message==t.message;case KG:case ZG:return e==t+"";case HG:var f=LG;case YG:var d=i&UG;if(f||(f=aR),e.size!=t.size&&!d)return!1;var h=c.get(e);if(h)return h==t;i|=qG,c.set(e,t);var m=Gz(f(e),f(t),i,s,l,c);return c.delete(e),m;case XG:if(Kx)return Kx.call(e)==Kx.call(t)}return!1}var eK=1,tK=Object.prototype,nK=tK.hasOwnProperty;function rK(e,t,r,i,s,l){var c=r&eK,f=WT(e),d=f.length,h=WT(t),m=h.length;if(d!=m&&!c)return!1;for(var g=d;g--;){var v=f[g];if(!(c?v in t:nK.call(t,v)))return!1}var S=l.get(e),b=l.get(t);if(S&&b)return S==t&&b==e;var _=!0;l.set(e,t),l.set(t,e);for(var E=c;++g<d;){v=f[g];var R=e[v],w=t[v];if(i)var T=c?i(w,R,v,t,e,l):i(R,w,v,e,t,l);if(!(T===void 0?R===w||s(R,w,r,i,l):T)){_=!1;break}E||(E=v=="constructor")}if(_&&!E){var x=e.constructor,O=t.constructor;x!=O&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof O=="function"&&O instanceof O)&&(_=!1)}return l.delete(e),l.delete(t),_}var aK=1,KM="[object Arguments]",YM="[object Array]",g1="[object Object]",iK=Object.prototype,ZM=iK.hasOwnProperty;function oK(e,t,r,i,s,l){var c=za(e),f=za(t),d=c?YM:ss(e),h=f?YM:ss(t);d=d==KM?g1:d,h=h==KM?g1:h;var m=d==g1,g=h==g1,v=d==h;if(v&&Fh(e)){if(!Fh(t))return!1;c=!0,m=!1}if(v&&!m)return l||(l=new dl),c||Pb(e)?Gz(e,t,r,i,s,l):JG(e,t,d,r,i,s,l);if(!(r&aK)){var S=m&&ZM.call(e,"__wrapped__"),b=g&&ZM.call(t,"__wrapped__");if(S||b){var _=S?e.value():e,E=b?t.value():t;return l||(l=new dl),s(_,E,r,i,l)}}return v?(l||(l=new dl),rK(e,t,r,i,s,l)):!1}function qb(e,t,r,i,s){return e===t?!0:e==null||t==null||!hs(e)&&!hs(t)?e!==e&&t!==t:oK(e,t,r,i,qb,s)}var sK=1,lK=2;function uK(e,t,r,i){var s=r.length,l=s;if(e==null)return!l;for(e=Object(e);s--;){var c=r[s];if(c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<l;){c=r[s];var f=c[0],d=e[f],h=c[1];if(c[2]){if(d===void 0&&!(f in e))return!1}else{var m=new dl,g;if(!(g===void 0?qb(h,d,sK|lK,i,m):g))return!1}}return!0}function Kz(e){return e===e&&!In(e)}function cK(e){for(var t=ls(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Kz(s)]}return t}function Yz(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function fK(e){var t=cK(e);return t.length==1&&t[0][2]?Yz(t[0][0],t[0][1]):function(r){return r===e||uK(r,e,t)}}function dK(e,t){return e!=null&&t in Object(e)}function Zz(e,t,r){t=Em(t,e);for(var i=-1,s=t.length,l=!1;++i<s;){var c=tp(t[i]);if(!(l=e!=null&&r(e,c)))break;e=e[c]}return l||++i!=s?l:(s=e==null?0:e.length,!!s&&ZO(s)&&Uw(c,s)&&(za(e)||em(e)))}function Xz(e,t){return e!=null&&Zz(e,t,dK)}var hK=1,pK=2;function mK(e,t){return QO(e)&&Kz(t)?Yz(tp(e),t):function(r){var i=Ve(r,e);return i===void 0&&i===t?Xz(r,e):qb(t,i,hK|pK)}}function gK(e){return function(t){return t?.[e]}}function yK(e){return function(t){return Hw(t,e)}}function vK(e){return QO(e)?gK(tp(e)):yK(e)}function iR(e){return typeof e=="function"?e:e==null?Lw:typeof e=="object"?za(e)?mK(e[0],e[1]):fK(e):vK(e)}function bK(e){return function(t,r,i){for(var s=-1,l=Object(t),c=i(t),f=c.length;f--;){var d=c[++s];if(r(l[d],d,l)===!1)break}return t}}var Qz=bK();function Wz(e,t){return e&&Qz(e,t,ls)}function SK(e,t){return function(r,i){if(r==null)return r;if(!sf(r))return e(r,i);for(var s=r.length,l=-1,c=Object(r);++l<s&&i(c[l],l,c)!==!1;);return r}}var Jz=SK(Wz);function tC(e,t,r){(r!==void 0&&!zb(e[t],r)||r===void 0&&!(t in e))&&YO(e,t,r)}function sb(e){return hs(e)&&sf(e)}function nC(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function wK(e){return ep(e,Ib(e))}function EK(e,t,r,i,s,l,c){var f=nC(e,r),d=nC(t,r),h=c.get(d);if(h){tC(e,r,h);return}var m=l?l(f,d,r+"",e,t,c):void 0,g=m===void 0;if(g){var v=za(d),S=!v&&Fh(d),b=!v&&!S&&Pb(d);m=d,v||S||b?za(f)?m=f:sb(f)?m=HO(f):S?(g=!1,m=Pz(d,!0)):b?(g=!1,m=qz(d,!0)):m=[]:Gc(d)||em(d)?(m=f,em(f)?m=wK(f):(!In(f)||Nb(f))&&(m=Vz(d))):g=!1}g&&(c.set(d,m),s(m,d,i,l,c),c.delete(d)),tC(e,r,m)}function e6(e,t,r,i,s){e!==t&&Qz(t,function(l,c){if(s||(s=new dl),In(l))EK(e,t,c,r,e6,i,s);else{var f=i?i(nC(e,c),l,c+"",e,t,s):void 0;f===void 0&&(f=l),tC(e,c,f)}},Ib)}var xK=200;function _K(e,t,r,i){var s=-1,l=KO,c=!0,f=e.length,d=[],h=t.length;if(!f)return d;t.length>=xK&&(l=ob,c=!1,t=new Hh(t));e:for(;++s<f;){var m=e[s],g=m;if(m=m!==0?m:0,c&&g===g){for(var v=h;v--;)if(t[v]===g)continue e;d.push(m)}else l(t,g,i)||d.push(m)}return d}var TK=Vw(function(e,t){return sb(e)?_K(e,Lb(t,1,sb,!0)):[]});function t6(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function n6(e){return typeof e=="function"?e:Lw}function CK(e,t){var r=za(e)?GO:Jz;return r(e,n6(t))}var OK=1/0;function RK(e){var t=e==null?0:e.length;return t?Lb(e,OK):[]}var AK=Object.prototype,MK=AK.hasOwnProperty;function jK(e,t){return e!=null&&MK.call(e,t)}function Mn(e,t){return e!=null&&Zz(e,t,jK)}var kK="[object String]";function Kc(e){return typeof e=="string"||!za(e)&&hs(e)&&pc(e)==kK}function DK(e,t){return wm(t,function(r){return e[r]})}function NK(e){return e==null?[]:DK(e,ls(e))}var zK=Math.max;function $K(e,t,r,i){e=sf(e)?e:NK(e),r=r?Sz(r):0;var s=e.length;return r<0&&(r=zK(s+r,0)),Kc(e)?r<=s&&e.indexOf(t,r)>-1:!!s&&xz(e,t,r)>-1}var PK=Math.min;function IK(e,t,r){for(var i=KO,s=e[0].length,l=e.length,c=l,f=Array(l),d=1/0,h=[];c--;){var m=e[c];d=PK(m.length,d),f[c]=s>=120&&m.length>=120?new Hh(c&&m):void 0}m=e[0];var g=-1,v=f[0];e:for(;++g<s&&h.length<d;){var S=m[g],b=S;if(S=S!==0?S:0,!(v?ob(v,b):i(h,b))){for(c=l;--c;){var _=f[c];if(!(_?ob(_,b):i(e[c],b)))continue e}v&&v.push(b),h.push(S)}}return h}function LK(e){return sb(e)?e:[]}var XM=Vw(function(e){var t=wm(e,LK);return t.length&&t[0]===e[0]?IK(t):[]});function UK(e,t){return t.length<2?e:Hw(e,rH(t,0,-1))}var qK="[object Map]",VK="[object Set]",FK=Object.prototype,BK=FK.hasOwnProperty;function oa(e){if(e==null)return!0;if(sf(e)&&(za(e)||typeof e=="string"||typeof e.splice=="function"||Fh(e)||Pb(e)||em(e)))return!e.length;var t=ss(e);if(t==qK||t==VK)return!e.size;if($b(e))return!kz(e).length;for(var r in e)if(BK.call(e,r))return!1;return!0}function $c(e,t){return qb(e,t)}function HK(e,t,r){r=typeof r=="function"?r:void 0;var i=r?r(e,t):void 0;return i===void 0?qb(e,t,void 0,r):!!i}var GK="[object Number]";function r6(e){return typeof e=="number"||hs(e)&&pc(e)==GK}function rw(e){return e==null}function a6(e){return e===void 0}var KK=Tz(function(e,t,r){e6(e,t,r)}),YK=Object.prototype,ZK=YK.hasOwnProperty;function i6(e,t){t=Em(t,e);var r=-1,i=t.length;if(!i)return!0;for(var s=e==null||typeof e!="object"&&typeof e!="function";++r<i;){var l=t[r];if(typeof l=="string"){if(l==="__proto__"&&!ZK.call(e,"__proto__"))return!1;if(l==="constructor"&&r+1<i&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(s&&r===0)continue;return!1}}}var c=UK(e,t);return c==null||delete c[tp(t6(t))]}function XK(e){return Gc(e)?void 0:e}var QK=1,WK=2,JK=4,lb=Nz(function(e,t){var r={};if(e==null)return r;var i=!1;t=wm(t,function(l){return l=Em(l,e),i||(i=l.length>1),l}),ep(e,nR(e),r),i&&(r=Gv(r,QK|WK|JK,XK));for(var s=t.length;s--;)i6(r,t[s]);return r});function oR(e,t,r,i){if(!In(e))return e;t=Em(t,e);for(var s=-1,l=t.length,c=l-1,f=e;f!=null&&++s<l;){var d=tp(t[s]),h=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(s!=c){var m=f[d];h=i?i(m,d,f):void 0,h===void 0&&(h=In(m)?m:Uw(t[s+1])?[]:{})}qw(f,d,h),f=f[d]}return e}function o6(e,t,r){for(var i=-1,s=t.length,l={};++i<s;){var c=t[i],f=Hw(e,c);r(f,c)&&oR(l,Em(c,e),f)}return l}function eY(e,t){if(e==null)return{};var r=wm(nR(e),function(i){return[i]});return t=iR(t),o6(e,r,function(i,s){return t(i,s[0])})}function tY(e,t){return o6(e,t,function(r,i){return Xz(e,i)})}var sR=Nz(function(e,t){return e==null?{}:tY(e,t)});function nY(e,t,r,i,s){return s(e,function(l,c,f){r=i?(i=!1,l):t(r,l,c,f)}),r}function rY(e,t,r){var i=za(e)?aH:nY,s=arguments.length<3;return i(e,iR(t),r,s,Jz)}function Gn(e,t,r){return e==null?e:oR(e,t,r)}function aY(e,t,r,i){return i=typeof i=="function"?i:void 0,e==null?e:oR(e,t,r,i)}var iY=9007199254740991,Yx=4294967295,oY=Math.min;function s6(e,t){if(e=Sz(e),e<1||e>iY)return[];var r=Yx,i=oY(e,Yx);t=n6(t),e-=Yx;for(var s=Cz(i,t);++r<e;)t(r);return s}function l6(e){return za(e)?wm(e,tp):Db(e)?[e]:HO(Dz(JO(e)))}function sY(e,t,r){var i=za(e),s=i||Fh(e)||Pb(e);if(t=iR(t),r==null){var l=e&&e.constructor;s?r=i?new l:[]:In(e)?r=Nb(l)?wz(Gw(e)):{}:r={}}return(s?GO:Wz)(e,function(c,f,d){return t(r,c,f,d)}),r}var lY=1/0,uY=qp&&1/aR(new qp([,-0]))[1]==lY?function(e){return new qp(e)}:DS,cY=200;function u6(e,t,r){var i=-1,s=KO,l=e.length,c=!0,f=[],d=f;if(l>=cY){var h=uY(e);if(h)return aR(h);c=!1,s=ob,d=new Hh}else d=f;e:for(;++i<l;){var m=e[i],g=m;if(m=m!==0?m:0,c&&g===g){for(var v=d.length;v--;)if(d[v]===g)continue e;f.push(m)}else s(d,g,r)||(d!==f&&d.push(g),f.push(m))}return f}var fY=Vw(function(e){return u6(Lb(e,1,sb,!0))});function c6(e){return e&&e.length?u6(e):[]}var dY=0;function f6(e){var t=++dY;return JO(e)+t}function hY(e,t){return e==null?!0:i6(e,t)}const QM=e=>{let t;const r=new Set,i=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const v=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),r.forEach(S=>S(t,v))}},s=()=>t,f={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(r.add(h),()=>r.delete(h))},d=t=e(i,s,f);return f},pY=(e=>e?QM(e):QM),mY=e=>e;function gY(e,t=mY){const r=Bo.useSyncExternalStore(e.subscribe,Bo.useCallback(()=>t(e.getState()),[e,t]),Bo.useCallback(()=>t(e.getInitialState()),[e,t]));return Bo.useDebugValue(r),r}const yY=e=>{const t=pY(e),r=i=>gY(t,i);return Object.assign(r,t),r},vY=(e=>yY),xm=vY()(e=>({tools:{},setToolData:(t,r)=>e(i=>y1(i,`tools.${t}`,{...i.tools[t],...r})),updateOpenaiObject:(t,r,i)=>e(s=>s.tools[t]?.openaiObject?y1(s,`tools.${t}.openaiObject.${r}`,i):s),pushOpenAiLog:(t,r)=>e(i=>{const s=i.tools[t]?.openaiLogs||[];return y1(i,`tools.${t}.openaiLogs`,[...s,{...r,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,r)=>e(i=>y1(i,`tools.${t}.openInAppUrl`,r))})),_m=e=>{const{tools:t}=xm();return t[e]},y1=(e,t,r)=>{const i=Ub(e);return Gn(i,t,r),i};function d6(e,t,r){try{return e(t)}catch(i){return Mq("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,i,r),null}}function yc(e){function t(r){if(typeof r>"u")return null;let i="";if(Array.isArray(r)){if(r[0]===void 0)return null;i=r[0]}return typeof r=="string"&&(i=r),d6(e.parse,i)}return{type:"single",eq:(r,i)=>r===i,...e,parseServerSide:t,withDefault(r){return{...this,defaultValue:r,parseServerSide(i){return t(i)??r}}},withOptions(r){return{...this,...r}}}}const bY=yc({parse:e=>e,serialize:String});yc({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});yc({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});yc({parse:e=>{const t=parseInt(e,16);return t==t?t:null},serialize:e=>{const t=Math.round(e).toString(16);return(t.length&1?"0":"")+t}});yc({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});yc({parse:e=>e.toLowerCase()==="true",serialize:String});function lR(e,t){return e.valueOf()===t.valueOf()}yc({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:lR});yc({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:lR});yc({parse:e=>{const t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:lR});const Zx=LO(),SY={};function wY(e,t={}){const r=j.useId(),i=Iq(),s=Lq(),{history:l="replace",scroll:c=i?.scroll??!1,shallow:f=i?.shallow??!0,throttleMs:d=Fv.timeMs,limitUrlUpdates:h=i?.limitUrlUpdates,clearOnDefault:m=i?.clearOnDefault??!0,startTransition:g,urlKeys:v=SY}=t,S=Object.keys(e).join(","),b=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,v[D]??D])),[S,JSON.stringify(v)]),_=Pq(Object.values(b)),E=_.searchParams,R=j.useRef({}),w=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,e[D].defaultValue??null])),[Object.values(e).map(({defaultValue:D})=>D).join(",")]),T=Vx.useQueuedQueries(Object.values(b)),[x,O]=j.useState(()=>Xx(e,v,E??new URLSearchParams,T).state),C=j.useRef(x);if(Lr("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,S,x,E),Object.keys(R.current).join("&")!==Object.values(b).join("&")){const{state:D,hasChanged:$}=Xx(e,v,E,T,R.current,C.current);$&&(Lr("[nuq+ %s `%s`] State changed: %O",r,S,{state:D,initialSearchParams:E,queuedQueries:T,queryRef:R.current,stateRef:C.current}),C.current=D,O(D)),R.current=Object.fromEntries(Object.entries(b).map(([q,L])=>[L,e[q]?.type==="multi"?E?.getAll(L):E?.get(L)??null]))}j.useEffect(()=>{const{state:D,hasChanged:$}=Xx(e,v,E,T,R.current,C.current);$&&(Lr("[nuq+ %s `%s`] State changed: %O",r,S,{state:D,initialSearchParams:E,queuedQueries:T,queryRef:R.current,stateRef:C.current}),C.current=D,O(D))},[Object.values(b).map(D=>`${D}=${E?.getAll(D)}`).join("&"),JSON.stringify(T)]),j.useEffect(()=>{const D=Object.keys(e).reduce(($,q)=>($[q]=({state:L,query:V})=>{O(F=>{const{defaultValue:re}=e[q],ae=b[q],K=L??re??null,B=F[q]??re??null;return Object.is(B,K)?(Lr("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,S,ae,L,re,C.current),F):(C.current={...C.current,[q]:K},R.current[ae]=V,Lr("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,S,ae,L,re,C.current),C.current)})},$),{});for(const $ of Object.keys(e)){const q=b[$];Lr("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,q,S),Zx.on(q,D[$])}return()=>{for(const $ of Object.keys(e)){const q=b[$];Lr("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,q,S),Zx.off(q,D[$])}}},[S,b]);const M=j.useCallback((D,$={})=>{const q=Object.fromEntries(Object.keys(e).map(B=>[B,null])),L=typeof D=="function"?D(WM(C.current,w))??q:D??q;Lr("[nuq+ %s `%s`] setState: %O",r,S,L);let V,F=0,re=!1;const ae=[];for(let[B,Y]of Object.entries(L)){const fe=e[B],ie=b[B];if(!fe||Y===void 0)continue;($.clearOnDefault??fe.clearOnDefault??m)&&Y!==null&&fe.defaultValue!==void 0&&(fe.eq??((U,P)=>U===P))(Y,fe.defaultValue)&&(Y=null);const N=Y===null?null:(fe.serialize??String)(Y);Zx.emit(ie,{state:Y,query:N});const I={key:ie,query:N,options:{history:$.history??fe.history??l,shallow:$.shallow??fe.shallow??f,scroll:$.scroll??fe.scroll??c,startTransition:$.startTransition??fe.startTransition??g}};if($?.limitUrlUpdates?.method==="debounce"||h?.method==="debounce"||fe.limitUrlUpdates?.method==="debounce"){I.options.shallow===!0&&console.warn(kb(422));const U=$?.limitUrlUpdates?.timeMs??h?.timeMs??fe.limitUrlUpdates?.timeMs??Fv.timeMs,P=Vx.push(I,U,_,s);F<U&&(V=P,F=U)}else{const U=$?.limitUrlUpdates?.timeMs??fe?.limitUrlUpdates?.timeMs??h?.timeMs??$.throttleMs??fe.throttleMs??d;ae.push(Vx.abort(ie)),jS.push(I,U),re=!0}}const K=ae.reduce((B,Y)=>Y(B),re?jS.flush(_,s):jS.getPendingPromise(_));return V??K},[S,l,f,c,d,h?.method,h?.timeMs,g,b,_.updateUrl,_.getSearchParamsSnapshot,_.rateLimitFactor,s,w]);return[j.useMemo(()=>WM(x,w),[x,w]),M]}function Xx(e,t,r,i,s,l){let c=!1;const f=Object.entries(e).reduce((d,[h,m])=>{const g=t?.[h]??h,v=i[g],S=m.type==="multi"?[]:null,b=v===void 0?(m.type==="multi"?r?.getAll(g):r?.get(g))??S:v;return s&&l&&ez(s[g]??S,b)?(d[h]=l[h]??null,d):(c=!0,d[h]=(Vq(b)?null:d6(m.parse,b,g))??null,s&&(s[g]=b),d)},{});if(!c){const d=Object.keys(e),h=Object.keys(l??{});c=d.length!==h.length||d.some(m=>!h.includes(m))}return{state:f,hasChanged:c}}function WM(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function EY(e,t={}){const{parse:r,type:i,serialize:s,eq:l,defaultValue:c,...f}=t,[{[e]:d},h]=wY({[e]:{parse:r??(m=>m),type:i,serialize:s,eq:l,defaultValue:c}},f);return[d,j.useCallback((m,g={})=>h(v=>({[e]:typeof m=="function"?m(v[e]):m}),g),[e,h])]}function uR(){return EY("tool",bY)}const xY=Object.freeze({status:"aborted"});function De(e,t,r){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:c,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=c.prototype,m=Object.keys(h);for(let g=0;g<m.length;g++){const v=m[g];v in f||(f[v]=h[v].bind(f))}}const s=r?.Parent??Object;class l extends s{}Object.defineProperty(l,"name",{value:e});function c(f){var d;const h=r?.Parent?new l:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(c,"init",{value:i}),Object.defineProperty(c,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class Vp extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class h6 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const p6={};function Yc(e){return p6}function m6(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function rC(e,t){return typeof t=="bigint"?t.toString():t}function Kw(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function cR(e){return e==null}function fR(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function _Y(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(s=Number.parseInt(d[1]))}const l=r>s?r:s,c=Number.parseInt(e.toFixed(l).replace(".","")),f=Number.parseInt(t.toFixed(l).replace(".",""));return c%f/10**l}const JM=Symbol("evaluating");function Kn(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==JM)return i===void 0&&(i=JM,i=r()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function np(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function lf(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function e3(e){return JSON.stringify(e)}function TY(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const g6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ub(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const CY=Kw(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function nm(e){if(ub(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ub(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function y6(e){return nm(e)?{...e}:Array.isArray(e)?[...e]:e}const OY=new Set(["string","number","symbol"]);function rm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uf(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function St(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function RY(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const AY={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function MY(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=lf(e._zod.def,{get shape(){const c={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(c[f]=r.shape[f])}return np(this,"shape",c),c},checks:[]});return uf(e,l)}function jY(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=lf(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete c[f]}return np(this,"shape",c),c},checks:[]});return uf(e,l)}function kY(e,t){if(!nm(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const l=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=lf(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return np(this,"shape",l),l}});return uf(e,s)}function DY(e,t){if(!nm(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=lf(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return np(this,"shape",i),i}});return uf(e,r)}function NY(e,t){const r=lf(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return np(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return uf(e,r)}function zY(e,t,r){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=lf(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(r)for(const h in r){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);r[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return np(this,"shape",d),d},checks:[]});return uf(t,c)}function $Y(e,t,r){const i=lf(t._zod.def,{get shape(){const s=t._zod.def.shape,l={...s};if(r)for(const c in r){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c in s)l[c]=new e({type:"nonoptional",innerType:s[c]});return np(this,"shape",l),l}});return uf(t,i)}function jp(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function kp(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function v1(e){return typeof e=="string"?e:e?.message}function Zc(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const s=v1(e.inst?._zod.def?.error?.(e))??v1(t?.error?.(e))??v1(r.customError?.(e))??v1(r.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function dR(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cb(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}const v6=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,rC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},b6=De("$ZodError",v6),S6=De("$ZodError",v6,{Parent:Error});function PY(e,t=r=>r.message){const r={},i=[];for(const s of e.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):i.push(t(s));return{formErrors:i,fieldErrors:r}}function IY(e,t=r=>r.message){const r={_errors:[]},i=s=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c}));else if(l.code==="invalid_key")i({issues:l.issues});else if(l.code==="invalid_element")i({issues:l.issues});else if(l.path.length===0)r._errors.push(t(l));else{let c=r,f=0;for(;f<l.path.length;){const d=l.path[f];f===l.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(l))):c[d]=c[d]||{_errors:[]},c=c[d],f++}}};return i(e),r}const hR=e=>(t,r,i,s)=>{const l=i?Object.assign(i,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},l);if(c instanceof Promise)throw new Vp;if(c.issues.length){const f=new(s?.Err??e)(c.issues.map(d=>Zc(d,l,Yc())));throw g6(f,s?.callee),f}return c.value},pR=e=>async(t,r,i,s)=>{const l=i?Object.assign(i,{async:!0}):{async:!0};let c=t._zod.run({value:r,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const f=new(s?.Err??e)(c.issues.map(d=>Zc(d,l,Yc())));throw g6(f,s?.callee),f}return c.value},Yw=e=>(t,r,i)=>{const s=i?{...i,async:!1}:{async:!1},l=t._zod.run({value:r,issues:[]},s);if(l instanceof Promise)throw new Vp;return l.issues.length?{success:!1,error:new(e??b6)(l.issues.map(c=>Zc(c,s,Yc())))}:{success:!0,data:l.value}},w6=Yw(S6),Zw=e=>async(t,r,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:r,issues:[]},s);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Zc(c,s,Yc())))}:{success:!0,data:l.value}},LY=Zw(S6),UY=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return hR(e)(t,r,s)},qY=e=>(t,r,i)=>hR(e)(t,r,i),VY=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return pR(e)(t,r,s)},FY=e=>async(t,r,i)=>pR(e)(t,r,i),BY=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Yw(e)(t,r,s)},HY=e=>(t,r,i)=>Yw(e)(t,r,i),GY=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zw(e)(t,r,s)},KY=e=>async(t,r,i)=>Zw(e)(t,r,i),YY=/^[cC][^\s-]{8,}$/,ZY=/^[0-9a-z]+$/,XY=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,QY=/^[0-9a-vA-V]{20}$/,WY=/^[A-Za-z0-9]{27}$/,JY=/^[a-zA-Z0-9_-]{21}$/,eZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tZ=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,t3=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rZ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function aZ(){return new RegExp(rZ,"u")}const iZ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sZ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,lZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,E6=/^[A-Za-z0-9_-]*$/,cZ=/^\+[1-9]\d{6,14}$/,x6="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",fZ=new RegExp(`^${x6}$`);function _6(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function dZ(e){return new RegExp(`^${_6(e)}$`)}function hZ(e){const t=_6({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${x6}T(?:${i})$`)}const pZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},mZ=/^-?\d+$/,T6=/^-?\d+(?:\.\d+)?$/,gZ=/^(?:true|false)$/i,yZ=/^null$/i,vZ=/^[^A-Z]*$/,bZ=/^[^a-z]*$/,so=De("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),C6={number:"number",bigint:"bigint",object:"date"},O6=De("$ZodCheckLessThan",(e,t)=>{so.init(e,t);const r=C6[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),R6=De("$ZodCheckGreaterThan",(e,t)=>{so.init(e,t);const r=C6[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),SZ=De("$ZodCheckMultipleOf",(e,t)=>{so.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):_Y(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),wZ=De("$ZodCheckNumberFormat",(e,t)=>{so.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[s,l]=AY[t.format];e._zod.onattach.push(c=>{const f=c._zod.bag;f.format=t.format,f.minimum=s,f.maximum=l,r&&(f.pattern=mZ)}),e._zod.check=c=>{const f=c.value;if(r){if(!Number.isInteger(f)){c.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?c.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):c.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}f<s&&c.issues.push({origin:"number",input:f,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),f>l&&c.issues.push({origin:"number",input:f,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),EZ=De("$ZodCheckMaxLength",(e,t)=>{var r;so.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!cR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const c=dR(s);i.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),xZ=De("$ZodCheckMinLength",(e,t)=>{var r;so.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!cR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const c=dR(s);i.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),_Z=De("$ZodCheckLengthEquals",(e,t)=>{var r;so.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!cR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,l=s.length;if(l===t.length)return;const c=dR(s),f=l>t.length;i.issues.push({origin:c,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Xw=De("$ZodCheckStringFormat",(e,t)=>{var r,i;so.init(e,t),e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),TZ=De("$ZodCheckRegex",(e,t)=>{Xw.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),CZ=De("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=vZ),Xw.init(e,t)}),OZ=De("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=bZ),Xw.init(e,t)}),RZ=De("$ZodCheckIncludes",(e,t)=>{so.init(e,t);const r=rm(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(s=>{const l=s._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),AZ=De("$ZodCheckStartsWith",(e,t)=>{so.init(e,t);const r=new RegExp(`^${rm(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),MZ=De("$ZodCheckEndsWith",(e,t)=>{so.init(e,t);const r=new RegExp(`.*${rm(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),jZ=De("$ZodCheckOverwrite",(e,t)=>{so.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class kZ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
11
+ `).filter(c=>c),s=Math.min(...i.map(c=>c.length-c.trimStart().length)),l=i.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,r=this?.args,s=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...r,s.join(`
12
+ `))}}const DZ={major:4,minor:3,patch:6},Nr=De("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=DZ;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const l of s._zod.onattach)l(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,f,d)=>{let h=jp(c),m;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(c))continue}else if(h)continue;const v=c.issues.length,S=g._zod.check(c);if(S instanceof Promise&&d?.async===!1)throw new Vp;if(m||S instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await S,c.issues.length!==v&&(h||(h=jp(c,v)))});else{if(c.issues.length===v)continue;h||(h=jp(c,v))}}return m?m.then(()=>c):c},l=(c,f,d)=>{if(jp(c))return c.aborted=!0,c;const h=s(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Vp;return h.then(m=>e._zod.parse(m,d))}return e._zod.parse(h,d)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(m=>l(m,c,f)):l(h,c,f)}const d=e._zod.parse(c,f);if(d instanceof Promise){if(f.async===!1)throw new Vp;return d.then(h=>s(h,i,f))}return s(d,i,f)}}Kn(e,"~standard",()=>({validate:s=>{try{const l=w6(e,s);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return LY(e,s).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),mR=De("$ZodString",(e,t)=>{Nr.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pZ(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ur=De("$ZodStringFormat",(e,t)=>{Xw.init(e,t),mR.init(e,t)}),NZ=De("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tZ),Ur.init(e,t)}),zZ=De("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=t3(i))}else t.pattern??(t.pattern=t3());Ur.init(e,t)}),$Z=De("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=nZ),Ur.init(e,t)}),PZ=De("$ZodURL",(e,t)=>{Ur.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=s.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),IZ=De("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=aZ()),Ur.init(e,t)}),LZ=De("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=JY),Ur.init(e,t)}),UZ=De("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=YY),Ur.init(e,t)}),qZ=De("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ZY),Ur.init(e,t)}),VZ=De("$ZodULID",(e,t)=>{t.pattern??(t.pattern=XY),Ur.init(e,t)}),FZ=De("$ZodXID",(e,t)=>{t.pattern??(t.pattern=QY),Ur.init(e,t)}),BZ=De("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=WY),Ur.init(e,t)}),HZ=De("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=hZ(t)),Ur.init(e,t)}),GZ=De("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fZ),Ur.init(e,t)}),KZ=De("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=dZ(t)),Ur.init(e,t)}),YZ=De("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=eZ),Ur.init(e,t)}),ZZ=De("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=iZ),Ur.init(e,t),e._zod.bag.format="ipv4"}),XZ=De("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oZ),Ur.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),QZ=De("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sZ),Ur.init(e,t)}),WZ=De("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=lZ),Ur.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[s,l]=i;if(!l)throw new Error;const c=Number(l);if(`${c}`!==l)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${s}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function A6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const JZ=De("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=uZ),Ur.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{A6(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function eX(e){if(!E6.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return A6(r)}const tX=De("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=E6),Ur.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{eX(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),nX=De("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cZ),Ur.init(e,t)});function rX(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const aX=De("$ZodJWT",(e,t)=>{Ur.init(e,t),e._zod.check=r=>{rX(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),M6=De("$ZodNumber",(e,t)=>{Nr.init(e,t),e._zod.pattern=e._zod.bag.pattern??T6,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const s=r.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return r;const l=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...l?{received:l}:{}}),r}}),iX=De("$ZodNumberFormat",(e,t)=>{wZ.init(e,t),M6.init(e,t)}),oX=De("$ZodBoolean",(e,t)=>{Nr.init(e,t),e._zod.pattern=gZ,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const s=r.value;return typeof s=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),r}}),sX=De("$ZodNull",(e,t)=>{Nr.init(e,t),e._zod.pattern=yZ,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const s=r.value;return s===null||r.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),r}}),lX=De("$ZodAny",(e,t)=>{Nr.init(e,t),e._zod.parse=r=>r}),uX=De("$ZodUnknown",(e,t)=>{Nr.init(e,t),e._zod.parse=r=>r}),cX=De("$ZodNever",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function n3(e,t,r){e.issues.length&&t.issues.push(...kp(r,e.issues)),t.value[r]=e.value}const fX=De("$ZodArray",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=Array(s.length);const l=[];for(let c=0;c<s.length;c++){const f=s[c],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?l.push(d.then(h=>n3(h,r,c))):n3(d,r,c)}return l.length?Promise.all(l).then(()=>r):r}});function aw(e,t,r,i,s){if(e.issues.length){if(s&&!(r in i))return;t.issues.push(...kp(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function j6(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=RY(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function k6(e,t,r,i,s,l){const c=[],f=s.keySet,d=s.catchall._zod,h=d.def.type,m=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){c.push(g);continue}const v=d.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(S=>aw(S,r,g,t,m))):aw(v,r,g,t,m)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l}),e.length?Promise.all(e).then(()=>r):r}const dX=De("$ZodObject",(e,t)=>{if(Nr.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Kw(()=>j6(t));Kn(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const m=f[h]._zod;if(m.values){d[h]??(d[h]=new Set);for(const g of m.values)d[h].add(g)}}return d});const s=ub,l=t.catchall;let c;e._zod.parse=(f,d)=>{c??(c=i.value);const h=f.value;if(!s(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const m=[],g=c.shape;for(const v of c.keys){const S=g[v],b=S._zod.optout==="optional",_=S._zod.run({value:h[v],issues:[]},d);_ instanceof Promise?m.push(_.then(E=>aw(E,f,v,h,b))):aw(_,f,v,h,b)}return l?k6(m,h,f,d,i.value,e):m.length?Promise.all(m).then(()=>f):f}}),hX=De("$ZodObjectJIT",(e,t)=>{dX.init(e,t);const r=e._zod.parse,i=Kw(()=>j6(t)),s=v=>{const S=new kZ(["shape","payload","ctx"]),b=i.value,_=T=>{const x=e3(T);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};S.write("const input = payload.value;");const E=Object.create(null);let R=0;for(const T of b.keys)E[T]=`key_${R++}`;S.write("const newResult = {};");for(const T of b.keys){const x=E[T],O=e3(T),M=v[T]?._zod?.optout==="optional";S.write(`const ${x} = ${_(T)};`),M?S.write(`
13
+ if (${x}.issues.length) {
14
+ if (${O} in input) {
15
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${x}.value === undefined) {
23
+ if (${O} in input) {
24
+ newResult[${O}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${O}] = ${x}.value;
28
+ }
29
+
30
+ `):S.write(`
31
+ if (${x}.issues.length) {
32
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
35
+ })));
36
+ }
37
+
38
+ if (${x}.value === undefined) {
39
+ if (${O} in input) {
40
+ newResult[${O}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${O}] = ${x}.value;
44
+ }
45
+
46
+ `)}S.write("payload.value = newResult;"),S.write("return payload;");const w=S.compile();return(T,x)=>w(v,T,x)};let l;const c=ub,f=!p6.jitless,h=f&&CY.value,m=t.catchall;let g;e._zod.parse=(v,S)=>{g??(g=i.value);const b=v.value;return c(b)?f&&h&&S?.async===!1&&S.jitless!==!0?(l||(l=s(t.shape)),v=l(v,S),m?k6([],b,v,S,g,e):v):r(v,S):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function r3(e,t,r,i){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const s=e.filter(l=>!jp(l));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(l=>l.issues.map(c=>Zc(c,i,Yc())))}),t)}const D6=De("$ZodUnion",(e,t)=>{Nr.init(e,t),Kn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Kn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Kn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Kn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${s.map(l=>fR(l.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,l)=>{if(r)return i(s,l);let c=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:s.value,issues:[]},l);if(h instanceof Promise)f.push(h),c=!0;else{if(h.issues.length===0)return h;f.push(h)}}return c?Promise.all(f).then(d=>r3(d,s,e,l)):r3(f,s,e,l)}}),pX=De("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,D6.init(e,t);const r=e._zod.parse;Kn(e._zod,"propValues",()=>{const s={};for(const l of t.options){const c=l._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[f,d]of Object.entries(c)){s[f]||(s[f]=new Set);for(const h of d)s[f].add(h)}}return s});const i=Kw(()=>{const s=t.options,l=new Map;for(const c of s){const f=c._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of f){if(l.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);l.set(d,c)}}return l});e._zod.parse=(s,l)=>{const c=s.value;if(!ub(c))return s.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),s;const f=i.value.get(c?.[t.discriminator]);return f?f._zod.run(s,l):t.unionFallback?r(s,l):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),s)}}),mX=De("$ZodIntersection",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value,l=t.left._zod.run({value:s,issues:[]},i),c=t.right._zod.run({value:s,issues:[]},i);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([d,h])=>a3(r,d,h)):a3(r,l,c)}});function aC(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nm(e)&&nm(t)){const r=Object.keys(t),i=Object.keys(e).filter(l=>r.indexOf(l)!==-1),s={...e,...t};for(const l of i){const c=aC(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};s[l]=c.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const s=e[i],l=t[i],c=aC(s,l);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};r.push(c.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function a3(e,t,r){const i=new Map;let s;for(const f of t.issues)if(f.code==="unrecognized_keys"){s??(s=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const l=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(l.length&&s&&e.issues.push({...s,keys:l}),jp(e))return e;const c=aC(t.value,r.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const gX=De("$ZodRecord",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!nm(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const l=[],c=t.keyType._zod.values;if(c){r.value={};const f=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const m=t.valueType._zod.run({value:s[h],issues:[]},i);m instanceof Promise?l.push(m.then(g=>{g.issues.length&&r.issues.push(...kp(h,g.issues)),r.value[h]=g.value})):(m.issues.length&&r.issues.push(...kp(h,m.issues)),r.value[h]=m.value)}let d;for(const h in s)f.has(h)||(d=d??[],d.push(h));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:d})}else{r.value={};for(const f of Reflect.ownKeys(s)){if(f==="__proto__")continue;let d=t.keyType._zod.run({value:f,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&T6.test(f)&&d.issues.length){const g=t.keyType._zod.run({value:Number(f),issues:[]},i);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(d=g)}if(d.issues.length){t.mode==="loose"?r.value[f]=s[f]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>Zc(g,i,Yc())),input:f,path:[f],inst:e});continue}const m=t.valueType._zod.run({value:s[f],issues:[]},i);m instanceof Promise?l.push(m.then(g=>{g.issues.length&&r.issues.push(...kp(f,g.issues)),r.value[d.value]=g.value})):(m.issues.length&&r.issues.push(...kp(f,m.issues)),r.value[d.value]=m.value)}}return l.length?Promise.all(l).then(()=>r):r}}),yX=De("$ZodEnum",(e,t)=>{Nr.init(e,t);const r=m6(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(s=>OY.has(typeof s)).map(s=>typeof s=="string"?rm(s):s.toString()).join("|")})$`),e._zod.parse=(s,l)=>{const c=s.value;return i.has(c)||s.issues.push({code:"invalid_value",values:r,input:c,inst:e}),s}}),vX=De("$ZodLiteral",(e,t)=>{if(Nr.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?rm(i):i?rm(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),i}}),bX=De("$ZodTransform",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new h6(e.constructor.name);const s=t.transform(r.value,r);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(c=>(r.value=c,r));if(s instanceof Promise)throw new Vp;return r.value=s,r}});function i3(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const N6=De("$ZodOptional",(e,t)=>{Nr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Kn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Kn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${fR(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>i3(l,r.value)):i3(s,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),SX=De("$ZodExactOptional",(e,t)=>{N6.init(e,t),Kn(e._zod,"values",()=>t.innerType._zod.values),Kn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),wX=De("$ZodNullable",(e,t)=>{Nr.init(e,t),Kn(e._zod,"optin",()=>t.innerType._zod.optin),Kn(e._zod,"optout",()=>t.innerType._zod.optout),Kn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${fR(r.source)}|null)$`):void 0}),Kn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),EX=De("$ZodDefault",(e,t)=>{Nr.init(e,t),e._zod.optin="optional",Kn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>o3(l,t)):o3(s,t)}});function o3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const xX=De("$ZodPrefault",(e,t)=>{Nr.init(e,t),e._zod.optin="optional",Kn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),_X=De("$ZodNonOptional",(e,t)=>{Nr.init(e,t),Kn(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>s3(l,e)):s3(s,e)}});function s3(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const TX=De("$ZodCatch",(e,t)=>{Nr.init(e,t),Kn(e._zod,"optin",()=>t.innerType._zod.optin),Kn(e._zod,"optout",()=>t.innerType._zod.optout),Kn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>(r.value=l.value,l.issues.length&&(r.value=t.catchValue({...r,error:{issues:l.issues.map(c=>Zc(c,i,Yc()))},input:r.value}),r.issues=[]),r)):(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(l=>Zc(l,i,Yc()))},input:r.value}),r.issues=[]),r)}}),CX=De("$ZodPipe",(e,t)=>{Nr.init(e,t),Kn(e._zod,"values",()=>t.in._zod.values),Kn(e._zod,"optin",()=>t.in._zod.optin),Kn(e._zod,"optout",()=>t.out._zod.optout),Kn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const l=t.out._zod.run(r,i);return l instanceof Promise?l.then(c=>b1(c,t.in,i)):b1(l,t.in,i)}const s=t.in._zod.run(r,i);return s instanceof Promise?s.then(l=>b1(l,t.out,i)):b1(s,t.out,i)}});function b1(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const OX=De("$ZodReadonly",(e,t)=>{Nr.init(e,t),Kn(e._zod,"propValues",()=>t.innerType._zod.propValues),Kn(e._zod,"values",()=>t.innerType._zod.values),Kn(e._zod,"optin",()=>t.innerType?._zod?.optin),Kn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l3):l3(s)}});function l3(e){return e.value=Object.freeze(e.value),e}const RX=De("$ZodCustom",(e,t)=>{so.init(e,t),Nr.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,s=t.fn(i);if(s instanceof Promise)return s.then(l=>u3(l,r,i,e));u3(s,r,i,e)}});function u3(e,t,r,i){if(!e){const s={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(cb(s))}}var c3;class AX{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function MX(){return new AX}(c3=globalThis).__zod_globalRegistry??(c3.__zod_globalRegistry=MX());const zv=globalThis.__zod_globalRegistry;function jX(e,t){return new e({type:"string",...St(t)})}function kX(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...St(t)})}function f3(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...St(t)})}function DX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...St(t)})}function NX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...St(t)})}function zX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...St(t)})}function $X(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...St(t)})}function z6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...St(t)})}function PX(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...St(t)})}function IX(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...St(t)})}function LX(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...St(t)})}function UX(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...St(t)})}function qX(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...St(t)})}function VX(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...St(t)})}function FX(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...St(t)})}function BX(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...St(t)})}function HX(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...St(t)})}function GX(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...St(t)})}function KX(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...St(t)})}function YX(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...St(t)})}function ZX(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...St(t)})}function XX(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...St(t)})}function QX(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...St(t)})}function WX(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...St(t)})}function JX(e,t){return new e({type:"string",format:"date",check:"string_format",...St(t)})}function eQ(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...St(t)})}function tQ(e,t){return new e({type:"string",format:"duration",check:"string_format",...St(t)})}function nQ(e,t){return new e({type:"number",checks:[],...St(t)})}function rQ(e,t){return new e({type:"number",coerce:!0,checks:[],...St(t)})}function aQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...St(t)})}function iQ(e,t){return new e({type:"boolean",...St(t)})}function oQ(e,t){return new e({type:"null",...St(t)})}function sQ(e){return new e({type:"any"})}function lQ(e){return new e({type:"unknown"})}function uQ(e,t){return new e({type:"never",...St(t)})}function d3(e,t){return new O6({check:"less_than",...St(t),value:e,inclusive:!1})}function Qx(e,t){return new O6({check:"less_than",...St(t),value:e,inclusive:!0})}function h3(e,t){return new R6({check:"greater_than",...St(t),value:e,inclusive:!1})}function Wx(e,t){return new R6({check:"greater_than",...St(t),value:e,inclusive:!0})}function p3(e,t){return new SZ({check:"multiple_of",...St(t),value:e})}function $6(e,t){return new EZ({check:"max_length",...St(t),maximum:e})}function iw(e,t){return new xZ({check:"min_length",...St(t),minimum:e})}function P6(e,t){return new _Z({check:"length_equals",...St(t),length:e})}function cQ(e,t){return new TZ({check:"string_format",format:"regex",...St(t),pattern:e})}function fQ(e){return new CZ({check:"string_format",format:"lowercase",...St(e)})}function dQ(e){return new OZ({check:"string_format",format:"uppercase",...St(e)})}function hQ(e,t){return new RZ({check:"string_format",format:"includes",...St(t),includes:e})}function pQ(e,t){return new AZ({check:"string_format",format:"starts_with",...St(t),prefix:e})}function mQ(e,t){return new MZ({check:"string_format",format:"ends_with",...St(t),suffix:e})}function Tm(e){return new jZ({check:"overwrite",tx:e})}function gQ(e){return Tm(t=>t.normalize(e))}function yQ(){return Tm(e=>e.trim())}function vQ(){return Tm(e=>e.toLowerCase())}function bQ(){return Tm(e=>e.toUpperCase())}function SQ(){return Tm(e=>TY(e))}function wQ(e,t,r){return new e({type:"array",element:t,...St(r)})}function EQ(e,t,r){const i=St(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function xQ(e,t,r){return new e({type:"custom",check:"custom",fn:t,...St(r)})}function _Q(e){const t=TQ(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(cb(i,r.value,t._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),r.issues.push(cb(s))}},e(r.value,r)));return t}function TQ(e,t){const r=new so({check:"custom",...St(t)});return r._zod.check=e,r}function I6(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??zv,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function da(e,t,r={path:[],schemaPath:[]}){var i;const s=e._zod.def,l=t.seen.get(e);if(l)return l.count++,r.schemaPath.includes(e)&&(l.cycle=r.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,c);const f=e._zod.toJSONSchema?.();if(f)c.schema=f;else{const m={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const v=c.schema,S=t.processors[s.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);S(e,t,v,m)}const g=e._zod.parent;g&&(c.ref||(c.ref=g),da(g,t,m),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&Xi(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((i=c.schema).default??(i.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function L6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const c of e.seen.entries()){const f=e.metadataRegistry.get(c[0])?.id;if(f){const d=i.get(f);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,c[0])}}const s=c=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(c[0])?.id,v=e.external.uri??(b=>b);if(g)return{ref:v(g)};const S=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=S,{defId:S,ref:`${v("__shared")}#/${f}/${S}`}}if(c[1]===r)return{ref:"#"};const h=`#/${f}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:h+m}},l=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:d,defId:h}=s(c);f.def={...f.schema},h&&(f.defId=h);const m=f.schema;for(const g in m)delete m[g];m.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
47
+
48
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(f.cycle){l(c);continue}if(f.count>1&&e.reused==="ref"){l(c);continue}}}function U6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=c=>{const f=e.seen.get(c);if(f.ref===null)return;const d=f.def??f.schema,h={...d},m=f.ref;if(f.ref=null,m){i(m);const v=e.seen.get(m),S=v.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(S)):Object.assign(d,S),Object.assign(d,h),c._zod.parent===m)for(const _ in d)_==="$ref"||_==="allOf"||_ in h||delete d[_];if(S.$ref&&v.def)for(const _ in d)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(d[_])===JSON.stringify(v.def[_])&&delete d[_]}const g=c._zod.parent;if(g&&g!==m){i(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const S in d)S==="$ref"||S==="allOf"||S in v.def&&JSON.stringify(d[S])===JSON.stringify(v.def[S])&&delete d[S]}e.override({zodSchema:c,jsonSchema:d,path:f.path??[]})};for(const c of[...e.seen.entries()].reverse())i(c[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,r.def??r.schema);const l=e.external?.defs??{};for(const c of e.seen.entries()){const f=c[1];f.def&&f.defId&&(l[f.defId]=f.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:ow(t,"input",e.processors),output:ow(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Xi(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Xi(i.element,r);if(i.type==="set")return Xi(i.valueType,r);if(i.type==="lazy")return Xi(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Xi(i.innerType,r);if(i.type==="intersection")return Xi(i.left,r)||Xi(i.right,r);if(i.type==="record"||i.type==="map")return Xi(i.keyType,r)||Xi(i.valueType,r);if(i.type==="pipe")return Xi(i.in,r)||Xi(i.out,r);if(i.type==="object"){for(const s in i.shape)if(Xi(i.shape[s],r))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Xi(s,r))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Xi(s,r))return!0;return!!(i.rest&&Xi(i.rest,r))}return!1}const CQ=(e,t={})=>r=>{const i=I6({...r,processors:t});return da(e,i),L6(i,e),U6(i,e)},ow=(e,t,r={})=>i=>{const{libraryOptions:s,target:l}=i??{},c=I6({...s??{},target:l,io:t,processors:r});return da(e,c),L6(c,e),U6(c,e)},OQ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},RQ=(e,t,r,i)=>{const s=r;s.type="string";const{minimum:l,maximum:c,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(s.minLength=l),typeof c=="number"&&(s.maxLength=c),f&&(s.format=OQ[f]??f,s.format===""&&delete s.format,f==="time"&&delete s.format),h&&(s.contentEncoding=h),d&&d.size>0){const m=[...d];m.length===1?s.pattern=m[0].source:m.length>1&&(s.allOf=[...m.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},AQ=(e,t,r,i)=>{const s=r,{minimum:l,maximum:c,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:m}=e._zod.bag;typeof f=="string"&&f.includes("int")?s.type="integer":s.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=m,s.exclusiveMinimum=!0):s.exclusiveMinimum=m),typeof l=="number"&&(s.minimum=l,typeof m=="number"&&t.target!=="draft-04"&&(m>=l?delete s.minimum:delete s.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=h,s.exclusiveMaximum=!0):s.exclusiveMaximum=h),typeof c=="number"&&(s.maximum=c,typeof h=="number"&&t.target!=="draft-04"&&(h<=c?delete s.maximum:delete s.exclusiveMaximum)),typeof d=="number"&&(s.multipleOf=d)},MQ=(e,t,r,i)=>{r.type="boolean"},jQ=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},kQ=(e,t,r,i)=>{r.not={}},DQ=(e,t,r,i)=>{},NQ=(e,t,r,i)=>{},zQ=(e,t,r,i)=>{const s=e._zod.def,l=m6(s.entries);l.every(c=>typeof c=="number")&&(r.type="number"),l.every(c=>typeof c=="string")&&(r.type="string"),r.enum=l},$Q=(e,t,r,i)=>{const s=e._zod.def,l=[];for(const c of s.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];r.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[c]:r.const=c}else l.every(c=>typeof c=="number")&&(r.type="number"),l.every(c=>typeof c=="string")&&(r.type="string"),l.every(c=>typeof c=="boolean")&&(r.type="boolean"),l.every(c=>c===null)&&(r.type="null"),r.enum=l},PQ=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},IQ=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},LQ=(e,t,r,i)=>{const s=r,l=e._zod.def,{minimum:c,maximum:f}=e._zod.bag;typeof c=="number"&&(s.minItems=c),typeof f=="number"&&(s.maxItems=f),s.type="array",s.items=da(l.element,t,{...i,path:[...i.path,"items"]})},UQ=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object",s.properties={};const c=l.shape;for(const h in c)s.properties[h]=da(c[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(c)),d=new Set([...f].filter(h=>{const m=l.shape[h]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(s.required=Array.from(d)),l.catchall?._zod.def.type==="never"?s.additionalProperties=!1:l.catchall?l.catchall&&(s.additionalProperties=da(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},qQ=(e,t,r,i)=>{const s=e._zod.def,l=s.inclusive===!1,c=s.options.map((f,d)=>da(f,t,{...i,path:[...i.path,l?"oneOf":"anyOf",d]}));l?r.oneOf=c:r.anyOf=c},VQ=(e,t,r,i)=>{const s=e._zod.def,l=da(s.left,t,{...i,path:[...i.path,"allOf",0]}),c=da(s.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(l)?l.allOf:[l],...f(c)?c.allOf:[c]];r.allOf=d},FQ=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object";const c=l.keyType,d=c._zod.bag?.patterns;if(l.mode==="loose"&&d&&d.size>0){const m=da(l.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const g of d)s.patternProperties[g.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=da(l.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=da(l.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=c._zod.values;if(h){const m=[...h].filter(g=>typeof g=="string"||typeof g=="number");m.length>0&&(s.required=m)}},BQ=(e,t,r,i)=>{const s=e._zod.def,l=da(s.innerType,t,i),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=s.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},HQ=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},GQ=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.default=JSON.parse(JSON.stringify(s.defaultValue))},KQ=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},YQ=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType;let c;try{c=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=c},ZQ=(e,t,r,i)=>{const s=e._zod.def,l=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;da(l,t,i);const c=t.seen.get(e);c.ref=l},XQ=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.readOnly=!0},q6=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType};function Qw(e){return!!e._zod}function jc(e,t){return Qw(e)?w6(e,t):e.safeParse(t)}function V6(e){if(!e)return;let t;if(Qw(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function QQ(e){if(Qw(e)){const l=e._zod?.def;if(l){if(l.value!==void 0)return l.value;if(Array.isArray(l.values)&&l.values.length>0)return l.values[0]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const i=e.value;if(i!==void 0)return i}const WQ=De("ZodISODateTime",(e,t)=>{HZ.init(e,t),Xr.init(e,t)});function F6(e){return WX(WQ,e)}const JQ=De("ZodISODate",(e,t)=>{GZ.init(e,t),Xr.init(e,t)});function eW(e){return JX(JQ,e)}const tW=De("ZodISOTime",(e,t)=>{KZ.init(e,t),Xr.init(e,t)});function nW(e){return eQ(tW,e)}const rW=De("ZodISODuration",(e,t)=>{YZ.init(e,t),Xr.init(e,t)});function aW(e){return tQ(rW,e)}const iW=(e,t)=>{b6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>IY(e,r)},flatten:{value:r=>PY(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,rC,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,rC,2)}},isEmpty:{get(){return e.issues.length===0}}})},vs=De("ZodError",iW,{Parent:Error}),oW=hR(vs),sW=pR(vs),lW=Yw(vs),uW=Zw(vs),cW=UY(vs),fW=qY(vs),dW=VY(vs),hW=FY(vs),pW=BY(vs),mW=HY(vs),gW=GY(vs),yW=KY(vs),zr=De("ZodType",(e,t)=>(Nr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ow(e,"input"),output:ow(e,"output")}}),e.toJSONSchema=CQ(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(lf(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>uf(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>oW(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>lW(e,r,i),e.parseAsync=async(r,i)=>sW(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>uW(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>cW(e,r,i),e.decode=(r,i)=>fW(e,r,i),e.encodeAsync=async(r,i)=>dW(e,r,i),e.decodeAsync=async(r,i)=>hW(e,r,i),e.safeEncode=(r,i)=>pW(e,r,i),e.safeDecode=(r,i)=>mW(e,r,i),e.safeEncodeAsync=async(r,i)=>gW(e,r,i),e.safeDecodeAsync=async(r,i)=>yW(e,r,i),e.refine=(r,i)=>e.check(cJ(r,i)),e.superRefine=r=>e.check(fJ(r)),e.overwrite=r=>e.check(Tm(r)),e.optional=()=>ta(e),e.exactOptional=()=>QW(e),e.nullable=()=>y3(e),e.nullish=()=>ta(y3(e)),e.nonoptional=r=>rJ(e,r),e.array=()=>et(e),e.or=r=>$r([e,r]),e.and=r=>yR(e,r),e.transform=r=>oC(e,X6(r)),e.default=r=>eJ(e,r),e.prefault=r=>nJ(e,r),e.catch=r=>iJ(e,r),e.pipe=r=>oC(e,r),e.readonly=()=>lJ(e),e.describe=r=>{const i=e.clone();return zv.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return zv.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return zv.get(e);const i=e.clone();return zv.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),B6=De("_ZodString",(e,t)=>{mR.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>RQ(e,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(cQ(...i)),e.includes=(...i)=>e.check(hQ(...i)),e.startsWith=(...i)=>e.check(pQ(...i)),e.endsWith=(...i)=>e.check(mQ(...i)),e.min=(...i)=>e.check(iw(...i)),e.max=(...i)=>e.check($6(...i)),e.length=(...i)=>e.check(P6(...i)),e.nonempty=(...i)=>e.check(iw(1,...i)),e.lowercase=i=>e.check(fQ(i)),e.uppercase=i=>e.check(dQ(i)),e.trim=()=>e.check(yQ()),e.normalize=(...i)=>e.check(gQ(...i)),e.toLowerCase=()=>e.check(vQ()),e.toUpperCase=()=>e.check(bQ()),e.slugify=()=>e.check(SQ())}),vW=De("ZodString",(e,t)=>{mR.init(e,t),B6.init(e,t),e.email=r=>e.check(kX(bW,r)),e.url=r=>e.check(z6(H6,r)),e.jwt=r=>e.check(QX(zW,r)),e.emoji=r=>e.check(PX(wW,r)),e.guid=r=>e.check(f3(m3,r)),e.uuid=r=>e.check(DX(S1,r)),e.uuidv4=r=>e.check(NX(S1,r)),e.uuidv6=r=>e.check(zX(S1,r)),e.uuidv7=r=>e.check($X(S1,r)),e.nanoid=r=>e.check(IX(EW,r)),e.guid=r=>e.check(f3(m3,r)),e.cuid=r=>e.check(LX(xW,r)),e.cuid2=r=>e.check(UX(_W,r)),e.ulid=r=>e.check(qX(TW,r)),e.base64=r=>e.check(YX(kW,r)),e.base64url=r=>e.check(ZX(DW,r)),e.xid=r=>e.check(VX(CW,r)),e.ksuid=r=>e.check(FX(OW,r)),e.ipv4=r=>e.check(BX(RW,r)),e.ipv6=r=>e.check(HX(AW,r)),e.cidrv4=r=>e.check(GX(MW,r)),e.cidrv6=r=>e.check(KX(jW,r)),e.e164=r=>e.check(XX(NW,r)),e.datetime=r=>e.check(F6(r)),e.date=r=>e.check(eW(r)),e.time=r=>e.check(nW(r)),e.duration=r=>e.check(aW(r))});function be(e){return jX(vW,e)}const Xr=De("ZodStringFormat",(e,t)=>{Ur.init(e,t),B6.init(e,t)}),bW=De("ZodEmail",(e,t)=>{$Z.init(e,t),Xr.init(e,t)}),m3=De("ZodGUID",(e,t)=>{NZ.init(e,t),Xr.init(e,t)}),S1=De("ZodUUID",(e,t)=>{zZ.init(e,t),Xr.init(e,t)}),H6=De("ZodURL",(e,t)=>{PZ.init(e,t),Xr.init(e,t)});function SW(e){return z6(H6,e)}const wW=De("ZodEmoji",(e,t)=>{IZ.init(e,t),Xr.init(e,t)}),EW=De("ZodNanoID",(e,t)=>{LZ.init(e,t),Xr.init(e,t)}),xW=De("ZodCUID",(e,t)=>{UZ.init(e,t),Xr.init(e,t)}),_W=De("ZodCUID2",(e,t)=>{qZ.init(e,t),Xr.init(e,t)}),TW=De("ZodULID",(e,t)=>{VZ.init(e,t),Xr.init(e,t)}),CW=De("ZodXID",(e,t)=>{FZ.init(e,t),Xr.init(e,t)}),OW=De("ZodKSUID",(e,t)=>{BZ.init(e,t),Xr.init(e,t)}),RW=De("ZodIPv4",(e,t)=>{ZZ.init(e,t),Xr.init(e,t)}),AW=De("ZodIPv6",(e,t)=>{XZ.init(e,t),Xr.init(e,t)}),MW=De("ZodCIDRv4",(e,t)=>{QZ.init(e,t),Xr.init(e,t)}),jW=De("ZodCIDRv6",(e,t)=>{WZ.init(e,t),Xr.init(e,t)}),kW=De("ZodBase64",(e,t)=>{JZ.init(e,t),Xr.init(e,t)}),DW=De("ZodBase64URL",(e,t)=>{tX.init(e,t),Xr.init(e,t)}),NW=De("ZodE164",(e,t)=>{nX.init(e,t),Xr.init(e,t)}),zW=De("ZodJWT",(e,t)=>{aX.init(e,t),Xr.init(e,t)}),gR=De("ZodNumber",(e,t)=>{M6.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>AQ(e,i,s),e.gt=(i,s)=>e.check(h3(i,s)),e.gte=(i,s)=>e.check(Wx(i,s)),e.min=(i,s)=>e.check(Wx(i,s)),e.lt=(i,s)=>e.check(d3(i,s)),e.lte=(i,s)=>e.check(Qx(i,s)),e.max=(i,s)=>e.check(Qx(i,s)),e.int=i=>e.check(g3(i)),e.safe=i=>e.check(g3(i)),e.positive=i=>e.check(h3(0,i)),e.nonnegative=i=>e.check(Wx(0,i)),e.negative=i=>e.check(d3(0,i)),e.nonpositive=i=>e.check(Qx(0,i)),e.multipleOf=(i,s)=>e.check(p3(i,s)),e.step=(i,s)=>e.check(p3(i,s)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Yn(e){return nQ(gR,e)}const $W=De("ZodNumberFormat",(e,t)=>{iX.init(e,t),gR.init(e,t)});function g3(e){return aQ($W,e)}const PW=De("ZodBoolean",(e,t)=>{oX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>MQ(e,r,i)});function jr(e){return iQ(PW,e)}const IW=De("ZodNull",(e,t)=>{sX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>jQ(e,r,i)});function G6(e){return oQ(IW,e)}const LW=De("ZodAny",(e,t)=>{lX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>DQ()});function UW(){return sQ(LW)}const qW=De("ZodUnknown",(e,t)=>{uX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>NQ()});function Yr(){return lQ(qW)}const VW=De("ZodNever",(e,t)=>{cX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>kQ(e,r,i)});function FW(e){return uQ(VW,e)}const BW=De("ZodArray",(e,t)=>{fX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>LQ(e,r,i,s),e.element=t.element,e.min=(r,i)=>e.check(iw(r,i)),e.nonempty=r=>e.check(iw(1,r)),e.max=(r,i)=>e.check($6(r,i)),e.length=(r,i)=>e.check(P6(r,i)),e.unwrap=()=>e.element});function et(e,t){return wQ(BW,e,t)}const K6=De("ZodObject",(e,t)=>{hX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>UQ(e,r,i,s),Kn(e,"shape",()=>t.shape),e.keyof=()=>Wo(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yr()}),e.strict=()=>e.clone({...e._zod.def,catchall:FW()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>kY(e,r),e.safeExtend=r=>DY(e,r),e.merge=r=>NY(e,r),e.pick=r=>MY(e,r),e.omit=r=>jY(e,r),e.partial=(...r)=>zY(Q6,e,r[0]),e.required=(...r)=>$Y(W6,e,r[0])});function rt(e,t){const r={type:"object",shape:e??{},...St(t)};return new K6(r)}function mi(e,t){return new K6({type:"object",shape:e,catchall:Yr(),...St(t)})}const Y6=De("ZodUnion",(e,t)=>{D6.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>qQ(e,r,i,s),e.options=t.options});function $r(e,t){return new Y6({type:"union",options:e,...St(t)})}const HW=De("ZodDiscriminatedUnion",(e,t)=>{Y6.init(e,t),pX.init(e,t)});function Z6(e,t,r){return new HW({type:"union",options:t,discriminator:e,...St(r)})}const GW=De("ZodIntersection",(e,t)=>{mX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>VQ(e,r,i,s)});function yR(e,t){return new GW({type:"intersection",left:e,right:t})}const KW=De("ZodRecord",(e,t)=>{gX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>FQ(e,r,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function Zr(e,t,r){return new KW({type:"record",keyType:e,valueType:t,...St(r)})}const iC=De("ZodEnum",(e,t)=>{yX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>zQ(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const l={};for(const c of i)if(r.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new iC({...t,checks:[],...St(s),entries:l})},e.exclude=(i,s)=>{const l={...t.entries};for(const c of i)if(r.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new iC({...t,checks:[],...St(s),entries:l})}});function Wo(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new iC({type:"enum",entries:r,...St(t)})}const YW=De("ZodLiteral",(e,t)=>{vX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>$Q(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function _t(e,t){return new YW({type:"literal",values:Array.isArray(e)?e:[e],...St(t)})}const ZW=De("ZodTransform",(e,t)=>{bX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>IQ(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new h6(e.constructor.name);r.addIssue=l=>{if(typeof l=="string")r.issues.push(cb(l,r.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=e),r.issues.push(cb(c))}};const s=t.transform(r.value,r);return s instanceof Promise?s.then(l=>(r.value=l,r)):(r.value=s,r)}});function X6(e){return new ZW({type:"transform",transform:e})}const Q6=De("ZodOptional",(e,t)=>{N6.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>q6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function ta(e){return new Q6({type:"optional",innerType:e})}const XW=De("ZodExactOptional",(e,t)=>{SX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>q6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function QW(e){return new XW({type:"optional",innerType:e})}const WW=De("ZodNullable",(e,t)=>{wX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>BQ(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function y3(e){return new WW({type:"nullable",innerType:e})}const JW=De("ZodDefault",(e,t)=>{EX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>GQ(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eJ(e,t){return new JW({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():y6(t)}})}const tJ=De("ZodPrefault",(e,t)=>{xX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>KQ(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function nJ(e,t){return new tJ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():y6(t)}})}const W6=De("ZodNonOptional",(e,t)=>{_X.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>HQ(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function rJ(e,t){return new W6({type:"nonoptional",innerType:e,...St(t)})}const aJ=De("ZodCatch",(e,t)=>{TX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>YQ(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function iJ(e,t){return new aJ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const oJ=De("ZodPipe",(e,t)=>{CX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>ZQ(e,r,i,s),e.in=t.in,e.out=t.out});function oC(e,t){return new oJ({type:"pipe",in:e,out:t})}const sJ=De("ZodReadonly",(e,t)=>{OX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>XQ(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function lJ(e){return new sJ({type:"readonly",innerType:e})}const J6=De("ZodCustom",(e,t)=>{RX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>PQ(e,r)});function uJ(e,t){return EQ(J6,e??(()=>!0),t)}function cJ(e,t={}){return xQ(J6,e,t)}function fJ(e){return _Q(e)}function e9(e,t){return oC(X6(e),t)}const dJ={custom:"custom"};function hJ(e){return rQ(gR,e)}const Ww="2025-11-25",pJ=[Ww,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ch="io.modelcontextprotocol/related-task",Jw="2.0",gi=uJ(e=>e!==null&&(typeof e=="object"||typeof e=="function")),t9=$r([be(),Yn().int()]),n9=be();mi({ttl:$r([Yn(),G6()]).optional(),pollInterval:Yn().optional()});const mJ=rt({ttl:Yn().optional()}),gJ=rt({taskId:be()}),vR=mi({progressToken:t9.optional(),[Ch]:gJ.optional()}),Jo=rt({_meta:vR.optional()}),Vb=Jo.extend({task:mJ.optional()}),yJ=e=>Vb.safeParse(e).success,vi=rt({method:be(),params:Jo.loose().optional()}),bs=rt({_meta:vR.optional()}),Ss=rt({method:be(),params:bs.loose().optional()}),bi=mi({_meta:vR.optional()}),e2=$r([be(),Yn().int()]),r9=rt({jsonrpc:_t(Jw),id:e2,...vi.shape}).strict(),sC=e=>r9.safeParse(e).success,a9=rt({jsonrpc:_t(Jw),...Ss.shape}).strict(),vJ=e=>a9.safeParse(e).success,bR=rt({jsonrpc:_t(Jw),id:e2,result:bi}).strict(),$v=e=>bR.safeParse(e).success;var an;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(an||(an={}));const SR=rt({jsonrpc:_t(Jw),id:e2.optional(),error:rt({code:Yn().int(),message:be(),data:Yr().optional()})}).strict(),bJ=e=>SR.safeParse(e).success,Jx=$r([r9,a9,bR,SR]);$r([bR,SR]);const Dp=bi.strict(),SJ=bs.extend({requestId:e2.optional(),reason:be().optional()}),wR=Ss.extend({method:_t("notifications/cancelled"),params:SJ}),wJ=rt({src:be(),mimeType:be().optional(),sizes:et(be()).optional(),theme:Wo(["light","dark"]).optional()}),Fb=rt({icons:et(wJ).optional()}),am=rt({name:be(),title:be().optional()}),i9=am.extend({...am.shape,...Fb.shape,version:be(),websiteUrl:be().optional(),description:be().optional()}),EJ=yR(rt({applyDefaults:jr().optional()}),Zr(be(),Yr())),xJ=e9(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,yR(rt({form:EJ.optional(),url:gi.optional()}),Zr(be(),Yr()).optional())),_J=mi({list:gi.optional(),cancel:gi.optional(),requests:mi({sampling:mi({createMessage:gi.optional()}).optional(),elicitation:mi({create:gi.optional()}).optional()}).optional()}),TJ=mi({list:gi.optional(),cancel:gi.optional(),requests:mi({tools:mi({call:gi.optional()}).optional()}).optional()}),CJ=rt({experimental:Zr(be(),gi).optional(),sampling:rt({context:gi.optional(),tools:gi.optional()}).optional(),elicitation:xJ.optional(),roots:rt({listChanged:jr().optional()}).optional(),tasks:_J.optional()}),OJ=Jo.extend({protocolVersion:be(),capabilities:CJ,clientInfo:i9}),RJ=vi.extend({method:_t("initialize"),params:OJ}),AJ=rt({experimental:Zr(be(),gi).optional(),logging:gi.optional(),completions:gi.optional(),prompts:rt({listChanged:jr().optional()}).optional(),resources:rt({subscribe:jr().optional(),listChanged:jr().optional()}).optional(),tools:rt({listChanged:jr().optional()}).optional(),tasks:TJ.optional()}),o9=bi.extend({protocolVersion:be(),capabilities:AJ,serverInfo:i9,instructions:be().optional()}),s9=Ss.extend({method:_t("notifications/initialized"),params:bs.optional()}),MJ=e=>s9.safeParse(e).success,ER=vi.extend({method:_t("ping"),params:Jo.optional()}),jJ=rt({progress:Yn(),total:ta(Yn()),message:ta(be())}),kJ=rt({...bs.shape,...jJ.shape,progressToken:t9}),xR=Ss.extend({method:_t("notifications/progress"),params:kJ}),DJ=Jo.extend({cursor:n9.optional()}),Bb=vi.extend({params:DJ.optional()}),Hb=bi.extend({nextCursor:n9.optional()}),NJ=Wo(["working","input_required","completed","failed","cancelled"]),Gb=rt({taskId:be(),status:NJ,ttl:$r([Yn(),G6()]),createdAt:be(),lastUpdatedAt:be(),pollInterval:ta(Yn()),statusMessage:ta(be())}),fb=bi.extend({task:Gb}),zJ=bs.merge(Gb),sw=Ss.extend({method:_t("notifications/tasks/status"),params:zJ}),_R=vi.extend({method:_t("tasks/get"),params:Jo.extend({taskId:be()})}),TR=bi.merge(Gb),CR=vi.extend({method:_t("tasks/result"),params:Jo.extend({taskId:be()})});bi.loose();const OR=Bb.extend({method:_t("tasks/list")}),RR=Hb.extend({tasks:et(Gb)}),AR=vi.extend({method:_t("tasks/cancel"),params:Jo.extend({taskId:be()})}),$J=bi.merge(Gb),l9=rt({uri:be(),mimeType:ta(be()),_meta:Zr(be(),Yr()).optional()}),u9=l9.extend({text:be()}),MR=be().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),c9=l9.extend({blob:MR}),Kb=Wo(["user","assistant"]),Cm=rt({audience:et(Kb).optional(),priority:Yn().min(0).max(1).optional(),lastModified:F6({offset:!0}).optional()}),f9=rt({...am.shape,...Fb.shape,uri:be(),description:ta(be()),mimeType:ta(be()),annotations:Cm.optional(),_meta:ta(mi({}))}),PJ=rt({...am.shape,...Fb.shape,uriTemplate:be(),description:ta(be()),mimeType:ta(be()),annotations:Cm.optional(),_meta:ta(mi({}))}),IJ=Bb.extend({method:_t("resources/list")}),d9=Hb.extend({resources:et(f9)}),LJ=Bb.extend({method:_t("resources/templates/list")}),h9=Hb.extend({resourceTemplates:et(PJ)}),jR=Jo.extend({uri:be()}),UJ=jR,qJ=vi.extend({method:_t("resources/read"),params:UJ}),p9=bi.extend({contents:et($r([u9,c9]))}),m9=Ss.extend({method:_t("notifications/resources/list_changed"),params:bs.optional()}),VJ=jR,FJ=vi.extend({method:_t("resources/subscribe"),params:VJ}),BJ=jR,HJ=vi.extend({method:_t("resources/unsubscribe"),params:BJ}),GJ=bs.extend({uri:be()}),KJ=Ss.extend({method:_t("notifications/resources/updated"),params:GJ}),YJ=rt({name:be(),description:ta(be()),required:ta(jr())}),ZJ=rt({...am.shape,...Fb.shape,description:ta(be()),arguments:ta(et(YJ)),_meta:ta(mi({}))}),XJ=Bb.extend({method:_t("prompts/list")}),g9=Hb.extend({prompts:et(ZJ)}),QJ=Jo.extend({name:be(),arguments:Zr(be(),be()).optional()}),WJ=vi.extend({method:_t("prompts/get"),params:QJ}),kR=rt({type:_t("text"),text:be(),annotations:Cm.optional(),_meta:Zr(be(),Yr()).optional()}),DR=rt({type:_t("image"),data:MR,mimeType:be(),annotations:Cm.optional(),_meta:Zr(be(),Yr()).optional()}),NR=rt({type:_t("audio"),data:MR,mimeType:be(),annotations:Cm.optional(),_meta:Zr(be(),Yr()).optional()}),JJ=rt({type:_t("tool_use"),name:be(),id:be(),input:Zr(be(),Yr()),_meta:Zr(be(),Yr()).optional()}),eee=rt({type:_t("resource"),resource:$r([u9,c9]),annotations:Cm.optional(),_meta:Zr(be(),Yr()).optional()}),tee=f9.extend({type:_t("resource_link")}),zR=$r([kR,DR,NR,tee,eee]),nee=rt({role:Kb,content:zR}),y9=bi.extend({description:be().optional(),messages:et(nee)}),v9=Ss.extend({method:_t("notifications/prompts/list_changed"),params:bs.optional()}),ree=rt({title:be().optional(),readOnlyHint:jr().optional(),destructiveHint:jr().optional(),idempotentHint:jr().optional(),openWorldHint:jr().optional()}),aee=rt({taskSupport:Wo(["required","optional","forbidden"]).optional()}),b9=rt({...am.shape,...Fb.shape,description:be().optional(),inputSchema:rt({type:_t("object"),properties:Zr(be(),gi).optional(),required:et(be()).optional()}).catchall(Yr()),outputSchema:rt({type:_t("object"),properties:Zr(be(),gi).optional(),required:et(be()).optional()}).catchall(Yr()).optional(),annotations:ree.optional(),execution:aee.optional(),_meta:Zr(be(),Yr()).optional()}),iee=Bb.extend({method:_t("tools/list")}),S9=Hb.extend({tools:et(b9)}),t2=bi.extend({content:et(zR).default([]),structuredContent:Zr(be(),Yr()).optional(),isError:jr().optional()});t2.or(bi.extend({toolResult:Yr()}));const oee=Vb.extend({name:be(),arguments:Zr(be(),Yr()).optional()}),see=vi.extend({method:_t("tools/call"),params:oee}),w9=Ss.extend({method:_t("notifications/tools/list_changed"),params:bs.optional()}),lee=rt({autoRefresh:jr().default(!0),debounceMs:Yn().int().nonnegative().default(300)}),E9=Wo(["debug","info","notice","warning","error","critical","alert","emergency"]),uee=Jo.extend({level:E9}),cee=vi.extend({method:_t("logging/setLevel"),params:uee}),fee=bs.extend({level:E9,logger:be().optional(),data:Yr()}),dee=Ss.extend({method:_t("notifications/message"),params:fee}),hee=rt({name:be().optional()}),pee=rt({hints:et(hee).optional(),costPriority:Yn().min(0).max(1).optional(),speedPriority:Yn().min(0).max(1).optional(),intelligencePriority:Yn().min(0).max(1).optional()}),mee=rt({mode:Wo(["auto","required","none"]).optional()}),gee=rt({type:_t("tool_result"),toolUseId:be().describe("The unique identifier for the corresponding tool call."),content:et(zR).default([]),structuredContent:rt({}).loose().optional(),isError:jr().optional(),_meta:Zr(be(),Yr()).optional()}),yee=Z6("type",[kR,DR,NR]),lw=Z6("type",[kR,DR,NR,JJ,gee]),vee=rt({role:Kb,content:$r([lw,et(lw)]),_meta:Zr(be(),Yr()).optional()}),bee=Vb.extend({messages:et(vee),modelPreferences:pee.optional(),systemPrompt:be().optional(),includeContext:Wo(["none","thisServer","allServers"]).optional(),temperature:Yn().optional(),maxTokens:Yn().int(),stopSequences:et(be()).optional(),metadata:gi.optional(),tools:et(b9).optional(),toolChoice:mee.optional()}),x9=vi.extend({method:_t("sampling/createMessage"),params:bee}),_9=bi.extend({model:be(),stopReason:ta(Wo(["endTurn","stopSequence","maxTokens"]).or(be())),role:Kb,content:yee}),T9=bi.extend({model:be(),stopReason:ta(Wo(["endTurn","stopSequence","maxTokens","toolUse"]).or(be())),role:Kb,content:$r([lw,et(lw)])}),See=rt({type:_t("boolean"),title:be().optional(),description:be().optional(),default:jr().optional()}),wee=rt({type:_t("string"),title:be().optional(),description:be().optional(),minLength:Yn().optional(),maxLength:Yn().optional(),format:Wo(["email","uri","date","date-time"]).optional(),default:be().optional()}),Eee=rt({type:Wo(["number","integer"]),title:be().optional(),description:be().optional(),minimum:Yn().optional(),maximum:Yn().optional(),default:Yn().optional()}),xee=rt({type:_t("string"),title:be().optional(),description:be().optional(),enum:et(be()),default:be().optional()}),_ee=rt({type:_t("string"),title:be().optional(),description:be().optional(),oneOf:et(rt({const:be(),title:be()})),default:be().optional()}),Tee=rt({type:_t("string"),title:be().optional(),description:be().optional(),enum:et(be()),enumNames:et(be()).optional(),default:be().optional()}),Cee=$r([xee,_ee]),Oee=rt({type:_t("array"),title:be().optional(),description:be().optional(),minItems:Yn().optional(),maxItems:Yn().optional(),items:rt({type:_t("string"),enum:et(be())}),default:et(be()).optional()}),Ree=rt({type:_t("array"),title:be().optional(),description:be().optional(),minItems:Yn().optional(),maxItems:Yn().optional(),items:rt({anyOf:et(rt({const:be(),title:be()}))}),default:et(be()).optional()}),Aee=$r([Oee,Ree]),Mee=$r([Tee,Cee,Aee]),jee=$r([Mee,See,wee,Eee]),kee=Vb.extend({mode:_t("form").optional(),message:be(),requestedSchema:rt({type:_t("object"),properties:Zr(be(),jee),required:et(be()).optional()})}),Dee=Vb.extend({mode:_t("url"),message:be(),elicitationId:be(),url:be().url()}),Nee=$r([kee,Dee]),C9=vi.extend({method:_t("elicitation/create"),params:Nee}),zee=bs.extend({elicitationId:be()}),$ee=Ss.extend({method:_t("notifications/elicitation/complete"),params:zee}),O9=bi.extend({action:Wo(["accept","decline","cancel"]),content:e9(e=>e===null?void 0:e,Zr(be(),$r([be(),Yn(),jr(),et(be())])).optional())}),Pee=rt({type:_t("ref/resource"),uri:be()}),Iee=rt({type:_t("ref/prompt"),name:be()}),Lee=Jo.extend({ref:$r([Iee,Pee]),argument:rt({name:be(),value:be()}),context:rt({arguments:Zr(be(),be()).optional()}).optional()}),Uee=vi.extend({method:_t("completion/complete"),params:Lee}),R9=bi.extend({completion:mi({values:et(be()).max(100),total:ta(Yn().int()),hasMore:ta(jr())})}),qee=rt({uri:be().startsWith("file://"),name:be().optional(),_meta:Zr(be(),Yr()).optional()}),Vee=vi.extend({method:_t("roots/list"),params:Jo.optional()}),Fee=bi.extend({roots:et(qee)}),Bee=Ss.extend({method:_t("notifications/roots/list_changed"),params:bs.optional()});$r([ER,RJ,Uee,cee,WJ,XJ,IJ,LJ,qJ,FJ,HJ,see,iee,_R,CR,OR,AR]);$r([wR,xR,s9,Bee,sw]);$r([Dp,_9,T9,O9,Fee,TR,RR,fb]);$r([ER,x9,C9,Vee,_R,CR,OR,AR]);$r([wR,xR,dee,KJ,m9,w9,v9,sw,$ee]);$r([Dp,o9,R9,y9,g9,d9,h9,p9,t2,S9,TR,RR,fb]);class It extends Error{constructor(t,r,i){super(`MCP error ${t}: ${r}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,r,i){if(t===an.UrlElicitationRequired&&i){const s=i;if(s.elicitations)return new Hee(s.elicitations,r)}return new It(t,r,i)}}class Hee extends It{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(an.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function vh(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function v3(e){const r=V6(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=QQ(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function b3(e,t){const r=jc(e,t);if(!r.success)throw r.error;return r.data}const Gee=6e4;class Kee{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(wR,r=>{this._oncancel(r)}),this.setNotificationHandler(xR,r=>{this._onprogress(r)}),this.setRequestHandler(ER,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_R,async(r,i)=>{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new It(an.InvalidParams,"Failed to retrieve task: Task not found");return{...s}}),this.setRequestHandler(CR,async(r,i)=>{const s=async()=>{const l=r.params.taskId;if(this._taskMessageQueue){let f;for(;f=await this._taskMessageQueue.dequeue(l,i.sessionId);){if(f.type==="response"||f.type==="error"){const d=f.message,h=d.id,m=this._requestResolvers.get(h);if(m)if(this._requestResolvers.delete(h),f.type==="response")m(d);else{const g=d,v=new It(g.error.code,g.error.message,g.error.data);m(v)}else{const g=f.type==="response"?"Response":"Error";this._onerror(new Error(`${g} handler missing for request ${h}`))}continue}await this._transport?.send(f.message,{relatedRequestId:i.requestId})}}const c=await this._taskStore.getTask(l,i.sessionId);if(!c)throw new It(an.InvalidParams,`Task not found: ${l}`);if(!vh(c.status))return await this._waitForTaskUpdate(l,i.signal),await s();if(vh(c.status)){const f=await this._taskStore.getTaskResult(l,i.sessionId);return this._clearTaskQueue(l),{...f,_meta:{...f._meta,[Ch]:{taskId:l}}}}return await s()};return await s()}),this.setRequestHandler(OR,async(r,i)=>{try{const{tasks:s,nextCursor:l}=await this._taskStore.listTasks(r.params?.cursor,i.sessionId);return{tasks:s,nextCursor:l,_meta:{}}}catch(s){throw new It(an.InvalidParams,`Failed to list tasks: ${s instanceof Error?s.message:String(s)}`)}}),this.setRequestHandler(AR,async(r,i)=>{try{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new It(an.InvalidParams,`Task not found: ${r.params.taskId}`);if(vh(s.status))throw new It(an.InvalidParams,`Cannot cancel task in terminal status: ${s.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(r.params.taskId);const l=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!l)throw new It(an.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...l}}catch(s){throw s instanceof It?s:new It(an.InvalidRequest,`Failed to cancel task: ${s instanceof Error?s.message:String(s)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,i,s,l=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(s,r),startTime:Date.now(),timeout:r,maxTotalTimeout:i,resetTimeoutOnProgress:l,onTimeout:s})}_resetTimeout(t){const r=this._timeoutInfo.get(t);if(!r)return!1;const i=Date.now()-r.startTime;if(r.maxTotalTimeout&&i>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),It.fromError(an.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:i});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){const r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const i=this.transport?.onerror;this._transport.onerror=l=>{i?.(l),this._onerror(l)};const s=this._transport?.onmessage;this._transport.onmessage=(l,c)=>{s?.(l,c),$v(l)||bJ(l)?this._onresponse(l):sC(l)?this._onrequest(l,c):vJ(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const r=It.fromError(an.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const i of t.values())i(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){const r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,r){const i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,s=this._transport,l=t.params?._meta?.[Ch]?.taskId;if(i===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:an.MethodNotFound,message:"Method not found"}};l&&this._taskMessageQueue?this._enqueueTaskMessage(l,{type:"error",message:m,timestamp:Date.now()},s?.sessionId).catch(g=>this._onerror(new Error(`Failed to enqueue error response: ${g}`))):s?.send(m).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const f=yJ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,s?.sessionId):void 0,h={signal:c.signal,sessionId:s?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{const g={relatedRequestId:t.id};l&&(g.relatedTask={taskId:l}),await this.notification(m,g)},sendRequest:async(m,g,v)=>{const S={...v,relatedRequestId:t.id};l&&!S.relatedTask&&(S.relatedTask={taskId:l});const b=S.relatedTask?.taskId??l;return b&&d&&await d.updateTaskStatus(b,"input_required"),await this.request(m,g,S)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:l,taskStore:d,taskRequestedTtl:f?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{f&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,h)).then(async m=>{if(c.signal.aborted)return;const g={result:m,jsonrpc:"2.0",id:t.id};l&&this._taskMessageQueue?await this._enqueueTaskMessage(l,{type:"response",message:g,timestamp:Date.now()},s?.sessionId):await s?.send(g)},async m=>{if(c.signal.aborted)return;const g={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:an.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};l&&this._taskMessageQueue?await this._enqueueTaskMessage(l,{type:"error",message:g,timestamp:Date.now()},s?.sessionId):await s?.send(g)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:r,...i}=t.params,s=Number(r),l=this._progressHandlers.get(s);if(!l){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(s),f=this._timeoutInfo.get(s);if(f&&c&&f.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(d){this._responseHandlers.delete(s),this._progressHandlers.delete(s),this._cleanupTimeout(s),c(d);return}l(i)}_onresponse(t){const r=Number(t.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),$v(t))i(t);else{const c=new It(t.error.code,t.error.message,t.error.data);i(c)}return}const s=this._responseHandlers.get(r);if(s===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let l=!1;if($v(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const f=c.task;typeof f.taskId=="string"&&(l=!0,this._taskProgressTokens.set(f.taskId,r))}}if(l||this._progressHandlers.delete(r),$v(t))s(t);else{const c=It.fromError(t.error.code,t.error.message,t.error.data);s(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,i){const{task:s}=i??{};if(!s){try{yield{type:"result",result:await this.request(t,r,i)}}catch(c){yield{type:"error",error:c instanceof It?c:new It(an.InternalError,String(c))}}return}let l;try{const c=await this.request(t,fb,i);if(c.task)l=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new It(an.InternalError,"Task creation did not return a task");for(;;){const f=await this.getTask({taskId:l},i);if(yield{type:"taskStatus",task:f},vh(f.status)){f.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)}:f.status==="failed"?yield{type:"error",error:new It(an.InternalError,`Task ${l} failed`)}:f.status==="cancelled"&&(yield{type:"error",error:new It(an.InternalError,`Task ${l} was cancelled`)});return}if(f.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)};return}const d=f.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(h=>setTimeout(h,d)),i?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof It?c:new It(an.InternalError,String(c))}}}request(t,r,i){const{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c,task:f,relatedTask:d}=i??{};return new Promise((h,m)=>{const g=w=>{m(w)};if(!this._transport){g(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),f&&this.assertTaskCapability(t.method)}catch(w){g(w);return}i?.signal?.throwIfAborted();const v=this._requestMessageId++,S={...t,jsonrpc:"2.0",id:v};i?.onprogress&&(this._progressHandlers.set(v,i.onprogress),S.params={...t.params,_meta:{...t.params?._meta||{},progressToken:v}}),f&&(S.params={...S.params,task:f}),d&&(S.params={...S.params,_meta:{...S.params?._meta||{},[Ch]:d}});const b=w=>{this._responseHandlers.delete(v),this._progressHandlers.delete(v),this._cleanupTimeout(v),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:v,reason:String(w)}},{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c}).catch(x=>this._onerror(new Error(`Failed to send cancellation: ${x}`)));const T=w instanceof It?w:new It(an.RequestTimeout,String(w));m(T)};this._responseHandlers.set(v,w=>{if(!i?.signal?.aborted){if(w instanceof Error)return m(w);try{const T=jc(r,w.result);T.success?h(T.data):m(T.error)}catch(T){m(T)}}}),i?.signal?.addEventListener("abort",()=>{b(i?.signal?.reason)});const _=i?.timeout??Gee,E=()=>b(It.fromError(an.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(v,_,i?.maxTotalTimeout,E,i?.resetTimeoutOnProgress??!1);const R=d?.taskId;if(R){const w=T=>{const x=this._responseHandlers.get(v);x?x(T):this._onerror(new Error(`Response handler missing for side-channeled request ${v}`))};this._requestResolvers.set(v,w),this._enqueueTaskMessage(R,{type:"request",message:S,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(v),m(T)})}else this._transport.send(S,{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c}).catch(w=>{this._cleanupTimeout(v),m(w)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},TR,r)}async getTaskResult(t,r,i){return this.request({method:"tasks/result",params:t},r,i)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},RR,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},$J,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const i=r?.relatedTask?.taskId;if(i){const f={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Ch]:r.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:f,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let f={...t,jsonrpc:"2.0"};r?.relatedTask&&(f={...f,params:{...f.params,_meta:{...f.params?._meta||{},[Ch]:r.relatedTask}}}),this._transport?.send(f,r).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};r?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[Ch]:r.relatedTask}}}),await this._transport.send(c,r)}setRequestHandler(t,r){const i=v3(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(s,l)=>{const c=b3(t,s);return Promise.resolve(r(c,l))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){const i=v3(t);this._notificationHandlers.set(i,s=>{const l=b3(t,s);return Promise.resolve(r(l))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const s=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,i,s)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(t,r);for(const s of i)if(s.type==="request"&&sC(s.message)){const l=s.message.id,c=this._requestResolvers.get(l);c?(c(new It(an.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(l)):this._onerror(new Error(`Resolver missing for request ${l} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let i=this._options?.defaultTaskPollInterval??1e3;try{const s=await this._taskStore?.getTask(t);s?.pollInterval&&(i=s.pollInterval)}catch{}return new Promise((s,l)=>{if(r.aborted){l(new It(an.InvalidRequest,"Request cancelled"));return}const c=setTimeout(s,i);r.addEventListener("abort",()=>{clearTimeout(c),l(new It(an.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async s=>{if(!t)throw new Error("No request provided");return await i.createTask(s,t.id,{method:t.method,params:t.params},r)},getTask:async s=>{const l=await i.getTask(s,r);if(!l)throw new It(an.InvalidParams,"Failed to retrieve task: Task not found");return l},storeTaskResult:async(s,l,c)=>{await i.storeTaskResult(s,l,c,r);const f=await i.getTask(s,r);if(f){const d=sw.parse({method:"notifications/tasks/status",params:f});await this.notification(d),vh(f.status)&&this._cleanupTaskProgressHandler(s)}},getTaskResult:s=>i.getTaskResult(s,r),updateTaskStatus:async(s,l,c)=>{const f=await i.getTask(s,r);if(!f)throw new It(an.InvalidParams,`Task "${s}" not found - it may have been cleaned up`);if(vh(f.status))throw new It(an.InvalidParams,`Cannot update task "${s}" from terminal status "${f.status}" to "${l}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(s,l,c,r);const d=await i.getTask(s,r);if(d){const h=sw.parse({method:"notifications/tasks/status",params:d});await this.notification(h),vh(d.status)&&this._cleanupTaskProgressHandler(s)}},listTasks:s=>i.listTasks(s,r)}}}function S3(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Yee(e,t){const r={...e};for(const i in t){const s=i,l=t[s];if(l===void 0)continue;const c=r[s];S3(c)&&S3(l)?r[s]={...c,...l}:r[s]=l}return r}var w1={exports:{}},e_={},Wu={},bh={},t_={},n_={},r_={},w3;function uw(){return w3||(w3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(w){if(super(),!e.IDENTIFIER.test(w))throw new Error("CodeGen: name must be a valid identifier");this.str=w}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(w){super(),this._items=typeof w=="string"?[w]:w}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const w=this._items[0];return w===""||w==='""'}get str(){var w;return(w=this._str)!==null&&w!==void 0?w:this._str=this._items.reduce((T,x)=>`${T}${x}`,"")}get names(){var w;return(w=this._names)!==null&&w!==void 0?w:this._names=this._items.reduce((T,x)=>(x instanceof r&&(T[x.str]=(T[x.str]||0)+1),T),{})}}e._Code=i,e.nil=new i("");function s(R,...w){const T=[R[0]];let x=0;for(;x<w.length;)f(T,w[x]),T.push(R[++x]);return new i(T)}e._=s;const l=new i("+");function c(R,...w){const T=[S(R[0])];let x=0;for(;x<w.length;)T.push(l),f(T,w[x]),T.push(l,S(R[++x]));return d(T),new i(T)}e.str=c;function f(R,w){w instanceof i?R.push(...w._items):w instanceof r?R.push(w):R.push(g(w))}e.addCodeArg=f;function d(R){let w=1;for(;w<R.length-1;){if(R[w]===l){const T=h(R[w-1],R[w+1]);if(T!==void 0){R.splice(w-1,3,T);continue}R[w++]="+"}w++}}function h(R,w){if(w==='""')return R;if(R==='""')return w;if(typeof R=="string")return w instanceof r||R[R.length-1]!=='"'?void 0:typeof w!="string"?`${R.slice(0,-1)}${w}"`:w[0]==='"'?R.slice(0,-1)+w.slice(1):void 0;if(typeof w=="string"&&w[0]==='"'&&!(R instanceof r))return`"${R}${w.slice(1)}`}function m(R,w){return w.emptyStr()?R:R.emptyStr()?w:c`${R}${w}`}e.strConcat=m;function g(R){return typeof R=="number"||typeof R=="boolean"||R===null?R:S(Array.isArray(R)?R.join(","):R)}function v(R){return new i(S(R))}e.stringify=v;function S(R){return JSON.stringify(R).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=S;function b(R){return typeof R=="string"&&e.IDENTIFIER.test(R)?new i(`.${R}`):s`[${R}]`}e.getProperty=b;function _(R){if(typeof R=="string"&&e.IDENTIFIER.test(R))return new i(`${R}`);throw new Error(`CodeGen: invalid export name: ${R}, use explicit $id name mapping`)}e.getEsmExportName=_;function E(R){return new i(R.toString())}e.regexpCode=E})(r_)),r_}var a_={},E3;function x3(){return E3||(E3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=uw();class r extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var i;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:h,parent:m}={}){this._names={},this._prefixes=h,this._parent=m}toName(h){return h instanceof t.Name?h:this.name(h)}name(h){return new t.Name(this._newName(h))}_newName(h){const m=this._names[h]||this._nameGroup(h);return`${h}${m.index++}`}_nameGroup(h){var m,g;if(!((g=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||g===void 0)&&g.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}e.Scope=s;class l extends t.Name{constructor(h,m){super(m),this.prefix=h}setValue(h,{property:m,itemIndex:g}){this.value=h,this.scopePath=(0,t._)`.${new t.Name(m)}[${g}]`}}e.ValueScopeName=l;const c=(0,t._)`\n`;class f extends s{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?c:t.nil}}get(){return this._scope}name(h){return new l(h,this._newName(h))}value(h,m){var g;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(h),{prefix:S}=v,b=(g=m.key)!==null&&g!==void 0?g:m.ref;let _=this._values[S];if(_){const w=_.get(b);if(w)return w}else _=this._values[S]=new Map;_.set(b,v);const E=this._scope[S]||(this._scope[S]=[]),R=E.length;return E[R]=m.ref,v.setValue(m,{property:S,itemIndex:R}),v}getValue(h,m){const g=this._values[h];if(g)return g.get(m)}scopeRefs(h,m=this._values){return this._reduceValues(m,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${h}${g.scopePath}`})}scopeCode(h=this._values,m,g){return this._reduceValues(h,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},m,g)}_reduceValues(h,m,g={},v){let S=t.nil;for(const b in h){const _=h[b];if(!_)continue;const E=g[b]=g[b]||new Map;_.forEach(R=>{if(E.has(R))return;E.set(R,i.Started);let w=m(R);if(w){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;S=(0,t._)`${S}${T} ${R} = ${w};${this.opts._n}`}else if(w=v?.(R))S=(0,t._)`${S}${w}${this.opts._n}`;else throw new r(R);E.set(R,i.Completed)})}return S}}e.ValueScope=f})(a_)),a_}var _3;function dn(){return _3||(_3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=uw(),r=x3();var i=uw();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var s=x3();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class l{optimizeNodes(){return this}optimizeNames(P,G){return this}}class c extends l{constructor(P,G,ee){super(),this.varKind=P,this.name=G,this.rhs=ee}render({es5:P,_n:G}){const ee=P?r.varKinds.var:this.varKind,ue=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${ue};`+G}optimizeNames(P,G){if(P[this.name.str])return this.rhs&&(this.rhs=re(this.rhs,P,G)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class f extends l{constructor(P,G,ee){super(),this.lhs=P,this.rhs=G,this.sideEffects=ee}render({_n:P}){return`${this.lhs} = ${this.rhs};`+P}optimizeNames(P,G){if(!(this.lhs instanceof t.Name&&!P[this.lhs.str]&&!this.sideEffects))return this.rhs=re(this.rhs,P,G),this}get names(){const P=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(P,this.rhs)}}class d extends f{constructor(P,G,ee,ue){super(P,ee,ue),this.op=G}render({_n:P}){return`${this.lhs} ${this.op}= ${this.rhs};`+P}}class h extends l{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`${this.label}:`+P}}class m extends l{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`break${this.label?` ${this.label}`:""};`+P}}class g extends l{constructor(P){super(),this.error=P}render({_n:P}){return`throw ${this.error};`+P}get names(){return this.error.names}}class v extends l{constructor(P){super(),this.code=P}render({_n:P}){return`${this.code};`+P}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(P,G){return this.code=re(this.code,P,G),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class S extends l{constructor(P=[]){super(),this.nodes=P}render(P){return this.nodes.reduce((G,ee)=>G+ee.render(P),"")}optimizeNodes(){const{nodes:P}=this;let G=P.length;for(;G--;){const ee=P[G].optimizeNodes();Array.isArray(ee)?P.splice(G,1,...ee):ee?P[G]=ee:P.splice(G,1)}return P.length>0?this:void 0}optimizeNames(P,G){const{nodes:ee}=this;let ue=ee.length;for(;ue--;){const ve=ee[ue];ve.optimizeNames(P,G)||(ae(P,ve.names),ee.splice(ue,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce((P,G)=>V(P,G.names),{})}}class b extends S{render(P){return"{"+P._n+super.render(P)+"}"+P._n}}class _ extends S{}class E extends b{}E.kind="else";class R extends b{constructor(P,G){super(G),this.condition=P}render(P){let G=`if(${this.condition})`+super.render(P);return this.else&&(G+="else "+this.else.render(P)),G}optimizeNodes(){super.optimizeNodes();const P=this.condition;if(P===!0)return this.nodes;let G=this.else;if(G){const ee=G.optimizeNodes();G=this.else=Array.isArray(ee)?new E(ee):ee}if(G)return P===!1?G instanceof R?G:G.nodes:this.nodes.length?this:new R(K(P),G instanceof R?[G]:G.nodes);if(!(P===!1||!this.nodes.length))return this}optimizeNames(P,G){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames(P,G),!!(super.optimizeNames(P,G)||this.else))return this.condition=re(this.condition,P,G),this}get names(){const P=super.names;return F(P,this.condition),this.else&&V(P,this.else.names),P}}R.kind="if";class w extends b{}w.kind="for";class T extends w{constructor(P){super(),this.iteration=P}render(P){return`for(${this.iteration})`+super.render(P)}optimizeNames(P,G){if(super.optimizeNames(P,G))return this.iteration=re(this.iteration,P,G),this}get names(){return V(super.names,this.iteration.names)}}class x extends w{constructor(P,G,ee,ue){super(),this.varKind=P,this.name=G,this.from=ee,this.to=ue}render(P){const G=P.es5?r.varKinds.var:this.varKind,{name:ee,from:ue,to:ve}=this;return`for(${G} ${ee}=${ue}; ${ee}<${ve}; ${ee}++)`+super.render(P)}get names(){const P=F(super.names,this.from);return F(P,this.to)}}class O extends w{constructor(P,G,ee,ue){super(),this.loop=P,this.varKind=G,this.name=ee,this.iterable=ue}render(P){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(P)}optimizeNames(P,G){if(super.optimizeNames(P,G))return this.iterable=re(this.iterable,P,G),this}get names(){return V(super.names,this.iterable.names)}}class C extends b{constructor(P,G,ee){super(),this.name=P,this.args=G,this.async=ee}render(P){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(P)}}C.kind="func";class M extends S{render(P){return"return "+super.render(P)}}M.kind="return";class D extends b{render(P){let G="try"+super.render(P);return this.catch&&(G+=this.catch.render(P)),this.finally&&(G+=this.finally.render(P)),G}optimizeNodes(){var P,G;return super.optimizeNodes(),(P=this.catch)===null||P===void 0||P.optimizeNodes(),(G=this.finally)===null||G===void 0||G.optimizeNodes(),this}optimizeNames(P,G){var ee,ue;return super.optimizeNames(P,G),(ee=this.catch)===null||ee===void 0||ee.optimizeNames(P,G),(ue=this.finally)===null||ue===void 0||ue.optimizeNames(P,G),this}get names(){const P=super.names;return this.catch&&V(P,this.catch.names),this.finally&&V(P,this.finally.names),P}}class $ extends b{constructor(P){super(),this.error=P}render(P){return`catch(${this.error})`+super.render(P)}}$.kind="catch";class q extends b{render(P){return"finally"+super.render(P)}}q.kind="finally";class L{constructor(P,G={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...G,_n:G.lines?`
49
+ `:""},this._extScope=P,this._scope=new r.Scope({parent:P}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(P){return this._scope.name(P)}scopeName(P){return this._extScope.name(P)}scopeValue(P,G){const ee=this._extScope.value(P,G);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue(P,G){return this._extScope.getValue(P,G)}scopeRefs(P){return this._extScope.scopeRefs(P,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(P,G,ee,ue){const ve=this._scope.toName(G);return ee!==void 0&&ue&&(this._constants[ve.str]=ee),this._leafNode(new c(P,ve,ee)),ve}const(P,G,ee){return this._def(r.varKinds.const,P,G,ee)}let(P,G,ee){return this._def(r.varKinds.let,P,G,ee)}var(P,G,ee){return this._def(r.varKinds.var,P,G,ee)}assign(P,G,ee){return this._leafNode(new f(P,G,ee))}add(P,G){return this._leafNode(new d(P,e.operators.ADD,G))}code(P){return typeof P=="function"?P():P!==t.nil&&this._leafNode(new v(P)),this}object(...P){const G=["{"];for(const[ee,ue]of P)G.length>1&&G.push(","),G.push(ee),(ee!==ue||this.opts.es5)&&(G.push(":"),(0,t.addCodeArg)(G,ue));return G.push("}"),new t._Code(G)}if(P,G,ee){if(this._blockNode(new R(P)),G&&ee)this.code(G).else().code(ee).endIf();else if(G)this.code(G).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(P){return this._elseNode(new R(P))}else(){return this._elseNode(new E)}endIf(){return this._endBlockNode(R,E)}_for(P,G){return this._blockNode(P),G&&this.code(G).endFor(),this}for(P,G){return this._for(new T(P),G)}forRange(P,G,ee,ue,ve=this.opts.es5?r.varKinds.var:r.varKinds.let){const Ee=this._scope.toName(P);return this._for(new x(ve,Ee,G,ee),()=>ue(Ee))}forOf(P,G,ee,ue=r.varKinds.const){const ve=this._scope.toName(P);if(this.opts.es5){const Ee=G instanceof t.Name?G:this.var("_arr",G);return this.forRange("_i",0,(0,t._)`${Ee}.length`,Oe=>{this.var(ve,(0,t._)`${Ee}[${Oe}]`),ee(ve)})}return this._for(new O("of",ue,ve,G),()=>ee(ve))}forIn(P,G,ee,ue=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(P,(0,t._)`Object.keys(${G})`,ee);const ve=this._scope.toName(P);return this._for(new O("in",ue,ve,G),()=>ee(ve))}endFor(){return this._endBlockNode(w)}label(P){return this._leafNode(new h(P))}break(P){return this._leafNode(new m(P))}return(P){const G=new M;if(this._blockNode(G),this.code(P),G.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(P,G,ee){if(!G&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const ue=new D;if(this._blockNode(ue),this.code(P),G){const ve=this.name("e");this._currNode=ue.catch=new $(ve),G(ve)}return ee&&(this._currNode=ue.finally=new q,this.code(ee)),this._endBlockNode($,q)}throw(P){return this._leafNode(new g(P))}block(P,G){return this._blockStarts.push(this._nodes.length),P&&this.code(P).endBlock(G),this}endBlock(P){const G=this._blockStarts.pop();if(G===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-G;if(ee<0||P!==void 0&&ee!==P)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${P} expected`);return this._nodes.length=G,this}func(P,G=t.nil,ee,ue){return this._blockNode(new C(P,G,ee)),ue&&this.code(ue).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(P=1){for(;P-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(P){return this._currNode.nodes.push(P),this}_blockNode(P){this._currNode.nodes.push(P),this._nodes.push(P)}_endBlockNode(P,G){const ee=this._currNode;if(ee instanceof P||G&&ee instanceof G)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${G?`${P.kind}/${G.kind}`:P.kind}"`)}_elseNode(P){const G=this._currNode;if(!(G instanceof R))throw new Error('CodeGen: "else" without "if"');return this._currNode=G.else=P,this}get _root(){return this._nodes[0]}get _currNode(){const P=this._nodes;return P[P.length-1]}set _currNode(P){const G=this._nodes;G[G.length-1]=P}}e.CodeGen=L;function V(U,P){for(const G in P)U[G]=(U[G]||0)+(P[G]||0);return U}function F(U,P){return P instanceof t._CodeOrName?V(U,P.names):U}function re(U,P,G){if(U instanceof t.Name)return ee(U);if(!ue(U))return U;return new t._Code(U._items.reduce((ve,Ee)=>(Ee instanceof t.Name&&(Ee=ee(Ee)),Ee instanceof t._Code?ve.push(...Ee._items):ve.push(Ee),ve),[]));function ee(ve){const Ee=G[ve.str];return Ee===void 0||P[ve.str]!==1?ve:(delete P[ve.str],Ee)}function ue(ve){return ve instanceof t._Code&&ve._items.some(Ee=>Ee instanceof t.Name&&P[Ee.str]===1&&G[Ee.str]!==void 0)}}function ae(U,P){for(const G in P)U[G]=(U[G]||0)-(P[G]||0)}function K(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,t._)`!${I(U)}`}e.not=K;const B=N(e.operators.AND);function Y(...U){return U.reduce(B)}e.and=Y;const fe=N(e.operators.OR);function ie(...U){return U.reduce(fe)}e.or=ie;function N(U){return(P,G)=>P===t.nil?G:G===t.nil?P:(0,t._)`${I(P)} ${U} ${I(G)}`}function I(U){return U instanceof t.Name?U:(0,t._)`(${U})`}})(n_)),n_}var bn={},T3;function qn(){if(T3)return bn;T3=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.checkStrictMode=bn.getErrorPath=bn.Type=bn.useFunc=bn.setEvaluated=bn.evaluatedPropsToName=bn.mergeEvaluated=bn.eachItem=bn.unescapeJsonPointer=bn.escapeJsonPointer=bn.escapeFragment=bn.unescapeFragment=bn.schemaRefOrVal=bn.schemaHasRulesButRef=bn.schemaHasRules=bn.checkUnknownRules=bn.alwaysValidSchema=bn.toHash=void 0;const e=dn(),t=uw();function r(O){const C={};for(const M of O)C[M]=!0;return C}bn.toHash=r;function i(O,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(s(O,C),!l(C,O.self.RULES.all))}bn.alwaysValidSchema=i;function s(O,C=O.schema){const{opts:M,self:D}=O;if(!M.strictSchema||typeof C=="boolean")return;const $=D.RULES.keywords;for(const q in C)$[q]||x(O,`unknown keyword: "${q}"`)}bn.checkUnknownRules=s;function l(O,C){if(typeof O=="boolean")return!O;for(const M in O)if(C[M])return!0;return!1}bn.schemaHasRules=l;function c(O,C){if(typeof O=="boolean")return!O;for(const M in O)if(M!=="$ref"&&C.all[M])return!0;return!1}bn.schemaHasRulesButRef=c;function f({topSchemaRef:O,schemaPath:C},M,D,$){if(!$){if(typeof M=="number"||typeof M=="boolean")return M;if(typeof M=="string")return(0,e._)`${M}`}return(0,e._)`${O}${C}${(0,e.getProperty)(D)}`}bn.schemaRefOrVal=f;function d(O){return g(decodeURIComponent(O))}bn.unescapeFragment=d;function h(O){return encodeURIComponent(m(O))}bn.escapeFragment=h;function m(O){return typeof O=="number"?`${O}`:O.replace(/~/g,"~0").replace(/\//g,"~1")}bn.escapeJsonPointer=m;function g(O){return O.replace(/~1/g,"/").replace(/~0/g,"~")}bn.unescapeJsonPointer=g;function v(O,C){if(Array.isArray(O))for(const M of O)C(M);else C(O)}bn.eachItem=v;function S({mergeNames:O,mergeToName:C,mergeValues:M,resultToName:D}){return($,q,L,V)=>{const F=L===void 0?q:L instanceof e.Name?(q instanceof e.Name?O($,q,L):C($,q,L),L):q instanceof e.Name?(C($,L,q),q):M(q,L);return V===e.Name&&!(F instanceof e.Name)?D($,F):F}}bn.mergeEvaluated={props:S({mergeNames:(O,C,M)=>O.if((0,e._)`${M} !== true && ${C} !== undefined`,()=>{O.if((0,e._)`${C} === true`,()=>O.assign(M,!0),()=>O.assign(M,(0,e._)`${M} || {}`).code((0,e._)`Object.assign(${M}, ${C})`))}),mergeToName:(O,C,M)=>O.if((0,e._)`${M} !== true`,()=>{C===!0?O.assign(M,!0):(O.assign(M,(0,e._)`${M} || {}`),_(O,M,C))}),mergeValues:(O,C)=>O===!0?!0:{...O,...C},resultToName:b}),items:S({mergeNames:(O,C,M)=>O.if((0,e._)`${M} !== true && ${C} !== undefined`,()=>O.assign(M,(0,e._)`${C} === true ? true : ${M} > ${C} ? ${M} : ${C}`)),mergeToName:(O,C,M)=>O.if((0,e._)`${M} !== true`,()=>O.assign(M,C===!0?!0:(0,e._)`${M} > ${C} ? ${M} : ${C}`)),mergeValues:(O,C)=>O===!0?!0:Math.max(O,C),resultToName:(O,C)=>O.var("items",C)})};function b(O,C){if(C===!0)return O.var("props",!0);const M=O.var("props",(0,e._)`{}`);return C!==void 0&&_(O,M,C),M}bn.evaluatedPropsToName=b;function _(O,C,M){Object.keys(M).forEach(D=>O.assign((0,e._)`${C}${(0,e.getProperty)(D)}`,!0))}bn.setEvaluated=_;const E={};function R(O,C){return O.scopeValue("func",{ref:C,code:E[C.code]||(E[C.code]=new t._Code(C.code))})}bn.useFunc=R;var w;(function(O){O[O.Num=0]="Num",O[O.Str=1]="Str"})(w||(bn.Type=w={}));function T(O,C,M){if(O instanceof e.Name){const D=C===w.Num;return M?D?(0,e._)`"[" + ${O} + "]"`:(0,e._)`"['" + ${O} + "']"`:D?(0,e._)`"/" + ${O}`:(0,e._)`"/" + ${O}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return M?(0,e.getProperty)(O).toString():"/"+m(O)}bn.getErrorPath=T;function x(O,C,M=O.opts.strictSchema){if(M){if(C=`strict mode: ${C}`,M===!0)throw new Error(C);O.self.logger.warn(C)}}return bn.checkStrictMode=x,bn}var E1={},C3;function cf(){if(C3)return E1;C3=1,Object.defineProperty(E1,"__esModule",{value:!0});const e=dn(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return E1.default=t,E1}var O3;function n2(){return O3||(O3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=dn(),r=qn(),i=cf();e.keywordError={message:({keyword:E})=>(0,t.str)`must pass "${E}" keyword validation`},e.keyword$DataError={message:({keyword:E,schemaType:R})=>R?(0,t.str)`"${E}" keyword must be ${R} ($data)`:(0,t.str)`"${E}" keyword is invalid ($data)`};function s(E,R=e.keywordError,w,T){const{it:x}=E,{gen:O,compositeRule:C,allErrors:M}=x,D=g(E,R,w);T??(C||M)?d(O,D):h(x,(0,t._)`[${D}]`)}e.reportError=s;function l(E,R=e.keywordError,w){const{it:T}=E,{gen:x,compositeRule:O,allErrors:C}=T,M=g(E,R,w);d(x,M),O||C||h(T,i.default.vErrors)}e.reportExtraError=l;function c(E,R){E.assign(i.default.errors,R),E.if((0,t._)`${i.default.vErrors} !== null`,()=>E.if(R,()=>E.assign((0,t._)`${i.default.vErrors}.length`,R),()=>E.assign(i.default.vErrors,null)))}e.resetErrorsCount=c;function f({gen:E,keyword:R,schemaValue:w,data:T,errsCount:x,it:O}){if(x===void 0)throw new Error("ajv implementation error");const C=E.name("err");E.forRange("i",x,i.default.errors,M=>{E.const(C,(0,t._)`${i.default.vErrors}[${M}]`),E.if((0,t._)`${C}.instancePath === undefined`,()=>E.assign((0,t._)`${C}.instancePath`,(0,t.strConcat)(i.default.instancePath,O.errorPath))),E.assign((0,t._)`${C}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${R}`),O.opts.verbose&&(E.assign((0,t._)`${C}.schema`,w),E.assign((0,t._)`${C}.data`,T))})}e.extendErrors=f;function d(E,R){const w=E.const("err",R);E.if((0,t._)`${i.default.vErrors} === null`,()=>E.assign(i.default.vErrors,(0,t._)`[${w}]`),(0,t._)`${i.default.vErrors}.push(${w})`),E.code((0,t._)`${i.default.errors}++`)}function h(E,R){const{gen:w,validateName:T,schemaEnv:x}=E;x.$async?w.throw((0,t._)`new ${E.ValidationError}(${R})`):(w.assign((0,t._)`${T}.errors`,R),w.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(E,R,w){const{createErrors:T}=E.it;return T===!1?(0,t._)`{}`:v(E,R,w)}function v(E,R,w={}){const{gen:T,it:x}=E,O=[S(x,w),b(E,w)];return _(E,R,O),T.object(...O)}function S({errorPath:E},{instancePath:R}){const w=R?(0,t.str)`${E}${(0,r.getErrorPath)(R,r.Type.Str)}`:E;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,w)]}function b({keyword:E,it:{errSchemaPath:R}},{schemaPath:w,parentSchema:T}){let x=T?R:(0,t.str)`${R}/${E}`;return w&&(x=(0,t.str)`${x}${(0,r.getErrorPath)(w,r.Type.Str)}`),[m.schemaPath,x]}function _(E,{params:R,message:w},T){const{keyword:x,data:O,schemaValue:C,it:M}=E,{opts:D,propertyName:$,topSchemaRef:q,schemaPath:L}=M;T.push([m.keyword,x],[m.params,typeof R=="function"?R(E):R||(0,t._)`{}`]),D.messages&&T.push([m.message,typeof w=="function"?w(E):w]),D.verbose&&T.push([m.schema,C],[m.parentSchema,(0,t._)`${q}${L}`],[i.default.data,O]),$&&T.push([m.propertyName,$])}})(t_)),t_}var R3;function Zee(){if(R3)return bh;R3=1,Object.defineProperty(bh,"__esModule",{value:!0}),bh.boolOrEmptySchema=bh.topBoolOrEmptySchema=void 0;const e=n2(),t=dn(),r=cf(),i={message:"boolean schema is false"};function s(f){const{gen:d,schema:h,validateName:m}=f;h===!1?c(f,!1):typeof h=="object"&&h.$async===!0?d.return(r.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}bh.topBoolOrEmptySchema=s;function l(f,d){const{gen:h,schema:m}=f;m===!1?(h.var(d,!1),c(f)):h.var(d,!0)}bh.boolOrEmptySchema=l;function c(f,d){const{gen:h,data:m}=f,g={gen:h,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:f};(0,e.reportError)(g,i,void 0,d)}return bh}var ci={},Sh={},A3;function A9(){if(A3)return Sh;A3=1,Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.getRules=Sh.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}Sh.isJSONType=r;function i(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return Sh.getRules=i,Sh}var Ju={},M3;function M9(){if(M3)return Ju;M3=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.shouldUseRule=Ju.shouldUseGroup=Ju.schemaHasRulesForType=void 0;function e({schema:i,self:s},l){const c=s.RULES.types[l];return c&&c!==!0&&t(i,c)}Ju.schemaHasRulesForType=e;function t(i,s){return s.rules.some(l=>r(i,l))}Ju.shouldUseGroup=t;function r(i,s){var l;return i[s.keyword]!==void 0||((l=s.definition.implements)===null||l===void 0?void 0:l.some(c=>i[c]!==void 0))}return Ju.shouldUseRule=r,Ju}var j3;function cw(){if(j3)return ci;j3=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.reportTypeError=ci.checkDataTypes=ci.checkDataType=ci.coerceAndCheckDataType=ci.getJSONTypes=ci.getSchemaTypes=ci.DataType=void 0;const e=A9(),t=M9(),r=n2(),i=dn(),s=qn();var l;(function(w){w[w.Correct=0]="Correct",w[w.Wrong=1]="Wrong"})(l||(ci.DataType=l={}));function c(w){const T=f(w.type);if(T.includes("null")){if(w.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&w.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');w.nullable===!0&&T.push("null")}return T}ci.getSchemaTypes=c;function f(w){const T=Array.isArray(w)?w:w?[w]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}ci.getJSONTypes=f;function d(w,T){const{gen:x,data:O,opts:C}=w,M=m(T,C.coerceTypes),D=T.length>0&&!(M.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(w,T[0]));if(D){const $=b(T,O,C.strictNumbers,l.Wrong);x.if($,()=>{M.length?g(w,T,M):E(w)})}return D}ci.coerceAndCheckDataType=d;const h=new Set(["string","number","integer","boolean","null"]);function m(w,T){return T?w.filter(x=>h.has(x)||T==="array"&&x==="array"):[]}function g(w,T,x){const{gen:O,data:C,opts:M}=w,D=O.let("dataType",(0,i._)`typeof ${C}`),$=O.let("coerced",(0,i._)`undefined`);M.coerceTypes==="array"&&O.if((0,i._)`${D} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>O.assign(C,(0,i._)`${C}[0]`).assign(D,(0,i._)`typeof ${C}`).if(b(T,C,M.strictNumbers),()=>O.assign($,C))),O.if((0,i._)`${$} !== undefined`);for(const L of x)(h.has(L)||L==="array"&&M.coerceTypes==="array")&&q(L);O.else(),E(w),O.endIf(),O.if((0,i._)`${$} !== undefined`,()=>{O.assign(C,$),v(w,$)});function q(L){switch(L){case"string":O.elseIf((0,i._)`${D} == "number" || ${D} == "boolean"`).assign($,(0,i._)`"" + ${C}`).elseIf((0,i._)`${C} === null`).assign($,(0,i._)`""`);return;case"number":O.elseIf((0,i._)`${D} == "boolean" || ${C} === null
50
+ || (${D} == "string" && ${C} && ${C} == +${C})`).assign($,(0,i._)`+${C}`);return;case"integer":O.elseIf((0,i._)`${D} === "boolean" || ${C} === null
51
+ || (${D} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign($,(0,i._)`+${C}`);return;case"boolean":O.elseIf((0,i._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign($,!1).elseIf((0,i._)`${C} === "true" || ${C} === 1`).assign($,!0);return;case"null":O.elseIf((0,i._)`${C} === "" || ${C} === 0 || ${C} === false`),O.assign($,null);return;case"array":O.elseIf((0,i._)`${D} === "string" || ${D} === "number"
52
+ || ${D} === "boolean" || ${C} === null`).assign($,(0,i._)`[${C}]`)}}}function v({gen:w,parentData:T,parentDataProperty:x},O){w.if((0,i._)`${T} !== undefined`,()=>w.assign((0,i._)`${T}[${x}]`,O))}function S(w,T,x,O=l.Correct){const C=O===l.Correct?i.operators.EQ:i.operators.NEQ;let M;switch(w){case"null":return(0,i._)`${T} ${C} null`;case"array":M=(0,i._)`Array.isArray(${T})`;break;case"object":M=(0,i._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":M=D((0,i._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":M=D();break;default:return(0,i._)`typeof ${T} ${C} ${w}`}return O===l.Correct?M:(0,i.not)(M);function D($=i.nil){return(0,i.and)((0,i._)`typeof ${T} == "number"`,$,x?(0,i._)`isFinite(${T})`:i.nil)}}ci.checkDataType=S;function b(w,T,x,O){if(w.length===1)return S(w[0],T,x,O);let C;const M=(0,s.toHash)(w);if(M.array&&M.object){const D=(0,i._)`typeof ${T} != "object"`;C=M.null?D:(0,i._)`!${T} || ${D}`,delete M.null,delete M.array,delete M.object}else C=i.nil;M.number&&delete M.integer;for(const D in M)C=(0,i.and)(C,S(D,T,x,O));return C}ci.checkDataTypes=b;const _={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:T})=>typeof w=="string"?(0,i._)`{type: ${w}}`:(0,i._)`{type: ${T}}`};function E(w){const T=R(w);(0,r.reportError)(T,_)}ci.reportTypeError=E;function R(w){const{gen:T,data:x,schema:O}=w,C=(0,s.schemaRefOrVal)(w,O,"type");return{gen:T,keyword:"type",data:x,schema:O.type,schemaCode:C,schemaValue:C,parentSchema:O,params:{},it:w}}return ci}var xv={},k3;function Xee(){if(k3)return xv;k3=1,Object.defineProperty(xv,"__esModule",{value:!0}),xv.assignDefaults=void 0;const e=dn(),t=qn();function r(s,l){const{properties:c,items:f}=s.schema;if(l==="object"&&c)for(const d in c)i(s,d,c[d].default);else l==="array"&&Array.isArray(f)&&f.forEach((d,h)=>i(s,h,d.default))}xv.assignDefaults=r;function i(s,l,c){const{gen:f,compositeRule:d,data:h,opts:m}=s;if(c===void 0)return;const g=(0,e._)`${h}${(0,e.getProperty)(l)}`;if(d){(0,t.checkStrictMode)(s,`default is ignored for: ${g}`);return}let v=(0,e._)`${g} === undefined`;m.useDefaults==="empty"&&(v=(0,e._)`${v} || ${g} === null || ${g} === ""`),f.if(v,(0,e._)`${g} = ${(0,e.stringify)(c)}`)}return xv}var ol={},er={},D3;function pl(){if(D3)return er;D3=1,Object.defineProperty(er,"__esModule",{value:!0}),er.validateUnion=er.validateArray=er.usePattern=er.callValidateCode=er.schemaProperties=er.allSchemaProperties=er.noPropertyInData=er.propertyInData=er.isOwnProperty=er.hasPropFunc=er.reportMissingProp=er.checkMissingProp=er.checkReportMissingProp=void 0;const e=dn(),t=qn(),r=cf(),i=qn();function s(w,T){const{gen:x,data:O,it:C}=w;x.if(m(x,O,T,C.opts.ownProperties),()=>{w.setParams({missingProperty:(0,e._)`${T}`},!0),w.error()})}er.checkReportMissingProp=s;function l({gen:w,data:T,it:{opts:x}},O,C){return(0,e.or)(...O.map(M=>(0,e.and)(m(w,T,M,x.ownProperties),(0,e._)`${C} = ${M}`)))}er.checkMissingProp=l;function c(w,T){w.setParams({missingProperty:T},!0),w.error()}er.reportMissingProp=c;function f(w){return w.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}er.hasPropFunc=f;function d(w,T,x){return(0,e._)`${f(w)}.call(${T}, ${x})`}er.isOwnProperty=d;function h(w,T,x,O){const C=(0,e._)`${T}${(0,e.getProperty)(x)} !== undefined`;return O?(0,e._)`${C} && ${d(w,T,x)}`:C}er.propertyInData=h;function m(w,T,x,O){const C=(0,e._)`${T}${(0,e.getProperty)(x)} === undefined`;return O?(0,e.or)(C,(0,e.not)(d(w,T,x))):C}er.noPropertyInData=m;function g(w){return w?Object.keys(w).filter(T=>T!=="__proto__"):[]}er.allSchemaProperties=g;function v(w,T){return g(T).filter(x=>!(0,t.alwaysValidSchema)(w,T[x]))}er.schemaProperties=v;function S({schemaCode:w,data:T,it:{gen:x,topSchemaRef:O,schemaPath:C,errorPath:M},it:D},$,q,L){const V=L?(0,e._)`${w}, ${T}, ${O}${C}`:T,F=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,M)],[r.default.parentData,D.parentData],[r.default.parentDataProperty,D.parentDataProperty],[r.default.rootData,r.default.rootData]];D.opts.dynamicRef&&F.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const re=(0,e._)`${V}, ${x.object(...F)}`;return q!==e.nil?(0,e._)`${$}.call(${q}, ${re})`:(0,e._)`${$}(${re})`}er.callValidateCode=S;const b=(0,e._)`new RegExp`;function _({gen:w,it:{opts:T}},x){const O=T.unicodeRegExp?"u":"",{regExp:C}=T.code,M=C(x,O);return w.scopeValue("pattern",{key:M.toString(),ref:M,code:(0,e._)`${C.code==="new RegExp"?b:(0,i.useFunc)(w,C)}(${x}, ${O})`})}er.usePattern=_;function E(w){const{gen:T,data:x,keyword:O,it:C}=w,M=T.name("valid");if(C.allErrors){const $=T.let("valid",!0);return D(()=>T.assign($,!1)),$}return T.var(M,!0),D(()=>T.break()),M;function D($){const q=T.const("len",(0,e._)`${x}.length`);T.forRange("i",0,q,L=>{w.subschema({keyword:O,dataProp:L,dataPropType:t.Type.Num},M),T.if((0,e.not)(M),$)})}}er.validateArray=E;function R(w){const{gen:T,schema:x,keyword:O,it:C}=w;if(!Array.isArray(x))throw new Error("ajv implementation error");if(x.some(q=>(0,t.alwaysValidSchema)(C,q))&&!C.opts.unevaluated)return;const D=T.let("valid",!1),$=T.name("_valid");T.block(()=>x.forEach((q,L)=>{const V=w.subschema({keyword:O,schemaProp:L,compositeRule:!0},$);T.assign(D,(0,e._)`${D} || ${$}`),w.mergeValidEvaluated(V,$)||T.if((0,e.not)(D))})),w.result(D,()=>w.reset(),()=>w.error(!0))}return er.validateUnion=R,er}var N3;function Qee(){if(N3)return ol;N3=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.validateKeywordUsage=ol.validSchemaType=ol.funcKeywordCode=ol.macroKeywordCode=void 0;const e=dn(),t=cf(),r=pl(),i=n2();function s(v,S){const{gen:b,keyword:_,schema:E,parentSchema:R,it:w}=v,T=S.macro.call(w.self,E,R,w),x=h(b,_,T);w.opts.validateSchema!==!1&&w.self.validateSchema(T,!0);const O=b.name("valid");v.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${w.errSchemaPath}/${_}`,topSchemaRef:x,compositeRule:!0},O),v.pass(O,()=>v.error(!0))}ol.macroKeywordCode=s;function l(v,S){var b;const{gen:_,keyword:E,schema:R,parentSchema:w,$data:T,it:x}=v;d(x,S);const O=!T&&S.compile?S.compile.call(x.self,R,w,x):S.validate,C=h(_,E,O),M=_.let("valid");v.block$data(M,D),v.ok((b=S.valid)!==null&&b!==void 0?b:M);function D(){if(S.errors===!1)L(),S.modifying&&c(v),V(()=>v.error());else{const F=S.async?$():q();S.modifying&&c(v),V(()=>f(v,F))}}function $(){const F=_.let("ruleErrs",null);return _.try(()=>L((0,e._)`await `),re=>_.assign(M,!1).if((0,e._)`${re} instanceof ${x.ValidationError}`,()=>_.assign(F,(0,e._)`${re}.errors`),()=>_.throw(re))),F}function q(){const F=(0,e._)`${C}.errors`;return _.assign(F,null),L(e.nil),F}function L(F=S.async?(0,e._)`await `:e.nil){const re=x.opts.passContext?t.default.this:t.default.self,ae=!("compile"in S&&!T||S.schema===!1);_.assign(M,(0,e._)`${F}${(0,r.callValidateCode)(v,C,re,ae)}`,S.modifying)}function V(F){var re;_.if((0,e.not)((re=S.valid)!==null&&re!==void 0?re:M),F)}}ol.funcKeywordCode=l;function c(v){const{gen:S,data:b,it:_}=v;S.if(_.parentData,()=>S.assign(b,(0,e._)`${_.parentData}[${_.parentDataProperty}]`))}function f(v,S){const{gen:b}=v;b.if((0,e._)`Array.isArray(${S})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${S} : ${t.default.vErrors}.concat(${S})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(v)},()=>v.error())}function d({schemaEnv:v},S){if(S.async&&!v.$async)throw new Error("async keyword in sync schema")}function h(v,S,b){if(b===void 0)throw new Error(`keyword "${S}" failed to compile`);return v.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function m(v,S,b=!1){return!S.length||S.some(_=>_==="array"?Array.isArray(v):_==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==_||b&&typeof v>"u")}ol.validSchemaType=m;function g({schema:v,opts:S,self:b,errSchemaPath:_},E,R){if(Array.isArray(E.keyword)?!E.keyword.includes(R):E.keyword!==R)throw new Error("ajv implementation error");const w=E.dependencies;if(w?.some(T=>!Object.prototype.hasOwnProperty.call(v,T)))throw new Error(`parent schema must have dependencies of ${R}: ${w.join(",")}`);if(E.validateSchema&&!E.validateSchema(v[R])){const x=`keyword "${R}" value is invalid at path "${_}": `+b.errorsText(E.validateSchema.errors);if(S.validateSchema==="log")b.logger.error(x);else throw new Error(x)}}return ol.validateKeywordUsage=g,ol}var ec={},z3;function Wee(){if(z3)return ec;z3=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.extendSubschemaMode=ec.extendSubschemaData=ec.getSubschema=void 0;const e=dn(),t=qn();function r(l,{keyword:c,schemaProp:f,schema:d,schemaPath:h,errSchemaPath:m,topSchemaRef:g}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const v=l.schema[c];return f===void 0?{schema:v,schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${l.errSchemaPath}/${c}`}:{schema:v[f],schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(f)}`,errSchemaPath:`${l.errSchemaPath}/${c}/${(0,t.escapeFragment)(f)}`}}if(d!==void 0){if(h===void 0||m===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:h,topSchemaRef:g,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}ec.getSubschema=r;function i(l,c,{dataProp:f,dataPropType:d,data:h,dataTypes:m,propertyName:g}){if(h!==void 0&&f!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=c;if(f!==void 0){const{errorPath:b,dataPathArr:_,opts:E}=c,R=v.let("data",(0,e._)`${c.data}${(0,e.getProperty)(f)}`,!0);S(R),l.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(f,d,E.jsPropertySyntax)}`,l.parentDataProperty=(0,e._)`${f}`,l.dataPathArr=[..._,l.parentDataProperty]}if(h!==void 0){const b=h instanceof e.Name?h:v.let("data",h,!0);S(b),g!==void 0&&(l.propertyName=g)}m&&(l.dataTypes=m);function S(b){l.data=b,l.dataLevel=c.dataLevel+1,l.dataTypes=[],c.definedProperties=new Set,l.parentData=c.data,l.dataNames=[...c.dataNames,b]}}ec.extendSubschemaData=i;function s(l,{jtdDiscriminator:c,jtdMetadata:f,compositeRule:d,createErrors:h,allErrors:m}){d!==void 0&&(l.compositeRule=d),h!==void 0&&(l.createErrors=h),m!==void 0&&(l.allErrors=m),l.jtdDiscriminator=c,l.jtdMetadata=f}return ec.extendSubschemaMode=s,ec}var Zi={},i_,$3;function j9(){return $3||($3=1,i_=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,s,l;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(s=i;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(l=Object.keys(t),i=l.length,i!==Object.keys(r).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,l[s]))return!1;for(s=i;s--!==0;){var c=l[s];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}),i_}var o_={exports:{}},P3;function Jee(){if(P3)return o_.exports;P3=1;var e=o_.exports=function(i,s,l){typeof s=="function"&&(l=s,s={}),l=s.cb||l;var c=typeof l=="function"?l:l.pre||function(){},f=l.post||function(){};t(s,c,f,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,s,l,c,f,d,h,m,g,v){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,f,d,h,m,g,v);for(var S in c){var b=c[S];if(Array.isArray(b)){if(S in e.arrayKeywords)for(var _=0;_<b.length;_++)t(i,s,l,b[_],f+"/"+S+"/"+_,d,f,S,c,_)}else if(S in e.propsKeywords){if(b&&typeof b=="object")for(var E in b)t(i,s,l,b[E],f+"/"+S+"/"+r(E),d,f,S,c,E)}else(S in e.keywords||i.allKeys&&!(S in e.skipKeywords))&&t(i,s,l,b,f+"/"+S,d,f,S,c)}l(c,f,d,h,m,g,v)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return o_.exports}var I3;function r2(){if(I3)return Zi;I3=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.getSchemaRefs=Zi.resolveUrl=Zi.normalizeId=Zi._getFullPath=Zi.getFullPath=Zi.inlineRef=void 0;const e=qn(),t=j9(),r=Jee(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(_,E=!0){return typeof _=="boolean"?!0:E===!0?!c(_):E?f(_)<=E:!1}Zi.inlineRef=s;const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(_){for(const E in _){if(l.has(E))return!0;const R=_[E];if(Array.isArray(R)&&R.some(c)||typeof R=="object"&&c(R))return!0}return!1}function f(_){let E=0;for(const R in _){if(R==="$ref")return 1/0;if(E++,!i.has(R)&&(typeof _[R]=="object"&&(0,e.eachItem)(_[R],w=>E+=f(w)),E===1/0))return 1/0}return E}function d(_,E="",R){R!==!1&&(E=g(E));const w=_.parse(E);return h(_,w)}Zi.getFullPath=d;function h(_,E){return _.serialize(E).split("#")[0]+"#"}Zi._getFullPath=h;const m=/#\/?$/;function g(_){return _?_.replace(m,""):""}Zi.normalizeId=g;function v(_,E,R){return R=g(R),_.resolve(E,R)}Zi.resolveUrl=v;const S=/^[a-z_][-a-z0-9._]*$/i;function b(_,E){if(typeof _=="boolean")return{};const{schemaId:R,uriResolver:w}=this.opts,T=g(_[R]||E),x={"":T},O=d(w,T,!1),C={},M=new Set;return r(_,{allKeys:!0},(q,L,V,F)=>{if(F===void 0)return;const re=O+L;let ae=x[F];typeof q[R]=="string"&&(ae=K.call(this,q[R])),B.call(this,q.$anchor),B.call(this,q.$dynamicAnchor),x[L]=ae;function K(Y){const fe=this.opts.uriResolver.resolve;if(Y=g(ae?fe(ae,Y):Y),M.has(Y))throw $(Y);M.add(Y);let ie=this.refs[Y];return typeof ie=="string"&&(ie=this.refs[ie]),typeof ie=="object"?D(q,ie.schema,Y):Y!==g(re)&&(Y[0]==="#"?(D(q,C[Y],Y),C[Y]=q):this.refs[Y]=re),Y}function B(Y){if(typeof Y=="string"){if(!S.test(Y))throw new Error(`invalid anchor "${Y}"`);K.call(this,`#${Y}`)}}}),C;function D(q,L,V){if(L!==void 0&&!t(q,L))throw $(V)}function $(q){return new Error(`reference "${q}" resolves to more than one schema`)}}return Zi.getSchemaRefs=b,Zi}var L3;function a2(){if(L3)return Wu;L3=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.getData=Wu.KeywordCxt=Wu.validateFunctionCode=void 0;const e=Zee(),t=cw(),r=M9(),i=cw(),s=Xee(),l=Qee(),c=Wee(),f=dn(),d=cf(),h=r2(),m=qn(),g=n2();function v(de){if(O(de)&&(M(de),x(de))){E(de);return}S(de,()=>(0,e.topBoolOrEmptySchema)(de))}Wu.validateFunctionCode=v;function S({gen:de,validateName:te,schema:Se,schemaEnv:we,opts:$e},Te){$e.code.es5?de.func(te,(0,f._)`${d.default.data}, ${d.default.valCxt}`,we.$async,()=>{de.code((0,f._)`"use strict"; ${w(Se,$e)}`),_(de,$e),de.code(Te)}):de.func(te,(0,f._)`${d.default.data}, ${b($e)}`,we.$async,()=>de.code(w(Se,$e)).code(Te))}function b(de){return(0,f._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${de.dynamicRef?(0,f._)`, ${d.default.dynamicAnchors}={}`:f.nil}}={}`}function _(de,te){de.if(d.default.valCxt,()=>{de.var(d.default.instancePath,(0,f._)`${d.default.valCxt}.${d.default.instancePath}`),de.var(d.default.parentData,(0,f._)`${d.default.valCxt}.${d.default.parentData}`),de.var(d.default.parentDataProperty,(0,f._)`${d.default.valCxt}.${d.default.parentDataProperty}`),de.var(d.default.rootData,(0,f._)`${d.default.valCxt}.${d.default.rootData}`),te.dynamicRef&&de.var(d.default.dynamicAnchors,(0,f._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{de.var(d.default.instancePath,(0,f._)`""`),de.var(d.default.parentData,(0,f._)`undefined`),de.var(d.default.parentDataProperty,(0,f._)`undefined`),de.var(d.default.rootData,d.default.data),te.dynamicRef&&de.var(d.default.dynamicAnchors,(0,f._)`{}`)})}function E(de){const{schema:te,opts:Se,gen:we}=de;S(de,()=>{Se.$comment&&te.$comment&&F(de),q(de),we.let(d.default.vErrors,null),we.let(d.default.errors,0),Se.unevaluated&&R(de),D(de),re(de)})}function R(de){const{gen:te,validateName:Se}=de;de.evaluated=te.const("evaluated",(0,f._)`${Se}.evaluated`),te.if((0,f._)`${de.evaluated}.dynamicProps`,()=>te.assign((0,f._)`${de.evaluated}.props`,(0,f._)`undefined`)),te.if((0,f._)`${de.evaluated}.dynamicItems`,()=>te.assign((0,f._)`${de.evaluated}.items`,(0,f._)`undefined`))}function w(de,te){const Se=typeof de=="object"&&de[te.schemaId];return Se&&(te.code.source||te.code.process)?(0,f._)`/*# sourceURL=${Se} */`:f.nil}function T(de,te){if(O(de)&&(M(de),x(de))){C(de,te);return}(0,e.boolOrEmptySchema)(de,te)}function x({schema:de,self:te}){if(typeof de=="boolean")return!de;for(const Se in de)if(te.RULES.all[Se])return!0;return!1}function O(de){return typeof de.schema!="boolean"}function C(de,te){const{schema:Se,gen:we,opts:$e}=de;$e.$comment&&Se.$comment&&F(de),L(de),V(de);const Te=we.const("_errs",d.default.errors);D(de,Te),we.var(te,(0,f._)`${Te} === ${d.default.errors}`)}function M(de){(0,m.checkUnknownRules)(de),$(de)}function D(de,te){if(de.opts.jtd)return K(de,[],!1,te);const Se=(0,t.getSchemaTypes)(de.schema),we=(0,t.coerceAndCheckDataType)(de,Se);K(de,Se,!we,te)}function $(de){const{schema:te,errSchemaPath:Se,opts:we,self:$e}=de;te.$ref&&we.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(te,$e.RULES)&&$e.logger.warn(`$ref: keywords ignored in schema at path "${Se}"`)}function q(de){const{schema:te,opts:Se}=de;te.default!==void 0&&Se.useDefaults&&Se.strictSchema&&(0,m.checkStrictMode)(de,"default is ignored in the schema root")}function L(de){const te=de.schema[de.opts.schemaId];te&&(de.baseId=(0,h.resolveUrl)(de.opts.uriResolver,de.baseId,te))}function V(de){if(de.schema.$async&&!de.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:de,schemaEnv:te,schema:Se,errSchemaPath:we,opts:$e}){const Te=Se.$comment;if($e.$comment===!0)de.code((0,f._)`${d.default.self}.logger.log(${Te})`);else if(typeof $e.$comment=="function"){const Pe=(0,f.str)`${we}/$comment`,Ge=de.scopeValue("root",{ref:te.root});de.code((0,f._)`${d.default.self}.opts.$comment(${Te}, ${Pe}, ${Ge}.schema)`)}}function re(de){const{gen:te,schemaEnv:Se,validateName:we,ValidationError:$e,opts:Te}=de;Se.$async?te.if((0,f._)`${d.default.errors} === 0`,()=>te.return(d.default.data),()=>te.throw((0,f._)`new ${$e}(${d.default.vErrors})`)):(te.assign((0,f._)`${we}.errors`,d.default.vErrors),Te.unevaluated&&ae(de),te.return((0,f._)`${d.default.errors} === 0`))}function ae({gen:de,evaluated:te,props:Se,items:we}){Se instanceof f.Name&&de.assign((0,f._)`${te}.props`,Se),we instanceof f.Name&&de.assign((0,f._)`${te}.items`,we)}function K(de,te,Se,we){const{gen:$e,schema:Te,data:Pe,allErrors:Ge,opts:Ce,self:Be}=de,{RULES:Fe}=Be;if(Te.$ref&&(Ce.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Te,Fe))){$e.block(()=>ue(de,"$ref",Fe.all.$ref.definition));return}Ce.jtd||Y(de,te),$e.block(()=>{for(const ke of Fe.rules)Je(ke);Je(Fe.post)});function Je(ke){(0,r.shouldUseGroup)(Te,ke)&&(ke.type?($e.if((0,i.checkDataType)(ke.type,Pe,Ce.strictNumbers)),B(de,ke),te.length===1&&te[0]===ke.type&&Se&&($e.else(),(0,i.reportTypeError)(de)),$e.endIf()):B(de,ke),Ge||$e.if((0,f._)`${d.default.errors} === ${we||0}`))}}function B(de,te){const{gen:Se,schema:we,opts:{useDefaults:$e}}=de;$e&&(0,s.assignDefaults)(de,te.type),Se.block(()=>{for(const Te of te.rules)(0,r.shouldUseRule)(we,Te)&&ue(de,Te.keyword,Te.definition,te.type)})}function Y(de,te){de.schemaEnv.meta||!de.opts.strictTypes||(fe(de,te),de.opts.allowUnionTypes||ie(de,te),N(de,de.dataTypes))}function fe(de,te){if(te.length){if(!de.dataTypes.length){de.dataTypes=te;return}te.forEach(Se=>{U(de.dataTypes,Se)||G(de,`type "${Se}" not allowed by context "${de.dataTypes.join(",")}"`)}),P(de,te)}}function ie(de,te){te.length>1&&!(te.length===2&&te.includes("null"))&&G(de,"use allowUnionTypes to allow union type keyword")}function N(de,te){const Se=de.self.RULES.all;for(const we in Se){const $e=Se[we];if(typeof $e=="object"&&(0,r.shouldUseRule)(de.schema,$e)){const{type:Te}=$e.definition;Te.length&&!Te.some(Pe=>I(te,Pe))&&G(de,`missing type "${Te.join(",")}" for keyword "${we}"`)}}}function I(de,te){return de.includes(te)||te==="number"&&de.includes("integer")}function U(de,te){return de.includes(te)||te==="integer"&&de.includes("number")}function P(de,te){const Se=[];for(const we of de.dataTypes)U(te,we)?Se.push(we):te.includes("integer")&&we==="number"&&Se.push("integer");de.dataTypes=Se}function G(de,te){const Se=de.schemaEnv.baseId+de.errSchemaPath;te+=` at "${Se}" (strictTypes)`,(0,m.checkStrictMode)(de,te,de.opts.strictTypes)}class ee{constructor(te,Se,we){if((0,l.validateKeywordUsage)(te,Se,we),this.gen=te.gen,this.allErrors=te.allErrors,this.keyword=we,this.data=te.data,this.schema=te.schema[we],this.$data=Se.$data&&te.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(te,this.schema,we,this.$data),this.schemaType=Se.schemaType,this.parentSchema=te.schema,this.params={},this.it=te,this.def=Se,this.$data)this.schemaCode=te.gen.const("vSchema",Oe(this.$data,te));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,Se.schemaType,Se.allowUndefined))throw new Error(`${we} value must be ${JSON.stringify(Se.schemaType)}`);("code"in Se?Se.trackErrors:Se.errors!==!1)&&(this.errsCount=te.gen.const("_errs",d.default.errors))}result(te,Se,we){this.failResult((0,f.not)(te),Se,we)}failResult(te,Se,we){this.gen.if(te),we?we():this.error(),Se?(this.gen.else(),Se(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(te,Se){this.failResult((0,f.not)(te),void 0,Se)}fail(te){if(te===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(te),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(te){if(!this.$data)return this.fail(te);const{schemaCode:Se}=this;this.fail((0,f._)`${Se} !== undefined && (${(0,f.or)(this.invalid$data(),te)})`)}error(te,Se,we){if(Se){this.setParams(Se),this._error(te,we),this.setParams({});return}this._error(te,we)}_error(te,Se){(te?g.reportExtraError:g.reportError)(this,this.def.error,Se)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(te){this.allErrors||this.gen.if(te)}setParams(te,Se){Se?Object.assign(this.params,te):this.params=te}block$data(te,Se,we=f.nil){this.gen.block(()=>{this.check$data(te,we),Se()})}check$data(te=f.nil,Se=f.nil){if(!this.$data)return;const{gen:we,schemaCode:$e,schemaType:Te,def:Pe}=this;we.if((0,f.or)((0,f._)`${$e} === undefined`,Se)),te!==f.nil&&we.assign(te,!0),(Te.length||Pe.validateSchema)&&(we.elseIf(this.invalid$data()),this.$dataError(),te!==f.nil&&we.assign(te,!1)),we.else()}invalid$data(){const{gen:te,schemaCode:Se,schemaType:we,def:$e,it:Te}=this;return(0,f.or)(Pe(),Ge());function Pe(){if(we.length){if(!(Se instanceof f.Name))throw new Error("ajv implementation error");const Ce=Array.isArray(we)?we:[we];return(0,f._)`${(0,i.checkDataTypes)(Ce,Se,Te.opts.strictNumbers,i.DataType.Wrong)}`}return f.nil}function Ge(){if($e.validateSchema){const Ce=te.scopeValue("validate$data",{ref:$e.validateSchema});return(0,f._)`!${Ce}(${Se})`}return f.nil}}subschema(te,Se){const we=(0,c.getSubschema)(this.it,te);(0,c.extendSubschemaData)(we,this.it,te),(0,c.extendSubschemaMode)(we,te);const $e={...this.it,...we,items:void 0,props:void 0};return T($e,Se),$e}mergeEvaluated(te,Se){const{it:we,gen:$e}=this;we.opts.unevaluated&&(we.props!==!0&&te.props!==void 0&&(we.props=m.mergeEvaluated.props($e,te.props,we.props,Se)),we.items!==!0&&te.items!==void 0&&(we.items=m.mergeEvaluated.items($e,te.items,we.items,Se)))}mergeValidEvaluated(te,Se){const{it:we,gen:$e}=this;if(we.opts.unevaluated&&(we.props!==!0||we.items!==!0))return $e.if(Se,()=>this.mergeEvaluated(te,f.Name)),!0}}Wu.KeywordCxt=ee;function ue(de,te,Se,we){const $e=new ee(de,Se,te);"code"in Se?Se.code($e,we):$e.$data&&Se.validate?(0,l.funcKeywordCode)($e,Se):"macro"in Se?(0,l.macroKeywordCode)($e,Se):(Se.compile||Se.validate)&&(0,l.funcKeywordCode)($e,Se)}const ve=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Oe(de,{dataLevel:te,dataNames:Se,dataPathArr:we}){let $e,Te;if(de==="")return d.default.rootData;if(de[0]==="/"){if(!ve.test(de))throw new Error(`Invalid JSON-pointer: ${de}`);$e=de,Te=d.default.rootData}else{const Be=Ee.exec(de);if(!Be)throw new Error(`Invalid JSON-pointer: ${de}`);const Fe=+Be[1];if($e=Be[2],$e==="#"){if(Fe>=te)throw new Error(Ce("property/index",Fe));return we[te-Fe]}if(Fe>te)throw new Error(Ce("data",Fe));if(Te=Se[te-Fe],!$e)return Te}let Pe=Te;const Ge=$e.split("/");for(const Be of Ge)Be&&(Te=(0,f._)`${Te}${(0,f.getProperty)((0,m.unescapeJsonPointer)(Be))}`,Pe=(0,f._)`${Pe} && ${Te}`);return Pe;function Ce(Be,Fe){return`Cannot access ${Be} ${Fe} levels up, current level is ${te}`}}return Wu.getData=Oe,Wu}var x1={},U3;function $R(){if(U3)return x1;U3=1,Object.defineProperty(x1,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return x1.default=e,x1}var _1={},q3;function i2(){if(q3)return _1;q3=1,Object.defineProperty(_1,"__esModule",{value:!0});const e=r2();class t extends Error{constructor(i,s,l,c){super(c||`can't resolve reference ${l} from id ${s}`),this.missingRef=(0,e.resolveUrl)(i,s,l),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return _1.default=t,_1}var Fo={},V3;function PR(){if(V3)return Fo;V3=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.resolveSchema=Fo.getCompilingSchema=Fo.resolveRef=Fo.compileSchema=Fo.SchemaEnv=void 0;const e=dn(),t=$R(),r=cf(),i=r2(),s=qn(),l=a2();class c{constructor(R){var w;this.refs={},this.dynamicAnchors={};let T;typeof R.schema=="object"&&(T=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=(w=R.baseId)!==null&&w!==void 0?w:(0,i.normalizeId)(T?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=T?.$async,this.refs={}}}Fo.SchemaEnv=c;function f(E){const R=m.call(this,E);if(R)return R;const w=(0,i.getFullPath)(this.opts.uriResolver,E.root.baseId),{es5:T,lines:x}=this.opts.code,{ownProperties:O}=this.opts,C=new e.CodeGen(this.scope,{es5:T,lines:x,ownProperties:O});let M;E.$async&&(M=C.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const D=C.scopeName("validate");E.validateName=D;const $={gen:C,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:C.scopeValue("schema",this.opts.code.source===!0?{ref:E.schema,code:(0,e.stringify)(E.schema)}:{ref:E.schema}),validateName:D,ValidationError:M,schema:E.schema,schemaEnv:E,rootId:w,baseId:E.baseId||w,schemaPath:e.nil,errSchemaPath:E.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let q;try{this._compilations.add(E),(0,l.validateFunctionCode)($),C.optimize(this.opts.code.optimize);const L=C.toString();q=`${C.scopeRefs(r.default.scope)}return ${L}`,this.opts.code.process&&(q=this.opts.code.process(q,E));const F=new Function(`${r.default.self}`,`${r.default.scope}`,q)(this,this.scope.get());if(this.scope.value(D,{ref:F}),F.errors=null,F.schema=E.schema,F.schemaEnv=E,E.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:D,validateCode:L,scopeValues:C._values}),this.opts.unevaluated){const{props:re,items:ae}=$;F.evaluated={props:re instanceof e.Name?void 0:re,items:ae instanceof e.Name?void 0:ae,dynamicProps:re instanceof e.Name,dynamicItems:ae instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return E.validate=F,E}catch(L){throw delete E.validate,delete E.validateName,q&&this.logger.error("Error compiling schema, function code:",q),L}finally{this._compilations.delete(E)}}Fo.compileSchema=f;function d(E,R,w){var T;w=(0,i.resolveUrl)(this.opts.uriResolver,R,w);const x=E.refs[w];if(x)return x;let O=v.call(this,E,w);if(O===void 0){const C=(T=E.localRefs)===null||T===void 0?void 0:T[w],{schemaId:M}=this.opts;C&&(O=new c({schema:C,schemaId:M,root:E,baseId:R}))}if(O!==void 0)return E.refs[w]=h.call(this,O)}Fo.resolveRef=d;function h(E){return(0,i.inlineRef)(E.schema,this.opts.inlineRefs)?E.schema:E.validate?E:f.call(this,E)}function m(E){for(const R of this._compilations)if(g(R,E))return R}Fo.getCompilingSchema=m;function g(E,R){return E.schema===R.schema&&E.root===R.root&&E.baseId===R.baseId}function v(E,R){let w;for(;typeof(w=this.refs[R])=="string";)R=w;return w||this.schemas[R]||S.call(this,E,R)}function S(E,R){const w=this.opts.uriResolver.parse(R),T=(0,i._getFullPath)(this.opts.uriResolver,w);let x=(0,i.getFullPath)(this.opts.uriResolver,E.baseId,void 0);if(Object.keys(E.schema).length>0&&T===x)return _.call(this,w,E);const O=(0,i.normalizeId)(T),C=this.refs[O]||this.schemas[O];if(typeof C=="string"){const M=S.call(this,E,C);return typeof M?.schema!="object"?void 0:_.call(this,w,M)}if(typeof C?.schema=="object"){if(C.validate||f.call(this,C),O===(0,i.normalizeId)(R)){const{schema:M}=C,{schemaId:D}=this.opts,$=M[D];return $&&(x=(0,i.resolveUrl)(this.opts.uriResolver,x,$)),new c({schema:M,schemaId:D,root:E,baseId:x})}return _.call(this,w,C)}}Fo.resolveSchema=S;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(E,{baseId:R,schema:w,root:T}){var x;if(((x=E.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(const M of E.fragment.slice(1).split("/")){if(typeof w=="boolean")return;const D=w[(0,s.unescapeFragment)(M)];if(D===void 0)return;w=D;const $=typeof w=="object"&&w[this.opts.schemaId];!b.has(M)&&$&&(R=(0,i.resolveUrl)(this.opts.uriResolver,R,$))}let O;if(typeof w!="boolean"&&w.$ref&&!(0,s.schemaHasRulesButRef)(w,this.RULES)){const M=(0,i.resolveUrl)(this.opts.uriResolver,R,w.$ref);O=S.call(this,T,M)}const{schemaId:C}=this.opts;if(O=O||new c({schema:w,schemaId:C,root:T,baseId:R}),O.schema!==O.root.schema)return O}return Fo}const ete="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tte="Meta-schema for $data reference (JSON AnySchema extension proposal)",nte="object",rte=["$data"],ate={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ite=!1,ote={$id:ete,description:tte,type:nte,required:rte,properties:ate,additionalProperties:ite};var T1={},_v={exports:{}},s_,F3;function k9(){if(F3)return s_;F3=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(v){let S="",b=0,_=0;for(_=0;_<v.length;_++)if(b=v[_].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";S+=v[_];break}for(_+=1;_<v.length;_++){if(b=v[_].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";S+=v[_]}return S}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(v){return v.length=0,!0}function l(v,S,b){if(v.length){const _=r(v);if(_!=="")S.push(_);else return b.error=!0,!1;v.length=0}return!0}function c(v){let S=0;const b={error:!1,address:"",zone:""},_=[],E=[];let R=!1,w=!1,T=l;for(let x=0;x<v.length;x++){const O=v[x];if(!(O==="["||O==="]"))if(O===":"){if(R===!0&&(w=!0),!T(E,_,b))break;if(++S>7){b.error=!0;break}x>0&&v[x-1]===":"&&(R=!0),_.push(":");continue}else if(O==="%"){if(!T(E,_,b))break;T=s}else{E.push(O);continue}}return E.length&&(T===s?b.zone=E.join(""):w?_.push(E.join("")):_.push(r(E))),b.address=_.join(""),b}function f(v){if(d(v,":")<2)return{host:v,isIPV6:!1};const S=c(v);if(S.error)return{host:v,isIPV6:!1};{let b=S.address,_=S.address;return S.zone&&(b+="%"+S.zone,_+="%25"+S.zone),{host:b,isIPV6:!0,escapedHost:_}}}function d(v,S){let b=0;for(let _=0;_<v.length;_++)v[_]===S&&b++;return b}function h(v){let S=v;const b=[];let _=-1,E=0;for(;E=S.length;){if(E===1){if(S===".")break;if(S==="/"){b.push("/");break}else{b.push(S);break}}else if(E===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){b.push("/");break}}else if(E===3&&S==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),b.length!==0&&b.pop();continue}}if((_=S.indexOf("/",1))===-1){b.push(S);break}else b.push(S.slice(0,_)),S=S.slice(_)}return b.join("")}function m(v,S){const b=S!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=b(v.scheme)),v.userinfo!==void 0&&(v.userinfo=b(v.userinfo)),v.host!==void 0&&(v.host=b(v.host)),v.path!==void 0&&(v.path=b(v.path)),v.query!==void 0&&(v.query=b(v.query)),v.fragment!==void 0&&(v.fragment=b(v.fragment)),v}function g(v){const S=[];if(v.userinfo!==void 0&&(S.push(v.userinfo),S.push("@")),v.host!==void 0){let b=unescape(v.host);if(!t(b)){const _=f(b);_.isIPV6===!0?b=`[${_.escapedHost}]`:b=v.host}S.push(b)}return(typeof v.port=="number"||typeof v.port=="string")&&(S.push(":"),S.push(String(v.port))),S.length?S.join(""):void 0}return s_={nonSimpleDomain:i,recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:h,isIPv4:t,isUUID:e,normalizeIPv6:f,stringArrayToHexStripped:r},s_}var l_,B3;function ste(){if(B3)return l_;B3=1;const{isUUID:e}=k9(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(O){return r.indexOf(O)!==-1}function s(O){return O.secure===!0?!0:O.secure===!1?!1:O.scheme?O.scheme.length===3&&(O.scheme[0]==="w"||O.scheme[0]==="W")&&(O.scheme[1]==="s"||O.scheme[1]==="S")&&(O.scheme[2]==="s"||O.scheme[2]==="S"):!1}function l(O){return O.host||(O.error=O.error||"HTTP URIs must have a host."),O}function c(O){const C=String(O.scheme).toLowerCase()==="https";return(O.port===(C?443:80)||O.port==="")&&(O.port=void 0),O.path||(O.path="/"),O}function f(O){return O.secure=s(O),O.resourceName=(O.path||"/")+(O.query?"?"+O.query:""),O.path=void 0,O.query=void 0,O}function d(O){if((O.port===(s(O)?443:80)||O.port==="")&&(O.port=void 0),typeof O.secure=="boolean"&&(O.scheme=O.secure?"wss":"ws",O.secure=void 0),O.resourceName){const[C,M]=O.resourceName.split("?");O.path=C&&C!=="/"?C:void 0,O.query=M,O.resourceName=void 0}return O.fragment=void 0,O}function h(O,C){if(!O.path)return O.error="URN can not be parsed",O;const M=O.path.match(t);if(M){const D=C.scheme||O.scheme||"urn";O.nid=M[1].toLowerCase(),O.nss=M[2];const $=`${D}:${C.nid||O.nid}`,q=x($);O.path=void 0,q&&(O=q.parse(O,C))}else O.error=O.error||"URN can not be parsed.";return O}function m(O,C){if(O.nid===void 0)throw new Error("URN without nid cannot be serialized");const M=C.scheme||O.scheme||"urn",D=O.nid.toLowerCase(),$=`${M}:${C.nid||D}`,q=x($);q&&(O=q.serialize(O,C));const L=O,V=O.nss;return L.path=`${D||C.nid}:${V}`,C.skipEscape=!0,L}function g(O,C){const M=O;return M.uuid=M.nss,M.nss=void 0,!C.tolerant&&(!M.uuid||!e(M.uuid))&&(M.error=M.error||"UUID is not valid."),M}function v(O){const C=O;return C.nss=(O.uuid||"").toLowerCase(),C}const S={scheme:"http",domainHost:!0,parse:l,serialize:c},b={scheme:"https",domainHost:S.domainHost,parse:l,serialize:c},_={scheme:"ws",domainHost:!0,parse:f,serialize:d},E={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},T={http:S,https:b,ws:_,wss:E,urn:{scheme:"urn",parse:h,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(T,null);function x(O){return O&&(T[O]||T[O.toLowerCase()])||void 0}return l_={wsIsSecure:s,SCHEMES:T,isValidSchemeName:i,getSchemeHandler:x},l_}var H3;function D9(){if(H3)return _v.exports;H3=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:s,nonSimpleDomain:l}=k9(),{SCHEMES:c,getSchemeHandler:f}=ste();function d(E,R){return typeof E=="string"?E=v(b(E,R),R):typeof E=="object"&&(E=b(v(E,R),R)),E}function h(E,R,w){const T=w?Object.assign({scheme:"null"},w):{scheme:"null"},x=m(b(E,T),b(R,T),T,!0);return T.skipEscape=!0,v(x,T)}function m(E,R,w,T){const x={};return T||(E=b(v(E,w),w),R=b(v(R,w),w)),w=w||{},!w.tolerant&&R.scheme?(x.scheme=R.scheme,x.userinfo=R.userinfo,x.host=R.host,x.port=R.port,x.path=t(R.path||""),x.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(x.userinfo=R.userinfo,x.host=R.host,x.port=R.port,x.path=t(R.path||""),x.query=R.query):(R.path?(R.path[0]==="/"?x.path=t(R.path):((E.userinfo!==void 0||E.host!==void 0||E.port!==void 0)&&!E.path?x.path="/"+R.path:E.path?x.path=E.path.slice(0,E.path.lastIndexOf("/")+1)+R.path:x.path=R.path,x.path=t(x.path)),x.query=R.query):(x.path=E.path,R.query!==void 0?x.query=R.query:x.query=E.query),x.userinfo=E.userinfo,x.host=E.host,x.port=E.port),x.scheme=E.scheme),x.fragment=R.fragment,x}function g(E,R,w){return typeof E=="string"?(E=unescape(E),E=v(i(b(E,w),!0),{...w,skipEscape:!0})):typeof E=="object"&&(E=v(i(E,!0),{...w,skipEscape:!0})),typeof R=="string"?(R=unescape(R),R=v(i(b(R,w),!0),{...w,skipEscape:!0})):typeof R=="object"&&(R=v(i(R,!0),{...w,skipEscape:!0})),E.toLowerCase()===R.toLowerCase()}function v(E,R){const w={host:E.host,scheme:E.scheme,userinfo:E.userinfo,port:E.port,path:E.path,query:E.query,nid:E.nid,nss:E.nss,uuid:E.uuid,fragment:E.fragment,reference:E.reference,resourceName:E.resourceName,secure:E.secure,error:""},T=Object.assign({},R),x=[],O=f(T.scheme||w.scheme);O&&O.serialize&&O.serialize(w,T),w.path!==void 0&&(T.skipEscape?w.path=unescape(w.path):(w.path=escape(w.path),w.scheme!==void 0&&(w.path=w.path.split("%3A").join(":")))),T.reference!=="suffix"&&w.scheme&&x.push(w.scheme,":");const C=r(w);if(C!==void 0&&(T.reference!=="suffix"&&x.push("//"),x.push(C),w.path&&w.path[0]!=="/"&&x.push("/")),w.path!==void 0){let M=w.path;!T.absolutePath&&(!O||!O.absolutePath)&&(M=t(M)),C===void 0&&M[0]==="/"&&M[1]==="/"&&(M="/%2F"+M.slice(2)),x.push(M)}return w.query!==void 0&&x.push("?",w.query),w.fragment!==void 0&&x.push("#",w.fragment),x.join("")}const S=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(E,R){const w=Object.assign({},R),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let x=!1;w.reference==="suffix"&&(w.scheme?E=w.scheme+":"+E:E="//"+E);const O=E.match(S);if(O){if(T.scheme=O[1],T.userinfo=O[3],T.host=O[4],T.port=parseInt(O[5],10),T.path=O[6]||"",T.query=O[7],T.fragment=O[8],isNaN(T.port)&&(T.port=O[5]),T.host)if(s(T.host)===!1){const D=e(T.host);T.host=D.host.toLowerCase(),x=D.isIPV6}else x=!0;T.scheme===void 0&&T.userinfo===void 0&&T.host===void 0&&T.port===void 0&&T.query===void 0&&!T.path?T.reference="same-document":T.scheme===void 0?T.reference="relative":T.fragment===void 0?T.reference="absolute":T.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==T.reference&&(T.error=T.error||"URI is not a "+w.reference+" reference.");const C=f(w.scheme||T.scheme);if(!w.unicodeSupport&&(!C||!C.unicodeSupport)&&T.host&&(w.domainHost||C&&C.domainHost)&&x===!1&&l(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(M){T.error=T.error||"Host's domain name can not be converted to ASCII: "+M}(!C||C&&!C.skipNormalize)&&(E.indexOf("%")!==-1&&(T.scheme!==void 0&&(T.scheme=unescape(T.scheme)),T.host!==void 0&&(T.host=unescape(T.host))),T.path&&(T.path=escape(unescape(T.path))),T.fragment&&(T.fragment=encodeURI(decodeURIComponent(T.fragment)))),C&&C.parse&&C.parse(T,w)}else T.error=T.error||"URI can not be parsed.";return T}const _={SCHEMES:c,normalize:d,resolve:h,resolveComponent:m,equal:g,serialize:v,parse:b};return _v.exports=_,_v.exports.default=_,_v.exports.fastUri=_,_v.exports}var G3;function lte(){if(G3)return T1;G3=1,Object.defineProperty(T1,"__esModule",{value:!0});const e=D9();return e.code='require("ajv/dist/runtime/uri").default',T1.default=e,T1}var K3;function ute(){return K3||(K3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=a2();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=dn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=$R(),s=i2(),l=A9(),c=PR(),f=dn(),d=r2(),h=cw(),m=qn(),g=ote,v=lte(),S=(ie,N)=>new RegExp(ie,N);S.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),E={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},R={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function T(ie){var N,I,U,P,G,ee,ue,ve,Ee,Oe,de,te,Se,we,$e,Te,Pe,Ge,Ce,Be,Fe,Je,ke,Ue,Xe;const Mt=ie.strict,Ae=(N=ie.code)===null||N===void 0?void 0:N.optimize,xe=Ae===!0||Ae===void 0?1:Ae||0,Ne=(U=(I=ie.code)===null||I===void 0?void 0:I.regExp)!==null&&U!==void 0?U:S,Ke=(P=ie.uriResolver)!==null&&P!==void 0?P:v.default;return{strictSchema:(ee=(G=ie.strictSchema)!==null&&G!==void 0?G:Mt)!==null&&ee!==void 0?ee:!0,strictNumbers:(ve=(ue=ie.strictNumbers)!==null&&ue!==void 0?ue:Mt)!==null&&ve!==void 0?ve:!0,strictTypes:(Oe=(Ee=ie.strictTypes)!==null&&Ee!==void 0?Ee:Mt)!==null&&Oe!==void 0?Oe:"log",strictTuples:(te=(de=ie.strictTuples)!==null&&de!==void 0?de:Mt)!==null&&te!==void 0?te:"log",strictRequired:(we=(Se=ie.strictRequired)!==null&&Se!==void 0?Se:Mt)!==null&&we!==void 0?we:!1,code:ie.code?{...ie.code,optimize:xe,regExp:Ne}:{optimize:xe,regExp:Ne},loopRequired:($e=ie.loopRequired)!==null&&$e!==void 0?$e:w,loopEnum:(Te=ie.loopEnum)!==null&&Te!==void 0?Te:w,meta:(Pe=ie.meta)!==null&&Pe!==void 0?Pe:!0,messages:(Ge=ie.messages)!==null&&Ge!==void 0?Ge:!0,inlineRefs:(Ce=ie.inlineRefs)!==null&&Ce!==void 0?Ce:!0,schemaId:(Be=ie.schemaId)!==null&&Be!==void 0?Be:"$id",addUsedSchema:(Fe=ie.addUsedSchema)!==null&&Fe!==void 0?Fe:!0,validateSchema:(Je=ie.validateSchema)!==null&&Je!==void 0?Je:!0,validateFormats:(ke=ie.validateFormats)!==null&&ke!==void 0?ke:!0,unicodeRegExp:(Ue=ie.unicodeRegExp)!==null&&Ue!==void 0?Ue:!0,int32range:(Xe=ie.int32range)!==null&&Xe!==void 0?Xe:!0,uriResolver:Ke}}class x{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...T(N)};const{es5:I,lines:U}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:_,es5:I,lines:U}),this.logger=V(N.logger);const P=N.validateFormats;N.validateFormats=!1,this.RULES=(0,l.getRules)(),O.call(this,E,N,"NOT SUPPORTED"),O.call(this,R,N,"DEPRECATED","warn"),this._metaOpts=q.call(this),N.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&$.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),M.call(this),N.validateFormats=P}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:I,schemaId:U}=this.opts;let P=g;U==="id"&&(P={...g},P.id=P.$id,delete P.$id),I&&N&&this.addMetaSchema(P,P[U],!1)}defaultMeta(){const{meta:N,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[I]||N:void 0}validate(N,I){let U;if(typeof N=="string"){if(U=this.getSchema(N),!U)throw new Error(`no schema with key or ref "${N}"`)}else U=this.compile(N);const P=U(I);return"$async"in U||(this.errors=U.errors),P}compile(N,I){const U=this._addSchema(N,I);return U.validate||this._compileSchemaEnv(U)}compileAsync(N,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return P.call(this,N,I);async function P(Oe,de){await G.call(this,Oe.$schema);const te=this._addSchema(Oe,de);return te.validate||ee.call(this,te)}async function G(Oe){Oe&&!this.getSchema(Oe)&&await P.call(this,{$ref:Oe},!0)}async function ee(Oe){try{return this._compileSchemaEnv(Oe)}catch(de){if(!(de instanceof s.default))throw de;return ue.call(this,de),await ve.call(this,de.missingSchema),ee.call(this,Oe)}}function ue({missingSchema:Oe,missingRef:de}){if(this.refs[Oe])throw new Error(`AnySchema ${Oe} is loaded but ${de} cannot be resolved`)}async function ve(Oe){const de=await Ee.call(this,Oe);this.refs[Oe]||await G.call(this,de.$schema),this.refs[Oe]||this.addSchema(de,Oe,I)}async function Ee(Oe){const de=this._loading[Oe];if(de)return de;try{return await(this._loading[Oe]=U(Oe))}finally{delete this._loading[Oe]}}}addSchema(N,I,U,P=this.opts.validateSchema){if(Array.isArray(N)){for(const ee of N)this.addSchema(ee,void 0,U,P);return this}let G;if(typeof N=="object"){const{schemaId:ee}=this.opts;if(G=N[ee],G!==void 0&&typeof G!="string")throw new Error(`schema ${ee} must be string`)}return I=(0,d.normalizeId)(I||G),this._checkUnique(I),this.schemas[I]=this._addSchema(N,U,I,P,!0),this}addMetaSchema(N,I,U=this.opts.validateSchema){return this.addSchema(N,I,!0,U),this}validateSchema(N,I){if(typeof N=="boolean")return!0;let U;if(U=N.$schema,U!==void 0&&typeof U!="string")throw new Error("$schema must be a string");if(U=U||this.opts.defaultMeta||this.defaultMeta(),!U)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const P=this.validate(U,N);if(!P&&I){const G="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(G);else throw new Error(G)}return P}getSchema(N){let I;for(;typeof(I=C.call(this,N))=="string";)N=I;if(I===void 0){const{schemaId:U}=this.opts,P=new c.SchemaEnv({schema:{},schemaId:U});if(I=c.resolveSchema.call(this,P,N),!I)return;this.refs[N]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(typeof N){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const I=C.call(this,N);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const I=N;this._cache.delete(I);let U=N[this.opts.schemaId];return U&&(U=(0,d.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const I of N)this.addKeyword(I);return this}addKeyword(N,I){let U;if(typeof N=="string")U=N,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=U);else if(typeof N=="object"&&I===void 0){if(I=N,U=I.keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(re.call(this,U,I),!I)return(0,m.eachItem)(U,G=>ae.call(this,G)),this;B.call(this,I);const P={...I,type:(0,h.getJSONTypes)(I.type),schemaType:(0,h.getJSONTypes)(I.schemaType)};return(0,m.eachItem)(U,P.type.length===0?G=>ae.call(this,G,P):G=>P.type.forEach(ee=>ae.call(this,G,P,ee))),this}getKeyword(N){const I=this.RULES.all[N];return typeof I=="object"?I.definition:!!I}removeKeyword(N){const{RULES:I}=this;delete I.keywords[N],delete I.all[N];for(const U of I.rules){const P=U.rules.findIndex(G=>G.keyword===N);P>=0&&U.rules.splice(P,1)}return this}addFormat(N,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[N]=I,this}errorsText(N=this.errors,{separator:I=", ",dataVar:U="data"}={}){return!N||N.length===0?"No errors":N.map(P=>`${U}${P.instancePath} ${P.message}`).reduce((P,G)=>P+I+G)}$dataMetaSchema(N,I){const U=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const P of I){const G=P.split("/").slice(1);let ee=N;for(const ue of G)ee=ee[ue];for(const ue in U){const ve=U[ue];if(typeof ve!="object")continue;const{$data:Ee}=ve.definition,Oe=ee[ue];Ee&&Oe&&(ee[ue]=fe(Oe))}}return N}_removeAllSchemas(N,I){for(const U in N){const P=N[U];(!I||I.test(U))&&(typeof P=="string"?delete N[U]:P&&!P.meta&&(this._cache.delete(P.schema),delete N[U]))}}_addSchema(N,I,U,P=this.opts.validateSchema,G=this.opts.addUsedSchema){let ee;const{schemaId:ue}=this.opts;if(typeof N=="object")ee=N[ue];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof N!="boolean")throw new Error("schema must be object or boolean")}let ve=this._cache.get(N);if(ve!==void 0)return ve;U=(0,d.normalizeId)(ee||U);const Ee=d.getSchemaRefs.call(this,N,U);return ve=new c.SchemaEnv({schema:N,schemaId:ue,meta:I,baseId:U,localRefs:Ee}),this._cache.set(ve.schema,ve),G&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=ve),P&&this.validateSchema(N,!0),ve}_checkUnique(N){if(this.schemas[N]||this.refs[N])throw new Error(`schema with key or id "${N}" already exists`)}_compileSchemaEnv(N){if(N.meta?this._compileMetaSchema(N):c.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const I=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,N)}finally{this.opts=I}}}x.ValidationError=i.default,x.MissingRefError=s.default,e.default=x;function O(ie,N,I,U="error"){for(const P in ie){const G=P;G in N&&this.logger[U](`${I}: option ${P}. ${ie[G]}`)}}function C(ie){return ie=(0,d.normalizeId)(ie),this.schemas[ie]||this.refs[ie]}function M(){const ie=this.opts.schemas;if(ie)if(Array.isArray(ie))this.addSchema(ie);else for(const N in ie)this.addSchema(ie[N],N)}function D(){for(const ie in this.opts.formats){const N=this.opts.formats[ie];N&&this.addFormat(ie,N)}}function $(ie){if(Array.isArray(ie)){this.addVocabulary(ie);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in ie){const I=ie[N];I.keyword||(I.keyword=N),this.addKeyword(I)}}function q(){const ie={...this.opts};for(const N of b)delete ie[N];return ie}const L={log(){},warn(){},error(){}};function V(ie){if(ie===!1)return L;if(ie===void 0)return console;if(ie.log&&ie.warn&&ie.error)return ie;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function re(ie,N){const{RULES:I}=this;if((0,m.eachItem)(ie,U=>{if(I.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!F.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function ae(ie,N,I){var U;const P=N?.post;if(I&&P)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:G}=this;let ee=P?G.post:G.rules.find(({type:ve})=>ve===I);if(ee||(ee={type:I,rules:[]},G.rules.push(ee)),G.keywords[ie]=!0,!N)return;const ue={keyword:ie,definition:{...N,type:(0,h.getJSONTypes)(N.type),schemaType:(0,h.getJSONTypes)(N.schemaType)}};N.before?K.call(this,ee,ue,N.before):ee.rules.push(ue),G.all[ie]=ue,(U=N.implements)===null||U===void 0||U.forEach(ve=>this.addKeyword(ve))}function K(ie,N,I){const U=ie.rules.findIndex(P=>P.keyword===I);U>=0?ie.rules.splice(U,0,N):(ie.rules.push(N),this.logger.warn(`rule ${I} is not defined`))}function B(ie){let{metaSchema:N}=ie;N!==void 0&&(ie.$data&&this.opts.$data&&(N=fe(N)),ie.validateSchema=this.compile(N,!0))}const Y={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(ie){return{anyOf:[ie,Y]}}})(e_)),e_}var C1={},O1={},R1={},Y3;function cte(){if(Y3)return R1;Y3=1,Object.defineProperty(R1,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return R1.default=e,R1}var Ec={},Z3;function fte(){if(Z3)return Ec;Z3=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.callRef=Ec.getValidate=void 0;const e=i2(),t=pl(),r=dn(),i=cf(),s=PR(),l=qn(),c={keyword:"$ref",schemaType:"string",code(h){const{gen:m,schema:g,it:v}=h,{baseId:S,schemaEnv:b,validateName:_,opts:E,self:R}=v,{root:w}=b;if((g==="#"||g==="#/")&&S===w.baseId)return x();const T=s.resolveRef.call(R,w,S,g);if(T===void 0)throw new e.default(v.opts.uriResolver,S,g);if(T instanceof s.SchemaEnv)return O(T);return C(T);function x(){if(b===w)return d(h,_,b,b.$async);const M=m.scopeValue("root",{ref:w});return d(h,(0,r._)`${M}.validate`,w,w.$async)}function O(M){const D=f(h,M);d(h,D,M,M.$async)}function C(M){const D=m.scopeValue("schema",E.code.source===!0?{ref:M,code:(0,r.stringify)(M)}:{ref:M}),$=m.name("valid"),q=h.subschema({schema:M,dataTypes:[],schemaPath:r.nil,topSchemaRef:D,errSchemaPath:g},$);h.mergeEvaluated(q),h.ok($)}}};function f(h,m){const{gen:g}=h;return m.validate?g.scopeValue("validate",{ref:m.validate}):(0,r._)`${g.scopeValue("wrapper",{ref:m})}.validate`}Ec.getValidate=f;function d(h,m,g,v){const{gen:S,it:b}=h,{allErrors:_,schemaEnv:E,opts:R}=b,w=R.passContext?i.default.this:r.nil;v?T():x();function T(){if(!E.$async)throw new Error("async schema referenced by sync schema");const M=S.let("valid");S.try(()=>{S.code((0,r._)`await ${(0,t.callValidateCode)(h,m,w)}`),C(m),_||S.assign(M,!0)},D=>{S.if((0,r._)`!(${D} instanceof ${b.ValidationError})`,()=>S.throw(D)),O(D),_||S.assign(M,!1)}),h.ok(M)}function x(){h.result((0,t.callValidateCode)(h,m,w),()=>C(m),()=>O(m))}function O(M){const D=(0,r._)`${M}.errors`;S.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${D} : ${i.default.vErrors}.concat(${D})`),S.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function C(M){var D;if(!b.opts.unevaluated)return;const $=(D=g?.validate)===null||D===void 0?void 0:D.evaluated;if(b.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(b.props=l.mergeEvaluated.props(S,$.props,b.props));else{const q=S.var("props",(0,r._)`${M}.evaluated.props`);b.props=l.mergeEvaluated.props(S,q,b.props,r.Name)}if(b.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(b.items=l.mergeEvaluated.items(S,$.items,b.items));else{const q=S.var("items",(0,r._)`${M}.evaluated.items`);b.items=l.mergeEvaluated.items(S,q,b.items,r.Name)}}}return Ec.callRef=d,Ec.default=c,Ec}var X3;function dte(){if(X3)return O1;X3=1,Object.defineProperty(O1,"__esModule",{value:!0});const e=cte(),t=fte(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return O1.default=r,O1}var A1={},M1={},Q3;function hte(){if(Q3)return M1;Q3=1,Object.defineProperty(M1,"__esModule",{value:!0});const e=dn(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:l,schemaCode:c})=>(0,e.str)`must be ${r[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>(0,e._)`{comparison: ${r[l].okStr}, limit: ${c}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(l){const{keyword:c,data:f,schemaCode:d}=l;l.fail$data((0,e._)`${f} ${r[c].fail} ${d} || isNaN(${f})`)}};return M1.default=s,M1}var j1={},W3;function pte(){if(W3)return j1;W3=1,Object.defineProperty(j1,"__esModule",{value:!0});const e=dn(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:s,data:l,schemaCode:c,it:f}=i,d=f.opts.multipleOfPrecision,h=s.let("res"),m=d?(0,e._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${d}`:(0,e._)`${h} !== parseInt(${h})`;i.fail$data((0,e._)`(${c} === 0 || (${h} = ${l}/${c}, ${m}))`)}};return j1.default=r,j1}var k1={},D1={},J3;function mte(){if(J3)return D1;J3=1,Object.defineProperty(D1,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,s=0,l;for(;s<r;)i++,l=t.charCodeAt(s++),l>=55296&&l<=56319&&s<r&&(l=t.charCodeAt(s),(l&64512)===56320&&s++);return i}return D1.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',D1}var e4;function gte(){if(e4)return k1;e4=1,Object.defineProperty(k1,"__esModule",{value:!0});const e=dn(),t=qn(),r=mte(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const f=l==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${f} than ${c} characters`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:f,schemaCode:d,it:h}=l,m=c==="maxLength"?e.operators.GT:e.operators.LT,g=h.opts.unicode===!1?(0,e._)`${f}.length`:(0,e._)`${(0,t.useFunc)(l.gen,r.default)}(${f})`;l.fail$data((0,e._)`${g} ${m} ${d}`)}};return k1.default=s,k1}var N1={},t4;function yte(){if(t4)return N1;t4=1,Object.defineProperty(N1,"__esModule",{value:!0});const e=pl(),t=dn(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:l,$data:c,schema:f,schemaCode:d,it:h}=s,m=h.opts.unicodeRegExp?"u":"",g=c?(0,t._)`(new RegExp(${d}, ${m}))`:(0,e.usePattern)(s,f);s.fail$data((0,t._)`!${g}.test(${l})`)}};return N1.default=i,N1}var z1={},n4;function vte(){if(n4)return z1;n4=1,Object.defineProperty(z1,"__esModule",{value:!0});const e=dn(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:s}){const l=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${s} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:s,data:l,schemaCode:c}=i,f=s==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${l}).length ${f} ${c}`)}};return z1.default=r,z1}var $1={},r4;function bte(){if(r4)return $1;r4=1,Object.defineProperty($1,"__esModule",{value:!0});const e=pl(),t=dn(),r=qn(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:l}})=>(0,t.str)`must have required property '${l}'`,params:({params:{missingProperty:l}})=>(0,t._)`{missingProperty: ${l}}`},code(l){const{gen:c,schema:f,schemaCode:d,data:h,$data:m,it:g}=l,{opts:v}=g;if(!m&&f.length===0)return;const S=f.length>=v.loopRequired;if(g.allErrors?b():_(),v.strictRequired){const w=l.parentSchema.properties,{definedProperties:T}=l.it;for(const x of f)if(w?.[x]===void 0&&!T.has(x)){const O=g.schemaEnv.baseId+g.errSchemaPath,C=`required property "${x}" is not defined at "${O}" (strictRequired)`;(0,r.checkStrictMode)(g,C,g.opts.strictRequired)}}function b(){if(S||m)l.block$data(t.nil,E);else for(const w of f)(0,e.checkReportMissingProp)(l,w)}function _(){const w=c.let("missing");if(S||m){const T=c.let("valid",!0);l.block$data(T,()=>R(w,T)),l.ok(T)}else c.if((0,e.checkMissingProp)(l,f,w)),(0,e.reportMissingProp)(l,w),c.else()}function E(){c.forOf("prop",d,w=>{l.setParams({missingProperty:w}),c.if((0,e.noPropertyInData)(c,h,w,v.ownProperties),()=>l.error())})}function R(w,T){l.setParams({missingProperty:w}),c.forOf(w,d,()=>{c.assign(T,(0,e.propertyInData)(c,h,w,v.ownProperties)),c.if((0,t.not)(T),()=>{l.error(),c.break()})},t.nil)}}};return $1.default=s,$1}var P1={},a4;function Ste(){if(a4)return P1;a4=1,Object.defineProperty(P1,"__esModule",{value:!0});const e=dn(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:s}){const l=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${s} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:s,data:l,schemaCode:c}=i,f=s==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${l}.length ${f} ${c}`)}};return P1.default=r,P1}var I1={},L1={},i4;function IR(){if(i4)return L1;i4=1,Object.defineProperty(L1,"__esModule",{value:!0});const e=j9();return e.code='require("ajv/dist/runtime/equal").default',L1.default=e,L1}var o4;function wte(){if(o4)return I1;o4=1,Object.defineProperty(I1,"__esModule",{value:!0});const e=cw(),t=dn(),r=qn(),i=IR(),l={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:f}})=>(0,t.str)`must NOT have duplicate items (items ## ${f} and ${c} are identical)`,params:({params:{i:c,j:f}})=>(0,t._)`{i: ${c}, j: ${f}}`},code(c){const{gen:f,data:d,$data:h,schema:m,parentSchema:g,schemaCode:v,it:S}=c;if(!h&&!m)return;const b=f.let("valid"),_=g.items?(0,e.getSchemaTypes)(g.items):[];c.block$data(b,E,(0,t._)`${v} === false`),c.ok(b);function E(){const x=f.let("i",(0,t._)`${d}.length`),O=f.let("j");c.setParams({i:x,j:O}),f.assign(b,!0),f.if((0,t._)`${x} > 1`,()=>(R()?w:T)(x,O))}function R(){return _.length>0&&!_.some(x=>x==="object"||x==="array")}function w(x,O){const C=f.name("item"),M=(0,e.checkDataTypes)(_,C,S.opts.strictNumbers,e.DataType.Wrong),D=f.const("indices",(0,t._)`{}`);f.for((0,t._)`;${x}--;`,()=>{f.let(C,(0,t._)`${d}[${x}]`),f.if(M,(0,t._)`continue`),_.length>1&&f.if((0,t._)`typeof ${C} == "string"`,(0,t._)`${C} += "_"`),f.if((0,t._)`typeof ${D}[${C}] == "number"`,()=>{f.assign(O,(0,t._)`${D}[${C}]`),c.error(),f.assign(b,!1).break()}).code((0,t._)`${D}[${C}] = ${x}`)})}function T(x,O){const C=(0,r.useFunc)(f,i.default),M=f.name("outer");f.label(M).for((0,t._)`;${x}--;`,()=>f.for((0,t._)`${O} = ${x}; ${O}--;`,()=>f.if((0,t._)`${C}(${d}[${x}], ${d}[${O}])`,()=>{c.error(),f.assign(b,!1).break(M)})))}}};return I1.default=l,I1}var U1={},s4;function Ete(){if(s4)return U1;s4=1,Object.defineProperty(U1,"__esModule",{value:!0});const e=dn(),t=qn(),r=IR(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:l})=>(0,e._)`{allowedValue: ${l}}`},code(l){const{gen:c,data:f,$data:d,schemaCode:h,schema:m}=l;d||m&&typeof m=="object"?l.fail$data((0,e._)`!${(0,t.useFunc)(c,r.default)}(${f}, ${h})`):l.fail((0,e._)`${m} !== ${f}`)}};return U1.default=s,U1}var q1={},l4;function xte(){if(l4)return q1;l4=1,Object.defineProperty(q1,"__esModule",{value:!0});const e=dn(),t=qn(),r=IR(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:l})=>(0,e._)`{allowedValues: ${l}}`},code(l){const{gen:c,data:f,$data:d,schema:h,schemaCode:m,it:g}=l;if(!d&&h.length===0)throw new Error("enum must have non-empty array");const v=h.length>=g.opts.loopEnum;let S;const b=()=>S??(S=(0,t.useFunc)(c,r.default));let _;if(v||d)_=c.let("valid"),l.block$data(_,E);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const w=c.const("vSchema",m);_=(0,e.or)(...h.map((T,x)=>R(w,x)))}l.pass(_);function E(){c.assign(_,!1),c.forOf("v",m,w=>c.if((0,e._)`${b()}(${f}, ${w})`,()=>c.assign(_,!0).break()))}function R(w,T){const x=h[T];return typeof x=="object"&&x!==null?(0,e._)`${b()}(${f}, ${w}[${T}])`:(0,e._)`${f} === ${x}`}}};return q1.default=s,q1}var u4;function _te(){if(u4)return A1;u4=1,Object.defineProperty(A1,"__esModule",{value:!0});const e=hte(),t=pte(),r=gte(),i=yte(),s=vte(),l=bte(),c=Ste(),f=wte(),d=Ete(),h=xte(),m=[e.default,t.default,r.default,i.default,s.default,l.default,c.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,h.default];return A1.default=m,A1}var V1={},hp={},c4;function N9(){if(c4)return hp;c4=1,Object.defineProperty(hp,"__esModule",{value:!0}),hp.validateAdditionalItems=void 0;const e=dn(),t=qn(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{parentSchema:c,it:f}=l,{items:d}=c;if(!Array.isArray(d)){(0,t.checkStrictMode)(f,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(l,d)}};function s(l,c){const{gen:f,schema:d,data:h,keyword:m,it:g}=l;g.items=!0;const v=f.const("len",(0,e._)`${h}.length`);if(d===!1)l.setParams({len:c.length}),l.pass((0,e._)`${v} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(g,d)){const b=f.var("valid",(0,e._)`${v} <= ${c.length}`);f.if((0,e.not)(b),()=>S(b)),l.ok(b)}function S(b){f.forRange("i",c.length,v,_=>{l.subschema({keyword:m,dataProp:_,dataPropType:t.Type.Num},b),g.allErrors||f.if((0,e.not)(b),()=>f.break())})}}return hp.validateAdditionalItems=s,hp.default=i,hp}var F1={},pp={},f4;function z9(){if(f4)return pp;f4=1,Object.defineProperty(pp,"__esModule",{value:!0}),pp.validateTuple=void 0;const e=dn(),t=qn(),r=pl(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(l){const{schema:c,it:f}=l;if(Array.isArray(c))return s(l,"additionalItems",c);f.items=!0,!(0,t.alwaysValidSchema)(f,c)&&l.ok((0,r.validateArray)(l))}};function s(l,c,f=l.schema){const{gen:d,parentSchema:h,data:m,keyword:g,it:v}=l;_(h),v.opts.unevaluated&&f.length&&v.items!==!0&&(v.items=t.mergeEvaluated.items(d,f.length,v.items));const S=d.name("valid"),b=d.const("len",(0,e._)`${m}.length`);f.forEach((E,R)=>{(0,t.alwaysValidSchema)(v,E)||(d.if((0,e._)`${b} > ${R}`,()=>l.subschema({keyword:g,schemaProp:R,dataProp:R},S)),l.ok(S))});function _(E){const{opts:R,errSchemaPath:w}=v,T=f.length,x=T===E.minItems&&(T===E.maxItems||E[c]===!1);if(R.strictTuples&&!x){const O=`"${g}" is ${T}-tuple, but minItems or maxItems/${c} are not specified or different at path "${w}"`;(0,t.checkStrictMode)(v,O,R.strictTuples)}}}return pp.validateTuple=s,pp.default=i,pp}var d4;function Tte(){if(d4)return F1;d4=1,Object.defineProperty(F1,"__esModule",{value:!0});const e=z9(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return F1.default=t,F1}var B1={},h4;function Cte(){if(h4)return B1;h4=1,Object.defineProperty(B1,"__esModule",{value:!0});const e=dn(),t=qn(),r=pl(),i=N9(),l={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:f,parentSchema:d,it:h}=c,{prefixItems:m}=d;h.items=!0,!(0,t.alwaysValidSchema)(h,f)&&(m?(0,i.validateAdditionalItems)(c,m):c.ok((0,r.validateArray)(c)))}};return B1.default=l,B1}var H1={},p4;function Ote(){if(p4)return H1;p4=1,Object.defineProperty(H1,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:l}})=>l===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${l} valid item(s)`,params:({params:{min:s,max:l}})=>l===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${l}}`},code(s){const{gen:l,schema:c,parentSchema:f,data:d,it:h}=s;let m,g;const{minContains:v,maxContains:S}=f;h.opts.next?(m=v===void 0?1:v,g=S):m=1;const b=l.const("len",(0,e._)`${d}.length`);if(s.setParams({min:m,max:g}),g===void 0&&m===0){(0,t.checkStrictMode)(h,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&m>g){(0,t.checkStrictMode)(h,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(h,c)){let T=(0,e._)`${b} >= ${m}`;g!==void 0&&(T=(0,e._)`${T} && ${b} <= ${g}`),s.pass(T);return}h.items=!0;const _=l.name("valid");g===void 0&&m===1?R(_,()=>l.if(_,()=>l.break())):m===0?(l.let(_,!0),g!==void 0&&l.if((0,e._)`${d}.length > 0`,E)):(l.let(_,!1),E()),s.result(_,()=>s.reset());function E(){const T=l.name("_valid"),x=l.let("count",0);R(T,()=>l.if(T,()=>w(x)))}function R(T,x){l.forRange("i",0,b,O=>{s.subschema({keyword:"contains",dataProp:O,dataPropType:t.Type.Num,compositeRule:!0},T),x()})}function w(T){l.code((0,e._)`${T}++`),g===void 0?l.if((0,e._)`${T} >= ${m}`,()=>l.assign(_,!0).break()):(l.if((0,e._)`${T} > ${g}`,()=>l.assign(_,!1).break()),m===1?l.assign(_,!0):l.if((0,e._)`${T} >= ${m}`,()=>l.assign(_,!0)))}}};return H1.default=i,H1}var u_={},m4;function Rte(){return m4||(m4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=dn(),r=qn(),i=pl();e.error={message:({params:{property:d,depsCount:h,deps:m}})=>{const g=h===1?"property":"properties";return(0,t.str)`must have ${g} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:h,deps:m,missingProperty:g}})=>(0,t._)`{property: ${d},
53
+ missingProperty: ${g},
54
+ depsCount: ${h},
55
+ deps: ${m}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[h,m]=l(d);c(d,h),f(d,m)}};function l({schema:d}){const h={},m={};for(const g in d){if(g==="__proto__")continue;const v=Array.isArray(d[g])?h:m;v[g]=d[g]}return[h,m]}function c(d,h=d.schema){const{gen:m,data:g,it:v}=d;if(Object.keys(h).length===0)return;const S=m.let("missing");for(const b in h){const _=h[b];if(_.length===0)continue;const E=(0,i.propertyInData)(m,g,b,v.opts.ownProperties);d.setParams({property:b,depsCount:_.length,deps:_.join(", ")}),v.allErrors?m.if(E,()=>{for(const R of _)(0,i.checkReportMissingProp)(d,R)}):(m.if((0,t._)`${E} && (${(0,i.checkMissingProp)(d,_,S)})`),(0,i.reportMissingProp)(d,S),m.else())}}e.validatePropertyDeps=c;function f(d,h=d.schema){const{gen:m,data:g,keyword:v,it:S}=d,b=m.name("valid");for(const _ in h)(0,r.alwaysValidSchema)(S,h[_])||(m.if((0,i.propertyInData)(m,g,_,S.opts.ownProperties),()=>{const E=d.subschema({keyword:v,schemaProp:_},b);d.mergeValidEvaluated(E,b)},()=>m.var(b,!0)),d.ok(b))}e.validateSchemaDeps=f,e.default=s})(u_)),u_}var G1={},g4;function Ate(){if(g4)return G1;g4=1,Object.defineProperty(G1,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:l,schema:c,data:f,it:d}=s;if((0,t.alwaysValidSchema)(d,c))return;const h=l.name("valid");l.forIn("key",f,m=>{s.setParams({propertyName:m}),s.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},h),l.if((0,e.not)(h),()=>{s.error(!0),d.allErrors||l.break()})}),s.ok(h)}};return G1.default=i,G1}var K1={},y4;function $9(){if(y4)return K1;y4=1,Object.defineProperty(K1,"__esModule",{value:!0});const e=pl(),t=dn(),r=cf(),i=qn(),l={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:f,schema:d,parentSchema:h,data:m,errsCount:g,it:v}=c;if(!g)throw new Error("ajv implementation error");const{allErrors:S,opts:b}=v;if(v.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(v,d))return;const _=(0,e.allSchemaProperties)(h.properties),E=(0,e.allSchemaProperties)(h.patternProperties);R(),c.ok((0,t._)`${g} === ${r.default.errors}`);function R(){f.forIn("key",m,C=>{!_.length&&!E.length?x(C):f.if(w(C),()=>x(C))})}function w(C){let M;if(_.length>8){const D=(0,i.schemaRefOrVal)(v,h.properties,"properties");M=(0,e.isOwnProperty)(f,D,C)}else _.length?M=(0,t.or)(..._.map(D=>(0,t._)`${C} === ${D}`)):M=t.nil;return E.length&&(M=(0,t.or)(M,...E.map(D=>(0,t._)`${(0,e.usePattern)(c,D)}.test(${C})`))),(0,t.not)(M)}function T(C){f.code((0,t._)`delete ${m}[${C}]`)}function x(C){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){T(C);return}if(d===!1){c.setParams({additionalProperty:C}),c.error(),S||f.break();return}if(typeof d=="object"&&!(0,i.alwaysValidSchema)(v,d)){const M=f.name("valid");b.removeAdditional==="failing"?(O(C,M,!1),f.if((0,t.not)(M),()=>{c.reset(),T(C)})):(O(C,M),S||f.if((0,t.not)(M),()=>f.break()))}}function O(C,M,D){const $={keyword:"additionalProperties",dataProp:C,dataPropType:i.Type.Str};D===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema($,M)}}};return K1.default=l,K1}var Y1={},v4;function Mte(){if(v4)return Y1;v4=1,Object.defineProperty(Y1,"__esModule",{value:!0});const e=a2(),t=pl(),r=qn(),i=$9(),s={keyword:"properties",type:"object",schemaType:"object",code(l){const{gen:c,schema:f,parentSchema:d,data:h,it:m}=l;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(m,i.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(f);for(const E of g)m.definedProperties.add(E);m.opts.unevaluated&&g.length&&m.props!==!0&&(m.props=r.mergeEvaluated.props(c,(0,r.toHash)(g),m.props));const v=g.filter(E=>!(0,r.alwaysValidSchema)(m,f[E]));if(v.length===0)return;const S=c.name("valid");for(const E of v)b(E)?_(E):(c.if((0,t.propertyInData)(c,h,E,m.opts.ownProperties)),_(E),m.allErrors||c.else().var(S,!0),c.endIf()),l.it.definedProperties.add(E),l.ok(S);function b(E){return m.opts.useDefaults&&!m.compositeRule&&f[E].default!==void 0}function _(E){l.subschema({keyword:"properties",schemaProp:E,dataProp:E},S)}}};return Y1.default=s,Y1}var Z1={},b4;function jte(){if(b4)return Z1;b4=1,Object.defineProperty(Z1,"__esModule",{value:!0});const e=pl(),t=dn(),r=qn(),i=qn(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(l){const{gen:c,schema:f,data:d,parentSchema:h,it:m}=l,{opts:g}=m,v=(0,e.allSchemaProperties)(f),S=v.filter(x=>(0,r.alwaysValidSchema)(m,f[x]));if(v.length===0||S.length===v.length&&(!m.opts.unevaluated||m.props===!0))return;const b=g.strictSchema&&!g.allowMatchingProperties&&h.properties,_=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,i.evaluatedPropsToName)(c,m.props));const{props:E}=m;R();function R(){for(const x of v)b&&w(x),m.allErrors?T(x):(c.var(_,!0),T(x),c.if(_))}function w(x){for(const O in b)new RegExp(x).test(O)&&(0,r.checkStrictMode)(m,`property ${O} matches pattern ${x} (use allowMatchingProperties)`)}function T(x){c.forIn("key",d,O=>{c.if((0,t._)`${(0,e.usePattern)(l,x)}.test(${O})`,()=>{const C=S.includes(x);C||l.subschema({keyword:"patternProperties",schemaProp:x,dataProp:O,dataPropType:i.Type.Str},_),m.opts.unevaluated&&E!==!0?c.assign((0,t._)`${E}[${O}]`,!0):!C&&!m.allErrors&&c.if((0,t.not)(_),()=>c.break())})})}}};return Z1.default=s,Z1}var X1={},S4;function kte(){if(S4)return X1;S4=1,Object.defineProperty(X1,"__esModule",{value:!0});const e=qn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:s,it:l}=r;if((0,e.alwaysValidSchema)(l,s)){r.fail();return}const c=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),r.failResult(c,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return X1.default=t,X1}var Q1={},w4;function Dte(){if(w4)return Q1;w4=1,Object.defineProperty(Q1,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:pl().validateUnion,error:{message:"must match a schema in anyOf"}};return Q1.default=t,Q1}var W1={},E4;function Nte(){if(E4)return W1;E4=1,Object.defineProperty(W1,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:l,schema:c,parentSchema:f,it:d}=s;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&f.discriminator)return;const h=c,m=l.let("valid",!1),g=l.let("passing",null),v=l.name("_valid");s.setParams({passing:g}),l.block(S),s.result(m,()=>s.reset(),()=>s.error(!0));function S(){h.forEach((b,_)=>{let E;(0,t.alwaysValidSchema)(d,b)?l.var(v,!0):E=s.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},v),_>0&&l.if((0,e._)`${v} && ${m}`).assign(m,!1).assign(g,(0,e._)`[${g}, ${_}]`).else(),l.if(v,()=>{l.assign(m,!0),l.assign(g,_),E&&s.mergeEvaluated(E,e.Name)})})}}};return W1.default=i,W1}var J1={},x4;function zte(){if(x4)return J1;x4=1,Object.defineProperty(J1,"__esModule",{value:!0});const e=qn(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:s,it:l}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const c=i.name("valid");s.forEach((f,d)=>{if((0,e.alwaysValidSchema)(l,f))return;const h=r.subschema({keyword:"allOf",schemaProp:d},c);r.ok(c),r.mergeEvaluated(h)})}};return J1.default=t,J1}var eS={},_4;function $te(){if(_4)return eS;_4=1,Object.defineProperty(eS,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:l})=>(0,e.str)`must match "${l.ifClause}" schema`,params:({params:l})=>(0,e._)`{failingKeyword: ${l.ifClause}}`},code(l){const{gen:c,parentSchema:f,it:d}=l;f.then===void 0&&f.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const h=s(d,"then"),m=s(d,"else");if(!h&&!m)return;const g=c.let("valid",!0),v=c.name("_valid");if(S(),l.reset(),h&&m){const _=c.let("ifClause");l.setParams({ifClause:_}),c.if(v,b("then",_),b("else",_))}else h?c.if(v,b("then")):c.if((0,e.not)(v),b("else"));l.pass(g,()=>l.error(!0));function S(){const _=l.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);l.mergeEvaluated(_)}function b(_,E){return()=>{const R=l.subschema({keyword:_},v);c.assign(g,v),l.mergeValidEvaluated(R,g),E?c.assign(E,(0,e._)`${_}`):l.setParams({ifClause:_})}}}};function s(l,c){const f=l.schema[c];return f!==void 0&&!(0,t.alwaysValidSchema)(l,f)}return eS.default=i,eS}var tS={},T4;function Pte(){if(T4)return tS;T4=1,Object.defineProperty(tS,"__esModule",{value:!0});const e=qn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:s}){i.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return tS.default=t,tS}var C4;function Ite(){if(C4)return V1;C4=1,Object.defineProperty(V1,"__esModule",{value:!0});const e=N9(),t=Tte(),r=z9(),i=Cte(),s=Ote(),l=Rte(),c=Ate(),f=$9(),d=Mte(),h=jte(),m=kte(),g=Dte(),v=Nte(),S=zte(),b=$te(),_=Pte();function E(R=!1){const w=[m.default,g.default,v.default,S.default,b.default,_.default,c.default,f.default,l.default,d.default,h.default];return R?w.push(t.default,i.default):w.push(e.default,r.default),w.push(s.default),w}return V1.default=E,V1}var nS={},rS={},O4;function Lte(){if(O4)return rS;O4=1,Object.defineProperty(rS,"__esModule",{value:!0});const e=dn(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,s){const{gen:l,data:c,$data:f,schema:d,schemaCode:h,it:m}=i,{opts:g,errSchemaPath:v,schemaEnv:S,self:b}=m;if(!g.validateFormats)return;f?_():E();function _(){const R=l.scopeValue("formats",{ref:b.formats,code:g.code.formats}),w=l.const("fDef",(0,e._)`${R}[${h}]`),T=l.let("fType"),x=l.let("format");l.if((0,e._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>l.assign(T,(0,e._)`${w}.type || "string"`).assign(x,(0,e._)`${w}.validate`),()=>l.assign(T,(0,e._)`"string"`).assign(x,w)),i.fail$data((0,e.or)(O(),C()));function O(){return g.strictSchema===!1?e.nil:(0,e._)`${h} && !${x}`}function C(){const M=S.$async?(0,e._)`(${w}.async ? await ${x}(${c}) : ${x}(${c}))`:(0,e._)`${x}(${c})`,D=(0,e._)`(typeof ${x} == "function" ? ${M} : ${x}.test(${c}))`;return(0,e._)`${x} && ${x} !== true && ${T} === ${s} && !${D}`}}function E(){const R=b.formats[d];if(!R){O();return}if(R===!0)return;const[w,T,x]=C(R);w===s&&i.pass(M());function O(){if(g.strictSchema===!1){b.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${d}" ignored in schema at path "${v}"`}}function C(D){const $=D instanceof RegExp?(0,e.regexpCode)(D):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(d)}`:void 0,q=l.scopeValue("formats",{key:d,ref:D,code:$});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,e._)`${q}.validate`]:["string",D,q]}function M(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!S.$async)throw new Error("async format in sync schema");return(0,e._)`await ${x}(${c})`}return typeof T=="function"?(0,e._)`${x}(${c})`:(0,e._)`${x}.test(${c})`}}}};return rS.default=r,rS}var R4;function Ute(){if(R4)return nS;R4=1,Object.defineProperty(nS,"__esModule",{value:!0});const t=[Lte().default];return nS.default=t,nS}var wh={},A4;function qte(){return A4||(A4=1,Object.defineProperty(wh,"__esModule",{value:!0}),wh.contentVocabulary=wh.metadataVocabulary=void 0,wh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],wh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),wh}var M4;function Vte(){if(M4)return C1;M4=1,Object.defineProperty(C1,"__esModule",{value:!0});const e=dte(),t=_te(),r=Ite(),i=Ute(),s=qte(),l=[e.default,t.default,(0,r.default)(),i.default,s.metadataVocabulary,s.contentVocabulary];return C1.default=l,C1}var aS={},Tv={},j4;function Fte(){if(j4)return Tv;j4=1,Object.defineProperty(Tv,"__esModule",{value:!0}),Tv.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Tv.DiscrError=e={})),Tv}var k4;function Bte(){if(k4)return aS;k4=1,Object.defineProperty(aS,"__esModule",{value:!0});const e=dn(),t=Fte(),r=PR(),i=i2(),s=qn(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:f,tagName:d}})=>f===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:f,tag:d,tagName:h}})=>(0,e._)`{error: ${f}, tag: ${h}, tagValue: ${d}}`},code(f){const{gen:d,data:h,schema:m,parentSchema:g,it:v}=f,{oneOf:S}=g;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=m.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!S)throw new Error("discriminator: requires oneOf keyword");const _=d.let("valid",!1),E=d.const("tag",(0,e._)`${h}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${E} == "string"`,()=>R(),()=>f.error(!1,{discrError:t.DiscrError.Tag,tag:E,tagName:b})),f.ok(_);function R(){const x=T();d.if(!1);for(const O in x)d.elseIf((0,e._)`${E} === ${O}`),d.assign(_,w(x[O]));d.else(),f.error(!1,{discrError:t.DiscrError.Mapping,tag:E,tagName:b}),d.endIf()}function w(x){const O=d.name("valid"),C=f.subschema({keyword:"oneOf",schemaProp:x},O);return f.mergeEvaluated(C,e.Name),O}function T(){var x;const O={},C=D(g);let M=!0;for(let L=0;L<S.length;L++){let V=S[L];if(V?.$ref&&!(0,s.schemaHasRulesButRef)(V,v.self.RULES)){const re=V.$ref;if(V=r.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,re),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new i.default(v.opts.uriResolver,v.baseId,re)}const F=(x=V?.properties)===null||x===void 0?void 0:x[b];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);M=M&&(C||D(V)),$(F,L)}if(!M)throw new Error(`discriminator: "${b}" must be required`);return O;function D({required:L}){return Array.isArray(L)&&L.includes(b)}function $(L,V){if(L.const)q(L.const,V);else if(L.enum)for(const F of L.enum)q(F,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function q(L,V){if(typeof L!="string"||L in O)throw new Error(`discriminator: "${b}" values must be unique strings`);O[L]=V}}}};return aS.default=c,aS}const Hte="http://json-schema.org/draft-07/schema#",Gte="http://json-schema.org/draft-07/schema#",Kte="Core schema meta-schema",Yte={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Zte=["object","boolean"],Xte={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Qte={$schema:Hte,$id:Gte,title:Kte,definitions:Yte,type:Zte,properties:Xte,default:!0};var D4;function LR(){return D4||(D4=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=ute(),i=Vte(),s=Bte(),l=Qte,c=["/properties"],f="http://json-schema.org/draft-07/schema";class d extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,c):l;this.addMetaSchema(b,f,!1),this.refs["http://json-schema.org/schema"]=f}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var h=a2();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var m=dn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var g=$R();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var v=i2();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(w1,w1.exports)),w1.exports}var Wte=LR();const P9=$l(Wte);var iS={exports:{}},c_={},N4;function Jte(){return N4||(N4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(L,V){return{validate:L,compare:V}}e.fullFormats={date:t(l,c),time:t(d(!0),h),"date-time":t(v(!0),S),"iso-time":t(d(),m),"iso-date-time":t(v(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:q,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:C},int64:{type:"number",validate:M},float:{type:"number",validate:D},double:{type:"number",validate:D},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,S),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(L){return L%4===0&&(L%100!==0||L%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l(L){const V=i.exec(L);if(!V)return!1;const F=+V[1],re=+V[2],ae=+V[3];return re>=1&&re<=12&&ae>=1&&ae<=(re===2&&r(F)?29:s[re])}function c(L,V){if(L&&V)return L>V?1:L<V?-1:0}const f=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(L){return function(F){const re=f.exec(F);if(!re)return!1;const ae=+re[1],K=+re[2],B=+re[3],Y=re[4],fe=re[5]==="-"?-1:1,ie=+(re[6]||0),N=+(re[7]||0);if(ie>23||N>59||L&&!Y)return!1;if(ae<=23&&K<=59&&B<60)return!0;const I=K-N*fe,U=ae-ie*fe-(I<0?1:0);return(U===23||U===-1)&&(I===59||I===-1)&&B<61}}function h(L,V){if(!(L&&V))return;const F=new Date("2020-01-01T"+L).valueOf(),re=new Date("2020-01-01T"+V).valueOf();if(F&&re)return F-re}function m(L,V){if(!(L&&V))return;const F=f.exec(L),re=f.exec(V);if(F&&re)return L=F[1]+F[2]+F[3],V=re[1]+re[2]+re[3],L>V?1:L<V?-1:0}const g=/t|\s/i;function v(L){const V=d(L);return function(re){const ae=re.split(g);return ae.length===2&&l(ae[0])&&V(ae[1])}}function S(L,V){if(!(L&&V))return;const F=new Date(L).valueOf(),re=new Date(V).valueOf();if(F&&re)return F-re}function b(L,V){if(!(L&&V))return;const[F,re]=L.split(g),[ae,K]=V.split(g),B=c(F,ae);if(B!==void 0)return B||h(re,K)}const _=/\/|:/,E=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function R(L){return _.test(L)&&E.test(L)}const w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(L){return w.lastIndex=0,w.test(L)}const x=-2147483648,O=2**31-1;function C(L){return Number.isInteger(L)&&L<=O&&L>=x}function M(L){return Number.isInteger(L)}function D(){return!0}const $=/[^\\]\\Z/;function q(L){if($.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}})(c_)),c_}var f_={},z4;function ene(){return z4||(z4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=LR(),r=dn(),i=r.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:f,schemaCode:d})=>(0,r.str)`should be ${s[f].okStr} ${d}`,params:({keyword:f,schemaCode:d})=>(0,r._)`{comparison: ${s[f].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(f){const{gen:d,data:h,schemaCode:m,keyword:g,it:v}=f,{opts:S,self:b}=v;if(!S.validateFormats)return;const _=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");_.$data?E():R();function E(){const T=d.scopeValue("formats",{ref:b.formats,code:S.code.formats}),x=d.const("fmt",(0,r._)`${T}[${_.schemaCode}]`);f.fail$data((0,r.or)((0,r._)`typeof ${x} != "object"`,(0,r._)`${x} instanceof RegExp`,(0,r._)`typeof ${x}.compare != "function"`,w(x)))}function R(){const T=_.schema,x=b.formats[T];if(!x||x===!0)return;if(typeof x!="object"||x instanceof RegExp||typeof x.compare!="function")throw new Error(`"${g}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:x,code:S.code.formats?(0,r._)`${S.code.formats}${(0,r.getProperty)(T)}`:void 0});f.fail$data(w(O))}function w(T){return(0,r._)`${T}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const c=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=c})(f_)),f_}var $4;function tne(){return $4||($4=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Jte(),i=ene(),s=dn(),l=new s.Name("fullFormats"),c=new s.Name("fastFormats"),f=(h,m={keywords:!0})=>{if(Array.isArray(m))return d(h,m,r.fullFormats,l),h;const[g,v]=m.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,l],S=m.formats||r.formatNames;return d(h,S,g,v),m.keywords&&(0,i.default)(h),h};f.get=(h,m="full")=>{const v=(m==="fast"?r.fastFormats:r.fullFormats)[h];if(!v)throw new Error(`Unknown format "${h}"`);return v};function d(h,m,g,v){var S,b;(S=(b=h.opts.code).formats)!==null&&S!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${v}`);for(const _ of m)h.addFormat(_,g[_])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(iS,iS.exports)),iS.exports}var nne=tne();const rne=$l(nne);function ane(){const e=new P9({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return rne(e),e}class ine{constructor(t){this._ajv=t??ane()}getValidator(t){const r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class one{constructor(t){this._client=t}async*callToolStream(t,r=t2,i){const s=this._client,l={...i,task:i?.task??(s.isToolTask(t.name)?{}:void 0)},c=s.requestStream({method:"tools/call",params:t},r,l),f=s.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&f){const h=d.result;if(!h.structuredContent&&!h.isError){yield{type:"error",error:new It(an.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(h.structuredContent)try{const m=f(h.structuredContent);if(!m.valid){yield{type:"error",error:new It(an.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof It){yield{type:"error",error:m};return}yield{type:"error",error:new It(an.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,r){return this._client.getTask({taskId:t},r)}async getTaskResult(t,r,i){return this._client.getTaskResult({taskId:t},r,i)}async listTasks(t,r){return this._client.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._client.cancelTask({taskId:t},r)}requestStream(t,r,i){return this._client.requestStream(t,r,i)}}function sne(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break}}function lne(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break}}function NS(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const r=t,i=e.properties;for(const s of Object.keys(i)){const l=i[s];r[s]===void 0&&Object.prototype.hasOwnProperty.call(l,"default")&&(r[s]=l.default),r[s]!==void 0&&NS(l,r[s])}}if(Array.isArray(e.anyOf))for(const r of e.anyOf)typeof r!="boolean"&&NS(r,t);if(Array.isArray(e.oneOf))for(const r of e.oneOf)typeof r!="boolean"&&NS(r,t)}}function une(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}class cne extends Kee{constructor(t,r){super(r),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new ine,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",w9,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",v9,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",m9,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new one(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Yee(this._capabilities,t)}setRequestHandler(t,r){const s=V6(t)?.method;if(!s)throw new Error("Schema is missing a method literal");let l;if(Qw(s)){const f=s;l=f._zod?.def?.value??f.value}else{const f=s;l=f._def?.value??f.value}if(typeof l!="string")throw new Error("Schema method literal must be a string");const c=l;if(c==="elicitation/create"){const f=async(d,h)=>{const m=jc(C9,d);if(!m.success){const w=m.error instanceof Error?m.error.message:String(m.error);throw new It(an.InvalidParams,`Invalid elicitation request: ${w}`)}const{params:g}=m.data;g.mode=g.mode??"form";const{supportsFormMode:v,supportsUrlMode:S}=une(this._capabilities.elicitation);if(g.mode==="form"&&!v)throw new It(an.InvalidParams,"Client does not support form-mode elicitation requests");if(g.mode==="url"&&!S)throw new It(an.InvalidParams,"Client does not support URL-mode elicitation requests");const b=await Promise.resolve(r(d,h));if(g.task){const w=jc(fb,b);if(!w.success){const T=w.error instanceof Error?w.error.message:String(w.error);throw new It(an.InvalidParams,`Invalid task creation result: ${T}`)}return w.data}const _=jc(O9,b);if(!_.success){const w=_.error instanceof Error?_.error.message:String(_.error);throw new It(an.InvalidParams,`Invalid elicitation result: ${w}`)}const E=_.data,R=g.mode==="form"?g.requestedSchema:void 0;if(g.mode==="form"&&E.action==="accept"&&E.content&&R&&this._capabilities.elicitation?.form?.applyDefaults)try{NS(R,E.content)}catch{}return E};return super.setRequestHandler(t,f)}if(c==="sampling/createMessage"){const f=async(d,h)=>{const m=jc(x9,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new It(an.InvalidParams,`Invalid sampling request: ${E}`)}const{params:g}=m.data,v=await Promise.resolve(r(d,h));if(g.task){const E=jc(fb,v);if(!E.success){const R=E.error instanceof Error?E.error.message:String(E.error);throw new It(an.InvalidParams,`Invalid task creation result: ${R}`)}return E.data}const b=g.tools||g.toolChoice?T9:_9,_=jc(b,v);if(!_.success){const E=_.error instanceof Error?_.error.message:String(_.error);throw new It(an.InvalidParams,`Invalid sampling result: ${E}`)}return _.data};return super.setRequestHandler(t,f)}return super.setRequestHandler(t,r)}assertCapability(t,r){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${r})`)}async connect(t,r){if(await super.connect(t),t.sessionId===void 0)try{const i=await this.request({method:"initialize",params:{protocolVersion:Ww,capabilities:this._capabilities,clientInfo:this._clientInfo}},o9,r);if(i===void 0)throw new Error(`Server sent invalid initialize result: ${i}`);if(!pJ.includes(i.protocolVersion))throw new Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(i){throw this.close(),i}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){sne(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&lne(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Dp,t)}async complete(t,r){return this.request({method:"completion/complete",params:t},R9,r)}async setLoggingLevel(t,r){return this.request({method:"logging/setLevel",params:{level:t}},Dp,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},y9,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},g9,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},d9,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},h9,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},p9,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},Dp,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},Dp,r)}async callTool(t,r=t2,i){if(this.isToolTaskRequired(t.name))throw new It(an.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const s=await this.request({method:"tools/call",params:t},r,i),l=this.getToolOutputValidator(t.name);if(l){if(!s.structuredContent&&!s.isError)throw new It(an.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(s.structuredContent)try{const c=l(s.structuredContent);if(!c.valid)throw new It(an.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof It?c:new It(an.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return s}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const r of t){if(r.outputSchema){const s=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,s)}const i=r.execution?.taskSupport;(i==="required"||i==="optional")&&this._cachedKnownTaskTools.add(r.name),i==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,r){const i=await this.request({method:"tools/list",params:t},S9,r);return this.cacheToolMetadata(i.tools),i}_setupListChangedHandler(t,r,i,s){const l=lee.safeParse(i);if(!l.success)throw new Error(`Invalid ${t} listChanged options: ${l.error.message}`);if(typeof i.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:c,debounceMs:f}=l.data,{onChanged:d}=i,h=async()=>{if(!c){d(null,null);return}try{const g=await s();d(null,g)}catch(g){const v=g instanceof Error?g:new Error(String(g));d(v,null)}},m=()=>{if(f){const g=this._listChangedDebounceTimers.get(t);g&&clearTimeout(g);const v=setTimeout(h,f);this._listChangedDebounceTimers.set(t,v)}else h()};this.setNotificationHandler(r,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function lC(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function fne(e=fetch,t){return t?async(r,i)=>{const s={...t,...i,headers:i?.headers?{...lC(t.headers),...lC(i.headers)}:t.headers};return e(r,s)}:e}let UR;UR=globalThis.crypto;async function dne(e){return(await UR).getRandomValues(new Uint8Array(e))}async function hne(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%t.length;let i="";for(;i.length<e;){const s=await dne(e-i.length);for(const l of s)l<r&&(i+=t[l%t.length])}return i}async function pne(e){return await hne(e)}async function mne(e){const t=await(await UR).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function gne(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await pne(e),r=await mne(t);return{code_verifier:t,code_challenge:r}}const hi=SW().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:dJ.custom,message:"URL must be parseable",fatal:!0}),xY}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),yne=mi({resource:be().url(),authorization_servers:et(hi).optional(),jwks_uri:be().url().optional(),scopes_supported:et(be()).optional(),bearer_methods_supported:et(be()).optional(),resource_signing_alg_values_supported:et(be()).optional(),resource_name:be().optional(),resource_documentation:be().optional(),resource_policy_uri:be().url().optional(),resource_tos_uri:be().url().optional(),tls_client_certificate_bound_access_tokens:jr().optional(),authorization_details_types_supported:et(be()).optional(),dpop_signing_alg_values_supported:et(be()).optional(),dpop_bound_access_tokens_required:jr().optional()}),I9=mi({issuer:be(),authorization_endpoint:hi,token_endpoint:hi,registration_endpoint:hi.optional(),scopes_supported:et(be()).optional(),response_types_supported:et(be()),response_modes_supported:et(be()).optional(),grant_types_supported:et(be()).optional(),token_endpoint_auth_methods_supported:et(be()).optional(),token_endpoint_auth_signing_alg_values_supported:et(be()).optional(),service_documentation:hi.optional(),revocation_endpoint:hi.optional(),revocation_endpoint_auth_methods_supported:et(be()).optional(),revocation_endpoint_auth_signing_alg_values_supported:et(be()).optional(),introspection_endpoint:be().optional(),introspection_endpoint_auth_methods_supported:et(be()).optional(),introspection_endpoint_auth_signing_alg_values_supported:et(be()).optional(),code_challenge_methods_supported:et(be()).optional(),client_id_metadata_document_supported:jr().optional()}),vne=mi({issuer:be(),authorization_endpoint:hi,token_endpoint:hi,userinfo_endpoint:hi.optional(),jwks_uri:hi,registration_endpoint:hi.optional(),scopes_supported:et(be()).optional(),response_types_supported:et(be()),response_modes_supported:et(be()).optional(),grant_types_supported:et(be()).optional(),acr_values_supported:et(be()).optional(),subject_types_supported:et(be()),id_token_signing_alg_values_supported:et(be()),id_token_encryption_alg_values_supported:et(be()).optional(),id_token_encryption_enc_values_supported:et(be()).optional(),userinfo_signing_alg_values_supported:et(be()).optional(),userinfo_encryption_alg_values_supported:et(be()).optional(),userinfo_encryption_enc_values_supported:et(be()).optional(),request_object_signing_alg_values_supported:et(be()).optional(),request_object_encryption_alg_values_supported:et(be()).optional(),request_object_encryption_enc_values_supported:et(be()).optional(),token_endpoint_auth_methods_supported:et(be()).optional(),token_endpoint_auth_signing_alg_values_supported:et(be()).optional(),display_values_supported:et(be()).optional(),claim_types_supported:et(be()).optional(),claims_supported:et(be()).optional(),service_documentation:be().optional(),claims_locales_supported:et(be()).optional(),ui_locales_supported:et(be()).optional(),claims_parameter_supported:jr().optional(),request_parameter_supported:jr().optional(),request_uri_parameter_supported:jr().optional(),require_request_uri_registration:jr().optional(),op_policy_uri:hi.optional(),op_tos_uri:hi.optional(),client_id_metadata_document_supported:jr().optional()}),bne=rt({...vne.shape,...I9.pick({code_challenge_methods_supported:!0}).shape}),Sne=rt({access_token:be(),id_token:be().optional(),token_type:be(),expires_in:hJ().optional(),scope:be().optional(),refresh_token:be().optional()}).strip(),wne=rt({error:be(),error_description:be().optional(),error_uri:be().optional()}),P4=hi.optional().or(_t("").transform(()=>{})),Ene=rt({redirect_uris:et(hi),token_endpoint_auth_method:be().optional(),grant_types:et(be()).optional(),response_types:et(be()).optional(),client_name:be().optional(),client_uri:hi.optional(),logo_uri:P4,scope:be().optional(),contacts:et(be()).optional(),tos_uri:P4,policy_uri:be().optional(),jwks_uri:hi.optional(),jwks:UW().optional(),software_id:be().optional(),software_version:be().optional(),software_statement:be().optional()}).strip(),xne=rt({client_id:be(),client_secret:be().optional(),client_id_issued_at:Yn().optional(),client_secret_expires_at:Yn().optional()}).strip(),_ne=Ene.merge(xne);rt({error:be(),error_description:be().optional()}).strip();rt({token:be(),token_type_hint:be().optional()}).strip();function Tne(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Cne({requestedResource:e,configuredResource:t}){const r=typeof e=="string"?new URL(e):new URL(e.href),i=typeof t=="string"?new URL(t):new URL(t.href);if(r.origin!==i.origin||r.pathname.length<i.pathname.length)return!1;const s=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",l=i.pathname.endsWith("/")?i.pathname:i.pathname+"/";return s.startsWith(l)}class La extends Error{constructor(t,r){super(t),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class uC extends La{}uC.errorCode="invalid_request";class fw extends La{}fw.errorCode="invalid_client";class dw extends La{}dw.errorCode="invalid_grant";class hw extends La{}hw.errorCode="unauthorized_client";class cC extends La{}cC.errorCode="unsupported_grant_type";class fC extends La{}fC.errorCode="invalid_scope";class dC extends La{}dC.errorCode="access_denied";class im extends La{}im.errorCode="server_error";class hC extends La{}hC.errorCode="temporarily_unavailable";class pC extends La{}pC.errorCode="unsupported_response_type";class mC extends La{}mC.errorCode="unsupported_token_type";class gC extends La{}gC.errorCode="invalid_token";class yC extends La{}yC.errorCode="method_not_allowed";class vC extends La{}vC.errorCode="too_many_requests";class pw extends La{}pw.errorCode="invalid_client_metadata";class bC extends La{}bC.errorCode="insufficient_scope";class SC extends La{}SC.errorCode="invalid_target";const One={[uC.errorCode]:uC,[fw.errorCode]:fw,[dw.errorCode]:dw,[hw.errorCode]:hw,[cC.errorCode]:cC,[fC.errorCode]:fC,[dC.errorCode]:dC,[im.errorCode]:im,[hC.errorCode]:hC,[pC.errorCode]:pC,[mC.errorCode]:mC,[gC.errorCode]:gC,[yC.errorCode]:yC,[vC.errorCode]:vC,[pw.errorCode]:pw,[bC.errorCode]:bC,[SC.errorCode]:SC};class mp extends Error{constructor(t){super(t??"Unauthorized")}}function Rne(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const d_="code",h_="S256";function Ane(e,t){const r=e.client_secret!==void 0;return t.length===0?r?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Rne(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:r&&t.includes("client_secret_basic")?"client_secret_basic":r&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":r?"client_secret_post":"none"}function Mne(e,t,r,i){const{client_id:s,client_secret:l}=t;switch(e){case"client_secret_basic":jne(s,l,r);return;case"client_secret_post":kne(s,l,i);return;case"none":Dne(s,i);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function jne(e,t,r){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const i=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${i}`)}function kne(e,t,r){r.set("client_id",e),t&&r.set("client_secret",t)}function Dne(e,t){t.set("client_id",e)}async function L9(e){const t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{const i=wne.parse(JSON.parse(r)),{error:s,error_description:l,error_uri:c}=i,f=One[s]||im;return new f(l||"",c)}catch(i){const s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${i}. Raw body: ${r}`;return new im(s)}}async function oS(e,t){try{return await p_(e,t)}catch(r){if(r instanceof fw||r instanceof hw)return await e.invalidateCredentials?.("all"),await p_(e,t);if(r instanceof dw)return await e.invalidateCredentials?.("tokens"),await p_(e,t);throw r}}async function p_(e,{serverUrl:t,authorizationCode:r,scope:i,resourceMetadataUrl:s,fetchFn:l}){let c,f;try{c=await $ne(t,{resourceMetadataUrl:s},l),c.authorization_servers&&c.authorization_servers.length>0&&(f=c.authorization_servers[0])}catch{}f||(f=new URL("/",t));const d=await zne(t,e,c),h=await qne(f,{fetchFn:l});let m=await Promise.resolve(e.clientInformation());if(!m){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const E=h?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!Nne(R))throw new pw(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(E&&R)m={client_id:R},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const T=await Gne(f,{metadata:h,clientMetadata:e.clientMetadata,fetchFn:l});await e.saveClientInformation(T),m=T}}const g=!e.redirectUrl;if(r!==void 0||g){const E=await Hne(e,f,{metadata:h,resource:d,authorizationCode:r,fetchFn:l});return await e.saveTokens(E),"AUTHORIZED"}const v=await e.tokens();if(v?.refresh_token)try{const E=await Bne(f,{metadata:h,clientInformation:m,refreshToken:v.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:l});return await e.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof La)||E instanceof im))throw E}const S=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:_}=await Vne(f,{metadata:h,clientInformation:m,state:S,redirectUrl:e.redirectUrl,scope:i||c?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(_),await e.redirectToAuthorization(b),"REDIRECT"}function Nne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function zne(e,t,r){const i=Tne(e);if(t.validateResourceURL)return await t.validateResourceURL(i,r?.resource);if(r){if(!Cne({requestedResource:i,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${i} (or origin)`);return new URL(r.resource)}}function I4(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[r,i]=t.split(" ");if(r.toLowerCase()!=="bearer"||!i)return{};const s=m_(e,"resource_metadata")||void 0;let l;if(s)try{l=new URL(s)}catch{}const c=m_(e,"scope")||void 0,f=m_(e,"error")||void 0;return{resourceMetadataUrl:l,scope:c,error:f}}function m_(e,t){const r=e.headers.get("WWW-Authenticate");if(!r)return null;const i=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),s=r.match(i);return s?s[1]||s[2]:null}async function $ne(e,t,r=fetch){const i=await Lne(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!i||i.status===404)throw await i?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!i.ok)throw await i.body?.cancel(),new Error(`HTTP ${i.status} trying to load well-known OAuth protected resource metadata.`);return yne.parse(await i.json())}async function qR(e,t,r=fetch){try{return await r(e,{headers:t})}catch(i){if(i instanceof TypeError)return t?qR(e,void 0,r):void 0;throw i}}function Pne(e,t="",r={}){return t.endsWith("/")&&(t=t.slice(0,-1)),r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function L4(e,t,r=fetch){return await qR(e,{"MCP-Protocol-Version":t},r)}function Ine(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Lne(e,t,r,i){const s=new URL(e),l=i?.protocolVersion??Ww;let c;if(i?.metadataUrl)c=new URL(i.metadataUrl);else{const d=Pne(t,s.pathname);c=new URL(d,i?.metadataServerUrl??s),c.search=s.search}let f=await L4(c,l,r);if(!i?.metadataUrl&&Ine(f,s.pathname)){const d=new URL(`/.well-known/${t}`,s);f=await L4(d,l,r)}return f}function Une(e){const t=typeof e=="string"?new URL(e):e,r=t.pathname!=="/",i=[];if(!r)return i.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),i.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),i;let s=t.pathname;return s.endsWith("/")&&(s=s.slice(0,-1)),i.push({url:new URL(`/.well-known/oauth-authorization-server${s}`,t.origin),type:"oauth"}),i.push({url:new URL(`/.well-known/openid-configuration${s}`,t.origin),type:"oidc"}),i.push({url:new URL(`${s}/.well-known/openid-configuration`,t.origin),type:"oidc"}),i}async function qne(e,{fetchFn:t=fetch,protocolVersion:r=Ww}={}){const i={"MCP-Protocol-Version":r,Accept:"application/json"},s=Une(e);for(const{url:l,type:c}of s){const f=await qR(l,i,t);if(f){if(!f.ok){if(await f.body?.cancel(),f.status>=400&&f.status<500)continue;throw new Error(`HTTP ${f.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}return c==="oauth"?I9.parse(await f.json()):bne.parse(await f.json())}}}async function Vne(e,{metadata:t,clientInformation:r,redirectUrl:i,scope:s,state:l,resource:c}){let f;if(t){if(f=new URL(t.authorization_endpoint),!t.response_types_supported.includes(d_))throw new Error(`Incompatible auth server: does not support response type ${d_}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(h_))throw new Error(`Incompatible auth server: does not support code challenge method ${h_}`)}else f=new URL("/authorize",e);const d=await gne(),h=d.code_verifier,m=d.code_challenge;return f.searchParams.set("response_type",d_),f.searchParams.set("client_id",r.client_id),f.searchParams.set("code_challenge",m),f.searchParams.set("code_challenge_method",h_),f.searchParams.set("redirect_uri",String(i)),l&&f.searchParams.set("state",l),s&&f.searchParams.set("scope",s),s?.includes("offline_access")&&f.searchParams.append("prompt","consent"),c&&f.searchParams.set("resource",c.href),{authorizationUrl:f,codeVerifier:h}}function Fne(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function U9(e,{metadata:t,tokenRequestParams:r,clientInformation:i,addClientAuthentication:s,resource:l,fetchFn:c}){const f=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(l&&r.set("resource",l.href),s)await s(d,r,f,t);else if(i){const m=t?.token_endpoint_auth_methods_supported??[],g=Ane(i,m);Mne(g,i,d,r)}const h=await(c??fetch)(f,{method:"POST",headers:d,body:r});if(!h.ok)throw await L9(h);return Sne.parse(await h.json())}async function Bne(e,{metadata:t,clientInformation:r,refreshToken:i,resource:s,addClientAuthentication:l,fetchFn:c}){const f=new URLSearchParams({grant_type:"refresh_token",refresh_token:i}),d=await U9(e,{metadata:t,tokenRequestParams:f,clientInformation:r,addClientAuthentication:l,resource:s,fetchFn:c});return{refresh_token:i,...d}}async function Hne(e,t,{metadata:r,resource:i,authorizationCode:s,fetchFn:l}={}){const c=e.clientMetadata.scope;let f;if(e.prepareTokenRequest&&(f=await e.prepareTokenRequest(c)),!f){if(!s)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const h=await e.codeVerifier();f=Fne(s,h,e.redirectUrl)}const d=await e.clientInformation();return U9(t,{metadata:r,tokenRequestParams:f,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:i,fetchFn:l})}async function Gne(e,{metadata:t,clientMetadata:r,fetchFn:i}){let s;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");s=new URL(t.registration_endpoint)}else s=new URL("/register",e);const l=await(i??fetch)(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!l.ok)throw await L9(l);return _ne.parse(await l.json())}class U4 extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function g_(e){}function Kne(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=g_,onError:r=g_,onRetry:i=g_,onComment:s}=e;let l="",c=!0,f,d="",h="";function m(_){const E=c?_.replace(/^\xEF\xBB\xBF/,""):_,[R,w]=Yne(`${l}${E}`);for(const T of R)g(T);l=w,c=!1}function g(_){if(_===""){S();return}if(_.startsWith(":")){s&&s(_.slice(_.startsWith(": ")?2:1));return}const E=_.indexOf(":");if(E!==-1){const R=_.slice(0,E),w=_[E+1]===" "?2:1,T=_.slice(E+w);v(R,T,_);return}v(_,"",_)}function v(_,E,R){switch(_){case"event":h=E;break;case"data":d=`${d}${E}
56
+ `;break;case"id":f=E.includes("\0")?void 0:E;break;case"retry":/^\d+$/.test(E)?i(parseInt(E,10)):r(new U4(`Invalid \`retry\` value: "${E}"`,{type:"invalid-retry",value:E,line:R}));break;default:r(new U4(`Unknown field "${_.length>20?`${_.slice(0,20)}…`:_}"`,{type:"unknown-field",field:_,value:E,line:R}));break}}function S(){d.length>0&&t({id:f,event:h||void 0,data:d.endsWith(`
57
+ `)?d.slice(0,-1):d}),f=void 0,d="",h=""}function b(_={}){l&&_.consume&&g(l),c=!0,f=void 0,d="",h="",l=""}return{feed:m,reset:b}}function Yne(e){const t=[];let r="",i=0;for(;i<e.length;){const s=e.indexOf("\r",i),l=e.indexOf(`
58
+ `,i);let c=-1;if(s!==-1&&l!==-1?c=Math.min(s,l):s!==-1?s===e.length-1?c=-1:c=s:l!==-1&&(c=l),c===-1){r=e.slice(i);break}else{const f=e.slice(i,c);t.push(f),i=c+1,e[i-1]==="\r"&&e[i]===`
59
+ `&&i++}}return[t,r]}class Zne extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let s;super({start(l){s=Kne({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){s.feed(l)}})}}const Xne={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class gp extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class Qne{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=fne(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Xne}async _authThenStart(){if(!this._authProvider)throw new mp("No auth provider");let t;try{t=await oS(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new mp;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=lC(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const s=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!s.ok){if(await s.body?.cancel(),s.status===401&&this._authProvider)return await this._authThenStart();if(s.status===405)return;throw new gp(s.status,`Failed to open SSE stream: ${s.statusText}`)}this._handleSseStream(s.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,s=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),s)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const s=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},s)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:s,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Zne({onRetry:S=>{this._serverRetryMs=S}})).getReader();for(;;){const{value:S,done:b}=await m.read();if(b)break;if(S.id&&(c=S.id,f=!0,s?.(S.id)),!!S.data&&(!S.event||S.event==="message"))try{const _=Jx.parse(JSON.parse(S.data));$v(_)&&(d=!0,l!==void 0&&(_.id=l)),this.onmessage?.(_)}catch(_){this.onerror?.(_)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:s,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:s,replayMessageId:l},0)}catch(S){this.onerror?.(new Error(`Failed to reconnect: ${S instanceof Error?S.message:String(S)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new mp("No auth provider");if(await oS(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mp("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:s}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:sC(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new gp(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:S,scope:b}=I4(f);if(this._resourceMetadataUrl=S,this._scope=b,await oS(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mp;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:S,scope:b,error:_}=I4(f);if(_==="insufficient_scope"){const E=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===E)throw new gp(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),S&&(this._resourceMetadataUrl=S),this._lastUpscopingHeader=E??void 0,await oS(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new mp;return this.send(t)}}throw new gp(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),MJ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,g=f.headers.get("content-type");if(m)if(g?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:s},!1);else if(g?.includes("application/json")){const v=await f.json(),S=Array.isArray(v)?v.map(b=>Jx.parse(b)):[Jx.parse(v)];for(const b of S)this.onmessage?.(b)}else throw await f.body?.cancel(),new gp(-1,`Unexpected content type: ${g}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new gp(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class Wne{client=null;transport=null;async connect(t){const r=typeof t=="string"?new URL(t):t;this.transport=new Qne(r),this.client=new cne({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");try{return(await this.client.listTools()).tools}catch(t){if(t instanceof Error&&t.message.includes("MCP error -32601: Method not found"))return[];throw t}}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");const i=await this.client.callTool({name:t,arguments:r??{}}),{_meta:s,...l}=i;return{...l,meta:s}}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Om=new Wne;Om.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const Jne={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:void 0,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},q9=()=>{const{data:e}=WN({queryKey:["list-tools"],queryFn:()=>Om.listTools()});return e},ere=()=>Om.getServerInfo(),tre=()=>{const{setToolData:e}=xm();return Aq({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});const i=await Om.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...Jne,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},VR=()=>{const[e]=uR();return q9().find(r=>r.name===e)??null},ff=()=>{const e=VR();if(!e)throw new Error("No tool is currently selected");return e},V9=e=>WN({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Om.readResource(e)}});const F9=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();const nre=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const rre=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase());const q4=e=>{const t=rre(e);return t.charAt(0).toUpperCase()+t.slice(1)};var are={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ire=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ore=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...are,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:F9("lucide",s),...!l&&!ire(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const lo=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(ore,{ref:l,iconNode:t,className:F9(`lucide-${nre(q4(e))}`,`lucide-${e}`,i),...s}));return r.displayName=q4(e),r};const sre=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],FR=lo("check",sre);const lre=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],B9=lo("chevron-down",lre);const ure=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],cre=lo("chevron-up",ure);const fre=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],dre=lo("chevrons-up-down",fre);const hre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],pre=lo("circle-alert",hre);const mre=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],gre=lo("external-link",mre);const yre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],vre=lo("info",yre);const bre=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Sre=lo("loader-circle",bre);const wre=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Ere=lo("moon",wre);const xre=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],_re=lo("play",xre);const Tre=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Cre=lo("search",Tre);const Ore=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Rre=lo("sun",Ore);const Are=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Mre=lo("trash",Are);const jre=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kre=lo("x",jre);function o2(){return typeof window<"u"}function df(e){return BR(e)?(e.nodeName||"").toLowerCase():"#document"}function ha(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Il(e){var t;return(t=(BR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function BR(e){return o2()?e instanceof Node||e instanceof ha(e).Node:!1}function ir(e){return o2()?e instanceof Element||e instanceof ha(e).Element:!1}function Gr(e){return o2()?e instanceof HTMLElement||e instanceof ha(e).HTMLElement:!1}function wC(e){return!o2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ha(e).ShadowRoot}const Dre=new Set(["inline","contents"]);function rp(e){const{overflow:t,overflowX:r,overflowY:i,display:s}=Qo(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!Dre.has(s)}const Nre=new Set(["table","td","th"]);function zre(e){return Nre.has(df(e))}const $re=[":popover-open",":modal"];function s2(e){return $re.some(t=>{try{return e.matches(t)}catch{return!1}})}const Pre=["transform","translate","scale","rotate","perspective"],Ire=["transform","translate","scale","rotate","perspective","filter"],Lre=["paint","layout","strict","content"];function HR(e){const t=l2(),r=ir(e)?Qo(e):e;return Pre.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ire.some(i=>(r.willChange||"").includes(i))||Lre.some(i=>(r.contain||"").includes(i))}function Ure(e){let t=uc(e);for(;Gr(t)&&!oc(t);){if(HR(t))return t;if(s2(t))return null;t=uc(t)}return null}function l2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qre=new Set(["html","body","#document"]);function oc(e){return qre.has(df(e))}function Qo(e){return ha(e).getComputedStyle(e)}function u2(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uc(e){if(df(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wC(e)&&e.host||Il(e);return wC(t)?t.host:t}function H9(e){const t=uc(e);return oc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&rp(t)?t:H9(t)}function Pc(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=H9(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),c=ha(s);if(l){const f=EC(c);return t.concat(c,c.visualViewport||[],rp(s)?s:[],f&&r?Pc(f):[])}return t.concat(s,Pc(s,[],r))}function EC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const V4={};function oo(e,t){const r=j.useRef(V4);return r.current===V4&&(r.current=e(t)),r}const y_=jb[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Vre=y_&&y_!==j.useLayoutEffect?y_:e=>e();function ot(e){const t=oo(Fre).current;return t.next=e,Vre(t.effect),t.trampoline}function Fre(){const e={next:void 0,callback:Bre,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Bre(){}const Hre=()=>{},ct=typeof document<"u"?j.useLayoutEffect:Hre;function xC(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Kv={};function Yb(e,t,r,i,s){let l={..._C(e,Kv)};return t&&(l=Pv(l,t)),r&&(l=Pv(l,r)),i&&(l=Pv(l,i)),s&&(l=Pv(l,s)),l}function Gre(e){if(e.length===0)return Kv;if(e.length===1)return _C(e[0],Kv);let t={..._C(e[0],Kv)};for(let r=1;r<e.length;r+=1)t=Pv(t,e[r]);return t}function Pv(e,t){return G9(t)?t(e):Kre(e,t)}function Kre(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=xC(e.style,i);break}case"className":{e[r]=K9(e.className,i);break}default:Yre(r,i)?e[r]=Zre(e[r],i):e[r]=i}}return e}function Yre(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),s=e.charCodeAt(2);return r===111&&i===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function G9(e){return typeof e=="function"}function _C(e,t){return G9(e)?e(t):e??Kv}function Zre(e,t){return t?e?r=>{if(Xre(r)){const s=r;TC(s);const l=t(s);return s.baseUIHandlerPrevented||e?.(s),l}const i=t(r);return e?.(r),i}:t:e}function TC(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function K9(e,t){return t?e?t+" "+e:t:e}function Xre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Si(e,...t){const r=new URL("https://base-ui.com/production-error");return r.searchParams.set("code",e.toString()),t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const Y9=j.createContext(void 0);function Z9(e=!1){const t=j.useContext(Y9);if(t===void 0&&!e)throw new Error(Si(16));return t}function Qre(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:s=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=s,!l&&r&&(h.tabIndex=t?s:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,s])}}function ap(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:s=!0}=e,l=j.useRef(null),c=Z9(!0)!==void 0,f=ot(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=Qre({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:s}),h=j.useCallback(()=>{const v=l.current;Wre(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);ct(h,[h]);const m=j.useCallback((v={})=>{const{onClick:S,onMouseDown:b,onKeyUp:_,onKeyDown:E,onPointerDown:R,...w}=v;return Yb({type:s?"button":void 0,onClick(x){if(t){x.preventDefault();return}S?.(x)},onMouseDown(x){t||b?.(x)},onKeyDown(x){if(t||(TC(x),E?.(x)),x.baseUIHandlerPrevented)return;const O=x.target===x.currentTarget&&!s&&!f()&&!t,C=x.key==="Enter",M=x.key===" ";O&&((M||C)&&x.preventDefault(),C&&S?.(x))},onKeyUp(x){t||(TC(x),_?.(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!s&&!t&&x.key===" "&&S?.(x)},onPointerDown(x){if(t){x.preventDefault();return}R?.(x)}},s?void 0:{role:"button"},d,w)},[t,d,s,f]),g=ot(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:g}}function Wre(e){return Gr(e)&&e.tagName==="BUTTON"}function cc(e,t,r,i){const s=oo(X9).current;return eae(s,e,t,r,i)&&Q9(s,[e,t,r,i]),s.callback}function Jre(e){const t=oo(X9).current;return tae(t,e)&&Q9(t,e),t.callback}function X9(){return{callback:null,cleanup:null,refs:[]}}function eae(e,t,r,i,s){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==s}function tae(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function Q9(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[s]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=i[s];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const nae=parseInt(j.version,10);function GR(e){return nae>=e}function F4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(GR(19)?r?.ref:t.ref)??null}function rae(e,t){const r={};for(const i in e){const s=e[i];if(t?.hasOwnProperty(i)){const l=t[i](s);l!=null&&Object.assign(r,l);continue}s===!0?r[`data-${i.toLowerCase()}`]="":s&&(r[`data-${i.toLowerCase()}`]=s.toString())}return r}function aae(e,t){return typeof e=="function"?e(t):e}function iae(e,t){return typeof e=="function"?e(t):e}function Ko(){}const om=Object.freeze([]),Da=Object.freeze({}),oae=500,sae={style:{transition:"none"}},W9="data-base-ui-click-trigger",lae={fallbackAxisSide:"none"},uae={fallbackAxisSide:"end"},cae={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function mr(e,t,r={}){const i=t.render,s=fae(t,r);if(r.enabled===!1)return null;const l=r.state??Da;return dae(e,i,s,l)}function fae(e,t={}){const{className:r,style:i,render:s}=e,{state:l=Da,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?aae(r,l):void 0,g=h?iae(i,l):void 0,v=h?rae(l,d):Da,S=h?xC(v,Array.isArray(f)?Gre(f):f)??Da:Da;return typeof document<"u"&&(h?Array.isArray(c)?S.ref=Jre([S.ref,F4(s),...c]):S.ref=cc(S.ref,F4(s),c):cc(null,null)),h?(m!==void 0&&(S.className=K9(S.className,m)),g!==void 0&&(S.style=xC(S.style,g)),S):Da}function dae(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const s=Yb(r,t.props);return s.ref=r.ref,j.cloneElement(t,s)}if(e&&typeof e=="string")return hae(e,r);throw new Error(Si(8))}function hae(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const pae=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:m}=ap({disabled:l,focusableWhenDisabled:c,native:f}),g=j.useMemo(()=>({disabled:l}),[l]);return mr("button",t,{state:g,ref:[r,m],props:[d,h]})});function J9(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=J9(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function KR(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=J9(e))&&(i&&(i+=" "),i+=t);return i}const B4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,H4=KR,vc=(e,t)=>r=>{var i;if(t?.variants==null)return H4(e,r?.class,r?.className);const{variants:s,defaultVariants:l}=t,c=Object.keys(s).map(h=>{const m=r?.[h],g=l?.[h];if(m===null)return null;const v=B4(m)||B4(g);return s[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[g,v]=m;return v===void 0||(h[g]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:g,className:v,...S}=m;return Object.entries(S).every(b=>{let[_,E]=b;return Array.isArray(E)?E.includes({...l,...f}[_]):{...l,...f}[_]===E})?[...h,g,v]:h},[]);return H4(e,c,d,r?.class,r?.className)},mae=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},gae=(e,t)=>({classGroupId:e,validator:t}),e$=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),mw="-",G4=[],yae="arbitrary..",vae=e=>{const t=Sae(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return bae(c);const f=c.split(mw),d=f[0]===""&&f.length>1?1:0;return t$(f,d,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=i[c],h=r[c];return d?h?mae(h,d):d:h||G4}return r[c]||G4}}},t$=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],l=r.nextPart.get(s);if(l){const h=t$(e,t+1,l);if(h)return h}const c=r.validators;if(c===null)return;const f=t===0?e.join(mw):e.slice(t).join(mw),d=c.length;for(let h=0;h<d;h++){const m=c[h];if(m.validator(f))return m.classGroupId}},bae=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?yae+i:void 0})(),Sae=e=>{const{theme:t,classGroups:r}=e;return wae(r,t)},wae=(e,t)=>{const r=e$();for(const i in e){const s=e[i];YR(s,r,i,t)}return r},YR=(e,t,r,i)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l];Eae(c,t,r,i)}},Eae=(e,t,r,i)=>{if(typeof e=="string"){xae(e,t,r);return}if(typeof e=="function"){_ae(e,t,r,i);return}Tae(e,t,r,i)},xae=(e,t,r)=>{const i=e===""?t:n$(t,e);i.classGroupId=r},_ae=(e,t,r,i)=>{if(Cae(e)){YR(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(gae(r,e))},Tae=(e,t,r,i)=>{const s=Object.entries(e),l=s.length;for(let c=0;c<l;c++){const[f,d]=s[c];YR(d,n$(t,f),r,i)}},n$=(e,t)=>{let r=e;const i=t.split(mw),s=i.length;for(let l=0;l<s;l++){const c=i[l];let f=r.nextPart.get(c);f||(f=e$(),r.nextPart.set(c,f)),r=f}return r},Cae=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Oae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const s=(l,c)=>{r[l]=c,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return s(l,c),c},set(l,c){l in r?r[l]=c:s(l,c)}}},CC="!",K4=":",Rae=[],Y4=(e,t,r,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),Aae=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=s=>{const l=[];let c=0,f=0,d=0,h;const m=s.length;for(let _=0;_<m;_++){const E=s[_];if(c===0&&f===0){if(E===K4){l.push(s.slice(d,_)),d=_+1;continue}if(E==="/"){h=_;continue}}E==="["?c++:E==="]"?c--:E==="("?f++:E===")"&&f--}const g=l.length===0?s:s.slice(d);let v=g,S=!1;g.endsWith(CC)?(v=g.slice(0,-1),S=!0):g.startsWith(CC)&&(v=g.slice(1),S=!0);const b=h&&h>d?h-d:void 0;return Y4(l,S,v,b)};if(t){const s=t+K4,l=i;i=c=>c.startsWith(s)?l(c.slice(s.length)):Y4(Rae,!1,c,void 0,!0)}if(r){const s=i;i=l=>r({className:l,parseClassName:s})}return i},Mae=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let s=[];for(let l=0;l<r.length;l++){const c=r[l],f=c[0]==="[",d=t.has(c);f||d?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(c)):s.push(c)}return s.length>0&&(s.sort(),i.push(...s)),i}},jae=e=>({cache:Oae(e.cacheSize),parseClassName:Aae(e),sortModifiers:Mae(e),...vae(e)}),kae=/\s+/,Dae=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,c=[],f=e.trim().split(kae);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:g,modifiers:v,hasImportantModifier:S,baseClassName:b,maybePostfixModifierPosition:_}=r(m);if(g){d=m+(d.length>0?" "+d:d);continue}let E=!!_,R=i(E?b.substring(0,_):b);if(!R){if(!E){d=m+(d.length>0?" "+d:d);continue}if(R=i(b),!R){d=m+(d.length>0?" "+d:d);continue}E=!1}const w=v.length===0?"":v.length===1?v[0]:l(v).join(":"),T=S?w+CC:w,x=T+R;if(c.indexOf(x)>-1)continue;c.push(x);const O=s(R,E);for(let C=0;C<O.length;++C){const M=O[C];c.push(T+M)}d=m+(d.length>0?" "+d:d)}return d},Nae=(...e)=>{let t=0,r,i,s="";for(;t<e.length;)(r=e[t++])&&(i=r$(r))&&(s&&(s+=" "),s+=i);return s},r$=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=r$(e[i]))&&(r&&(r+=" "),r+=t);return r},zae=(e,...t)=>{let r,i,s,l;const c=d=>{const h=t.reduce((m,g)=>g(m),e());return r=jae(h),i=r.cache.get,s=r.cache.set,l=f,f(d)},f=d=>{const h=i(d);if(h)return h;const m=Dae(d,r);return s(d,m),m};return l=c,(...d)=>l(Nae(...d))},$ae=[],Aa=e=>{const t=r=>r[e]||$ae;return t.isThemeGetter=!0,t},a$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,i$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pae=/^\d+\/\d+$/,Iae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lae=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qae=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yp=e=>Pae.test(e),Sn=e=>!!e&&!Number.isNaN(Number(e)),xc=e=>!!e&&Number.isInteger(Number(e)),v_=e=>e.endsWith("%")&&Sn(e.slice(0,-1)),tc=e=>Iae.test(e),Fae=()=>!0,Bae=e=>Lae.test(e)&&!Uae.test(e),o$=()=>!1,Hae=e=>qae.test(e),Gae=e=>Vae.test(e),Kae=e=>!pt(e)&&!mt(e),Yae=e=>Rm(e,u$,o$),pt=e=>a$.test(e),Eh=e=>Rm(e,c$,Bae),b_=e=>Rm(e,Jae,Sn),Z4=e=>Rm(e,s$,o$),Zae=e=>Rm(e,l$,Gae),sS=e=>Rm(e,f$,Hae),mt=e=>i$.test(e),Cv=e=>Am(e,c$),Xae=e=>Am(e,eie),X4=e=>Am(e,s$),Qae=e=>Am(e,u$),Wae=e=>Am(e,l$),lS=e=>Am(e,f$,!0),Rm=(e,t,r)=>{const i=a$.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},Am=(e,t,r=!1)=>{const i=i$.exec(e);return i?i[1]?t(i[1]):r:!1},s$=e=>e==="position"||e==="percentage",l$=e=>e==="image"||e==="url",u$=e=>e==="length"||e==="size"||e==="bg-size",c$=e=>e==="length",Jae=e=>e==="number",eie=e=>e==="family-name",f$=e=>e==="shadow",tie=()=>{const e=Aa("color"),t=Aa("font"),r=Aa("text"),i=Aa("font-weight"),s=Aa("tracking"),l=Aa("leading"),c=Aa("breakpoint"),f=Aa("container"),d=Aa("spacing"),h=Aa("radius"),m=Aa("shadow"),g=Aa("inset-shadow"),v=Aa("text-shadow"),S=Aa("drop-shadow"),b=Aa("blur"),_=Aa("perspective"),E=Aa("aspect"),R=Aa("ease"),w=Aa("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...x(),mt,pt],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[mt,pt,d],$=()=>[yp,"full","auto",...D()],q=()=>[xc,"none","subgrid",mt,pt],L=()=>["auto",{span:["full",xc,mt,pt]},xc,mt,pt],V=()=>[xc,"auto",mt,pt],F=()=>["auto","min","max","fr",mt,pt],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...D()],B=()=>[yp,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],Y=()=>[e,mt,pt],fe=()=>[...x(),X4,Z4,{position:[mt,pt]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Qae,Yae,{size:[mt,pt]}],I=()=>[v_,Cv,Eh],U=()=>["","none","full",h,mt,pt],P=()=>["",Sn,Cv,Eh],G=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Sn,v_,X4,Z4],ve=()=>["","none",b,mt,pt],Ee=()=>["none",Sn,mt,pt],Oe=()=>["none",Sn,mt,pt],de=()=>[Sn,mt,pt],te=()=>[yp,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tc],breakpoint:[tc],color:[Fae],container:[tc],"drop-shadow":[tc],ease:["in","out","in-out"],font:[Kae],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tc],shadow:[tc],spacing:["px",Sn],text:[tc],"text-shadow":[tc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yp,pt,mt,E]}],container:["container"],columns:[{columns:[Sn,pt,mt,f]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[xc,"auto",mt,pt]}],basis:[{basis:[yp,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sn,yp,"auto","initial","none",pt]}],grow:[{grow:["",Sn,mt,pt]}],shrink:[{shrink:["",Sn,mt,pt]}],order:[{order:[xc,"first","last","none",mt,pt]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[f,"screen",...B()]}],"min-w":[{"min-w":[f,"screen","none",...B()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",r,Cv,Eh]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,mt,b_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",v_,pt]}],"font-family":[{font:[Xae,pt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,mt,pt]}],"line-clamp":[{"line-clamp":[Sn,"none",mt,b_]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",mt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sn,"from-font","auto",mt,Eh]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Sn,"auto",mt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xc,mt,pt],radial:["",mt,pt],conic:[xc,mt,pt]},Wae,Zae]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sn,mt,pt]}],"outline-w":[{outline:["",Sn,Cv,Eh]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,lS,sS]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",g,lS,sS]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Sn,Eh]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",v,lS,sS]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Sn,mt,pt]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Sn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[mt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[Sn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mt,pt]}],filter:[{filter:["","none",mt,pt]}],blur:[{blur:ve()}],brightness:[{brightness:[Sn,mt,pt]}],contrast:[{contrast:[Sn,mt,pt]}],"drop-shadow":[{"drop-shadow":["","none",S,lS,sS]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Sn,mt,pt]}],"hue-rotate":[{"hue-rotate":[Sn,mt,pt]}],invert:[{invert:["",Sn,mt,pt]}],saturate:[{saturate:[Sn,mt,pt]}],sepia:[{sepia:["",Sn,mt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",mt,pt]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Sn,mt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[Sn,mt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sn,mt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sn,mt,pt]}],"backdrop-invert":[{"backdrop-invert":["",Sn,mt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[Sn,mt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[Sn,mt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",Sn,mt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sn,"initial",mt,pt]}],ease:[{ease:["linear","initial",R,mt,pt]}],delay:[{delay:[Sn,mt,pt]}],animate:[{animate:["none",w,mt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,mt,pt]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[mt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mt,pt]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Sn,Cv,Eh,b_]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},d$=zae(tie);function en(...e){return d$(KR(e))}const nie=vc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Xc({className:e,variant:t="default",size:r="default",...i}){return k.jsx(pae,{"data-slot":"button",className:en(nie({variant:t,size:r,className:e})),...i})}const rie=()=>{const e=ere(),t=e?.name,r=e?.version,[,i]=uR();return k.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:k.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[k.jsxs("div",{className:"flex items-center gap-4",children:[k.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),k.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),k.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[k.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),k.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),k.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[k.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),k.jsx("div",{className:"flex items-center gap-2",children:k.jsx(Xc,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:k.jsxs("a",{href:"https://docs.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",k.jsx(gre,{className:"h-3.5 w-3.5"})]})})})]})})},h$=j.createContext({});function aie(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const p$=typeof window<"u",iie=p$?j.useLayoutEffect:j.useEffect,ZR=j.createContext(null);function XR(e,t){e.indexOf(t)===-1&&e.push(t)}function QR(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Dl=(e,t,r)=>r>t?t:r<e?e:r;let WR=()=>{};const fc={},m$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function g$(e){return typeof e=="object"&&e!==null}const y$=e=>/^0[^.\s]+$/u.test(e);function JR(e){let t;return()=>(t===void 0&&(t=e()),t)}const fs=e=>e,oie=(e,t)=>r=>t(e(r)),Zb=(...e)=>e.reduce(oie),db=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class eA{constructor(){this.subscriptions=[]}add(t){return XR(this.subscriptions,t),()=>QR(this.subscriptions,t)}notify(t,r,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,i);else for(let l=0;l<s;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const sc=e=>e*1e3,us=e=>e/1e3;function v$(e,t){return t?e*(1e3/t):0}const b$=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,sie=1e-7,lie=12;function uie(e,t,r,i,s){let l,c,f=0;do c=t+(r-t)/2,l=b$(c,i,s)-e,l>0?r=c:t=c;while(Math.abs(l)>sie&&++f<lie);return c}function Xb(e,t,r,i){if(e===t&&r===i)return fs;const s=l=>uie(l,0,1,e,r);return l=>l===0||l===1?l:b$(s(l),t,i)}const S$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,w$=e=>t=>1-e(1-t),E$=Xb(.33,1.53,.69,.99),tA=w$(E$),x$=S$(tA),_$=e=>(e*=2)<1?.5*tA(e):.5*(2-Math.pow(2,-10*(e-1))),nA=e=>1-Math.sin(Math.acos(e)),T$=w$(nA),C$=S$(nA),cie=Xb(.42,0,1,1),fie=Xb(0,0,.58,1),O$=Xb(.42,0,.58,1),die=e=>Array.isArray(e)&&typeof e[0]!="number",R$=e=>Array.isArray(e)&&typeof e[0]=="number",hie={linear:fs,easeIn:cie,easeInOut:O$,easeOut:fie,circIn:nA,circInOut:C$,circOut:T$,backIn:tA,backInOut:x$,backOut:E$,anticipate:_$},pie=e=>typeof e=="string",Q4=e=>{if(R$(e)){WR(e.length===4);const[t,r,i,s]=e;return Xb(t,r,i,s)}else if(pie(e))return hie[e];return e},uS=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function mie(e,t){let r=new Set,i=new Set,s=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,g=!1,v=!1)=>{const b=v&&s?r:i;return g&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,s){l=!0;return}s=!0,[r,i]=[i,r],r.forEach(d),r.clear(),s=!1,l&&(l=!1,h.process(m))}};return h}const gie=40;function A$(e,t){let r=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=uS.reduce((T,x)=>(T[x]=mie(l),T),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:v,render:S,postRender:b}=c,_=()=>{const T=fc.useManualTiming?s.timestamp:performance.now();r=!1,fc.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(T-s.timestamp,gie),1)),s.timestamp=T,s.isProcessing=!0,f.process(s),d.process(s),h.process(s),m.process(s),g.process(s),v.process(s),S.process(s),b.process(s),s.isProcessing=!1,r&&t&&(i=!1,e(_))},E=()=>{r=!0,i=!0,s.isProcessing||e(_)};return{schedule:uS.reduce((T,x)=>{const O=c[x];return T[x]=(C,M=!1,D=!1)=>(r||E(),O.schedule(C,M,D)),T},{}),cancel:T=>{for(let x=0;x<uS.length;x++)c[uS[x]].cancel(T)},state:s,steps:c}}const{schedule:kr,cancel:Qc,state:fi,steps:S_}=A$(typeof requestAnimationFrame<"u"?requestAnimationFrame:fs,!0);let zS;function yie(){zS=void 0}const Ji={now:()=>(zS===void 0&&Ji.set(fi.isProcessing||fc.useManualTiming?fi.timestamp:performance.now()),zS),set:e=>{zS=e,queueMicrotask(yie)}},M$=e=>t=>typeof t=="string"&&t.startsWith(e),j$=M$("--"),vie=M$("var(--"),rA=e=>vie(e)?bie.test(e.split("/*")[0].trim()):!1,bie=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function W4(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Mm={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hb={...Mm,transform:e=>Dl(0,1,e)},cS={...Mm,default:1},Yv=e=>Math.round(e*1e5)/1e5,aA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Sie(e){return e==null}const wie=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,iA=(e,t)=>r=>!!(typeof r=="string"&&wie.test(r)&&r.startsWith(e)||t&&!Sie(r)&&Object.prototype.hasOwnProperty.call(r,t)),k$=(e,t,r)=>i=>{if(typeof i!="string")return i;const[s,l,c,f]=i.match(aA);return{[e]:parseFloat(s),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},Eie=e=>Dl(0,255,e),w_={...Mm,transform:e=>Math.round(Eie(e))},Mh={test:iA("rgb","red"),parse:k$("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+w_.transform(e)+", "+w_.transform(t)+", "+w_.transform(r)+", "+Yv(hb.transform(i))+")"};function xie(e){let t="",r="",i="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const OC={test:iA("#"),parse:xie,transform:Mh.transform},Qb=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oc=Qb("deg"),Ml=Qb("%"),gt=Qb("px"),_ie=Qb("vh"),Tie=Qb("vw"),J4={...Ml,parse:e=>Ml.parse(e)/100,transform:e=>Ml.transform(e*100)},Np={test:iA("hsl","hue"),parse:k$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ml.transform(Yv(t))+", "+Ml.transform(Yv(r))+", "+Yv(hb.transform(i))+")"},ca={test:e=>Mh.test(e)||OC.test(e)||Np.test(e),parse:e=>Mh.test(e)?Mh.parse(e):Np.test(e)?Np.parse(e):OC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mh.transform(e):Np.transform(e),getAnimatableNone:e=>{const t=ca.parse(e);return t.alpha=0,ca.transform(t)}},Cie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Oie(e){return isNaN(e)&&typeof e=="string"&&(e.match(aA)?.length||0)+(e.match(Cie)?.length||0)>0}const D$="number",N$="color",Rie="var",Aie="var(",ej="${}",Mie=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pb(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},s=[];let l=0;const f=t.replace(Mie,d=>(ca.test(d)?(i.color.push(l),s.push(N$),r.push(ca.parse(d))):d.startsWith(Aie)?(i.var.push(l),s.push(Rie),r.push(d)):(i.number.push(l),s.push(D$),r.push(parseFloat(d))),++l,ej)).split(ej);return{values:r,split:f,indexes:i,types:s}}function z$(e){return pb(e).values}function $$(e){const{split:t,types:r}=pb(e),i=t.length;return s=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],s[c]!==void 0){const f=r[c];f===D$?l+=Yv(s[c]):f===N$?l+=ca.transform(s[c]):l+=s[c]}return l}}const jie=e=>typeof e=="number"?0:ca.test(e)?ca.getAnimatableNone(e):e;function kie(e){const t=z$(e);return $$(e)(t.map(jie))}const Wc={test:Oie,parse:z$,createTransformer:$$,getAnimatableNone:kie};function E_(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Die({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let s=0,l=0,c=0;if(!t)s=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;s=E_(d,f,e+1/3),l=E_(d,f,e),c=E_(d,f,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function gw(e,t){return r=>r>0?t:e}const Kr=(e,t,r)=>e+(t-e)*r,x_=(e,t,r)=>{const i=e*e,s=r*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Nie=[OC,Mh,Np],zie=e=>Nie.find(t=>t.test(e));function tj(e){const t=zie(e);if(!t)return!1;let r=t.parse(e);return t===Np&&(r=Die(r)),r}const nj=(e,t)=>{const r=tj(e),i=tj(t);if(!r||!i)return gw(e,t);const s={...r};return l=>(s.red=x_(r.red,i.red,l),s.green=x_(r.green,i.green,l),s.blue=x_(r.blue,i.blue,l),s.alpha=Kr(r.alpha,i.alpha,l),Mh.transform(s))},RC=new Set(["none","hidden"]);function $ie(e,t){return RC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Pie(e,t){return r=>Kr(e,t,r)}function oA(e){return typeof e=="number"?Pie:typeof e=="string"?rA(e)?gw:ca.test(e)?nj:Uie:Array.isArray(e)?P$:typeof e=="object"?ca.test(e)?nj:Iie:gw}function P$(e,t){const r=[...e],i=r.length,s=e.map((l,c)=>oA(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=s[c](l);return r}}function Iie(e,t){const r={...e,...t},i={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(i[s]=oA(e[s])(e[s],t[s]));return s=>{for(const l in i)r[l]=i[l](s);return r}}function Lie(e,t){const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],c=e.indexes[l][i[l]],f=e.values[c]??0;r[s]=f,i[l]++}return r}const Uie=(e,t)=>{const r=Wc.createTransformer(t),i=pb(e),s=pb(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?RC.has(e)&&!s.values.length||RC.has(t)&&!i.values.length?$ie(e,t):Zb(P$(Lie(i,s),s.values),r):gw(e,t)};function I$(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Kr(e,t,r):oA(e)(e,t)}const qie=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>kr.update(t,r),stop:()=>Qc(t),now:()=>fi.isProcessing?fi.timestamp:Ji.now()}},L$=(e,t,r=10)=>{let i="";const s=Math.max(Math.round(t/r),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},yw=2e4;function sA(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<yw;)t+=r,i=e.next(t);return t>=yw?1/0:t}function Vie(e,t=100,r){const i=r({...e,keyframes:[0,t]}),s=Math.min(sA(i),yw);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:us(s)}}const Fie=5;function U$(e,t,r){const i=Math.max(t-Fie,0);return v$(r-e(i),t-i)}const ea={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},__=.001;function Bie({duration:e=ea.duration,bounce:t=ea.bounce,velocity:r=ea.velocity,mass:i=ea.mass}){let s,l,c=1-t;c=Dl(ea.minDamping,ea.maxDamping,c),e=Dl(ea.minDuration,ea.maxDuration,us(e)),c<1?(s=h=>{const m=h*c,g=m*e,v=m-r,S=AC(h,c),b=Math.exp(-g);return __-v/S*b},l=h=>{const g=h*c*e,v=g*r+r,S=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-g),_=AC(Math.pow(h,2),c);return(-s(h)+__>0?-1:1)*((v-S)*b)/_}):(s=h=>{const m=Math.exp(-h*e),g=(h-r)*e+1;return-__+m*g},l=h=>{const m=Math.exp(-h*e),g=(r-h)*(e*e);return m*g});const f=5/e,d=Gie(s,l,f);if(e=sc(e),isNaN(d))return{stiffness:ea.stiffness,damping:ea.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const Hie=12;function Gie(e,t,r){let i=r;for(let s=1;s<Hie;s++)i=i-e(i)/t(i);return i}function AC(e,t){return e*Math.sqrt(1-t*t)}const Kie=["duration","bounce"],Yie=["stiffness","damping","mass"];function rj(e,t){return t.some(r=>e[r]!==void 0)}function Zie(e){let t={velocity:ea.velocity,stiffness:ea.stiffness,damping:ea.damping,mass:ea.mass,isResolvedFromDuration:!1,...e};if(!rj(e,Yie)&&rj(e,Kie))if(e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),s=i*i,l=2*Dl(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ea.mass,stiffness:s,damping:l}}else{const r=Bie(e);t={...t,...r,mass:ea.mass},t.isResolvedFromDuration=!0}return t}function vw(e=ea.visualDuration,t=ea.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:g,velocity:v,isResolvedFromDuration:S}=Zie({...r,velocity:-us(r.velocity||0)}),b=v||0,_=h/(2*Math.sqrt(d*m)),E=c-l,R=us(Math.sqrt(d/m)),w=Math.abs(E)<5;i||(i=w?ea.restSpeed.granular:ea.restSpeed.default),s||(s=w?ea.restDelta.granular:ea.restDelta.default);let T;if(_<1){const O=AC(R,_);T=C=>{const M=Math.exp(-_*R*C);return c-M*((b+_*R*E)/O*Math.sin(O*C)+E*Math.cos(O*C))}}else if(_===1)T=O=>c-Math.exp(-R*O)*(E+(b+R*E)*O);else{const O=R*Math.sqrt(_*_-1);T=C=>{const M=Math.exp(-_*R*C),D=Math.min(O*C,300);return c-M*((b+_*R*E)*Math.sinh(D)+O*E*Math.cosh(D))/O}}const x={calculatedDuration:S&&g||null,next:O=>{const C=T(O);if(S)f.done=O>=g;else{let M=O===0?b:0;_<1&&(M=O===0?sc(b):U$(T,O,C));const D=Math.abs(M)<=i,$=Math.abs(c-C)<=s;f.done=D&&$}return f.value=f.done?c:C,f},toString:()=>{const O=Math.min(sA(x),yw),C=L$(M=>x.next(O*M).value,O,30);return O+"ms "+C},toTransition:()=>{}};return x}vw.applyToOptions=e=>{const t=Vie(e,100,vw);return e.ease=t.ease,e.duration=sc(t.duration),e.type="keyframes",e};function MC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],v={done:!1,value:g},S=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let _=r*t;const E=g+_,R=c===void 0?E:c(E);R!==E&&(_=R-g);const w=D=>-_*Math.exp(-D/i),T=D=>R+w(D),x=D=>{const $=w(D),q=T(D);v.done=Math.abs($)<=h,v.value=v.done?R:q};let O,C;const M=D=>{S(v.value)&&(O=D,C=vw({keyframes:[v.value,b(v.value)],velocity:U$(T,D,v.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let $=!1;return!C&&O===void 0&&($=!0,x(D),M(D)),O!==void 0&&D>=O?C.next(D-O):(!$&&x(D),v)}}}function Xie(e,t,r){const i=[],s=r||fc.mix||I$,l=e.length-1;for(let c=0;c<l;c++){let f=s(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||fs:t;f=Zb(d,f)}i.push(f)}return i}function Qie(e,t,{clamp:r=!0,ease:i,mixer:s}={}){const l=e.length;if(WR(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=Xie(t,i,s),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const v=db(e[g],e[g+1],m);return f[g](v)};return r?m=>h(Dl(e[0],e[l-1],m)):h}function Wie(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const s=db(0,t,i);e.push(Kr(r,1,s))}}function Jie(e){const t=[0];return Wie(t,e.length-1),t}function eoe(e,t){return e.map(r=>r*t)}function toe(e,t){return e.map(()=>t||O$).splice(0,e.length-1)}function Zv({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const s=die(i)?i.map(Q4):Q4(i),l={done:!1,value:t[0]},c=eoe(r&&r.length===t.length?r:Jie(t),e),f=Qie(c,t,{ease:Array.isArray(s)?s:toe(t,s)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const noe=e=>e!==null;function lA(e,{repeat:t,repeatType:r="loop"},i,s=1){const l=e.filter(noe),f=s<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const roe={decay:MC,inertia:MC,tween:Zv,keyframes:Zv,spring:vw};function q$(e){typeof e.type=="string"&&(e.type=roe[e.type])}class uA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const aoe=e=>e/100;class cA extends uA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Ji.now()&&this.tick(Ji.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;q$(t);const{type:r=Zv,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||Zv;d!==Zv&&typeof f[0]!="number"&&(this.mixKeyframes=Zb(aoe,I$(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=sA(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:v,repeatDelay:S,type:b,onUpdate:_,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const R=this.currentTime-h*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?R<0:R>s;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let T=this.currentTime,x=i;if(g){const D=Math.min(this.currentTime,s)/f;let $=Math.floor(D),q=D%1;!q&&D>=1&&(q=1),q===1&&$--,$=Math.min($,g+1),$%2&&(v==="reverse"?(q=1-q,S&&(q-=S/f)):v==="mirror"&&(x=c)),T=Dl(0,1,q)*f}const O=w?{done:!1,value:m[0]}:x.next(T);l&&(O.value=l(O.value));let{done:C}=O;!w&&d!==null&&(C=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return M&&b!==MC&&(O.value=lA(m,this.options,E,this.speed)),_&&_(O.value),M&&this.finish(),O}then(t,r){return this.finished.then(t,r)}get duration(){return us(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+us(t)}get time(){return us(this.currentTime)}set time(t){t=sc(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ji.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=us(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=qie,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ji.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function ioe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const jh=e=>e*180/Math.PI,jC=e=>{const t=jh(Math.atan2(e[1],e[0]));return kC(t)},ooe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:jC,rotateZ:jC,skewX:e=>jh(Math.atan(e[1])),skewY:e=>jh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},kC=e=>(e=e%360,e<0&&(e+=360),e),aj=jC,ij=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oj=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),soe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ij,scaleY:oj,scale:e=>(ij(e)+oj(e))/2,rotateX:e=>kC(jh(Math.atan2(e[6],e[5]))),rotateY:e=>kC(jh(Math.atan2(-e[2],e[0]))),rotateZ:aj,rotate:aj,skewX:e=>jh(Math.atan(e[4])),skewY:e=>jh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function DC(e){return e.includes("scale")?1:0}function NC(e,t){if(!e||e==="none")return DC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(r)i=soe,s=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ooe,s=f}if(!s)return DC(t);const l=i[t],c=s[1].split(",").map(uoe);return typeof l=="function"?l(c):c[l]}const loe=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return NC(r,t)};function uoe(e){return parseFloat(e.trim())}const jm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],km=new Set(jm),sj=e=>e===Mm||e===gt,coe=new Set(["x","y","z"]),foe=jm.filter(e=>!coe.has(e));function doe(e){const t=[];return foe.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const kc={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>NC(t,"x"),y:(e,{transform:t})=>NC(t,"y")};kc.translateX=kc.x;kc.translateY=kc.y;const zh=new Set;let zC=!1,$C=!1,PC=!1;function V$(){if($C){const e=Array.from(zh).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const s=doe(i);s.length&&(r.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=r.get(i);s&&s.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}$C=!1,zC=!1,zh.forEach(e=>e.complete(PC)),zh.clear()}function F$(){zh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($C=!0)})}function hoe(){PC=!0,F$(),V$(),PC=!1}class fA{constructor(t,r,i,s,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=s,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(zh.add(this),zC||(zC=!0,kr.read(F$),kr.resolveKeyframes(V$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),s&&l===void 0&&s.set(t[0])}ioe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),zh.delete(this)}cancel(){this.state==="scheduled"&&(zh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const poe=e=>e.startsWith("--");function moe(e,t,r){poe(t)?e.style.setProperty(t,r):e.style[t]=r}const goe=JR(()=>window.ScrollTimeline!==void 0),yoe={};function voe(e,t){const r=JR(e);return()=>yoe[t]??r()}const B$=voe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Iv=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,lj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Iv([0,.65,.55,1]),circOut:Iv([.55,0,1,.45]),backIn:Iv([.31,.01,.66,-.59]),backOut:Iv([.33,1.53,.69,.99])};function H$(e,t){if(e)return typeof e=="function"?B$()?L$(e,t):"ease-out":R$(e)?Iv(e):Array.isArray(e)?e.map(r=>H$(r,t)||lj.easeOut):lj[e]}function boe(e,t,r,{delay:i=0,duration:s=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const g=H$(f,s);Array.isArray(g)&&(m.easing=g);const v={delay:i,duration:s,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function G$(e){return typeof e=="function"&&"applyToOptions"in e}function Soe({type:e,...t}){return G$(e)&&B$()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class woe extends uA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:i,keyframes:s,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,WR(typeof t.type!="string");const h=Soe(t);this.animation=boe(r,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=lA(s,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(m):moe(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return us(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+us(t)}get time(){return us(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=sc(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&goe()?(this.animation.timeline=t,fs):r(this)}}const K$={anticipate:_$,backInOut:x$,circInOut:C$};function Eoe(e){return e in K$}function xoe(e){typeof e.ease=="string"&&Eoe(e.ease)&&(e.ease=K$[e.ease])}const T_=10;class _oe extends woe{constructor(t){xoe(t),q$(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:s,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new cA({...c,autoplay:!1}),d=Math.max(T_,Ji.now()-this.startTime),h=Dl(0,T_,d-T_);r.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const uj=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Wc.test(e)||e==="0")&&!e.startsWith("url("));function Toe(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Coe(e,t,r,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=uj(s,t),f=uj(l,t);return!c||!f?!1:Toe(e)||(r==="spring"||G$(r))&&i}function IC(e){e.duration=0,e.type="keyframes"}const Ooe=new Set(["opacity","clipPath","filter","transform"]),Roe=JR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Aoe(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:s,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return Roe()&&r&&Ooe.has(r)&&(r!=="transform"||!h)&&!d&&!i&&s!=="mirror"&&l!==0&&c!=="inertia"}const Moe=40;class joe extends uA{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ji.now();const v={autoplay:t,delay:r,type:i,repeat:s,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...g},S=m?.KeyframeResolver||fA;this.keyframeResolver=new S(f,(b,_,E)=>this.onKeyframesResolved(b,_,v,!E),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,s){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Ji.now(),Coe(t,l,c,f)||((fc.instantAnimations||!d)&&m?.(lA(t,i,r)),t[0]=t[t.length-1],IC(i),i.repeat=0);const v={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Moe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},S=!h&&Aoe(v),b=v.motionValue?.owner?.current,_=S?new _oe({...v,element:b}):new cA(v);_.finished.then(()=>{this.notifyFinished()}).catch(fs),this.pendingTimeline&&(this.stopTimeline=_.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=_}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),hoe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Y$(e,t,r,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):s===1?l*i:f-l*i}const koe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Doe(e){const t=koe.exec(e);if(!t)return[,];const[,r,i,s]=t;return[`--${r??i}`,s]}function Z$(e,t,r=1){const[i,s]=Doe(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return m$(c)?parseFloat(c):c}return rA(s)?Z$(s,t,r+1):s}const Noe={type:"spring",stiffness:500,damping:25,restSpeed:10},zoe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$oe={type:"keyframes",duration:.8},Poe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ioe=(e,{keyframes:t})=>t.length>2?$oe:km.has(e)?e.startsWith("scale")?zoe(t[1]):Noe:Poe,Loe=e=>e!==null;function Uoe(e,{repeat:t,repeatType:r="loop"},i){const s=e.filter(Loe),l=t&&r!=="loop"&&t%2===1?0:s.length-1;return s[l]}function dA(e,t){return e?.[t]??e?.default??e}function qoe({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:s,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const hA=(e,t,r,i={},s,l)=>c=>{const f=dA(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-sc(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:s};qoe(f)||Object.assign(m,Ioe(e,m)),m.duration&&(m.duration=sc(m.duration)),m.repeatDelay&&(m.repeatDelay=sc(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(IC(m),m.delay===0&&(g=!0)),(fc.instantAnimations||fc.skipAnimations)&&(g=!0,IC(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,g&&!l&&t.get()!==void 0){const v=Uoe(m.keyframes,f);if(v!==void 0){kr.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new cA(m):new joe(m)};function cj(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function pA(e,t,r,i){if(typeof t=="function"){const[s,l]=cj(i);t=t(r!==void 0?r:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=cj(i);t=t(r!==void 0?r:e.custom,s,l)}return t}function Fp(e,t,r){const i=e.getProps();return pA(i,t,r!==void 0?r:i.custom,e)}const X$=new Set(["width","height","top","left","right","bottom",...jm]),fj=30,Voe=e=>!isNaN(parseFloat(e));class Foe{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Ji.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ji.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Voe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new eA);const i=this.events[t].add(r);return t==="change"?()=>{i(),kr.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ji.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>fj)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,fj);return v$(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sm(e,t){return new Foe(e,t)}const LC=e=>Array.isArray(e);function Boe(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,sm(r))}function Hoe(e){return LC(e)?e[e.length-1]||0:e}function Goe(e,t){const r=Fp(e,t);let{transitionEnd:i={},transition:s={},...l}=r||{};l={...l,...i};for(const c in l){const f=Hoe(l[c]);Boe(e,c,f)}}const Ci=e=>!!(e&&e.getVelocity);function Koe(e){return!!(Ci(e)&&e.add)}function UC(e,t){const r=e.getValue("willChange");if(Koe(r))return r.add(t);if(!r&&fc.WillChange){const i=new fc.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function mA(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Yoe="framerAppearId",Q$="data-"+mA(Yoe);function W$(e){return e.props[Q$]}function Zoe({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function J$(e,t,{delay:r=0,transitionOverride:i,type:s}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:c,...f}=t;const d=l?.reduceMotion;i&&(l=i);const h=[],m=s&&e.animationState&&e.animationState.getState()[s];for(const g in f){const v=e.getValue(g,e.latestValues[g]??null),S=f[g];if(S===void 0||m&&Zoe(m,g))continue;const b={delay:r,...dA(l||{},g)},_=v.get();if(_!==void 0&&!v.isAnimating&&!Array.isArray(S)&&S===_&&!b.velocity)continue;let E=!1;if(window.MotionHandoffAnimation){const T=W$(e);if(T){const x=window.MotionHandoffAnimation(T,g,kr);x!==null&&(b.startTime=x,E=!0)}}UC(e,g);const R=d??e.shouldReduceMotion;v.start(hA(g,v,S,R&&X$.has(g)?{type:!1}:b,e,E));const w=v.animation;w&&h.push(w)}return c&&Promise.all(h).then(()=>{kr.update(()=>{c&&Goe(e,c)})}),h}function qC(e,t,r={}){const i=Fp(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const l=i?()=>Promise.all(J$(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=s;return Xoe(e,t,d,h,m,g,r)}:()=>Promise.resolve(),{when:f}=s;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function Xoe(e,t,r=0,i=0,s=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(qC(d,t,{...c,delay:r+(typeof i=="function"?0:i)+Y$(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function Qoe(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>qC(e,l,r));i=Promise.all(s)}else if(typeof t=="string")i=qC(e,t,r);else{const s=typeof t=="function"?Fp(e,t,r.custom):t;i=Promise.all(J$(e,s,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}const Woe={test:e=>e==="auto",parse:e=>e},e8=e=>t=>t.test(e),t8=[Mm,gt,Ml,Oc,Tie,_ie,Woe],dj=e=>t8.find(e8(e));function Joe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||y$(e):!0}const ese=new Set(["brightness","contrast","saturate","opacity"]);function tse(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(aA)||[];if(!i)return e;const s=r.replace(i,"");let l=ese.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+s+")"}const nse=/\b([a-z-]*)\(.*?\)/gu,VC={...Wc,getAnimatableNone:e=>{const t=e.match(nse);return t?t.map(tse).join(" "):e}},hj={...Mm,transform:Math.round},rse={rotate:Oc,rotateX:Oc,rotateY:Oc,rotateZ:Oc,scale:cS,scaleX:cS,scaleY:cS,scaleZ:cS,skew:Oc,skewX:Oc,skewY:Oc,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:hb,originX:J4,originY:J4,originZ:gt},gA={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,top:gt,right:gt,bottom:gt,left:gt,inset:gt,insetBlock:gt,insetBlockStart:gt,insetBlockEnd:gt,insetInline:gt,insetInlineStart:gt,insetInlineEnd:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,paddingBlock:gt,paddingBlockStart:gt,paddingBlockEnd:gt,paddingInline:gt,paddingInlineStart:gt,paddingInlineEnd:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,marginBlock:gt,marginBlockStart:gt,marginBlockEnd:gt,marginInline:gt,marginInlineStart:gt,marginInlineEnd:gt,fontSize:gt,backgroundPositionX:gt,backgroundPositionY:gt,...rse,zIndex:hj,fillOpacity:hb,strokeOpacity:hb,numOctaves:hj},ase={...gA,color:ca,backgroundColor:ca,outlineColor:ca,fill:ca,stroke:ca,borderColor:ca,borderTopColor:ca,borderRightColor:ca,borderBottomColor:ca,borderLeftColor:ca,filter:VC,WebkitFilter:VC},n8=e=>ase[e];function r8(e,t){let r=n8(e);return r!==VC&&(r=Wc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const ise=new Set(["auto","none","0"]);function ose(e,t,r){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!ise.has(l)&&pb(l).values.length&&(s=e[i]),i++}if(s&&r)for(const l of t)e[l]=r8(r,s)}class sse extends fA{constructor(t,r,i,s,l){super(t,r,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let g=t[m];if(typeof g=="string"&&(g=g.trim(),rA(g))){const v=Z$(g,r.current);v!==void 0&&(t[m]=v),m===t.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!X$.has(i)||t.length!==2)return;const[s,l]=t,c=dj(s),f=dj(l),d=W4(s),h=W4(l);if(d!==h&&kc[i]){this.needsMeasurement=!0;return}if(c!==f)if(sj(c)&&sj(f))for(let m=0;m<t.length;m++){const g=t[m];typeof g=="string"&&(t[m]=parseFloat(g))}else kc[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||Joe(t[s]))&&i.push(s);i.length&&ose(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kc[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=kc[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function lse(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=r?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const a8=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function use(e){return g$(e)&&"offsetHeight"in e}const{schedule:yA}=A$(queueMicrotask,!1),ul={x:!1,y:!1};function i8(){return ul.x||ul.y}function cse(e){return e==="x"||e==="y"?ul[e]?null:(ul[e]=!0,()=>{ul[e]=!1}):ul.x||ul.y?null:(ul.x=ul.y=!0,()=>{ul.x=ul.y=!1})}function o8(e,t){const r=lse(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[r,s,()=>i.abort()]}function pj(e){return!(e.pointerType==="touch"||i8())}function fse(e,t,r={}){const[i,s,l]=o8(e,r),c=f=>{if(!pj(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const m=g=>{pj(g)&&(h(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,s)};return i.forEach(f=>{f.addEventListener("pointerenter",c,s)}),l}const s8=(e,t)=>t?e===t?!0:s8(e,t.parentElement):!1,vA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dse=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function l8(e){return dse.has(e.tagName)||e.isContentEditable===!0}const $S=new WeakSet;function mj(e){return t=>{t.key==="Enter"&&e(t)}}function C_(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hse=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=mj(()=>{if($S.has(r))return;C_(r,"down");const s=mj(()=>{C_(r,"up")}),l=()=>C_(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function gj(e){return vA(e)&&!i8()}function pse(e,t,r={}){const[i,s,l]=o8(e,r),c=f=>{const d=f.currentTarget;if(!gj(f))return;$S.add(d);const h=t(d,f),m=(S,b)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),$S.has(d)&&$S.delete(d),gj(S)&&typeof h=="function"&&h(S,{success:b})},g=S=>{m(S,d===window||d===document||r.useGlobalTarget||s8(d,S.target))},v=S=>{m(S,!1)};window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",v,s)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,s),use(f)&&(f.addEventListener("focus",h=>hse(h,s)),!l8(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function u8(e){return g$(e)&&"ownerSVGElement"in e}function mse(e){return u8(e)&&e.tagName==="svg"}const gse=[...t8,ca,Wc],yse=e=>gse.find(e8(e)),yj=()=>({translate:0,scale:1,origin:0,originPoint:0}),zp=()=>({x:yj(),y:yj()}),vj=()=>({min:0,max:0}),Ma=()=>({x:vj(),y:vj()}),FC={current:null},c8={current:!1},vse=typeof window<"u";function bse(){if(c8.current=!0,!!vse)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>FC.current=e.matches;e.addEventListener("change",t),t()}else FC.current=!1}const Sse=new WeakMap;function c2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function mb(e){return typeof e=="string"||Array.isArray(e)}const bA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],SA=["initial",...bA];function f2(e){return c2(e.animate)||SA.some(t=>mb(e[t]))}function f8(e){return!!(f2(e)||e.variants)}function wse(e,t,r){for(const i in t){const s=t[i],l=r[i];if(Ci(s))e.addValue(i,s);else if(Ci(l))e.addValue(i,sm(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(s):c.hasAnimated||c.set(s)}else{const c=e.getStaticValue(i);e.addValue(i,sm(c!==void 0?c:s,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const bj=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bw={};function d8(e){bw=e}function Ese(){return bw}class xse{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:l,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=Ji.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,kr.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=f2(r),this.isVariantNode=f8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...g}=this.scrapeMotionValuesFromProps(r,{},this);for(const v in g){const S=g[v];d[v]!==void 0&&Ci(S)&&S.set(d[v])}}mount(t){this.current=t,Sse.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(c8.current||bse(),this.shouldReduceMotion=FC.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Qc(this.notifyUpdate),Qc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=km.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&kr.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),l&&l(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bw){const r=bw[t];if(!r)continue;const{isEnabled:i,Feature:s}=r;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ma()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<bj.length;i++){const s=bj[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,c=t[l];c&&(this.propEventSubscriptions[s]=this.on(s,c))}this.prevMotionValues=wse(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=sm(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(m$(i)||y$(i))?i=parseFloat(i):!yse(i)&&Wc.test(r)&&(i=r8(t,r)),this.setBaseTarget(t,Ci(i)?i.get():i)),Ci(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=pA(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ci(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new eA),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){yA.render(this.render)}}class h8 extends xse{constructor(){super(...arguments),this.KeyframeResolver=sse}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const i=t.style;return i?i[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ci(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class hf{constructor(t){this.isMounted=!1,this.node=t}update(){}}function p8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function _se({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Tse(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function O_(e){return e===void 0||e===1}function BC({scale:e,scaleX:t,scaleY:r}){return!O_(e)||!O_(t)||!O_(r)}function Oh(e){return BC(e)||m8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function m8(e){return Sj(e.x)||Sj(e.y)}function Sj(e){return e&&e!=="0%"}function Sw(e,t,r){const i=e-r,s=t*i;return r+s}function wj(e,t,r,i,s){return s!==void 0&&(e=Sw(e,s,i)),Sw(e,r,i)+t}function HC(e,t=0,r=1,i,s){e.min=wj(e.min,t,r,i,s),e.max=wj(e.max,t,r,i,s)}function g8(e,{x:t,y:r}){HC(e.x,t.translate,t.scale,t.originPoint),HC(e.y,r.translate,r.scale,r.originPoint)}const Ej=.999999999999,xj=1.0000000000001;function Cse(e,t,r,i=!1){const s=r.length;if(!s)return;t.x=t.y=1;let l,c;for(let f=0;f<s;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Pp(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,g8(e,c)),i&&Oh(l.latestValues)&&Pp(e,l.latestValues))}t.x<xj&&t.x>Ej&&(t.x=1),t.y<xj&&t.y>Ej&&(t.y=1)}function $p(e,t){e.min=e.min+t,e.max=e.max+t}function _j(e,t,r,i,s=.5){const l=Kr(e.min,e.max,s);HC(e,t,r,l,i)}function Pp(e,t){_j(e.x,t.x,t.scaleX,t.scale,t.originX),_j(e.y,t.y,t.scaleY,t.scale,t.originY)}function y8(e,t){return p8(Tse(e.getBoundingClientRect(),t))}function Ose(e,t,r){const i=y8(e,r),{scroll:s}=t;return s&&($p(i.x,s.offset.x),$p(i.y,s.offset.y)),i}const Rse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ase=jm.length;function Mse(e,t,r){let i="",s=!0;for(let l=0;l<Ase;l++){const c=jm[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(c.startsWith("scale")?1:0);else{const h=parseFloat(f);d=c.startsWith("scale")?h===1:h===0}if(!d||r){const h=a8(f,gA[c]);if(!d){s=!1;const m=Rse[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,s?"":i):s&&(i="none"),i}function wA(e,t,r){const{style:i,vars:s,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(km.has(d)){c=!0;continue}else if(j$(d)){s[d]=h;continue}else{const m=a8(h,gA[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=Mse(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}function v8(e,{style:t,vars:r},i,s){const l=e.style;let c;for(c in t)l[c]=t[c];s?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function Tj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ov={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(gt.test(e))e=parseFloat(e);else return e;const r=Tj(e,t.target.x),i=Tj(e,t.target.y);return`${r}% ${i}%`}},jse={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,s=Wc.parse(e);if(s.length>5)return i;const l=Wc.createTransformer(e),c=typeof s[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;s[0+c]/=f,s[1+c]/=d;const h=Kr(f,d,.5);return typeof s[2+c]=="number"&&(s[2+c]/=h),typeof s[3+c]=="number"&&(s[3+c]/=h),l(s)}},GC={borderRadius:{...Ov,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ov,borderTopRightRadius:Ov,borderBottomLeftRadius:Ov,borderBottomRightRadius:Ov,boxShadow:jse};function b8(e,{layout:t,layoutId:r}){return km.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!GC[e]||e==="opacity")}function EA(e,t,r){const i=e.style,s=t?.style,l={};if(!i)return l;for(const c in i)(Ci(i[c])||s&&Ci(s[c])||b8(c,e)||r?.getValue(c)?.liveStyle!==void 0)&&(l[c]=i[c]);return l}function kse(e){return window.getComputedStyle(e)}class Dse extends h8{constructor(){super(...arguments),this.type="html",this.renderInstance=v8}readValueFromInstance(t,r){if(km.has(r))return this.projection?.isProjecting?DC(r):loe(t,r);{const i=kse(t),s=(j$(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return y8(t,r)}build(t,r,i){wA(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return EA(t,r,i)}}const Nse={offset:"stroke-dashoffset",array:"stroke-dasharray"},zse={offset:"strokeDashoffset",array:"strokeDasharray"};function $se(e,t,r=1,i=0,s=!0){e.pathLength=1;const l=s?Nse:zse;e[l.offset]=`${-i}`,e[l.array]=`${t} ${r}`}const Pse=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function S8(e,{attrX:t,attrY:r,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(wA(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete g.transformBox);for(const S of Pse)g[S]!==void 0&&(v[S]=g[S],delete g[S]);t!==void 0&&(g.x=t),r!==void 0&&(g.y=r),i!==void 0&&(g.scale=i),s!==void 0&&$se(g,s,l,c,!1)}const w8=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),E8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ise(e,t,r,i){v8(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(w8.has(s)?s:mA(s),t.attrs[s])}function x8(e,t,r){const i=EA(e,t,r);for(const s in e)if(Ci(e[s])||Ci(t[s])){const l=jm.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class Lse extends h8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ma}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(km.has(r)){const i=n8(r);return i&&i.default||0}return r=w8.has(r)?r:mA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return x8(t,r,i)}build(t,r,i){S8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,s){Ise(t,r,i,s)}mount(t){this.isSVGTag=E8(t.tagName),super.mount(t)}}const Use=SA.length;function _8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?_8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<Use;r++){const i=SA[r],s=e.props[i];(mb(s)||s===!1)&&(t[i]=s)}return t}function T8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const qse=[...bA].reverse(),Vse=bA.length;function Fse(e){return t=>Promise.all(t.map(({animation:r,options:i})=>Qoe(e,r,i)))}function Bse(e){let t=Fse(e),r=Cj(),i=!0;const s=d=>(h,m)=>{const g=Fp(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:v,transitionEnd:S,...b}=g;h={...h,...b,...S}}return h};function l(d){t=d(e)}function c(d){const{props:h}=e,m=_8(e.parent)||{},g=[],v=new Set;let S={},b=1/0;for(let E=0;E<Vse;E++){const R=qse[E],w=r[R],T=h[R]!==void 0?h[R]:m[R],x=mb(T),O=R===d?w.isActive:null;O===!1&&(b=E);let C=T===m[R]&&T!==h[R]&&x;if(C&&i&&e.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...S},!w.isActive&&O===null||!T&&!w.prevProp||c2(T)||typeof T=="boolean")continue;const M=Hse(w.prevProp,T);let D=M||R===d&&w.isActive&&!C&&x||E>b&&x,$=!1;const q=Array.isArray(T)?T:[T];let L=q.reduce(s(R),{});O===!1&&(L={});const{prevResolvedValues:V={}}=w,F={...V,...L},re=B=>{D=!0,v.has(B)&&($=!0,v.delete(B)),w.needsAnimating[B]=!0;const Y=e.getValue(B);Y&&(Y.liveStyle=!1)};for(const B in F){const Y=L[B],fe=V[B];if(S.hasOwnProperty(B))continue;let ie=!1;LC(Y)&&LC(fe)?ie=!T8(Y,fe):ie=Y!==fe,ie?Y!=null?re(B):v.add(B):Y!==void 0&&v.has(B)?re(B):w.protectedKeys[B]=!0}w.prevProp=T,w.prevResolvedValues=L,w.isActive&&(S={...S,...L}),i&&e.blockInitialAnimation&&(D=!1);const ae=C&&M;D&&(!ae||$)&&g.push(...q.map(B=>{const Y={type:R};if(typeof B=="string"&&i&&!ae&&e.manuallyAnimateOnMount&&e.parent){const{parent:fe}=e,ie=Fp(fe,B);if(fe.enteringChildren&&ie){const{delayChildren:N}=ie.transition||{};Y.delay=Y$(fe.enteringChildren,e,N)}}return{animation:B,options:Y}}))}if(v.size){const E={};if(typeof h.initial!="boolean"){const R=Fp(e,Array.isArray(h.initial)?h.initial[0]:h.initial);R&&R.transition&&(E.transition=R.transition)}v.forEach(R=>{const w=e.getBaseTarget(R),T=e.getValue(R);T&&(T.liveStyle=!0),E[R]=w??null}),g.push({animation:E})}let _=!!g.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(_=!1),i=!1,_?t(g):Promise.resolve()}function f(d,h){if(r[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(d,h)),r[d].isActive=h;const m=c(d);for(const g in r)r[g].protectedKeys={};return m}return{animateChanges:c,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=Cj()}}}function Hse(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!T8(t,e):!1}function xh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cj(){return{animate:xh(!0),whileInView:xh(),whileHover:xh(),whileTap:xh(),whileDrag:xh(),whileFocus:xh(),exit:xh()}}function Oj(e,t){e.min=t.min,e.max=t.max}function sl(e,t){Oj(e.x,t.x),Oj(e.y,t.y)}function Rj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const C8=1e-4,Gse=1-C8,Kse=1+C8,O8=.01,Yse=0-O8,Zse=0+O8;function eo(e){return e.max-e.min}function Xse(e,t,r){return Math.abs(e-t)<=r}function Aj(e,t,r,i=.5){e.origin=i,e.originPoint=Kr(t.min,t.max,e.origin),e.scale=eo(r)/eo(t),e.translate=Kr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Gse&&e.scale<=Kse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Yse&&e.translate<=Zse||isNaN(e.translate))&&(e.translate=0)}function Xv(e,t,r,i){Aj(e.x,t.x,r.x,i?i.originX:void 0),Aj(e.y,t.y,r.y,i?i.originY:void 0)}function Mj(e,t,r){e.min=r.min+t.min,e.max=e.min+eo(t)}function Qse(e,t,r){Mj(e.x,t.x,r.x),Mj(e.y,t.y,r.y)}function jj(e,t,r){e.min=t.min-r.min,e.max=e.min+eo(t)}function ww(e,t,r){jj(e.x,t.x,r.x),jj(e.y,t.y,r.y)}function kj(e,t,r,i,s){return e-=t,e=Sw(e,1/r,i),s!==void 0&&(e=Sw(e,1/s,i)),e}function Wse(e,t=0,r=1,i=.5,s,l=e,c=e){if(Ml.test(t)&&(t=parseFloat(t),t=Kr(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=Kr(l.min,l.max,i);e===l&&(f-=t),e.min=kj(e.min,t,r,f,s),e.max=kj(e.max,t,r,f,s)}function Dj(e,t,[r,i,s],l,c){Wse(e,t[r],t[i],t[s],t.scale,l,c)}const Jse=["x","scaleX","originX"],ele=["y","scaleY","originY"];function Nj(e,t,r,i){Dj(e.x,t,Jse,r?r.x:void 0,i?i.x:void 0),Dj(e.y,t,ele,r?r.y:void 0,i?i.y:void 0)}function zj(e){return e.translate===0&&e.scale===1}function R8(e){return zj(e.x)&&zj(e.y)}function $j(e,t){return e.min===t.min&&e.max===t.max}function tle(e,t){return $j(e.x,t.x)&&$j(e.y,t.y)}function Pj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function A8(e,t){return Pj(e.x,t.x)&&Pj(e.y,t.y)}function Ij(e){return eo(e.x)/eo(e.y)}function Lj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function is(e){return[e("x"),e("y")]}function nle(e,t,r){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((s||l||c)&&(i=`translate3d(${s}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:v,skewX:S,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),g&&(i+=`rotateX(${g}deg) `),v&&(i+=`rotateY(${v}deg) `),S&&(i+=`skewX(${S}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const M8=["TopLeft","TopRight","BottomLeft","BottomRight"],rle=M8.length,Uj=e=>typeof e=="string"?parseFloat(e):e,qj=e=>typeof e=="number"||gt.test(e);function ale(e,t,r,i,s,l){s?(e.opacity=Kr(0,r.opacity??1,ile(i)),e.opacityExit=Kr(t.opacity??1,0,ole(i))):l&&(e.opacity=Kr(t.opacity??1,r.opacity??1,i));for(let c=0;c<rle;c++){const f=`border${M8[c]}Radius`;let d=Vj(t,f),h=Vj(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||qj(d)===qj(h)?(e[f]=Math.max(Kr(Uj(d),Uj(h),i),0),(Ml.test(h)||Ml.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Kr(t.rotate||0,r.rotate||0,i))}function Vj(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ile=j8(0,.5,T$),ole=j8(.5,.95,fs);function j8(e,t,r){return i=>i<e?0:i>t?1:r(db(e,t,i))}function sle(e,t,r){const i=Ci(e)?e:sm(e);return i.start(hA("",i,t,r)),i.animation}function gb(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}const lle=(e,t)=>e.depth-t.depth;class ule{constructor(){this.children=[],this.isDirty=!1}add(t){XR(this.children,t),this.isDirty=!0}remove(t){QR(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lle),this.isDirty=!1,this.children.forEach(t)}}function cle(e,t){const r=Ji.now(),i=({timestamp:s})=>{const l=s-r;l>=t&&(Qc(i),e(l-t))};return kr.setup(i,!0),()=>Qc(i)}function PS(e){return Ci(e)?e.get():e}class fle{constructor(){this.members=[]}add(t){XR(this.members,t),t.scheduleRender()}remove(t){if(QR(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let i;for(let s=r;s>=0;s--){const l=this.members[s];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const s=i.options.layoutDependency,l=t.options.layoutDependency;s!==void 0&&l!==void 0&&s===l||(t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:f}=t.options;f===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:i}=t;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const IS={hasAnimatedSinceResize:!0,hasEverUpdated:!1},R_=["","X","Y","Z"],dle=1e3;let hle=0;function A_(e,t,r,i){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function k8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=W$(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",kr,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&k8(i)}function D8({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(c={},f=t?.()){this.id=hle++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(gle),this.nodes.forEach(Sle),this.nodes.forEach(wle),this.nodes.forEach(yle)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new ule)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new eA),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=u8(c)&&!mse(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,g=0;const v=()=>this.root.updateBlockedByResize=!1;kr.read(()=>{g=window.innerWidth}),e(c,()=>{const S=window.innerWidth;S!==g&&(g=S,this.root.updateBlockedByResize=!0,m&&m(),m=cle(v,250),IS.hasAnimatedSinceResize&&(IS.hasAnimatedSinceResize=!1,this.nodes.forEach(Hj)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||Cle,{onLayoutAnimationStart:_,onLayoutAnimationComplete:E}=h.getProps(),R=!this.targetLayout||!A8(this.targetLayout,S),w=!g&&v;if(this.options.layoutRoot||this.resumeFrom||w||g&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...dA(b,"layout"),onPlay:_,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,w)}else g||Hj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Qc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ele),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&k8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ble),this.nodes.forEach(ple),this.nodes.forEach(mle)):this.nodes.forEach(Bj),this.clearAllSnapshots();const f=Ji.now();fi.delta=Dl(0,1e3/60,f-fi.timestamp),fi.timestamp=f,fi.isProcessing=!0,S_.update.process(fi),S_.preRender.process(fi),S_.render.process(fi),fi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vle),this.sharedNodes.forEach(xle)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,kr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){kr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!eo(this.snapshot.measuredBox.x)&&!eo(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ma(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!R8(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||Oh(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),Ole(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Ma();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Rle))){const{scroll:h}=this.root;h&&($p(f.x,h.offset.x),$p(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Ma();if(sl(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:g}=h;h!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&sl(f,c),$p(f.x,m.offset.x),$p(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Ma();sl(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Pp(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Oh(m.latestValues)&&Pp(d,m.latestValues)}return Oh(this.latestValues)&&Pp(d,this.latestValues),d}removeTransform(c){const f=Ma();sl(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!Oh(h.latestValues))continue;BC(h.latestValues)&&h.updateSnapshot();const m=Ma(),g=h.measurePageBox();sl(m,g),Nj(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return Oh(this.latestValues)&&Nj(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==fi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!this.layout||!(m||g))return;this.resolvedRelativeTargetAt=fi.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ma(),this.targetWithTransforms=Ma()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Qse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sl(this.target,this.layout.layoutBox),g8(this.target,this.targetDelta)):sl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||BC(this.parent.latestValues)||m8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ma(),this.relativeTargetOrigin=Ma(),ww(this.relativeTargetOrigin,f,d),sl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===fi.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;sl(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;Cse(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ma());const{target:S}=c;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rj(this.prevProjectionDelta.x,this.projectionDelta.x),Rj(this.prevProjectionDelta.y,this.projectionDelta.y)),Xv(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!Lj(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zp(),this.projectionDelta=zp(),this.projectionDeltaWithTransform=zp()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},g=zp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Ma(),S=d?d.source:void 0,b=this.layout?this.layout.source:void 0,_=S!==b,E=this.getStack(),R=!E||E.members.length<=1,w=!!(_&&!R&&this.options.crossfade===!0&&!this.path.some(Tle));this.animationProgress=0;let T;this.mixTargetDelta=x=>{const O=x/1e3;Gj(g.x,c.x,O),Gj(g.y,c.y,O),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ww(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_le(this.relativeTarget,this.relativeTargetOrigin,v,O),T&&tle(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ma()),sl(T,this.relativeTarget)),_&&(this.animationValues=m,ale(m,h,this.latestValues,O,w,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Qc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=kr.update(()=>{IS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=sm(0)),this.currentAnimation=sle(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dle),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&N8(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Ma();const g=eo(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+g;const v=eo(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}sl(f,d),Pp(f,m),Xv(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new fle),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&A_("z",c,h,this.animationValues);for(let m=0;m<R_.length;m++)A_(`rotate${R_[m]}`,c,h,this.animationValues),A_(`skew${R_[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=PS(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=PS(f?.pointerEvents)||""),this.hasProjected&&!Oh(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let g=nle(this.projectionDeltaWithTransform,this.treeScale,m);d&&(g=d(m,g)),c.transform=g;const{x:v,y:S}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${S.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in GC){if(m[b]===void 0)continue;const{correct:_,applyTo:E,isCSSVariable:R}=GC[b],w=g==="none"?m[b]:_(m[b],h);if(E){const T=E.length;for(let x=0;x<T;x++)c[E[x]]=w}else R?this.options.visualElement.renderState.vars[b]=w:c[b]=w}this.options.layoutId&&(c.pointerEvents=h===this?PS(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Fj),this.root.sharedNodes.clear()}}}function ple(e){e.updateLayout()}function mle(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;s==="size"?is(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=eo(g);g.min=r[m].min,g.max=g.min+v}):N8(s,t.layoutBox,r)&&is(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=eo(r[m]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=zp();Xv(c,r,t.layoutBox);const f=zp();l?Xv(f,e.applyTransform(i,!0),t.measuredBox):Xv(f,r,t.layoutBox);const d=!R8(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:v}=m;if(g&&v){const S=Ma();ww(S,t.layoutBox,g.layoutBox);const b=Ma();ww(b,r,v.layoutBox),A8(S,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=S,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function gle(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yle(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vle(e){e.clearSnapshot()}function Fj(e){e.clearMeasurements()}function Bj(e){e.isLayoutDirty=!1}function ble(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sle(e){e.resolveTargetDelta()}function wle(e){e.calcProjection()}function Ele(e){e.resetSkewAndRotation()}function xle(e){e.removeLeadSnapshot()}function Gj(e,t,r){e.translate=Kr(t.translate,0,r),e.scale=Kr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Kj(e,t,r,i){e.min=Kr(t.min,r.min,i),e.max=Kr(t.max,r.max,i)}function _le(e,t,r,i){Kj(e.x,t.x,r.x,i),Kj(e.y,t.y,r.y,i)}function Tle(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Cle={duration:.45,ease:[.4,0,.1,1]},Yj=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Zj=Yj("applewebkit/")&&!Yj("chrome/")?Math.round:fs;function Xj(e){e.min=Zj(e.min),e.max=Zj(e.max)}function Ole(e){Xj(e.x),Xj(e.y)}function N8(e,t,r){return e==="position"||e==="preserve-aspect"&&!Xse(Ij(t),Ij(r),.2)}function Rle(e){return e!==e.root&&e.scroll?.wasRoot}const Ale=D8({attachResizeListener:(e,t)=>gb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),M_={current:void 0},z8=D8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M_.current){const e=new Ale({});e.mount(window),e.setOptions({layoutScroll:!0}),M_.current=e}return M_.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Mle(e=!0){const t=j.useContext(ZR);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:s}=t,l=j.useId();j.useEffect(()=>{if(e)return s(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const P8=j.createContext({strict:!1}),Qj={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Wj=!1;function jle(){if(Wj)return;const e={};for(const t in Qj)e[t]={isEnabled:r=>Qj[t].some(i=>!!r[i])};d8(e),Wj=!0}function I8(){return jle(),Ese()}function kle(e){const t=I8();for(const r in e)t[r]={...t[r],...e[r]};d8(t)}const Dle=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ew(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Dle.has(e)}let L8=e=>!Ew(e);function Nle(e){typeof e=="function"&&(L8=t=>t.startsWith("on")?!Ew(t):e(t))}try{Nle(require("@emotion/is-prop-valid").default)}catch{}function zle(e,t,r){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(L8(s)||r===!0&&Ew(s)||!t&&!Ew(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const d2=j.createContext({});function $le(e,t){if(f2(e)){const{initial:r,animate:i}=e;return{initial:r===!1||mb(r)?r:void 0,animate:mb(i)?i:void 0}}return e.inherit!==!1?t:{}}function Ple(e){const{initial:t,animate:r}=$le(e,j.useContext(d2));return j.useMemo(()=>({initial:t,animate:r}),[Jj(t),Jj(r)])}function Jj(e){return Array.isArray(e)?e.join(" "):e}const xA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function U8(e,t,r){for(const i in t)!Ci(t[i])&&!b8(i,r)&&(e[i]=t[i])}function Ile({transformTemplate:e},t){return j.useMemo(()=>{const r=xA();return wA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Lle(e,t){const r=e.style||{},i={};return U8(i,r,e),Object.assign(i,Ile(e,t)),i}function Ule(e,t){const r={},i=Lle(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const q8=()=>({...xA(),attrs:{}});function qle(e,t,r,i){const s=j.useMemo(()=>{const l=q8();return S8(l,t,E8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};U8(l,e.style,e),s.style={...l,...s.style}}return s}const Vle=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _A(e){return typeof e!="string"||e.includes("-")?!1:!!(Vle.indexOf(e)>-1||/[A-Z]/u.test(e))}function Fle(e,t,r,{latestValues:i},s,l=!1,c){const d=(c??_A(e)?qle:Ule)(t,i,s,e),h=zle(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:g}=t,v=j.useMemo(()=>Ci(g)?g.get():g,[g]);return j.createElement(e,{...m,children:v})}function Ble({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,s){return{latestValues:Hle(r,i,s,e),renderState:t()}}function Hle(e,t,r,i){const s={},l=i(e,{});for(const v in l)s[v]=PS(l[v]);let{initial:c,animate:f}=e;const d=f2(e),h=f8(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const g=m?f:c;if(g&&typeof g!="boolean"&&!c2(g)){const v=Array.isArray(g)?g:[g];for(let S=0;S<v.length;S++){const b=pA(e,v[S]);if(b){const{transitionEnd:_,transition:E,...R}=b;for(const w in R){let T=R[w];if(Array.isArray(T)){const x=m?T.length-1:0;T=T[x]}T!==null&&(s[w]=T)}for(const w in _)s[w]=_[w]}}}return s}const V8=e=>(t,r)=>{const i=j.useContext(d2),s=j.useContext(ZR),l=()=>Ble(e,t,i,s);return r?l():aie(l)},Gle=V8({scrapeMotionValuesFromProps:EA,createRenderState:xA}),Kle=V8({scrapeMotionValuesFromProps:x8,createRenderState:q8}),Yle=Symbol.for("motionComponentSymbol");function Zle(e,t,r){const i=j.useRef(r);j.useInsertionEffect(()=>{i.current=r});const s=j.useRef(null);return j.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const c=i.current;if(typeof c=="function")if(l){const f=c(l);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):c(l);else c&&(c.current=l)},[t])}const F8=j.createContext({});function Lv(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Xle(e,t,r,i,s,l){const{visualElement:c}=j.useContext(d2),f=j.useContext(P8),d=j.useContext(ZR),h=j.useContext($8).reducedMotion,m=j.useRef(null),g=j.useRef(!1);i=i||f.renderer,!m.current&&i&&(m.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:l}),g.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const v=m.current,S=j.useContext(F8);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&Qle(m.current,r,s,S);const b=j.useRef(!1);j.useInsertionEffect(()=>{v&&b.current&&v.update(r,d)});const _=r[Q$],E=j.useRef(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return iie(()=>{g.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),E.current&&v.animationState&&v.animationState.animateChanges())}),j.useEffect(()=>{v&&(!E.current&&v.animationState&&v.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),E.current=!1),v.enteringChildren=void 0)}),v}function Qle(e,t,r,i){const{layoutId:s,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:B8(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!c||f&&Lv(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function B8(e){if(e)return e.options.allowProjection!==!1?e.projection:B8(e.parent)}function j_(e,{forwardMotionProps:t=!1,type:r}={},i,s){i&&kle(i);const l=r?r==="svg":_A(e),c=l?Kle:Gle;function f(h,m){let g;const v={...j.useContext($8),...h,layoutId:Wle(h)},{isStatic:S}=v,b=Ple(h),_=c(h,S);if(!S&&p$){Jle();const E=eue(v);g=E.MeasureLayout,b.visualElement=Xle(e,_,v,s,E.ProjectionNode,l)}return k.jsxs(d2.Provider,{value:b,children:[g&&b.visualElement?k.jsx(g,{visualElement:b.visualElement,...v}):null,Fle(e,h,Zle(_,b.visualElement,m),_,S,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[Yle]=e,d}function Wle({layoutId:e}){const t=j.useContext(h$).id;return t&&e!==void 0?t+"-"+e:e}function Jle(e,t){j.useContext(P8).strict}function eue(e){const t=I8(),{drag:r,layout:i}=t;if(!r&&!i)return{};const s={...r,...i};return{MeasureLayout:r?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function tue(e,t){if(typeof Proxy>"u")return j_;const r=new Map,i=(l,c)=>j_(l,c,e,t),s=(l,c)=>i(l,c);return new Proxy(s,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,j_(c,void 0,e,t)),r.get(c))})}const nue=(e,t)=>t.isSVG??_A(e)?new Lse(t):new Dse(t,{allowProjection:e!==j.Fragment});class rue extends hf{constructor(t){super(t),t.animationState||(t.animationState=Bse(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();c2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aue=0;class iue extends hf{constructor(){super(...arguments),this.id=aue++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const oue={animation:{Feature:rue},exit:{Feature:iue}};function Wb(e){return{point:{x:e.pageX,y:e.pageY}}}const sue=e=>t=>vA(t)&&e(t,Wb(t));function Qv(e,t,r,i){return gb(e,t,sue(r),i)}const H8=({current:e})=>e?e.ownerDocument.defaultView:null,ek=(e,t)=>Math.abs(e-t);function lue(e,t){const r=ek(e.x,t.x),i=ek(e.y,t.y);return Math.sqrt(r**2+i**2)}const tk=new Set(["auto","scroll"]);class G8{constructor(t,r,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=D_(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,_=lue(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!_)return;const{point:E}=S,{timestamp:R}=fi;this.history.push({...E,timestamp:R});const{onStart:w,onMove:T}=this.handlers;b||(w&&w(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,S)},this.handlePointerMove=(S,b)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=k_(b,this.transformPagePoint),kr.update(this.updatePoint,!0)},this.handlePointerUp=(S,b)=>{this.end();const{onEnd:_,onSessionEnd:E,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=D_(S.type==="pointercancel"?this.lastMoveEventInfo:k_(b,this.transformPagePoint),this.history);this.startEvent&&_&&_(S,w),E&&E(S,w)},!vA(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=s||window;const d=Wb(t),h=k_(d,this.transformPagePoint),{point:m}=h,{timestamp:g}=fi;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=r;v&&v(t,D_(h,this.history)),this.removeListeners=Zb(Qv(this.contextWindow,"pointermove",this.handlePointerMove),Qv(this.contextWindow,"pointerup",this.handlePointerUp),Qv(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let r=t.parentElement;for(;r;){const i=getComputedStyle(r);(tk.has(i.overflowX)||tk.has(i.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-r.x,y:s.y-r.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),kr.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Qc(this.updatePoint)}}function k_(e,t){return t?{point:t(e.point)}:e}function nk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D_({point:e},t){return{point:e,delta:nk(e,K8(t)),offset:nk(e,uue(t)),velocity:cue(t,.1)}}function uue(e){return e[0]}function K8(e){return e[e.length-1]}function cue(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const s=K8(e);for(;r>=0&&(i=e[r],!(s.timestamp-i.timestamp>sc(t)));)r--;if(!i)return{x:0,y:0};const l=us(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function fue(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Kr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Kr(r,e,i.max):Math.min(e,r)),e}function rk(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function due(e,{top:t,left:r,bottom:i,right:s}){return{x:rk(e.x,r,s),y:rk(e.y,t,i)}}function ak(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function hue(e,t){return{x:ak(e.x,t.x),y:ak(e.y,t.y)}}function pue(e,t){let r=.5;const i=eo(e),s=eo(t);return s>i?r=db(t.min,t.max-i,e.min):i>s&&(r=db(e.min,e.max-s,t.min)),Dl(0,1,r)}function mue(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const KC=.35;function gue(e=KC){return e===!1?e=0:e===!0&&(e=KC),{x:ik(e,"left","right"),y:ik(e,"top","bottom")}}function ik(e,t,r){return{min:ok(e,t),max:ok(e,r)}}function ok(e,t){return typeof e=="number"?e:e[t]||0}const yue=new WeakMap;class vue{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ma(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=g=>{r?(this.stopAnimation(),this.snapToCursor(Wb(g).point)):this.pauseAnimation()},c=(g,v)=>{this.stopAnimation();const{drag:S,dragPropagation:b,onDragStart:_}=this.getProps();if(S&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=cse(S),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),is(R=>{let w=this.getAxisMotionValue(R).get()||0;if(Ml.test(w)){const{projection:T}=this.visualElement;if(T&&T.layout){const x=T.layout.layoutBox[R];x&&(w=eo(x)*(parseFloat(w)/100))}}this.originPoint[R]=w}),_&&kr.postRender(()=>_(g,v)),UC(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},f=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:S,dragDirectionLock:b,onDirectionLock:_,onDrag:E}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:R}=v;if(b&&this.currentDirection===null){this.currentDirection=bue(R),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",v.point,R),this.updateAxis("y",v.point,R),this.visualElement.render(),E&&E(g,v)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>is(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new G8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:H8(this.visualElement),element:this.visualElement.current})}stop(t,r){const i=t||this.latestPointerEvent,s=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&kr.postRender(()=>f(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,i){const{drag:s}=this.getProps();if(!i||!fS(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=fue(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Lv(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=due(i.layoutBox,t):this.constraints=!1,this.elastic=gue(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&is(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=mue(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Lv(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=Ose(i,s.root,this.visualElement.getTransformPagePoint());let c=hue(s.layout.layoutBox,l);if(r){const f=r(_se(c));this.hasMutatedConstraints=!!f,f&&(c=p8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=is(m=>{if(!fS(m,r,this.currentDirection))return;let g=d&&d[m]||{};c&&(g={min:0,max:0});const v=s?200:1e6,S=s?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...l,...g};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return UC(this.visualElement,t),i.start(hA(t,i,0,r,this.visualElement,!1))}stopAnimation(){is(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){is(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[r];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){is(r=>{const{drag:i}=this.getProps();if(!fS(r,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(r);if(s&&s.layout){const{min:c,max:f}=s.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Kr(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Lv(r)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};is(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();s[c]=pue({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),is(c=>{if(!fS(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set(Kr(d,h,s[c]))})}addListeners(){if(!this.visualElement.current)return;yue.set(this.visualElement,this);const t=this.visualElement.current,r=Qv(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps(),g=d.target,v=g!==t&&l8(g);h&&m&&!v&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();Lv(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,l=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),kr.read(i);const c=gb(window,"resize",()=>this.scalePositionWithinConstraints()),f=s.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(is(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())}));return()=>{c(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:c=KC,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function fS(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function bue(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Sue extends hf{constructor(t){super(t),this.removeGroupControls=fs,this.removeListeners=fs,this.controls=new vue(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const sk=e=>(t,r)=>{e&&kr.postRender(()=>e(t,r))};class wue extends hf{constructor(){super(...arguments),this.removePointerDownListener=fs}onPointerDown(t){this.session=new G8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:H8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:sk(t),onStart:sk(r),onMove:i,onEnd:(l,c)=>{delete this.session,s&&kr.postRender(()=>s(l,c))}}}mount(){this.removePointerDownListener=Qv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let N_=!1;class Eue extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&s&&i.register(l),N_&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),IS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:s,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,t.layoutDependency!==r&&c.setOptions({...c.options,layoutDependency:r}),N_=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||kr.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:s}=t;N_=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Y8(e){const[t,r]=Mle(),i=j.useContext(h$);return k.jsx(Eue,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(F8),isPresent:t,safeToRemove:r})}const xue={pan:{Feature:wue},drag:{Feature:Sue,ProjectionNode:z8,MeasureLayout:Y8}};function lk(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,l=i[s];l&&kr.postRender(()=>l(t,Wb(t)))}class _ue extends hf{mount(){const{current:t}=this.node;t&&(this.unmount=fse(t,(r,i)=>(lk(this.node,i,"Start"),s=>lk(this.node,s,"End"))))}unmount(){}}class Tue extends hf{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Zb(gb(this.node.current,"focus",()=>this.onFocus()),gb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uk(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),l=i[s];l&&kr.postRender(()=>l(t,Wb(t)))}class Cue extends hf{mount(){const{current:t}=this.node;t&&(this.unmount=pse(t,(r,i)=>(uk(this.node,i,"Start"),(s,{success:l})=>uk(this.node,s,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const YC=new WeakMap,z_=new WeakMap,Oue=e=>{const t=YC.get(e.target);t&&t(e)},Rue=e=>{e.forEach(Oue)};function Aue({root:e,...t}){const r=e||document;z_.has(r)||z_.set(r,{});const i=z_.get(r),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(Rue,{root:e,...t})),i[s]}function Mue(e,t,r){const i=Aue(t);return YC.set(e,r),i.observe(e),()=>{YC.delete(e),i.unobserve(e)}}const jue={some:0,all:1};class kue extends hf{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:s="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:jue[s]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),v=h?m:g;v&&v(d)};return Mue(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Due(t,r))&&this.startObserver()}unmount(){}}function Due({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Nue={inView:{Feature:kue},tap:{Feature:Cue},focus:{Feature:Tue},hover:{Feature:_ue}},zue={layout:{ProjectionNode:z8,MeasureLayout:Y8}},$ue={...oue,...Nue,...xue,...zue},ck=tue($ue,nue),Z8=Bo.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return k.jsx("div",{className:en("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:k.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("title",{children:"Background Beams"}),k.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>k.jsx(ck.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),k.jsxs("defs",{children:[t.map((r,i)=>k.jsxs(ck.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[k.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),k.jsx("stop",{stopColor:"#111111"}),k.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),k.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),k.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[k.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),k.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),k.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});Z8.displayName="BackgroundBeams";const Pue=()=>k.jsxs(k.Fragment,{children:[k.jsx(Z8,{className:"absolute inset-0"}),k.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:k.jsxs("div",{className:"text-center",children:[k.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),k.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Rn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Iue(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Rn(e.additionalItems)}function fk(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const lc="__additional_property",xw="additionalProperties",Jc="allOf",$n="anyOf",ps="const",h2="default",TA="dependencies",Lue="enum",pi="__errors",or="$id",CA="if",lm="items",Uue="_$junk_option_schema_id$_",LS="$name",pn="oneOf",ZC="patternProperties",Un="properties",$_="readonly",X8="required",_w="submitButtonOptions",vr="$ref",Uv="$schema",Q8="root",W8="_",que=["discriminator","propertyName"],dk="formContext",Vue="layoutGridLookupMap",OA="__rjsf_additionalProperties",J8="__rjsf_rootSchema",Fue="ui:field",RA="ui:widget",Ic="ui:options",XC="ui:globalOptions",Bue="https://json-schema.org/draft/2019-09/schema",US="https://json-schema.org/draft/2020-12/schema";function kt(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const s=e[i];return i===RA&&Rn(s)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Ic&&Rn(s)?{...r,...s}:{...r,[i.substring(3)]:s}},{...t}):{...t}}function eP(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=kt(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function QC(e){const t={[pi]:[],addError(r){this[pi].push(r)}};if(Array.isArray(e))return e.reduce((r,i,s)=>({...r,[s]:QC(i)}),t);if(Gc(e)){const r=e;return Object.keys(r).reduce((i,s)=>({...i,[s]:QC(r[s])}),t)}return t}function yr(e,t){return HK(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const Hue=Object.prototype;function qv(e){for(const t in e)if(Hue.hasOwnProperty.call(e,t))return!1;return!0}const Gue=["array","boolean","integer","null","number","object","string"];new Set(Gue);const Kue=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Kue);const Yue=["items","allOf","oneOf","anyOf"];new Set(Yue);const Zue=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Zue);function qS(e){return typeof e=="object"}function El(e){return qS(e)?qv(e):e===!0}function Ip(e,t){return e<t?-1:e>t?1:0}function P_(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const s=new Set(e);for(let l=0;l<i;l++)s.add(t[l]);return Array.from(s)}function Xue(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const s=e;e=t,t=s}const i=new Set(t);for(let s=0;s<e.length&&i.size>0;s++){const l=e[s];i.delete(l)&&r.push(l)}return r}function hk(e){return e.length===0}function I_(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let s=0;s<t.length;s++)if(t[s]!==r[s]){const l=e(t[s],r[s]);if(l!==0)return l}return 0}}function tP(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const s=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(s[l],s[c])!==0&&++l!==c&&(s[l]=s[c]);return s.length=l+1,s}}function Que(e){return(t,r)=>{const i=[];let s=t.length,l=r.length;if(s===0||l===0)return i;if(s>l){const m=t;t=r,r=m;const g=s;s=l,l=g}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<s&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function Wue(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const pk=Wue,nP=()=>0,Jue=e=>e===void 0,ece=e=>typeof e!="object",mk={boolean:0,number:1,string:2};function tce(e,t){const r=typeof e,i=typeof t;return r===i?Ip(e,t):mk[r]-mk[i]}function nce(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const s=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];s.has(f)||e.push(f)}return e}function p2(e,t,r=nP){return(i,s)=>e(i)?e(s)?r(i,s):-1:e(s)?1:t(i,s)}function _p(e){return p2(Jue,e)}function Rc(e,t){return p2(r=>r===void 0||e(r),t)}function L_(e,t){return p2(Array.isArray,e,t)}const ua=_p(Ip),U_=Rc(e=>e===0,(e,t)=>e-t);function rce({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=pk(t,_=>Object.keys(_).sort());function i(_){return(E,R)=>{const w=r(E),T=r(R),x=Math.min(w.length,T.length);for(let O=0;O<x;O++){const C=Ip(w[O],T[O]);if(C!==0)return C}if(w.length!==T.length)return w.length-T.length;for(let O=0;O<x;O++){const C=w[O],M=_(E[C],R[C]);if(M!==0)return M}return 0}}function s(_){const E=I_(_),R=pk(e,tP(_,{threshold:0}));return(w,T)=>E(R(w),R(T))}const l=s(Ip);function c(_,E){if(qS(_)){if(qS(E)){const R=Object.keys(_),w=Object.keys(E),T=nce(R,w),x=T.length;for(let O=0;O<x;O++){const C=T[O];if(_[C]===E[C])continue;const D=(b[C]??f)(_[C],E[C]);if(D!==0)return D}return 0}return E===!0&&qv(_)?0:1}return qS(E)?_===!0&&qv(E)?0:-1:Ip(_,E)}const f=_p(h),d=p2(ece,L_(i(f),I_(h)),tce);function h(_,E){return _===null?-1:E===null?1:d(_,E)}const m=_p(c),g=Rc(qv,i(m)),v=_p(s(c)),S=Rc(El,c),b={$id:ua,$comment:ua,$defs:g,$ref:ua,$schema:ua,const:f,contains:m,contentEncoding:ua,contentMediaType:ua,default:f,definitions:g,description:ua,else:m,examples:f,exclusiveMaximum:ua,exclusiveMinimum:ua,format:ua,if:m,maximum:ua,maxItems:ua,maxLength:ua,maxProperties:ua,minimum:ua,multipleOf:ua,not:m,pattern:ua,propertyNames:m,readOnly:ua,then:m,title:ua,writeOnly:ua,uniqueItems:Rc(_=>_===!1,nP),minLength:U_,minItems:U_,minProperties:U_,required:Rc(hk,l),enum:Rc(hk,s(h)),type:_p((_,E)=>{const R=Array.isArray(_),w=Array.isArray(E);return!R&&!w?Ip(_,E):l(R?_:[_],w?E:[E])}),items:Rc(_=>!Array.isArray(_)&&El(_),L_(c,I_(c))),anyOf:v,allOf:v,oneOf:v,properties:g,patternProperties:g,additionalProperties:S,additionalItems:S,dependencies:Rc(qv,i(_p(L_(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function gk(e){return e}const rP=(e,t)=>e?rP(t%e,e):t,ace=(e,t)=>Math.abs(e*t)/rP(e,t);function ice(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*q_(e,t,r){const i=e.length,s=t.length;if(i>0&&s>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<s;f++)yield r(c,t[f])}}function V_(e,t){return e||t}function yk(e){return(t,r)=>{const i={...t},s=Object.keys(r),l=s.length;for(let c=0;c<l;c++){const f=s[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function oce(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function _h(e,t,r){r===void 0||El(r)?delete e[t]:e[t]=r}const sce=["properties","patternProperties","additionalProperties"];function vk(e){const t=Object.keys(e),r=t.length,i=[];for(let s=0;s<r;s++){const l=t[s];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const bk=[[],[]];function Sk(e,t,r){const i=r.length;for(let s=0;s<i;s++){const l=r[s];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const lce=["items","additionalItems"],uce=["if","then","else"];function wk(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function F_(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function Th(e,t,r){return[e,t,r]}function cce(e){const t=new Map;for(const[r,i,s]of e){const l=c=>{if(!s(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const fce=[Th("minimum","maximum",e=>e.maximum>=e.minimum),Th("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Th("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Th("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Th("minLength","maxLength",e=>e.maxLength>=e.minLength),Th("minItems","maxItems",e=>e.maxItems>=e.minItems),Th("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function dce({mergePatterns:e=ice,isSubRegExp:t=Object.is,intersectJson:r=Xue,deduplicateJsonSchemaDef:i=gk,defaultMerger:s=gk,assigners:l=[],checks:c=fce,mergers:f}={}){function d(x){const O=x.length;let C=x[0];for(let M=1;M<O;M++){const D=R(C,x[M]);if(D===!1)return!1;El(D)||(C=D)}return C}function h(x,O,C,M,D,$,q){if(x.length=0,C===!1)return!1;if(x.push(C),D!==void 0){if(D===!1)return!1;x.push(D)}if(Sk(x,O,$))return!1;const V=x.length<2;if(q===!1){if(V)return;if(Sk(x,O,M))return!1}else V&&q!==void 0&&x.push(q);return x.length===1?x[0]:d(x)}function m(x,O,C,M,D,$){const q=C.length;if(q>0&&D!==!1)if($)Object.assign(x,O);else for(let L=0;L<q;L++){const V=C[L];M.has(V)||(x[V]=R(O[V],D))}return x}const g=(x,{properties:O={},patternProperties:C,additionalProperties:M=!0},{properties:D={},patternProperties:$,additionalProperties:q=!0})=>{const L=El(M),V=El(q);if(L&&V)return _h(x,"properties",w(O,D)),_h(x,"patternProperties",C&&$?w(C,$):C??$),delete x.additionalProperties,x;const F=R(M,q);_h(x,"additionalProperties",F);const re={},ae=Object.keys(O),K=ae.length,[B,Y]=C?vk(C):bk,[fe,ie]=$?vk($):bk,N=[],I=new Set,U=V?void 0:q;for(let Ee=0;Ee<K;Ee++){const Oe=ae[Ee];I.add(Oe);const de=h(N,Oe,O[Oe],B,D[Oe],fe,U);de!==void 0&&(re[Oe]=de)}const P=Object.keys(D),G=P.length,ee=L?void 0:M;for(let Ee=0;Ee<G;Ee++){const Oe=P[Ee];if(I.has(Oe))continue;const de=h(N,Oe,D[Oe],fe,void 0,B,ee);de!==void 0&&(re[Oe]=de)}_h(x,"properties",re);let ue={};const ve=new Set;if(Y.length>0&&ie.length>0){const Ee=q_(Y,ie,(Oe,de)=>{t(Oe,de)&&ve.add(Oe),t(de,Oe)&&ve.add(de),ue[e(Oe,de)]=R(C[Oe],$[de])});for(;!Ee.next().done;);}return ue=m(ue,C,Y,ve,q,V),ue=m(ue,$,ie,ve,M,L),_h(x,"patternProperties",ue),x},v=(x,{items:O=[],additionalItems:C},{items:M=[],additionalItems:D})=>{const $=Array.isArray(O),q=Array.isArray(M),L=[];if(x.items=L,$&&q){const[V,F,re]=O.length<M.length?[O.length,C,M]:[M.length,D,O];let ae=0;for(;ae<V;ae++)L.push(R(O[ae],M[ae]));if(F===!1)x.additionalItems=!1;else{const K=F===void 0||El(F);for(;ae<re.length;ae++)L.push(K?re[ae]:R(re[ae],F));_h(x,"additionalItems",C!==void 0&&D!==void 0?R(C,D):C??D)}}else if($||q){const[V,F,re]=$?[O,M,C]:[M,O,D];_h(x,"additionalItems",re&&R(re,F));for(let ae=0;ae<V.length;ae++)L.push(R(V[ae],F))}else delete x.additionalItems,x.items=R(O,M);return x},S=(x,O,C)=>{wk(x,O);const M=wk({},C);return x.allOf===void 0?x.allOf=[M]:x.allOf=x.allOf.concat(M),x};function b(x,O){return i(Array.from(q_(x,O,R)))}const _=oce([[sce,g],[lce,v],[uce,S],...l]),E=cce(c);function R(x,O){if(x===!1||O===!1)return!1;if(El(x))return El(O)?!0:O;if(El(O))return x;let C={...x};const M=new Set,D=new Set,$=Object.keys(O),q=$.length;for(let L=0;L<q;L++){const V=$[L],F=O[V];if(F===void 0)continue;const re=E.get(V);if(re!==void 0){const Y=re.length;for(let fe=0;fe<Y;fe++){const ie=re[fe];x[ie.oppositeKey]!==void 0&&D.add(ie.check)}}const ae=x[V];if(ae===void 0){C[V]=F;continue}const K=_.get(V);if(K){M.add(K);continue}const B=T[V]??s;C[V]=B(ae,F)}for(const L of M)C=L(C,x,O);for(const L of D)L(C);return C}const w=yk(R),T={$id:s,$ref:s,$schema:s,$comment:s,$defs:w,definitions:w,type:(x,O)=>{if(x===O)return x;const C=Array.isArray(x),M=Array.isArray(O);if(!C&&!M){const D=F_(x,O);if(D!==void 0)return D}else if(C||M){const D=new Set;if(C&&M)for(const q of q_(x,O,F_))q!==void 0&&D.add(q);else{const q=C?x:O,L=C?O:x,V=q.length;for(let F=0;F<V;F++){const re=F_(L,q[F]);re!==void 0&&D.add(re)}}const $=D.size;if($===1)return D.values().next().value;if($>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${x.toString()}, ${O.toString()}`)},default:s,description:s,title:s,const:s,format:s,contentEncoding:s,contentMediaType:s,not:(x,O)=>{const C=i([x,O]);return C.length===1?C[0]:{anyOf:C}},pattern:e,readOnly:V_,writeOnly:V_,enum:(x,O)=>{const C=r(x,O);if(C.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(x)}", "${JSON.stringify(O)}"`);return C},anyOf:b,oneOf:b,allOf:(x,O)=>i(x.concat(O)),propertyNames:R,contains:R,dependencies:yk((x,O)=>Array.isArray(x)?Array.isArray(O)?P_(x,O):R(O,{required:x}):Array.isArray(O)?R(x,{required:O}):R(x,O)),examples:(x,O)=>{if(!Array.isArray(x)||!Array.isArray(O))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(x)}" and "${JSON.stringify(O)}"`);return P_(x,O)},multipleOf:(x,O)=>{let C=1;for(;!Number.isInteger(x)||!Number.isInteger(O);)C*=10,x*=10,O*=10;return ace(x,O)/C},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:V_,required:P_,...f};return{mergeSchemaDefinitions:R,mergeArrayOfSchemaDefinitions:d}}function hce(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:s,...l}=i;t.push(l);for(let c=s.length-1;c>=0;c--)r.push(s[c])}return t}function pce(e){return t=>e(hce(t))}var Rv={},Ek;function mce(){if(Ek)return Rv;Ek=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function s(h,m,g){for(var v,S,b=1,_=m.length;b<_;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),S=_>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),S&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!S)break;h=h[v]}var E=h[v];return g===void 0?delete h[v]:h[v]=g,E}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var g=m.length;if(g===1)return h;for(var v=1;v<g;){if(h=h[i(m[v++])],g===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,g){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return s(h,m,g)}function d(h){var m=l(h);return{get:function(g){return c(g,m)},set:function(g,v){return f(g,m,v)}}}return Rv.get=c,Rv.set=f,Rv.compile=d,Rv}var gce=mce();const B_=$l(gce);var yce=D9();const AA=$l(yce);function Tw(e,t){if(or in e&&AA.equal(e[or],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(In(i)){const s=Tw(i,t);if(s!==void 0)return s}}else if(In(r)){const i=Tw(r,t);if(i!==void 0)return i}}function WC(e,t){const r=Ve(e,or,t);vr in e&&(e={...e,[vr]:AA.resolve(r,e[vr])});for(const[i,s]of Object.entries(e))Array.isArray(s)?e={...e,[i]:s.map(l=>In(l)?WC(l,r):l)}:In(s)&&(e={...e,[i]:WC(s,r)});return e}function MA(e,t){const r=t[e];return[lb(t,[e]),r]}function aP(e,t={},r=[],i=Ve(t,[or])){const s=e||"";let l;if(s.startsWith("#")){const f=decodeURIComponent(s.substring(1));i===void 0||or in t&&t[or]===i?l=B_.get(t,f):t[Uv]===US&&(l=Tw(t,i.replace(/\/$/,"")),l!==void 0&&(l=B_.get(l,f)))}else if(t[Uv]===US){const f=i?AA.resolve(i,s):s,[d,...h]=f.replace(/#\/?$/,"").split("#");l=Tw(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[or],oa(h)||(l=B_.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[vr];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...g]=r,v=[...g,s,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=MA(vr,l),h=aP(d,t,[...r,s],i);return Object.keys(f).length>0?t[Uv]===Bue||t[Uv]===US?{[Jc]:[f,h]}:{...f,...h}:h}return l}function iP(e,t={},r=Ve(t,[or])){return aP(e,t,[],r)}function Nl(e){let t;const r=Ve(e,que);return Kc(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function yb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function hl(e){let{type:t}=e;return!t&&e.const?yb(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function dc(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},c=t[s];return e&&s in e&&Rn(c)?i[s]=dc(l,c):e&&t&&(hl(e)==="object"||hl(t)==="object")&&s===X8&&Array.isArray(l)&&Array.isArray(c)?i[s]=fY(l,c):i[s]=c,i},r)}function oP(e,t,r){var i;if(e&&r){const s=Ve(e,r);if(s===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Ve(c,[Un,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===s||!((i=f.enum)===null||i===void 0)&&i.includes(s)))return l}}}function jA(e,t,r,i,s){if(t===void 0)return 0;const l=oP(t,r,s);if(r6(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(s&&Mn(f,[Un,s])){const d=Ve(t,s),h=Ve(f,[Un,s],{});if(e.isValid(h,d,i))return c}else if(f[Un]){const d={anyOf:Object.keys(f[Un]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function yi(e,t,r={},i,s,l=!1){return Cl(e,t,r,i,void 0,void 0,s,l)[0]}function vce(e,t,r,i,s,l,c){const{if:f,then:d,else:h,...m}=t,g=e.isValid(f,l||{},r);let v=[m],S=[];if(i)d&&typeof d!="boolean"&&(S=S.concat(Cl(e,d,r,l,i,s,c))),h&&typeof h!="boolean"&&(S=S.concat(Cl(e,h,r,l,i,s,c)));else{const b=g?d:h;b&&typeof b!="boolean"&&(S=S.concat(Cl(e,b,r,l,i,s,c)))}return S.length&&(v=S.map(b=>dc(m,b))),v.flatMap(b=>Cl(e,b,r,l,i,s,c))}function sP(e){return e.reduce((r,i)=>i.length>1?i.flatMap(s=>s6(r.length,l=>[...r[l]].concat(s))):(r.forEach(s=>s.push(i[0])),r),[[]])}function lP(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Gn(r,[i],e.patternProperties[i]),r),{})}function bce(e,t,r,i,s,l,c,f){const d=uP(e,t,r,i,s,l,c,f);if(d.length>1||d[0]!==t)return d;if(TA in t)return cP(e,t,r,i,s,l,c).flatMap(m=>Cl(e,m,r,l,i,s,c));if(Jc in t&&Array.isArray(t[Jc])){const h=t.allOf.map(g=>Cl(e,g,r,l,i,s,c));return sP(h).map(g=>({...t,allOf:g}))}return[t]}function uP(e,t,r,i,s,l,c,f){const d=Bp(t,r,s,void 0,f);return d!==t?Cl(e,d,r,l,i,s,c,f):[t]}function Bp(e,t,r,i,s){if(!Rn(e))return e;let l=e;if(vr in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...iP(c,t,i),...f},or in l&&(i=l[or])}if(Un in l){const c=[],f=sY(l[Un],(d,h,m)=>{const g=[...r];d[m]=Bp(h,t,g,i,s),c.push(g)},{});KK(r,c6(RK(c))),l={...l,[Un]:f}}if(lm in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Bp(l.items,t,r,i,s)}),s){let c,f;$n in e&&Array.isArray(e[$n])?(c=$n,f=l[$n]):pn in e&&Array.isArray(e[pn])&&(c=pn,f=l[pn]),c&&f&&(l={...l,[c]:f.map(d=>Bp(d,t,r,i,s))})}return yr(e,l)?e:l}function Sce(e,t,r,i,s){const l={...t,properties:{...t.properties}},c=i&&Rn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(ZC in l){const d=lP(l,f);if(!oa(d)){l.properties[f]=yi(e,{[Jc]:Object.values(d)},r,Ve(c,[f]),s),Gn(l.properties,[f,lc],!0);return}}if(xw in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?vr in l.additionalProperties?d=yi(e,{[vr]:Ve(l.additionalProperties,[vr])},r,c,s):"type"in l.additionalProperties?d={...l.additionalProperties}:$n in l.additionalProperties||pn in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:yb(Ve(c,[f]))}:d={type:yb(Ve(c,[f]))},l.properties[f]=d,Gn(l.properties,[f,lc],!0)}else l.properties[f]={type:"null"},Gn(l.properties,[f,lc],!0)}}),l}const{compareSchemaDefinitions:wce,compareSchemaValues:Ece}=rce(),{mergeArrayOfSchemaDefinitions:xce}=dce({intersectJson:Que(Ece),deduplicateJsonSchemaDef:tP(wce)}),_ce=pce(xce);function Tce(e){return _ce(e)}function Cl(e,t,r,i,s=!1,l=[],c,f){return Rn(t)?bce(e,t,r,s,l,i,c,f).flatMap(h=>{var m;let g=h;if(CA in g)return vce(e,g,r,s,l,i,c);if(Jc in g){if(s){const{allOf:S,...b}=g;return[...S,b]}try{const S=[],b=[];(m=g.allOf)===null||m===void 0||m.forEach(_=>{typeof _=="object"&&_.contains?S.push(_):b.push(_)}),S.length&&(g={...g,allOf:b}),g=c?c(g):Tce(g),S.length&&(g.allOf=S)}catch(S){console.warn(`could not merge subschemas in allOf:
60
+ `,S);const{allOf:b,..._}=g;return _}}return Un in g&&ZC in g&&(g=Object.keys(g.properties).reduce((S,b)=>{const _=lP(S,b);return oa(_)||(S.properties[b]=yi(e,{allOf:[S.properties[b],...Object.values(_)]},r,Ve(i,[b]),c)),S},{...g,properties:{...g.properties}})),ZC in g||xw in g&&g.additionalProperties!==!1?Sce(e,g,r,i,c):g}):[{}]}function Cce(e,t,r,i,s){let l;const{oneOf:c,anyOf:f,...d}=t;if(Array.isArray(c)?l=c:Array.isArray(f)&&(l=f),l){const h=s===void 0&&i?{}:s,m=Nl(t);l=l.map(v=>Bp(v,r,[]));const g=jA(e,h,l,r,m);if(i)return l.map(v=>dc(d,v));t=dc(d,l[g])}return[t]}function cP(e,t,r,i,s,l,c){const{dependencies:f,...d}=t;return Cce(e,d,r,i,l).flatMap(m=>fP(e,f,m,r,i,s,l,c))}function fP(e,t,r,i,s,l,c,f){let d=[r];for(const h in t){if(!s&&Ve(c,[h])===void 0||r.properties&&!(h in r.properties))continue;const[m,g]=MA(h,t);return Array.isArray(g)?d[0]=Oce(r,g):Rn(g)&&(d=Rce(e,r,i,h,g,s,l,c,f)),d.flatMap(v=>fP(e,m,v,i,s,l,c,f))}return d}function Oce(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function Rce(e,t,r,i,s,l,c,f,d){return Cl(e,s,r,f,l,c,d).flatMap(m=>{const{oneOf:g,...v}=m;if(t=dc(t,v),g===void 0)return t;const S=g.map(_=>typeof _=="boolean"||!(vr in _)?[_]:uP(e,_,r,l,c,f));return sP(S).flatMap(_=>Ace(e,t,r,i,_,l,c,f,d))})}function Ace(e,t,r,i,s,l,c,f,d){const h=s.filter(m=>{if(typeof m=="boolean"||!m||!m.properties)return!1;const{[i]:g}=m.properties;if(g){const v={type:"object",properties:{[i]:g}};return e.isValid(v,f,r)||l}return!1});return!l&&h.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):h.flatMap(m=>{const g=m,[v]=MA(i,g.properties),S={...g,properties:v};return Cl(e,S,r,f,l,c,d).map(_=>dc(t,_))})}function Vv(e,t,r,i,s,l={},c){if(Array.isArray(r[s])){const d=Nl(r)||i,h=r[s].map(g=>yi(e,g,t,l,c)),m=Ve(l,d);if(m!==void 0)return h.find(g=>$c(Ve(g,[Un,d,h2],Ve(g,[Un,d,ps])),m))}}function dP(e,t,r,i,s){let l=r;if(Mn(r,vr)&&(l=yi(e,r,t,void 0,s)),oa(i))return l;const c=Array.isArray(i)?i:i.split("."),[f,...d]=c;if(f&&Mn(l,f))return l=Ve(l,f),dP(e,t,l,d,s)}function VS(e,t,r,i,s,l){const c=dP(e,t,r,i,l);return c===void 0?s:c}const xk={title:"!@#$_UNKNOWN_$#@!"};function Mce(e,t,r,i,s={},l){const c=Array.isArray(i)?[...i]:i.split(".");let f=r;const d=c.pop();c.length&&c.forEach(v=>{f=VS(e,t,f,[Un,v],{},l),Mn(f,pn)?f=Vv(e,t,f,d,pn,Ve(s,v),l):Mn(f,$n)&&(f=Vv(e,t,f,d,$n,Ve(s,v),l))}),Mn(f,pn)?f=Vv(e,t,f,d,pn,s,l):Mn(f,$n)&&(f=Vv(e,t,f,d,$n,s,l));let h=VS(e,t,f,[Un,d],xk,l);h===xk&&(h=void 0);const m=VS(e,t,f,X8,[],l);let g;return h&&Array.isArray(m)&&(g=m.includes(d)),{field:h,isRequired:g}}const jce={type:"object",$id:Uue,properties:{__not_really_there__:{type:"number"}}};function JC(e,t,r,i,s){let l=0;return r&&(In(r.properties)?l+=rY(r.properties,(c,f,d)=>{const h=Ve(i,d);if(typeof f=="boolean")return c;if(Mn(f,vr)){const m=yi(e,f,t,h,s);return c+JC(e,t,m,h||{},s)}if((Mn(f,pn)||Mn(f,$n))&&h){const m=Mn(f,pn)?pn:$n,g=Nl(f);return c+vb(e,t,h,Ve(f,m),-1,g,s)}if(f.type==="object")return In(h)&&(c+=1),c+JC(e,t,f,h,s);if(f.type===yb(h)){let m=c+1;return f.default?m+=h===f.default?1:-1:f.const&&(m+=h===f.const?1:-1),m}return c},0):Kc(r.type)&&r.type===yb(i)&&(l+=1)),l}function vb(e,t,r,i,s=-1,l,c){const f=i.map(v=>Bp(v,t,[])),d=oP(r,i,l);if(r6(d))return d;const h=f.reduce((v,S,b)=>(jA(e,r,[jce,S],t,l)===1&&v.push(b),v),[]);if(h.length===1)return h[0];h.length||s6(f.length,v=>h.push(v));const m=new Set,{bestIndex:g}=h.reduce((v,S)=>{const{bestScore:b}=v,_=f[S],E=JC(e,t,_,r,c);return m.add(E),E>b?{bestIndex:S,bestScore:E}:v},{bestIndex:s,bestScore:0});return m.size===1&&s>=0?s:g}function kA(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Rn(t))}function bb(e,t,r=!1,i=!1,s=!1){if(Array.isArray(t)){const l=Array.isArray(e)?e:[],c=s?l:t,f=s?t:l,d=c.map((h,m)=>f[m]!==void 0?bb(l[m],t[m],r,i,s):h);return(r||s)&&d.length<f.length&&d.push(...f.slice(d.length)),d}if(Rn(t)){const l=Object.assign({},e);return Object.keys(t).reduce((c,f)=>{var d;const h=Ve(t,f),m=Rn(e)&&f in e,g=f in t,v=(d=Ve(e,f))!==null&&d!==void 0?d:{},S=m&&Object.entries(v).some(([,E])=>Rn(E)),b=m&&Rn(Ve(e,f)),_=g&&Rn(h);return b&&_&&!S?(c[f]={...Ve(e,f),...h},c):(c[f]=bb(Ve(e,f),h,r,i,s&&(m||!g)),c)},l)}return i&&(e!==void 0&&rw(t)||typeof t=="number"&&isNaN(t))||s&&!rw(t)?e:t}function Sb(e,t,r=!1){return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},c=t[s];if(e&&s in e&&Rn(c))i[s]=Sb(l,c,r);else if(r&&Array.isArray(l)&&Array.isArray(c)){let f=c;r==="preventDuplicates"&&(f=c.reduce((d,h)=>(l.includes(h)||d.push(h),d),[])),i[s]=l.concat(f)}else i[s]=c;return i},Object.assign({},e))}function hP(e){return Array.isArray(e.enum)&&e.enum.length===1||ps in e}function DA(e,t,r={},i){const s=yi(e,t,r,void 0,i),l=s.oneOf||s.anyOf;return Array.isArray(s.enum)?!0:Array.isArray(l)?l.every(c=>typeof c!="boolean"&&hP(c)):!1}function NA(e,t,r,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:DA(e,t.items,r,i)}function pP(e){const t=e[ps],r=hl(e);return Rn(t)&&Kc(t?.$data)&&r!=="object"&&r!=="array"}function kce(e){if(Lue in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ps in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function um(e,t){if(e.enum){let l;if(t){const{enumNames:c}=kt(t);l=c}return e.enum.map((c,f)=>({label:l?.[f]||String(c),value:c}))}let r,i;e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf);let s=Nl(e);if(t){const{optionsSchemaSelector:l=s}=kt(t);s=l}return r&&r.map((l,c)=>{const{title:f}=kt(i?.[c]),d=l;let h,m=f;if(s){const g=Ve(d,[Un,s],{});h=Ve(g,h2,Ve(g,ps)),m=m||g?.title||d.title||String(h)}else h=kce(d),m=m||d.title||String(h);return{schema:d,label:m,value:h}})}const Dce=["string","number","integer","boolean","null"];var cm;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(cm||(cm={}));function H_(e,t=cm.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const i=e.items[r];if(typeof i!="boolean")return i}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==cm.Ignore&&Rn(e.additionalItems)?e.additionalItems:{}}function mP(e,t){const{default:r,type:i}=e;return Array.isArray(i)&&i.includes("null")&&oa(t)&&r===null?null:t}function _k(e,t,r,i,s,l=[],c={},f=!1,d=!1){const{emptyObjectFields:h="populateAllDefaults"}=c;if(i===!0||f)e[t]=r;else if(i==="excludeObjectChildren")(d&&r!==void 0||!Rn(r)||!oa(r))&&(e[t]=r);else if(h!=="skipDefaults"){const m=s===void 0?l.includes(t):s;Rn(r)?h==="skipEmptyDefaults"?oa(r)||(e[t]=r):(!oa(r)||l.includes(t))&&(m||h!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(h==="populateAllDefaults"||h==="skipEmptyDefaults"||m&&l.includes(t))&&(e[t]=r)}}function Lc(e,t,r={}){const{parentDefaults:i,rawFormData:s,rootSchema:l={},includeUndefinedValues:c=!1,_recurseList:f=[],experimental_defaultFormStateBehavior:d=void 0,experimental_customMergeAllOf:h=void 0,required:m,shouldMergeDefaultsIntoFormData:g=!1,initialDefaultsGenerated:v}=r;let S=Rn(s)?s:{};const b=Rn(t)?t:{};let _=i,E=null,R=d,w=f;if(b[ps]!==void 0&&d?.constAsDefaults!=="never"&&!pP(b))_=b[ps];else if(Rn(_)&&Rn(b.default)&&!b[$n]&&!b[pn]&&!b[vr])_=Sb(_,b.default);else if(h2 in b&&!b[$n]&&!b[pn]&&!b[vr])_=b.default;else if(vr in b){const O=b[vr];f.includes(O)||(w=f.concat(O),E=iP(O,l));const C=s===void 0||Rn(s)&&oa(s);E&&!_&&C&&(_=b.default),g&&E&&!Rn(s)&&(S=s)}else if(TA in b){const O={...Tk(e,b,r,_),...S};E=cP(e,b,l,!1,[],O,h)[0]}else if(kA(b))_=b.items.map((O,C)=>Lc(e,O,{rootSchema:l,includeUndefinedValues:c,_recurseList:f,experimental_defaultFormStateBehavior:d,experimental_customMergeAllOf:h,parentDefaults:Array.isArray(i)?i[C]:void 0,rawFormData:S,required:m,shouldMergeDefaultsIntoFormData:g}));else if(pn in b){const{oneOf:O,...C}=b;if(O.length===0)return;const M=Nl(b),{type:D="null"}=C;!Array.isArray(D)&&Dce.includes(D)&&R?.constAsDefaults==="skipOneOf"&&(R={...R,constAsDefaults:"never"}),E=O[vb(e,l,s??b.default,O,0,M,h)],E=dc(C,E)}else if($n in b){const{anyOf:O,...C}=b;if(O.length===0)return;const M=Nl(b);E=O[vb(e,l,s??b.default,O,0,M,h)],E=dc(C,E)}if(E)return Lc(e,E,{rootSchema:l,includeUndefinedValues:c,_recurseList:w,experimental_defaultFormStateBehavior:R,experimental_customMergeAllOf:h,parentDefaults:_,rawFormData:s??S,required:m,shouldMergeDefaultsIntoFormData:g,initialDefaultsGenerated:v});_===void 0&&(_=b.default);const T=Tk(e,b,r,_);let x=T??_;if(g){const{arrayMinItems:O={}}=d||{},{mergeExtraDefaults:C}=O,M=Nce(e,b,l,s,d,h);(!Rn(s)||Jc in b)&&(x=bb(x,M,C,!0))}return x}function Nce(e,t,r,i,s,l){const c=!hP(t)&&DA(e,t,r,l);let f=i;if(c){const h=um(t);f=h?.some(g=>yr(g.value,i))?i:void 0}return t[ps]&&s?.constAsDefaults==="always"&&(f=t.const),f}function zce(e,t,{rawFormData:r,rootSchema:i={},includeUndefinedValues:s=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){{const v=Rn(r)?r:{},S=t,_=c?.allOf==="populateDefaults"&&Jc in S||c?.emptyObjectFields!=="skipEmptyDefaults"&&CA in S?yi(e,S,i,v,f):S,E=_[ps],R=Object.keys(_.properties||{}).reduce((w,T)=>{var x;const O=Ve(_,[Un,T],{}),C=Rn(E)&&E[T]!==void 0,M=(Rn(O)&&ps in O||C)&&c?.constAsDefaults!=="never"&&!pP(O),D=Lc(e,O,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:Ve(g,[T]),rawFormData:Ve(v,[T]),required:(x=_.required)===null||x===void 0?void 0:x.includes(T),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});return _k(w,T,D,s,d,_.required,c,M,O?.type==="null"),w},{});if(_.additionalProperties&&!m){const w=Rn(_.additionalProperties)?_.additionalProperties:{},T=new Set;Rn(g)&&Object.keys(g).filter(O=>!_.properties||!_.properties[O]).forEach(O=>T.add(O));const x=[];Object.keys(v).filter(O=>!_.properties||!_.properties[O]).forEach(O=>{T.add(O),x.push(O)}),T.forEach(O=>{var C;const M=Lc(e,w,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:Ve(g,[O]),rawFormData:Ve(v,[O]),required:(C=_.required)===null||C===void 0?void 0:C.includes(O),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});_k(R,O,M,s,d,x)})}return mP(t,R)}}function $ce(e,t,{rawFormData:r,rootSchema:i={},_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:f,requiredAsRoot:d=!1,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){var v,S;const b=t,_=(v=l?.arrayMinItems)!==null&&v!==void 0?v:{},{populate:E,mergeExtraDefaults:R}=_,w=E==="never",T=E==="requiredOnly",x=E==="all"||!w&&!T,O=(S=_?.computeSkipPopulate)!==null&&S!==void 0?S:(()=>!1),M=l?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(g)&&(g=g.map((L,V)=>{const F=H_(b,cm.Fallback,V),re=Array.isArray(r)?r[V]:void 0;return Lc(e,F,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:L,rawFormData:re,required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m})})),Array.isArray(r)){const L=H_(b);if(w)g=r;else{const V=r.map((re,ae)=>Lc(e,L,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:re,parentDefaults:Ve(g,[ae]),required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}));g=bb(g,V,(T&&f||x)&&R)}}if((Rn(b)&&ps in b&&l?.constAsDefaults!=="never")===!1){if(w)return g??M;if(T&&!f)return g||void 0}let $;const q=Array.isArray(g)?g.length:0;if(!b.minItems||NA(e,b,i,c)||O(e,b,i)||b.minItems<=q)$=g||!f&&!d?g:M;else{const L=g||[],V=H_(b,cm.Invert),F=V.default,re=Array.from({length:b.minItems-q},()=>Lc(e,V,{parentDefaults:F,rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,required:f,shouldMergeDefaultsIntoFormData:h}));$=L.concat(re)}return mP(t,$)}function Tk(e,t,r={},i){switch(hl(t)){case"object":return zce(e,t,r,i);case"array":return $ce(e,t,r,i)}}function gP(e,t,r,i,s=!1,l,c,f){if(!Rn(t))throw new Error("Invalid schema: "+t);const d=yi(e,t,i,r,c),h=Lc(e,d,{rootSchema:i,includeUndefinedValues:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:f,requiredAsRoot:!0});if(d.type!=="object"&&Rn(d.default))return{...h,...r};if(Rn(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:m}=l||{};return bb(h,r,!0,m==="useDefaultIfFormDataUndefined",!0)}return h}function yP(e={}){return"widget"in kt(e)&&kt(e).widget!=="hidden"}function vP(e,t,r={},i,s){if(r[RA]==="files")return!0;if(t.items){const l=yi(e,t.items,i,void 0,s);return l.type==="string"&&l.format==="data-url"}return!1}function Pce(e,t,r={},i,s,l){const c=kt(r,s),{label:f=!0}=c;let d=!!f;if(d){const h=hl(t),m=Ve(t,lc,!1);h==="array"&&(d=m||NA(e,t,i,l)||vP(e,t,r,i,l)||yP(r)),h==="object"&&(d=m),h==="boolean"&&r&&!r[RA]&&(d=!1),r&&r[Fue]&&(d=!1)}return d}function Rh(e,t,r,i,s,l=[],c){if(vr in t||TA in t||Jc in t||CA in t){const d=yi(e,t,i,s,c);if(l.findIndex(m=>yr(m,d))===-1)return Rh(e,d,r,i,s,l.concat(d),c)}let f={[LS]:r.replace(/^\./,"")};if(pn in t||$n in t){const d=pn in t?t.oneOf:t.anyOf,h=Nl(t),m=vb(e,i,s,d,0,h,c),g=d[m];f={...f,...Rh(e,g,r,i,s,l,c)}}if(xw in t&&t[xw]!==!1&&Gn(f,OA,!0),lm in t&&Array.isArray(s)){const{items:d,additionalItems:h}=t;Array.isArray(d)?s.forEach((m,g)=>{d[g]?f[g]=Rh(e,d[g],`${r}.${g}`,i,m,l,c):h?f[g]=Rh(e,h,`${r}.${g}`,i,m,l,c):console.warn(`Unable to generate path schema for "${r}.${g}". No schema defined for it`)}):s.forEach((m,g)=>{f[g]=Rh(e,d,`${r}.${g}`,i,m,l,c)})}else if(Un in t)for(const d in t.properties){const h=Ve(t,[Un,d],{});f[d]=Rh(e,h,`${r}.${d}`,i,Ve(s,[d]),l,c)}return f}function bP(e,t,r="",i,s,l){return Rh(e,t,r,i,s,void 0,l)}function SP(e,t){if(t.length===0&&typeof e!="object")return e;const r=sR(e,t);return Array.isArray(e)?Object.keys(r).map(i=>r[i]):r}function wP(e,t){const r=(s,l)=>typeof s!="object"||oa(s)||l&&!oa(s),i=(s,l=[],c=[[]])=>{const f=Object.keys(s);return f.forEach(d=>{const h=s[d];if(typeof h=="object"){const m=c.map(g=>[...g,d]);h[OA]&&h[LS]!==""?l.push(h[LS]):i(h,l,m)}else d===LS&&h!==""&&c.forEach(m=>{const g=Ve(t,m),v=f.length===1;(r(g,v)||Array.isArray(g)&&g.every(S=>r(S,v)))&&l.push(m)})}),l};return i(e)}function Ice(e,t,r={},i){const s=yi(e,t,r,i),l=bP(e,s,"",r,i),f=wP(l,i).map(d=>Array.isArray(d)?d.join("."):d);return SP(i,f)}const vp=Symbol("no Value");function eO(e,t,r,i,s={},l){let c;if(Mn(r,Un)){const f={};if(Mn(i,Un)){const m=Ve(i,Un,{});Object.keys(m).forEach(g=>{Mn(s,g)&&(f[g]=void 0)})}const d=Object.keys(Ve(r,Un,{})),h={};d.forEach(m=>{const g=Ve(s,m);let v=Ve(i,[Un,m],{}),S=Ve(r,[Un,m],{});Mn(v,vr)&&(v=yi(e,v,t,g,l)),Mn(S,vr)&&(S=yi(e,S,t,g,l));const b=Ve(v,"type"),_=Ve(S,"type");if(!b||b===_)if(Mn(f,m)&&delete f[m],_==="object"||_==="array"&&Array.isArray(g)){const E=eO(e,t,S,v,g,l);(E!==void 0||_==="array")&&(h[m]=E)}else{const E=Ve(S,"default",vp),R=Ve(v,"default",vp);E!==vp&&E!==g&&(R===g?f[m]=E:Ve(S,"readOnly")===!0&&(f[m]=void 0));const w=Ve(S,"const",vp),T=Ve(v,"const",vp);w!==vp&&w!==g&&(f[m]=T===g?w:void 0)}}),c={...typeof s=="string"||Array.isArray(s)?void 0:s,...f,...h}}else if(Ve(i,"type")==="array"&&Ve(r,"type")==="array"&&Array.isArray(s)){let f=Ve(i,"items"),d=Ve(r,"items");if(typeof f=="object"&&typeof d=="object"&&!Array.isArray(f)&&!Array.isArray(d)){Mn(f,vr)&&(f=yi(e,f,t,s,l)),Mn(d,vr)&&(d=yi(e,d,t,s,l));const h=Ve(f,"type"),m=Ve(d,"type");if(!h||h===m){const g=Ve(r,"maxItems",-1);m==="object"?c=s.reduce((v,S)=>{const b=eO(e,t,d,f,S,l);return b!==void 0&&(g<0||v.length<g)&&v.push(b),v},[]):c=g>0&&s.length>g?s.slice(0,g):s}}else typeof f=="boolean"&&typeof d=="boolean"&&f===d&&(c=s)}return c}class Lce{constructor(t,r,i,s){r&&r[Uv]===US?this.rootSchema=WC(r,Ve(r,or,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=i,this.experimental_customMergeAllOf=s}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,i={},s){return!t||!r?!1:this.validator!==t||!yr(this.rootSchema,r)||!yr(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==s}findFieldInSchema(t,r,i){return Mce(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,i,s){return Vv(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,i=!1,s){return gP(this.validator,t,r,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,s)}getDisplayLabel(t,r,i){return Pce(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,i,s){return vb(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,i){return jA(this.validator,t,r,this.rootSchema,i)}getFromSchema(t,r,i){return VS(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}isFilesArray(t,r){return vP(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return NA(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return DA(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,r){return Ice(this.validator,t,this.rootSchema,r)}retrieveSchema(t,r,i){return yi(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,r,i){return eO(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,i){return bP(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}}function Uce(e,t,r={},i){return new Lce(e,t,r,i)}function qce(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const i=e.slice(5).split(";base64,");if(i.length!==2)throw new Error("File is invalid: dataURI must be base64");const[s,l]=i,[c,...f]=s.split(";"),d=c||"",h=decodeURI(((t=f.map(m=>m.split("=")).find(([m])=>m==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const m=atob(l),g=new Array(m.length);for(let S=0;S<m.length;S++)g[S]=m.charCodeAt(S);return{blob:new window.Blob([new Uint8Array(g)],{type:d}),name:h}}catch(m){throw new Error("File is invalid: "+m.message)}}function Ac(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function EP(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return EP(t,e).reverse();const r=[];for(let i=e;i<=t;i++)r.push({value:i,label:Ac(i,2)});return r}function Ck(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let s=0;s<r.length;s++){const l=r[s];if(!Object.prototype.hasOwnProperty.call(t,l)||!Object.is(e[l],t[l]))return!1}return!0}function Vce(e,t){let r=e;if(Array.isArray(t)){const i=r.split(/(%\d)/);t.forEach((s,l)=>{const c=i.findIndex(f=>f===`%${l+1}`);c>=0&&(i[c]=s)}),r=i.join("")}return r}function Fce(e,t){return Vce(e,t)}function Na(e,t=[],r){if(Array.isArray(e))return e.map(l=>Na(l,t)).filter(l=>l!==r);const i=e===""||e===null?-1:Number(e),s=t[i];return s?s.value:r}function xP(e,t,r=[]){const i=Na(e,r);return Array.isArray(t)?t.filter(s=>!yr(s,i)):yr(i,t)?void 0:t}function Jb(e,t){return Array.isArray(t)?t.some(r=>yr(r,e)):yr(t,e)}function _P(e,t=[],r=!1){const i=t.map((s,l)=>Jb(s.value,e)?String(l):void 0).filter(s=>typeof s<"u");return r?i:i[0]}function TP(e,t,r=[]){const i=Na(e,r);if(!rw(i)){const s=r.findIndex(f=>i===f.value),l=r.map(({value:f})=>f);return t.slice(0,s).concat(i,t.slice(s)).sort((f,d)=>+(l.indexOf(f)>l.indexOf(d)))}return t}class CP{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let i=Array.isArray(t)&&t.length>0||typeof t=="string"?Ve(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},aY(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?Ub(t):{},this}addErrors(t,r){const i=this.getOrCreateErrorBlock(r);let s=Ve(i,pi);return Array.isArray(s)||(s=[],i[pi]=s),Array.isArray(t)?Gn(i,pi,[...new Set([...s,...t])]):Gn(i,pi,[...new Set([...s,t])]),this}setErrors(t,r){const i=this.getOrCreateErrorBlock(r),s=Array.isArray(t)?[...new Set([...t])]:[t];return Gn(i,pi,s),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Gn(r,pi,[]),this}}function Ok(e,t){const r=Gc(e),i=Gc(t);if(e===t||!r&&!i)return[];if(r&&!i)return ls(e);if(!r&&i)return ls(t);{const s=ls(eY(e,(c,f)=>!yr(c,Ve(t,f)))),l=TK(ls(t),ls(e));return[...s,...l]}}function Bce(e,t,r=[1900,new Date().getFullYear()+2],i="YMD"){const{day:s,month:l,year:c,hour:f,minute:d,second:h}=e,m={type:"day",range:[1,31],value:s},g={type:"month",range:[1,12],value:l},v={type:"year",range:r,value:c},S=[];switch(i){case"MDY":S.push(g,m,v);break;case"DMY":S.push(m,g,v);break;default:S.push(v,g,m)}return t&&S.push({type:"hour",range:[0,23],value:f},{type:"minute",range:[0,59],value:d},{type:"second",range:[0,59],value:h}),S}function OP(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function RP(e,t,r={},i=!0){const s={type:t||"text",...OP(e)};return r.inputType?s.type=r.inputType:t||(e.type==="number"?(s.type="number",i&&s.step===void 0&&(s.step="any")):e.type==="integer"&&(s.type="number",s.step===void 0&&(s.step=1))),r.autocomplete&&(s.autoComplete=r.autocomplete),r.accept&&(s.accept=r.accept),s}const Rk={props:{disabled:!1},submitText:"Submit",norender:!1};function AP(e={}){const t=kt(e);if(t&&t[_w]){const r=t[_w];return{...Rk,...r}}return Rk}function Ut(e,t,r={}){const{templates:i}=t;if(e==="ButtonTemplates")return i[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(i,r[e])){const s=r[e];return i[s]}return r[e]||i[e]}function zA(){if(typeof process>"u"||Ve(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,f6("test-id-")),e.get(r)}})}var G_={exports:{}},Hn={};var Ak;function Hce(){if(Ak)return Hn;Ak=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function _(E){if(typeof E=="object"&&E!==null){var R=E.$$typeof;switch(R){case e:switch(E=E.type,E){case r:case s:case i:case h:case m:return E;default:switch(E=E&&E.$$typeof,E){case f:case c:case d:case v:case g:case l:return E;default:return R}}case t:return R}}}return Hn.ContextConsumer=c,Hn.ContextProvider=l,Hn.Element=e,Hn.ForwardRef=d,Hn.Fragment=r,Hn.Lazy=v,Hn.Memo=g,Hn.Portal=t,Hn.Profiler=s,Hn.StrictMode=i,Hn.Suspense=h,Hn.SuspenseList=m,Hn.isAsyncMode=function(){return!1},Hn.isConcurrentMode=function(){return!1},Hn.isContextConsumer=function(E){return _(E)===c},Hn.isContextProvider=function(E){return _(E)===l},Hn.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},Hn.isForwardRef=function(E){return _(E)===d},Hn.isFragment=function(E){return _(E)===r},Hn.isLazy=function(E){return _(E)===v},Hn.isMemo=function(E){return _(E)===g},Hn.isPortal=function(E){return _(E)===t},Hn.isProfiler=function(E){return _(E)===s},Hn.isStrictMode=function(E){return _(E)===i},Hn.isSuspense=function(E){return _(E)===h},Hn.isSuspenseList=function(E){return _(E)===m},Hn.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===s||E===i||E===h||E===m||E===S||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===g||E.$$typeof===l||E.$$typeof===c||E.$$typeof===d||E.$$typeof===b||E.getModuleId!==void 0)},Hn.typeOf=_,Hn}var Mk;function Gce(){return Mk||(Mk=1,G_.exports=Hce()),G_.exports}var Kce=Gce();const jk=$l(Kce),K_={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Yce(e){let t=Ve(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...s})=>k.jsx(e,{options:{...r,...i},...s}),Gn(e,"MergedWidget",t)}return t}function zl(e,t,r={}){const i=hl(e);if(typeof t=="function"||t&&jk.isForwardRef(j.createElement(t))||jk.isMemo(t))return Yce(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in r){const s=r[t];return zl(e,s,r)}if(typeof i=="string"){if(!(i in K_))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in K_[i]){const s=r[K_[i][t]];return zl(e,s,r)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function Zce(e){let t=0;for(let r=0;r<e.length;r+=1){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return t.toString(16)}function Xce(e){const t=new Set;return JSON.stringify(e,(r,i)=>(t.add(r),i)),JSON.stringify(e,Array.from(t).sort())}function Ol(e){return Zce(Xce(e))}function Qce(e){return Ol(e)}function Wce(e,t,r={}){try{return zl(e,t,r),!0}catch(i){const s=i;if(s.message&&(s.message.startsWith("No widget")||s.message.startsWith("Unsupported widget")))return!1;throw i}}function ip(e,t){return`${Kc(e)?e:e[or]}__${t}`}function op(e){return ip(e,"description")}function $A(e){return ip(e,"error")}function wb(e){return ip(e,"examples")}function PA(e){return ip(e,"help")}function m2(e){return ip(e,"title")}function uo(e,t=!1){const r=t?` ${wb(e)}`:"";return`${$A(e)} ${op(e)} ${PA(e)}${r}`}function $h(e,t){return`${e}-${t}`}function Rl(e,t){return ip(e,t)}function Y_(e,t){return ip(e,`optional${t}`)}function Dm(e){return!rw(e)&&(!In(e)||Array.isArray(e)||!oa(e))}function Jce(e,t){const{rootSchema:r,schemaUtils:i}=e;if($c(t,r))return!0;if(vr in r){const s=i.retrieveSchema(r);return $c(t,s)}return!1}function MP(e,t,r){return t?r:e}function efe(e){return e?new Date(e).toJSON():void 0}function IA(e,t,r){const i=[Vue];return Mn(e,dk)&&i.unshift(dk),Ve(e,[...i,t],r)}function tfe(e,t){if(!Array.isArray(t))return e;const r=m=>m.reduce((g,v)=>(g[v]=!0,g),{}),i=m=>m.length>1?`properties '${m.join("', '")}'`:`property '${m[0]}'`,s=r(e),l=t.filter(m=>m==="*"||s[m]),c=r(l),f=e.filter(m=>!c[m]),d=l.indexOf("*");if(d===-1){if(f.length)throw new Error(`uiSchema order list does not contain ${i(f)}`);return l}if(d!==l.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const h=[...l];return h.splice(d,1,...f),h}function Z_(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function Wv(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Wv(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Wv(e.oneOf[0]);if(e.allOf){const t=r=>Wv(r);return e.allOf.some(t)}return!1}function jP(e,t,r,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:c,state:f}=e;return!Ck(c,t)||!Ck(f,r)}const{props:s,state:l}=e;return!yr(s,t)||!yr(l,r)}function kk(e){const t=c6(e.map(r=>In(r)?hl(r):void 0).flat().filter(r=>r!==void 0));return t.length===1?t[0]:t}function e1(e,t,r,i){const{enableOptionalDataFieldForType:s=[]}=kt(i,e.globalUiOptions);let l;return $n in t&&Array.isArray(t[$n])?l=kk(t[$n]):pn in t&&Array.isArray(t[pn])?l=kk(t[pn]):l=hl(t),!Jce(e,t)&&!r&&!!l&&!Array.isArray(l)&&!!s.find(c=>c===l)}function Dk(e,t=!0){const{year:r,month:i,day:s,hour:l=0,minute:c=0,second:f=0}=e,d=Date.UTC(r,i-1,s,l,c,f),h=new Date(d).toJSON();return t?h:h.slice(0,10)}function LA(e,t=[]){if(!e)return[];let r=[];return pi in e&&(r=r.concat(e[pi].map(i=>{const s=`.${t.join(".")}`;return{property:s,message:i,stack:`${s} ${i}`}}))),Object.keys(e).reduce((i,s)=>{if(s!==pi){const l=e[s];Gc(l)&&(i=i.concat(LA(l,[...t,s])))}return i},r)}function nfe(e){const t=new CP;return e.length&&e.forEach(r=>{const{property:i,message:s}=r,l=i==="."?[]:l6(i);l.length>0&&l[0]===""&&l.splice(0,1),s&&t.addErrors(s,l)}),t.ErrorSchema}function ms(e,t,r,i){const s=Array.isArray(r)?r:r?.path,l=e===""?[]:[e],c=s?s.concat(...l):l,f=[t.idPrefix,...c].join(t.idSeparator);let d;return t.nameGenerator&&c.length>0&&(d=t.nameGenerator(c,t.idPrefix,i)),{path:c,[or]:f,...d!==void 0&&{name:d}}}function kP(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const i=e[r];return Gc(i)?{...t,[r]:kP(i)}:{...t,[r]:i}}},{})}function rfe(e){return Object.values(e).every(t=>t!==-1)}function afe(e){const{className:t="form-control",type:r,range:i,value:s,select:l,rootId:c,name:f,disabled:d,readonly:h,autofocus:m,registry:g,onBlur:v,onFocus:S}=e,b=`${c}_${r}`,{SelectWidget:_}=g.widgets,E=j.useCallback(R=>l(r,R),[l,r]);return k.jsx(_,{schema:{type:"integer"},id:b,name:f,className:t,options:{enumOptions:EP(i[0],i[1])},placeholder:r,value:s,disabled:d,readonly:h,autofocus:m,onChange:E,onBlur:v,onFocus:S,registry:g,label:"","aria-describedby":uo(c)})}function ife(e){const{time:t=!1,disabled:r=!1,readonly:i=!1,options:s,onChange:l,value:c}=e,[f,d]=j.useState(Z_(c,t));j.useEffect(()=>{d(Z_(c,t))},[t,c]);const h=j.useCallback((S,b)=>{const _={...f,[S]:typeof b>"u"?-1:b};rfe(_)?l(Dk(_,t)):d(_)},[f,l,t]),m=j.useCallback(S=>{S.preventDefault(),!(r||i)&&l(void 0)},[r,i,l]),g=j.useCallback(S=>{if(S.preventDefault(),r||i)return;const b=Z_(new Date().toJSON(),t);l(Dk(b,t))},[r,i,t,l]);return{elements:j.useMemo(()=>Bce(f,t,s.yearsRange,s.format),[f,t,s.yearsRange,s.format]),handleChange:h,handleClear:m,handleSetNow:g}}function sp(e){const t=j.useRef(e);return $c(e,t.current)||(t.current=e),t.current}function ofe(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function sfe(e){const{name:t,size:r,type:i}=e;return new Promise((s,l)=>{const c=new window.FileReader;c.onerror=l,c.onload=f=>{var d;typeof((d=f.target)===null||d===void 0?void 0:d.result)=="string"?s({dataURL:ofe(f.target.result,t),name:t,size:r,type:i}):s({dataURL:null,name:t,size:r,type:i})},c.readAsDataURL(e)})}function lfe(e){return Promise.all(Array.from(e).map(sfe))}function Nk(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:i,name:s}=qce(r);return[...t,{dataURL:r,name:s,size:i.size,type:i.type}]}catch{return t}},[])}function ufe(e,t,r=!1){const i=j.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),s=j.useMemo(()=>Array.isArray(e)?Nk(e):Nk([e||""]),[e]),l=j.useCallback(f=>{lfe(f).then(d=>{const h=d.map(m=>m.dataURL||null);t(r?i.concat(...h):h[0])})},[i,r,t]),c=j.useCallback(f=>{if(r){const d=i.filter((h,m)=>m!==f);t(d)}else t(void 0)},[i,r,t]);return{filesInfo:s,handleChange:l,handleRemove:c}}function cfe(e){if(!e)return"";const t=new Date(e),r=Ac(t.getFullYear(),4),i=Ac(t.getMonth()+1,2),s=Ac(t.getDate(),2),l=Ac(t.getHours(),2),c=Ac(t.getMinutes(),2),f=Ac(t.getSeconds(),2),d=Ac(t.getMilliseconds(),3);return`${r}-${i}-${s}T${l}:${c}:${f}.${d}`}function FS(e,t,r=!1){if(!t)return e;const{errors:i,errorSchema:s}=e;let l=LA(t),c=t;return oa(s)||(c=Sb(s,t,r?"preventDuplicates":!0),l=[...i].concat(l)),{errorSchema:c,errors:l}}function ffe(e){for(const t in e){const r=e,i=r[t];t===vr&&typeof i=="string"&&i.startsWith("#")?r[t]=J8+i:r[t]=UA(i)}return e}function dfe(e){for(let t=0;t<e.length;t++)e[t]=UA(e[t]);return e}function UA(e){return Array.isArray(e)?dfe([...e]):In(e)?ffe({...e}):e}var gn;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(gn||(gn={}));function tO(){return f6("rjsf-array-item-")}function zk(e){return Array.isArray(e)?e.map(t=>({key:tO(),item:t})):[]}function DP(e){return Array.isArray(e)?e.map(t=>t.item):[]}function hfe(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function NP(e,t,r,i){let{addable:s}=kt(i,e.globalUiOptions);return s!==!1&&(t.maxItems!==void 0?s=r.length<t.maxItems:s=!0),s}function zP(e,t,r,i){if(typeof e.items=="function")try{return e.items(t,r,i)}catch(s){console.error(`Error executing dynamic uiSchema.items function for item at index ${r}:`,s);return}else return e.items}function pfe(e,t){const{schemaUtils:r,globalFormOptions:i}=e;let s=t.items;return i.useFallbackUiForUnsupportedType&&!s?s={}:kA(t)&&Iue(t)&&(s=t.additionalItems),r.getDefaultFormState(s)}function mfe(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s=[],disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,placeholder:h,onBlur:m,onFocus:g,registry:v,rawErrors:S,name:b,onSelectChange:_}=e,{widgets:E,schemaUtils:R,globalFormOptions:w,globalUiOptions:T}=v,x=R.retrieveSchema(t.items,s),O=um(x,i),{widget:C="select",title:M,...D}=kt(i,T),$=zl(t,C,E),q=M??t.title??b,L=R.getDisplayLabel(t,i,T),V=sp(ms("",w,r,!0));return k.jsx($,{id:V[or],name:b,multiple:!0,onChange:_,onBlur:m,onFocus:g,options:{...D,enumOptions:O},schema:t,uiSchema:i,registry:v,value:s,disabled:l,readonly:c,required:d,label:q,hideLabel:!L,placeholder:h,autofocus:f,rawErrors:S,htmlName:V.name})}function gfe(e){const{schema:t,fieldPathId:r,uiSchema:i,disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,hideError:d,placeholder:h,onBlur:m,onFocus:g,formData:v=[],registry:S,rawErrors:b,name:_,onSelectChange:E}=e,{widgets:R,schemaUtils:w,globalFormOptions:T,globalUiOptions:x}=S,{widget:O,title:C,...M}=kt(i,x),D=zl(t,O,R),$=C??t.title??_,q=w.getDisplayLabel(t,i,x),L=sp(ms("",T,r,!0));return k.jsx(D,{id:L[or],name:_,multiple:!0,onChange:E,onBlur:m,onFocus:g,options:M,schema:t,uiSchema:i,registry:S,value:v,disabled:s,readonly:l,hideError:d,required:f,label:$,hideLabel:!q,placeholder:h,autofocus:c,rawErrors:b,htmlName:L.name})}function yfe(e){const{schema:t,uiSchema:r,fieldPathId:i,name:s,disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,onBlur:h,onFocus:m,registry:g,formData:v=[],rawErrors:S,onSelectChange:b}=e,{widgets:_,schemaUtils:E,globalFormOptions:R,globalUiOptions:w}=g,{widget:T="files",title:x,...O}=kt(r,w),C=zl(t,T,_),M=x??t.title??s,D=E.getDisplayLabel(t,r,w),$=sp(ms("",R,i,!0));return k.jsx(C,{options:O,id:$[or],name:s,multiple:!0,onChange:b,onBlur:h,onFocus:m,schema:t,uiSchema:r,value:v,disabled:l,readonly:c,required:d,registry:g,autofocus:f,rawErrors:S,label:M,hideLabel:!D,htmlName:$.name})}function $P(e){const{itemKey:t,index:r,name:i,disabled:s,hideError:l,readonly:c,registry:f,uiOptions:d,parentUiSchema:h,canAdd:m,canRemove:g=!0,canMoveUp:v,canMoveDown:S,itemSchema:b,itemData:_,itemUiSchema:E,itemFieldPathId:R,itemErrorSchema:w,autofocus:T,onBlur:x,onFocus:O,onChange:C,rawErrors:M,totalItems:D,title:$,handleAddItem:q,handleCopyItem:L,handleRemoveItem:V,handleReorderItems:F}=e,{schemaUtils:re,fields:{ArraySchemaField:ae,SchemaField:K},globalUiOptions:B}=f,Y=sp(R),fe=ae||K,ie=Ut("ArrayFieldItemTemplate",f,d),N=re.getDisplayLabel(b,E,B),{description:I}=kt(E),U=!!I||!!b.description,{orderable:P=!0,removable:G=!0,copyable:ee=!1}=d,ue={moveUp:P&&v,moveDown:P&&S,copy:ee&&m,remove:G&&g,toolbar:!1};ue.toolbar=Object.keys(ue).some(we=>ue[we]);const ve=j.useCallback(we=>{q(we,r+1)},[q,r]),Ee=j.useCallback(we=>{L(we,r)},[L,r]),Oe=j.useCallback(we=>{V(we,r)},[V,r]),de=j.useCallback(we=>{F(we,r,r-1)},[F,r]),te=j.useCallback(we=>{F(we,r,r+1)},[F,r]),Se={children:k.jsx(fe,{name:i,title:$,index:r,schema:b,uiSchema:E,formData:_,errorSchema:w,fieldPathId:Y,required:hfe(b),onChange:C,onBlur:x,onFocus:O,registry:f,disabled:s,readonly:c,hideError:l,autofocus:T,rawErrors:M}),buttonsProps:{fieldPathId:Y,disabled:s,readonly:c,canAdd:m,hasCopy:ue.copy,hasMoveUp:ue.moveUp,hasMoveDown:ue.moveDown,hasRemove:ue.remove,index:r,totalItems:D,onAddItem:ve,onCopyItem:Ee,onRemoveItem:Oe,onMoveUpItem:de,onMoveDownItem:te,registry:f,schema:b,uiSchema:E},itemKey:t,className:"rjsf-array-item",disabled:s,hasToolbar:ue.toolbar,index:r,totalItems:D,readonly:c,registry:f,schema:b,uiSchema:E,parentUiSchema:h,displayLabel:N,hasDescription:U};return k.jsx(ie,{...Se})}function vfe(e){const{schema:t,uiSchema:r={},errorSchema:i,fieldPathId:s,formData:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:S,onBlur:b,onFocus:_,rawErrors:E,onChange:R,keyedFormData:w,handleAddItem:T,handleCopyItem:x,handleRemoveItem:O,handleReorderItems:C}=e,M=t.title||f||c,{schemaUtils:D,fields:$,formContext:q,globalFormOptions:L,globalUiOptions:V}=S,{OptionalDataControlsField:F}=$,re=kt(r,V),ae=In(t.items)?t.items:{},K=D.retrieveSchema(ae),B=DP(w),Y=e1(S,t,g,r),fe=Dm(l),ie=NP(S,t,B,r)&&(!Y||fe),N=fe?w:[],I=Y?" rjsf-optional-array-field":"",U=e.childFieldPathId??s,P=Y?k.jsx(F,{...e,fieldPathId:U}):void 0,G={canAdd:ie,items:N.map((ue,ve)=>{const{key:Ee,item:Oe}=ue,de=Oe,te=D.retrieveSchema(ae,de),Se=i?i[ve]:void 0,we=ms(ve,L,U),$e=zP(r,Oe,ve,q),Te={itemKey:Ee,index:ve,name:c&&`${c}-${ve}`,registry:S,uiOptions:re,hideError:v,readonly:h,disabled:d,required:g,title:M?`${M}-${ve+1}`:void 0,canAdd:ie,canMoveUp:ve>0,canMoveDown:ve<B.length-1,itemSchema:te,itemFieldPathId:we,itemErrorSchema:Se,itemData:de,itemUiSchema:$e,autofocus:m&&ve===0,onBlur:b,onFocus:_,rawErrors:E,totalItems:w.length,handleAddItem:T,handleCopyItem:x,handleRemoveItem:O,handleReorderItems:C,onChange:R};return k.jsx($P,{...Te},Ee)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${K.type}${I}`,disabled:d,fieldPathId:s,uiSchema:r,onAddClick:T,readonly:h,required:g,schema:t,title:M,formData:B,rawErrors:E,registry:S,optionalDataControl:P},ee=Ut("ArrayFieldTemplate",S,re);return k.jsx(ee,{...G})}function bfe(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:S,onBlur:b,onFocus:_,rawErrors:E,keyedFormData:R,onChange:w,handleAddItem:T,handleCopyItem:x,handleRemoveItem:O,handleReorderItems:C}=e;let{formData:M=[]}=e;const D=t.title||f||c,{schemaUtils:$,fields:q,formContext:L,globalFormOptions:V,globalUiOptions:F}=S,re=kt(r,F),{OptionalDataControlsField:ae}=q,K=e1(S,t,g,r),B=Dm(i),fe=(In(t.items)?t.items:[]).map((ve,Ee)=>$.retrieveSchema(ve,M[Ee])),ie=In(t.additionalItems)?$.retrieveSchema(t.additionalItems,i):null,N=e.childFieldPathId??l;M.length<fe.length&&(M=M.concat(new Array(fe.length-M.length)));const I=B?R:[],U=K?" rjsf-optional-array-field":"",P=K?k.jsx(ae,{...e,fieldPathId:N}):void 0,G=NP(S,t,M,r)&&!!ie&&(!K||B),ee={canAdd:G,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${U}`,disabled:d,fieldPathId:l,formData:i,items:I.map((ve,Ee)=>{const{key:Oe,item:de}=ve,te=de,Se=Ee>=fe.length,we=(Se&&In(t.additionalItems)?$.retrieveSchema(t.additionalItems,te):fe[Ee])||{},$e=ms(Ee,V,N);let Te;Se?Te=r.additionalItems:Array.isArray(r.items)?Te=r.items[Ee]:Te=zP(r,de,Ee,L);const Pe=s?s[Ee]:void 0,Ge={index:Ee,itemKey:Oe,name:c&&`${c}-${Ee}`,registry:S,uiOptions:re,hideError:v,readonly:h,disabled:d,required:g,title:D?`${D}-${Ee+1}`:void 0,canAdd:G,canRemove:Se,canMoveUp:Ee>=fe.length+1,canMoveDown:Se&&Ee<M.length-1,itemSchema:we,itemData:te,itemUiSchema:Te,itemFieldPathId:$e,itemErrorSchema:Pe,autofocus:m&&Ee===0,onBlur:b,onFocus:_,rawErrors:E,totalItems:R.length,onChange:w,handleAddItem:T,handleCopyItem:x,handleRemoveItem:O,handleReorderItems:C};return k.jsx($P,{...Ge},Oe)}),onAddClick:T,readonly:h,required:g,registry:S,schema:t,uiSchema:r,title:D,errorSchema:s,rawErrors:E,optionalDataControl:P},ue=Ut("ArrayFieldTemplate",S,re);return k.jsx(ue,{...ee})}function Sfe(e=[]){const t=j.useMemo(()=>Ol(e),[e]),[r,i]=j.useState(()=>({formDataHash:t,keyedFormData:zk(e)}));let{keyedFormData:s,formDataHash:l}=r;if(t!==l){const f=Array.isArray(e)?e:[],d=s||[];s=f.length===d.length?d.map((h,m)=>({key:h.key,item:f[m]})):zk(f),l=t,i({formDataHash:l,keyedFormData:s})}const c=j.useCallback(f=>{const d=DP(f),h=Ol(d);return i({formDataHash:h,keyedFormData:f}),d},[]);return{keyedFormData:s,updateKeyedFormData:c}}function wfe(e){const{schema:t,uiSchema:r,errorSchema:i,fieldPathId:s,registry:l,formData:c,onChange:f}=e,{globalFormOptions:d,schemaUtils:h,translateString:m}=l,{keyedFormData:g,updateKeyedFormData:v}=Sfe(c),S=e.childFieldPathId??s,b=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const L in i){const V=parseInt(L);M===void 0||V<M?Gn(D,[V],i[L]):V>=M&&Gn(D,[V+1],i[L])}}const $={key:tO(),item:pfe(l,t)},q=[...g];M!==void 0?q.splice(M,0,$):q.push($),f(v(q),S.path,D)},[g,l,t,f,v,i,S]),_=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const L in i){const V=parseInt(L);V<=M?Gn(D,[V],i[L]):V>M&&Gn(D,[V+1],i[L])}}const $={key:tO(),item:Ub(g[M].item)},q=[...g];M!==void 0?q.splice(M+1,0,$):q.push($),f(v(q),S.path,D)},[g,f,v,i,S]),E=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const q in i){const L=parseInt(q);L<M?Gn(D,[L],i[q]):L>M&&Gn(D,[L-1],i[q])}}const $=g.filter((q,L)=>L!==M);f(v($),S.path,D)},[g,f,v,i,S]),R=j.useCallback((C,M,D)=>{C&&(C.preventDefault(),C.currentTarget.blur());let $;if(i){$={};for(const V in i){const F=parseInt(V);F==M?Gn($,[D],i[M]):F==D?Gn($,[M],i[D]):Gn($,[V],i[F])}}function q(){const V=g.slice();return V.splice(M,1),V.splice(D,0,g[M]),V}const L=q();f(v(L),S.path,$)},[g,f,v,i,S]),w=j.useCallback((C,M,D,$)=>{f(C===void 0?null:C,M,D,$)},[f]),T=j.useCallback(C=>{f(C,S.path,void 0,S?.[or])},[f,S]),x={...e,formData:c,fieldPathId:S,onSelectChange:T},O={...e,handleAddItem:b,handleCopyItem:_,handleRemoveItem:E,handleReorderItems:R,keyedFormData:g,onChange:w};if(!(lm in t)){if(!d.useFallbackUiForUnsupportedType){const M=kt(r),D=Ut("UnsupportedFieldTemplate",l,M);return k.jsx(D,{schema:t,fieldPathId:s,reason:m(gn.MissingItems),registry:l})}const C={...t,[lm]:{type:void 0}};x.schema=C,O.schema=C}return h.isMultiSelect(x.schema)?k.jsx(mfe,{...x}):yP(r)?k.jsx(gfe,{...x}):kA(x.schema)?k.jsx(bfe,{...O}):h.isFilesArray(x.schema,r)?k.jsx(yfe,{...x}):k.jsx(vfe,{...O})}function Efe(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,registry:c,required:f,disabled:d,readonly:h,hideError:m,autofocus:g,title:v,onChange:S,onFocus:b,onBlur:_,rawErrors:E}=e,{title:R}=t,{widgets:w,translateString:T,globalUiOptions:x}=c,{widget:O="checkbox",title:C,label:M=!0,enumNames:D,...$}=kt(i,x),q=zl(t,O,w),L=T(gn.YesLabel),V=T(gn.NoLabel);let F;const re=C??R??v??r;if(Array.isArray(t.oneOf))F=um({oneOf:t.oneOf.map(K=>{if(In(K))return{...K,title:K.title||(K.const===!0?L:V)}}).filter(K=>K)},i);else{const K=t.enum??[!0,!1];!D&&K.length===2&&K.every(B=>typeof B=="boolean")?F=[{value:K[0],label:K[0]?L:V},{value:K[1],label:K[1]?L:V}]:F=um({enum:K},i)}const ae=j.useCallback((K,B,Y)=>S(K,s.path,B,Y),[S,s]);return k.jsx(q,{options:{...$,enumOptions:F},schema:t,uiSchema:i,id:s.$id,name:r,onChange:ae,onFocus:b,onBlur:_,label:re,hideLabel:!M,value:l,required:f,disabled:d,readonly:h,hideError:m,registry:c,autofocus:g,rawErrors:E,htmlName:s.name})}function xfe(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function _fe(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Tfe(e,t){switch(t){case"string":return String(e);case"number":{const r=Number(e);return isNaN(r)?0:r}case"boolean":return!!e;default:return e}}function Cfe(e){const{id:t,formData:r,displayLabel:i=!0,schema:s,name:l,uiSchema:c,required:f,disabled:d=!1,readonly:h=!1,onBlur:m,onFocus:g,registry:v,fieldPathId:S,onChange:b,errorSchema:_}=e,{translateString:E,fields:R,globalFormOptions:w}=v,[T,x]=j.useState(_fe(r)),O=kt(c),C=sp(ms("__internal_type_selector",w,S)),M=E(gn.Type),D=j.useMemo(()=>xfe(M),[M]),$=V=>{V!=null&&(x(V),b(Tfe(r,V),S.path,_,t))};if(!w.useFallbackUiForUnsupportedType){const{reason:V=E(gn.UnknownFieldType,[String(s.type)])}=e,F=Ut("UnsupportedFieldTemplate",v,O);return k.jsx(F,{schema:s,fieldPathId:S,reason:V,registry:v})}const q=Ut("FallbackFieldTemplate",v,O),{SchemaField:L}=R;return k.jsx(q,{schema:s,registry:v,typeSelector:k.jsx(L,{fieldPathId:C,name:`${l}__fallback_type`,schema:D,formData:T,onChange:$,onBlur:m,onFocus:g,registry:v,hideLabel:!i,disabled:d,readonly:h,required:f},r?Ol(r):"__empty__"),schemaField:k.jsx(L,{...e,schema:{type:T,title:E(gn.Value),...T==="object"&&{additionalProperties:!0}}})})}var Al;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Al||(Al={}));var Jv;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Jv||(Jv={}));const Ofe=/^\$lookup=(.+)/,X_="layoutGrid";function $k(e,t){return e??t}function Rfe(e){return/^\d+?$/.test(e)}const Uc=zA();function Afe(e,t,r,i,s){const l=Ve(r,[XC],{}),c=Ve(r,e),f={...Ve(c,[Ic],{}),...t,...l},d={...c};oa(f)||Gn(d,[Ic],f),oa(l)||Gn(d,[XC],l);let{readonly:h}=kt(d);return(s===!0||a6(h)&&i===!0)&&(h=!0,Mn(f,$_)?Gn(d,[Ic,$_],!0):Gn(d,`ui:${$_}`,!0)),{fieldUiSchema:d,uiReadonly:h}}function Mfe(e,t,r="$0m3tH1nG Un3xP3cT3d"){const i=QT([t]).sort(),s=QT([r]).sort();switch(e){case Jv.ALL:return $c(i,s);case Jv.SOME:return XM(i,s).length>0;case Jv.NONE:return XM(i,s).length===0;default:return!1}}function g2(e,t,r){let i={},s=e[t];if(Gc(s)){const{children:l,className:c,...f}=s;if(s=l,c){const h=c.split(" ").map(m=>IA(r,m,m)).join(" ");i={...f,className:h}}else i=f}if(!Array.isArray(s))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:s,gridProps:i}}function Pk(e,t,r){let i;if(Rfe(r)&&e&&e?.type==="array"&&Mn(e,lm)){const s=Number(r),l=e[lm];Array.isArray(l)?s>l.length?i=t6(l):i=l[s]:i=l,t={[or]:t[or],path:[...t.path.slice(0,t.path.length-1),s]}}return{rawSchema:i,fieldPathId:t}}function jfe(e,t,r,i,s){const{schemaUtils:l,globalFormOptions:c}=e;let f=r,d=s;const h=t.split("."),m=h.pop();let g=l.retrieveSchema(f,i),v=i,S=g.readOnly;h.forEach(E=>{if(d=ms(E,c,d),Mn(g,Un))f=Ve(g,[Un,E],{});else if(g&&(Mn(g,pn)||Mn(g,$n))){const R=Mn(g,pn)?pn:$n,w=l.findSelectedOptionInXxxOf(g,E,R,v);f=Ve(w,[Un,E],{})}else{const R=Pk(g,d,E);f=R.rawSchema??{},d=R.fieldPathId}v=Ve(v,E,{}),g=l.retrieveSchema(f,v),S=$k(g.readOnly,S)});let b,_=!1;if(oa(g)&&(g=void 0),g&&m){if(g&&(Mn(g,pn)||Mn(g,$n))){const R=Mn(g,pn)?pn:$n;g=l.findSelectedOptionInXxxOf(g,m,R,v)}d=ms(m,c,d),_=g!==void 0&&Array.isArray(g.required)&&$K(g.required,m);const E=Pk(g,d,m);if(E.rawSchema?(g=E.rawSchema,d=E.fieldPathId):(g=Ve(g,[Un,m]),g=g&&l.retrieveSchema(g)),S=$k(g?.readOnly,S),g&&(Mn(g,pn)||Mn(g,$n))){const R=Mn(g,pn)?pn:$n,w=Nl(g);b={options:g[R],hasDiscriminator:!!w}}}return{schema:g,isRequired:_,isReadonly:S,optionsInfo:b,fieldPathId:d}}function kfe(e,t){let r=e;return Kc(r)&&(r=IA(t,r)),Nb(r)?r:null}function Dfe(e,t){let r,i=null,s={},l;if(Kc(t)||a6(t))r=t??"";else{const{name:c="",render:f,...d}=t;r=c,s=d,oa(s)||CK(s,(h,m)=>{if(Kc(h)){const g=Ofe.exec(h);if(Array.isArray(g)&&g.length>1){const v=g[1];s[m]=IA(e,v,v)}}}),i=kfe(f,e),!c&&i&&(l=k.jsx(i,{...d,"data-testid":Uc.uiComponent}))}return{name:r,UIComponent:i,uiProps:s,rendered:l}}function y2(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:i,schema:s,formData:l}=r,{schemaUtils:c}=i,f=c.retrieveSchema(s,l);return t.map(d=>j.createElement(qA,{...r,key:`layoutGrid-${Ol(d)}`,schema:f,layoutGridSchema:d}))}function Nfe(e){const{layoutGridSchema:t,...r}=e,{formData:i,registry:s}=r,{children:l,gridProps:c}=g2(t,Al.CONDITION,s),{operator:f,field:d="",value:h}=c,m=Ve(i,d,null);return Mfe(f,m,h)?k.jsx(y2,{...r,childrenLayoutGridSchemaId:l}):null}function zfe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=g2(t,Al.COLUMN,i),f=kt(s),d=Ut("GridTemplate",i,f);return k.jsx(d,{column:!0,"data-testid":Uc.col,...c,children:k.jsx(y2,{...r,childrenLayoutGridSchemaId:l})})}function $fe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=g2(t,Al.COLUMNS,i),f=kt(s),d=Ut("GridTemplate",i,f);return l.map(h=>k.jsx(d,{column:!0,"data-testid":Uc.col,...c,children:k.jsx(y2,{...r,childrenLayoutGridSchemaId:[h]})},`column-${Ol(h)}`))}function Pfe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=g2(t,Al.ROW,i),f=kt(s),d=Ut("GridTemplate",i,f);return k.jsx(d,{...c,"data-testid":Uc.row,children:k.jsx(y2,{...r,childrenLayoutGridSchemaId:l})})}function Ife(e){const{gridSchema:t,schema:r,uiSchema:i,errorSchema:s,fieldPathId:l,onBlur:c,onFocus:f,formData:d,readonly:h,registry:m,layoutGridSchema:g,...v}=e,{onChange:S}=v,{fields:b}=m,{SchemaField:_,LayoutMultiSchemaField:E}=b,R=Dfe(m,t),{name:w,UIComponent:T,uiProps:x}=R,{schema:O,isRequired:C,isReadonly:M,optionsInfo:D,fieldPathId:$}=jfe(m,w,r,d,l),q=sp($);if(R.rendered)return R.rendered;if(O){const L=D?.hasDiscriminator?E:_,{fieldUiSchema:V,uiReadonly:F}=Afe(w,x,i,M,h);return k.jsx(L,{"data-testid":D?.hasDiscriminator?Uc.layoutMultiSchemaField:Uc.field,...v,name:w,required:C,readonly:F,schema:O,uiSchema:V,errorSchema:Ve(s,w),fieldPathId:q,formData:Ve(d,w),onChange:S,onBlur:c,onFocus:f,options:D?.options,registry:m})}return T?k.jsx(T,{"data-testid":Uc.uiComponent,...v,name:w,required:C,formData:d,readOnly:!!M||h,errorSchema:s,uiSchema:i,schema:r,fieldPathId:l,onBlur:c,onFocus:f,registry:m,...x}):null}function qA(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const i=kt(t);if(!r&&X_ in i&&In(i[X_])&&(r=i[X_]),In(r)){if(Al.ROW in r)return k.jsx(Pfe,{...e,layoutGridSchema:r});if(Al.COLUMN in r)return k.jsx(zfe,{...e,layoutGridSchema:r});if(Al.COLUMNS in r)return k.jsx($fe,{...e,layoutGridSchema:r});if(Al.CONDITION in r)return k.jsx(Nfe,{...e,layoutGridSchema:r})}return k.jsx(Ife,{...e,gridSchema:r})}qA.TEST_IDS=Uc;function Lfe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:c,name:f}=e,d=kt(s,c.globalUiOptions),{title:h}=d,{title:m}=i,g=h||r||m||f;if(!g)return null;const v=Ut("TitleFieldTemplate",c,d);return k.jsx(v,{id:m2(t),title:g,required:l,schema:i,uiSchema:s,registry:c})}function Q_(e,t,r){const i="!@#!@$@#$!@$#";return e.map(({schema:l})=>l).find(l=>{const c=Ve(l,[Un,t]);return Ve(c,h2,Ve(c,ps,i))===r})}function Ik(e,t,r,i,s){const l=t.map(d=>r.retrieveSchema(d,s));let c=e;Mn(e,pn)?c={...e,[pn]:l}:Mn(e,$n)&&(c={...e,[$n]:l});const f=um(c,i);if(!f)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(c)}`);return f}function Ufe(e){const{name:t,baseType:r,disabled:i=!1,formData:s,fieldPathId:l,onBlur:c,onChange:f,options:d,onFocus:h,registry:m,uiSchema:g,schema:v,autofocus:S,readonly:b,required:_,errorSchema:E,hideError:R=!1}=e,{widgets:w,schemaUtils:T,globalUiOptions:x}=m,[O,C]=j.useState(Ik(v,d,T,g,s)),M=Ve(l,or),D=Nl(v),$=Ut("FieldErrorTemplate",m,d),q=Ut("FieldTemplate",m,d),L=Ol(v),V=Ol(d),F=g?Ol(g):"",re=s?Ol(s):"";j.useEffect(()=>{C(Ik(v,d,T,g,s))},[L,V,T,F,re]);const{widget:ae=D?"radio":"select",title:K="",placeholder:B="",optionsSchemaSelector:Y=D,hideError:fe,...ie}=kt(g);if(!Y)throw new Error("No selector field provided for the LayoutMultiSchemaField");const N=Ve(s,Y);let I=Ve(O[0]?.schema,[Un,Y],{});const U=Q_(O,Y,N);I=I?.type?I:{...I,type:U?.type||r};const P=zl(I,ae,w),G=fe===void 0?R:!!fe,ee=Ve(E,[pi],[]),ue=lb(E,[pi]),ve=T.getDisplayLabel(v,g,x),Ee=te=>{const Se=Q_(O,Y,te),we=Q_(O,Y,N);let $e=T.sanitizeDataForNewSchema(Se,we,s);$e&&Se&&($e=T.getDefaultFormState(Se,$e,"excludeObjectChildren")),$e&&Gn($e,Y,te),f($e,l.path,void 0,M)},Oe={enumOptions:O,...ie},de=!G&&ee.length>0?k.jsx($,{fieldPathId:l,schema:v,errors:ee,registry:m}):void 0;return k.jsx(q,{fieldPathId:l,id:M,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(O)&&oa(O),uiSchema:g,required:_,readonly:!!b,registry:m,displayLabel:ve,errors:de,onChange:f,onKeyRename:DS,onKeyRenameBlur:DS,onRemoveProperty:DS,children:k.jsx(P,{id:M,name:t,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(O)&&oa(O),uiSchema:g,autofocus:S,readonly:b,required:_,registry:m,multiple:!1,rawErrors:ee,hideError:G,hideLabel:!ve,errorSchema:ue,placeholder:B,onChange:Ee,onBlur:c,onFocus:h,value:N,options:Oe,htmlName:l.name})})}class Lk extends j.Component{constructor(t){super(t);const{formData:r,options:i,registry:{schemaUtils:s}}=this.props,l=i.map(c=>s.retrieveSchema(c,r));this.state={retrievedOptions:l,selectedOption:this.getMatchingOption(0,r,l)}}componentDidUpdate(t,r){const{formData:i,options:s,fieldPathId:l}=this.props,{selectedOption:c}=this.state;let f=this.state;if(!yr(t.options,s)){const{registry:{schemaUtils:d}}=this.props,h=s.map(m=>d.retrieveSchema(m,i));f={selectedOption:c,retrievedOptions:h}}if(!yr(i,t.formData)&&l.$id===t.fieldPathId.$id){const{retrievedOptions:d}=f,h=this.getMatchingOption(c,i,d);r&&h!==c&&(f={selectedOption:h,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(t,r,i){const{schema:s,registry:{schemaUtils:l}}=this.props,c=Nl(s);return l.getClosestMatchingOption(r,i,t,c)}onOptionChange=t=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:s,onChange:l,registry:c,fieldPathId:f}=this.props,{schemaUtils:d}=c,h=t!==void 0?parseInt(t,10):-1;if(h===r)return;const m=h>=0?i[h]:void 0,g=r>=0?i[r]:void 0;let v=d.sanitizeDataForNewSchema(m,g,s);m&&(v=d.getDefaultFormState(m,v,"excludeObjectChildren")),this.setState({selectedOption:h},()=>{l(v,f.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:r}=this.props;return`${t.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:r=!1,errorSchema:i={},formData:s,onBlur:l,onFocus:c,readonly:f,required:d=!1,registry:h,schema:m,uiSchema:g}=this.props,{widgets:v,fields:S,translateString:b,globalUiOptions:_,schemaUtils:E}=h,{SchemaField:R}=S,w=Ut("MultiSchemaFieldTemplate",h,_),T=e1(h,m,d,g),x=Dm(s),{selectedOption:O,retrievedOptions:C}=this.state,{widget:M="select",placeholder:D,autofocus:$,autocomplete:q,title:L=m.title,...V}=kt(g,_),F=zl({type:"number"},M,v),re=Ve(i,pi,[]),ae=lb(i,[pi]),K=E.getDisplayLabel(m,g,_),B=O>=0&&C[O]||null;let Y;if(B){const{required:ee}=m;Y=ee?dc({required:ee},B):B}let fe=[];pn in m&&g&&pn in g?Array.isArray(g[pn])?fe=g[pn]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):$n in m&&g&&$n in g&&(Array.isArray(g[$n])?fe=g[$n]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let ie=g;O>=0&&fe.length>O&&(ie=fe[O]);const N=L?gn.TitleOptionPrefix:gn.OptionPrefix,I=L?[L]:[],U=C.map((ee,ue)=>{const{title:ve=ee.title}=kt(fe[ue]);return{label:ve||b(N,I.concat(String(ue+1))),value:ue}}),P=!T||x?k.jsx(F,{id:this.getFieldId(),name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:l,onFocus:c,disabled:r||oa(U),multiple:!1,rawErrors:re,errorSchema:ae,value:O>=0?O:void 0,options:{enumOptions:U,...V},registry:h,placeholder:D,autocomplete:q,autofocus:$,label:L??t,hideLabel:!K,readonly:f}):void 0,G=Y&&Y.type!=="null"&&k.jsx(R,{...this.props,schema:Y,uiSchema:ie})||null;return k.jsx(w,{schema:m,registry:h,uiSchema:g,selector:P,optionSchemaField:G})}}const qfe=/\.([0-9]*0)*$/,Vfe=/[0.]0*$/;function Ffe(e){const{registry:t,onChange:r,formData:i,value:s}=e,[l,c]=j.useState(s),{StringField:f}=t.fields;let d=i;const h=j.useCallback((m,g,v,S)=>{c(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const b=typeof m=="string"&&m.match(qfe)?fk(m.replace(Vfe,"")):fk(m);r(b,g,v,S)},[r]);if(typeof l=="string"&&typeof d=="number"){const m=new RegExp(`^(${String(d).replace(".","\\.")})?\\.?0*$`);l.match(m)&&(d=l)}return k.jsx(f,{...e,formData:d,onChange:h})}function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},xl.apply(null,arguments)}const dS=["strong","em","del","mark"],Uk=[["**",dS[0]],["__",dS[0]],["~~",dS[2]],["==",dS[3]],["*","em"],["_","em"]];function Bfe(e,t){for(var r=1,i=t+1;i<e.length&&r>0;)e[i]!=="\\"?(e[i]==="["&&r++,e[i]==="]"&&r--,i++):i+=2;if(r===0&&i<e.length&&(e[i]==="("||e[i]==="[")){var s=e[i]==="("?")":"]",l=1;for(i++;i<e.length&&l>0;)e[i]!=="\\"?(e[i]==="("&&s===")"&&l++,e[i]===s&&l--,i++):i+=2;if(l===0)return i}return-1}function Hfe(e,t){if(!t||!t.inline&&!t.simple)return null;var r=e[0];if(r!=="*"&&r!=="_"&&r!=="~"&&r!=="=")return null;for(var i="",s=0,l="",c=0;c<6;c++){var f=Uk[c][0];if(e.startsWith(f)&&e.length>=2*f.length){i=f,s=f.length,l=Uk[c][1];break}}if(!i)return null;for(var d=s,h=!1,m=!1,g="",v=0,S="",b=!1,_="";d<e.length;){var E=e[d];if(b)S+=E,b=!1,_=E,d++;else if(E!=="\\")if(E!=="`"||v!==0){if(E==="["&&!h&&v===0){var R=Bfe(e,d);if(R!==-1){S+=e.slice(d,R),d=R,_=e[R-1];continue}}if(m)S+=E,g?E===g&&(g=""):E==='"'||E==="'"?g=E:E===">"&&(m=!1),_=E,d++;else if(E!=="<"||h){if(E===`
61
+ `&&_===`
62
+ `&&!h&&v===0)return null;if(!h&&v===0){for(var w=0;d+w<e.length&&e[d+w]===i[0];)w++;if(w>=s&&(s!==1||i!=="*"&&i!=="_"||e[d-1]!==i&&e[d+1]!==i)){var T=[e.slice(0,d+w),l,S+e.slice(d+s,d+w)];return T.index=0,T.input=e,T}}S+=E,_=E,d++}else{var x=e[d+1],O=e.indexOf(">",d);if(O!==-1){var C=e.slice(d,O+1).endsWith("/>");x==="/"?v=Math.max(0,v-1):C||v++}m=!0,S+=E,_=E,d++}}else h=!h,S+=E,_=E,d++;else S+=E,b=!0,_=E,d++}return null}const Gfe=["children","options"],qk=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),Vk={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Kfe=["style","script","pre"],Yfe=["src","href","data","formAction","srcDoc","action"],Zfe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Xfe=/\n{2,}$/,Fk=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Qfe=/^ *> ?/gm,Wfe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Jfe=/^ {2,}\n/,ede=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Bk=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Hk=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,tde=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,nde=/^(?:\n *)*\n/,rde=/\r\n?/g,ade=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ide=/^\[\^([^\]]+)]/,ode=/\f/g,sde=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,lde=/^\[(x|\s)\]/,Gk=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Kk=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Yk=/^([^\n]+)\n *(=|-)\2{2,} *\n/,VA=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function ude(e){const t=VA.exec(e);if(!t)return null;const r=t[1],i=r.toLowerCase(),s=i.length+1;let l=t[0].length;e[l]===`
63
+ `&&l++;const c=l;let f=l,d=1;const h=e.length;for(;d>0;){const g=e.indexOf("<",l);if(g===-1)return null;let v=-1,S=-1;if(e[g+1]==="/")S=g;else if(e[g+1]===i[0]||e[g+1]===r[0]){let b=!0;for(let _=0;_<i.length;_++){const E=e[g+1+_];if(E!==i[_]&&E!==r[_]){b=!1;break}}!b||e[g+s]!==" "&&e[g+s]!==">"||(v=g)}if(v!==-1||S!==-1)if(v!==-1&&(S===-1||v<S))l=v+s+1,d++;else{let b=S+2;for(;b<h;){const E=e[b];if(E!==" "&&E!==" "&&E!==`
64
+ `&&E!=="\r")break;b++}if(b+i.length>h)return null;let _=!0;for(let E=0;E<i.length;E++){const R=e[b+E];if(R!==i[E]&&R!==r[E]){_=!1;break}}if(!_){l=b;continue}for(b+=i.length;b<h;){const E=e[b];if(E!==" "&&E!==" "&&E!==`
65
+ `&&E!=="\r")break;b++}if(b>=h||e[b]!==">"){l=b;continue}f=S,l=b+1,d--}else l=g+1}let m=0;for(;l+m<h&&e[l+m]===`
66
+ `;)m++;return[e.slice(0,l+m),r,t[2],e.slice(c,f)]}const cde=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Zk=/^<!--[\s\S]*?(?:-->)/,fde=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,nO=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,dde=/^\{.*\}$/,hde=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,pde=/^<([^ >]+[:@\/][^ >]+)>/,mde=/-([a-z])?/gi,Xk=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,gde=/^[^\n]+(?: \n|\n{2,})/,yde=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,vde=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,bde=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Sde=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,wde=/\t/g,Ede=/(^ *\||\| *$)/g,xde=/^ *:-+: *$/,_de=/^ *:-+ *$/,Tde=/^ *-+: *$/,Cde=/^(:[a-zA-Z0-9-_]+:)/,Ode=/^\\([^0-9A-Za-z\s])/,Rde=/\\([^0-9A-Za-z\s])/g,Ade=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Mde=/^\n+/,jde=/^([ \t]*)/,kde=/(?:^|\n)( *)$/,FA="(?:\\d+\\.)",BA="(?:[*+-])";function PP(e){return"( *)("+(e===1?FA:BA)+") +"}const IP=PP(1),LP=PP(2);function UP(e){return RegExp("^"+(e===1?IP:LP))}const Dde=UP(1),Nde=UP(2);function qP(e){return RegExp("^"+(e===1?IP:LP)+"[^\\n]*(?:\\n(?!\\1"+(e===1?FA:BA)+" )[^\\n]*)*(\\n|$)","gm")}const zde=qP(1),$de=qP(2);function VP(e){const t=e===1?FA:BA;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const FP=VP(1),BP=VP(2);function Qk(e,t){const r=t===1,i=r?FP:BP,s=r?zde:$de,l=r?Dde:Nde;return{t:c=>l.test(c),o:Dc(function(c,f){const d=kde.exec(f.prevCapture);return d&&(f.list||!f.inline&&!f.simple)?i.exec(c=d[1]+c):null}),u:1,i(c,f,d){const h=r?+c[2]:void 0,m=c[0].replace(Xfe,`
67
+ `).match(s),g=l.exec(m[0]),v=RegExp("^ {1,"+(g?g[0].length:0)+"}","gm");let S=!1;return{items:m.map(function(b,_){const E=b.replace(v,"").replace(l,""),R=_===m.length-1,w=Sl(E,`
68
+
69
+ `)||R&&S;S=w;const T=d.inline,x=d.list;let O;d.list=!0,w?(d.inline=!1,O=eb(E)+`
70
+
71
+ `):(d.inline=!0,O=eb(E));const C=f(O,d);return d.inline=T,d.list=x,C}),ordered:r,start:h}}}}const Pde=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Ide=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Wk(e){return typeof e=="string"}function eb(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function rO(e,t){return e.startsWith(t)}function Sl(e,t){return e.indexOf(t)!==-1}function Lde(e,t,r){if(Array.isArray(r)){for(let i=0;i<r.length;i++)if(rO(e,r[i]))return!0;return!1}return r(e,t)}function Av(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Ude(e){return Tde.test(e)?"right":xde.test(e)?"center":_de.test(e)?"left":null}function Jk(e,t,r,i){const s=r.inTable;r.inTable=!0;let l=[[]],c="";function f(){if(!c)return;const d=l[l.length-1];d.push.apply(d,t(c,r)),c=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,h,m)=>{d.trim()==="|"&&(f(),i)?h!==0&&h!==m.length-1&&l.push([]):c+=d}),f(),r.inTable=s,l}function qde(e,t,r){r.inline=!0;const i=e[2]?e[2].replace(Ede,"").split("|").map(Ude):[],s=e[3]?(function(c,f,d){return c.trim().split(`
72
+ `).map(function(h){return Jk(h,f,d,!0)})})(e[3],t,r):[],l=Jk(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:i,cells:s,header:l,type:"25"}:{children:l,type:"21"}}function eD(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Dc(e){return e.inline=1,e}function _c(e){return Dc(function(t,r){return r.inline?e.exec(t):null})}function hS(e){return Dc(function(t,r){return r.inline||r.simple?e.exec(t):null})}function nc(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function tD(e){return Dc(function(t){return e.exec(t)})}const Vde=/(javascript|vbscript|data(?!:image)):/i;function Fde(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(Vde.test(t))return null}catch{return null}return e}function wl(e){return e&&e.replace(Rde,"$1")}function BS(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const l=e(t,r);return r.inline=i,r.simple=s,l}function Bde(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const l=e(t,r);return r.inline=i,r.simple=s,l}function Hde(e,t,r){const i=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=i,s}const Gde=(e,t,r)=>({children:BS(t,e[2],r)});function W_(){return{}}function Kde(...e){return e.filter(Boolean).join(" ")}function J_(e,t,r){let i=e;const s=t.split(".");for(;s.length&&(i=i[s[0]],i!==void 0);)s.shift();return i||r}function eT(e,t,r,i){if(!t||!t.trim())return null;const s=t.match(Zfe);return s?s.reduce(function(l,c){const f=c.indexOf("=");if(f!==-1){const d=(function(g){return g.indexOf("-")!==-1&&g.match(fde)===null&&(g=g.replace(mde,function(v,S){return S.toUpperCase()})),g})(c.slice(0,f)).trim(),h=qk[d]||d;if(h==="ref")return l;const m=l[h]=(function(g,v,S,b){return v==="style"?(function(_){const E=[];if(!_)return E;let R="",w=0,T="";for(let O=0;O<_.length;O++){const C=_[O];if(C==='"'||C==="'")T?C===T&&(T="",w--):(T=C,w++);else if(C==="("&&R.endsWith("url"))w++;else if(C===")"&&w>0)w--;else if(C===";"&&w===0){const M=R.indexOf(":");M>0&&E.push([R.slice(0,M).trim(),R.slice(M+1).trim()]),R="";continue}R+=C}const x=R.indexOf(":");return x>0&&E.push([R.slice(0,x).trim(),R.slice(x+1).trim()]),E})(S).reduce(function(_,[E,R]){return _[E.replace(/(-[a-z])/g,w=>w[1].toUpperCase())]=b(R,g,E),_},{}):Yfe.indexOf(v)!==-1?b(wl(S),g,v):(S.match(dde)&&(S=wl(S.slice(1,S.length-1))),S==="true"||S!=="false"&&S)})(e,d,(function(g){const v=g[0];return(v==='"'||v==="'")&&g.length>=2&&g[g.length-1]===v?g.slice(1,-1):g})(c.slice(f+1).trim()),r);typeof m=="string"&&(VA.test(m)||nO.test(m))&&(l[h]=i(m.trim()))}else c!=="style"&&(l[qk[c]||c]=!0);return l},{}):null}function nD(e,t){for(let r=0;r<e.length;r++)if(e[r].test(t))return!0;return!1}function Yde(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?xl({},Vk,t.namedCodesToUnicode):Vk;const r=t.slugify||Av,i=t.sanitizer||Fde,s=t.createElement||j.createElement,l=[Fk,Bk,Hk,t.enforceAtxHeadings?Kk:Gk,Yk,Xk,FP,BP],c=[...l,gde,VA,Zk,nO];function f(b,_,...E){const R=J_(t.overrides,b+".props",{});return s((function(w,T){const x=J_(T,w);return x?typeof x=="function"||typeof x=="object"&&"render"in x?x:J_(T,w+".component",w):w})(b,t.overrides),xl({},_,R,{className:Kde(_?.className,R.className)||void 0}),...E)}function d(b){b=b.replace(sde,"");let _=!1;t.forceInline?_=!0:t.forceBlock||(_=Sde.test(b)===!1);const E=v(_?b:eb(b).replace(Mde,"")+`
73
+
74
+ `,{inline:_});if(t.ast)return E;const R=S(E);for(;Wk(R[R.length-1])&&!R[R.length-1].trim();)R.pop();if(h.length&&R.push(f("footer",{key:"footer"},h.map(function(x){return f("div",{id:r(x.identifier,Av),key:x.identifier},x.identifier,S(v(x.footnote,{inline:!0})))}))),t.wrapper===null)return R;const w=t.wrapper||(_?"span":"div");let T;if(R.length>1||t.forceWrapper)T=R;else{if(R.length===1)return T=R[0],typeof T=="string"?f("span",{key:"outer"},T):T;T=null}return s(w,xl({key:"outer"},t.wrapperProps),T)}const h=[],m={},g={0:{t:[">"],o:nc(Fk),u:1,i(b,_,E){const[,R,w]=b[0].replace(Qfe,"").match(Wfe);return{alert:R,children:_(w,E)}}},1:{t:[" "],o:_c(Jfe),u:1,i:W_},2:{t:function(b,_){if(_.inline||_.simple)return!1;var E=b[0];return E==="-"||E==="*"||E==="_"},o:nc(ede),u:1,i:W_},3:{t:[" "],o:nc(Hk),u:0,i:b=>({lang:void 0,text:wl(eb(b[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:nc(Bk),u:0,i:b=>({attrs:eT("code",b[3]||"",i,d),lang:b[2]||void 0,text:b[4],type:"3"})},5:{t:["`"],o:hS(tde),u:3,i:b=>({text:wl(b[2])})},6:{t:["[^"],o:nc(ade),u:0,i:b=>(h.push({footnote:b[2],identifier:b[1]}),{})},7:{t:["[^"],o:_c(ide),u:1,i:b=>({target:"#"+r(b[1],Av),text:b[1]})},8:{t:["[ ]","[x]"],o:_c(lde),u:1,i:b=>({completed:b[1].toLowerCase()==="x"})},9:{t:["#"],o:nc(t.enforceAtxHeadings?Kk:Gk),u:1,i:(b,_,E)=>({children:BS(_,b[2],E),id:r(b[2],Av),level:b[1].length})},10:{t:b=>{const _=b.indexOf(`
75
+ `);return _>0&&_<b.length-1&&(b[_+1]==="="||b[_+1]==="-")},o:nc(Yk),u:1,i:(b,_,E)=>({children:BS(_,b[1],E),level:b[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Dc(ude),u:1,i(b,_,E){const[,R]=b[3].match(jde),w=RegExp("^"+R,"gm"),T=b[3].replace(w,""),x=nD(c,T)?Hde:BS,O=b[1].toLowerCase(),C=Kfe.indexOf(O)!==-1,M=(C?O:b[1]).trim(),D={attrs:eT(M,b[2],i,d),noInnerParse:C,tag:M};if(E.inAnchor=E.inAnchor||O==="a",C)D.text=b[3];else{const $=E.inHTML;E.inHTML=!0,D.children=x(_,T,E),E.inHTML=$}return E.inAnchor=!1,D}},13:{t:["<"],o:tD(nO),u:1,i(b){const _=b[1].trim();return{attrs:eT(_,b[2]||"",i,d),tag:_}}},12:{t:["<!--"],o:tD(Zk),u:1,i:()=>({})},14:{t:["!["],o:hS(Ide),u:1,i:b=>({alt:wl(b[1]),target:wl(b[2]),title:wl(b[3])})},15:{t:["["],o:_c(Pde),u:3,i:(b,_,E)=>({children:Bde(_,b[1],E),target:wl(b[2]),title:wl(b[3])})},16:{t:function(b,_){return!(!_.inline||_.inAnchor)&&b[0]==="<"&&(Sl(b,":")||Sl(b,"@")||Sl(b,"/"))},o:_c(pde),u:0,i(b){let _=b[1],E=!1;return Sl(_,"@")&&!Sl(_,"//")&&(E=!0,_=_.replace("mailto:","")),{children:[{text:_,type:"27"}],target:E?"mailto:"+_:_,type:"15"}}},17:{t:(b,_)=>!_.inAnchor&&!t.disableAutoLink&&rO(b,"http"),o:_c(hde),u:0,i:b=>({children:[{text:b[1],type:"27"}],target:b[1],title:void 0,type:"15"})},20:Qk(0,1),30:Qk(0,2),19:{t:[`
76
+ `],o:nc(nde),u:3,i:W_},21:{t:function(b,_){return!_.inline&&!_.simple},o:Dc(function(b,_){if(_.inline||_.simple||_.inHTML&&!Sl(b,`
77
+
78
+ `)&&!Sl(_.prevCapture,`
79
+
80
+ `))return null;let E="",R=0;for(;;){const T=b.indexOf(`
81
+ `,R),x=b.slice(R,T===-1?void 0:T+1),O=b[R];if((O===">"||O==="#"||O==="|"||O==="`"||O==="~"||O==="*"||O==="-"||O==="_"||O===" ")&&nD(l,x)||(E+=x,T===-1||!x.trim()))break;R=T+1}const w=eb(E);return w===""?null:[E,,w]}),u:3,i:Gde},22:{t:["["],o:_c(yde),u:0,i:b=>(m[b[1]]={target:b[2],title:b[4]},{})},23:{t:["!["],o:hS(vde),u:0,i:b=>({alt:b[1]?wl(b[1]):void 0,ref:b[2]})},24:{t:b=>b[0]==="["&&!Sl(b,"]("),o:_c(bde),u:0,i:(b,_,E)=>({children:_(b[1],E),fallbackChildren:b[0],ref:b[2]})},25:{t:["|"],o:nc(Xk),u:1,i:qde},27:{o:Dc(function(b,_){let E;return rO(b,":")&&(E=Cde.exec(b)),E||Ade.exec(b)}),u:4,i(b){const _=b[0];return{text:Sl(_,"&")?_.replace(cde,(E,R)=>t.namedCodesToUnicode[R]||E):_}}},34:{t:["*","_","~","="],o:Dc(Hfe),u:2,i:(b,_,E)=>({children:_(b[2],E),tag:b[1]})},28:{t:["\\"],o:hS(Ode),u:1,i:b=>({text:b[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete g[11],delete g[13]);const v=(function(b){var _=Object.keys(b);function E(R,w){var T=[];if(w.prevCapture=w.prevCapture||"",R.trim())for(;R;)for(var x=0;x<_.length;){var O=_[x],C=b[O];if(!C.t||Lde(R,w,C.t)){var M=C.o(R,w);if(M&&M[0]){R=R.substring(M[0].length);var D=C.i(M,E,w);w.prevCapture+=M[0],D.type||(D.type=O),T.push(D);break}x++}else x++}return w.prevCapture="",T}return _.sort(function(R,w){return b[R].u-b[w].u||(R<w?-1:1)}),function(R,w){return E((function(T){return T.replace(rde,`
82
+ `).replace(ode,"").replace(wde," ")})(R),w)}})(g),S=(function(b,_,E,R,w){function T(x){return Array.isArray(x)?x.map(O=>"text"in O?O.text:""):"text"in x?x.text:""}return function x(O,C={}){const M=(C.renderDepth||0)+1;if(M>2500)return T(O);C.renderDepth=M;try{if(Array.isArray(O)){const $=C.key,q=[];let L=!1;for(let V=0;V<O.length;V++){C.key=V;const F=x(O[V],C),re=Wk(F);re&&L?q[q.length-1]+=F:F!==null&&q.push(F),L=re}return C.key=$,C.renderDepth=M-1,q}const D=(function($,q,L){const V=()=>(function(F,re,ae,K,B,Y,fe){switch(F.type){case"0":{const ie={key:ae.key};return F.alert&&(ie.className="markdown-alert-"+Y(F.alert.toLowerCase(),Av),F.children.unshift({attrs:{},children:[{type:"27",text:F.alert}],noInnerParse:!0,type:"11",tag:"header"})),K("blockquote",ie,re(F.children,ae))}case"1":return K("br",{key:ae.key});case"2":return K("hr",{key:ae.key});case"3":return K("pre",{key:ae.key},K("code",xl({},F.attrs,{className:F.lang?"lang-"+F.lang:""}),F.text));case"5":return K("code",{key:ae.key},F.text);case"7":return K("a",{key:ae.key,href:B(F.target,"a","href")},K("sup",{key:ae.key},F.text));case"8":return K("input",{checked:F.completed,key:ae.key,readOnly:!0,type:"checkbox"});case"9":return K("h"+F.level,{id:F.id,key:ae.key},re(F.children,ae));case"11":return K(F.tag,xl({key:ae.key},F.attrs),F.text||(F.children?re(F.children,ae):""));case"13":return K(F.tag,xl({},F.attrs,{key:ae.key}));case"14":return K("img",{key:ae.key,alt:F.alt||void 0,title:F.title||void 0,src:B(F.target,"img","src")});case"15":return K("a",{key:ae.key,href:B(F.target,"a","href"),title:F.title},re(F.children,ae));case"23":return fe[F.ref]?K("img",{key:ae.key,alt:F.alt,src:B(fe[F.ref].target,"img","src"),title:fe[F.ref].title}):null;case"24":return fe[F.ref]?K("a",{key:ae.key,href:B(fe[F.ref].target,"a","href"),title:fe[F.ref].title},re(F.children,ae)):K("span",{key:ae.key},F.fallbackChildren);case"25":{const ie=F;return K("table",{key:ae.key},K("thead",null,K("tr",null,ie.header.map(function(N,I){return K("th",{key:I,style:eD(ie,I)},re(N,ae))}))),K("tbody",null,ie.cells.map(function(N,I){return K("tr",{key:I},N.map(function(U,P){return K("td",{key:P,style:eD(ie,P)},re(U,ae))}))})))}case"27":return F.text;case"34":return K(F.tag,{key:ae.key},re(F.children,ae));case"20":case"30":return K(F.ordered?"ol":"ul",{key:ae.key,start:F.type==="20"?F.start:void 0},F.items.map(function(ie,N){return K("li",{key:N},re(ie,ae))}));case"19":return`
83
+ `;case"21":return K("p",{key:ae.key},re(F.children,ae));default:return null}})($,q,L,_,E,R,w);return b?b(V,$,q,L):V()})(O,x,C);return C.renderDepth=M-1,D}catch(D){if(D instanceof RangeError&&D.message.includes("Maximum call stack"))return T(O);throw D}}})(t.renderRule,f,i,r,m);return d(e)}const t1=e=>{let{children:t,options:r}=e,i=(function(s,l){if(s==null)return{};var c={};for(var f in s)if({}.hasOwnProperty.call(s,f)){if(l.indexOf(f)!==-1)continue;c[f]=s[f]}return c})(e,Gfe);return Yde(t??"",xl({},r,{wrapperProps:xl({},r?.wrapperProps,i)}))},HP=Symbol("remove-this-key"),rD=Symbol("reset");function Zde(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function Xde(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return e(gn.NewStringDefault)}}function Qde(e){const{fieldPathId:t,schema:r,registry:i,uiSchema:s,errorSchema:l,formData:c,onChange:f,onBlur:d,onFocus:h,disabled:m,readonly:g,required:v,hideError:S,propertyName:b,handleKeyRename:_,handleRemoveProperty:E,addedByAdditionalProperties:R}=e,[w,T]=j.useState(!1),{globalFormOptions:x,fields:O}=i,{SchemaField:C}=O,M=sp(ms(b,x,t.path)),D=j.useCallback((V,F,re,ae)=>{V===void 0&&R&&(V=""),f(V,F,re,ae)},[f,R]),$=j.useCallback(V=>{b!==V&&T(!0),_(b,V)},[b,_]),q=j.useCallback(V=>{const{target:{value:F}}=V;$(F)},[$]),L=j.useCallback(()=>{E(b)},[b,E]);return k.jsx(C,{name:b,required:v,schema:r,uiSchema:s,errorSchema:l,fieldPathId:M,formData:c,wasPropertyKeyModified:w,onKeyRename:$,onKeyRenameBlur:q,onRemoveProperty:L,onChange:D,onBlur:d,onFocus:h,registry:i,disabled:m,readonly:g,hideError:S})}function Wde(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:c,required:f=!1,disabled:d,readonly:h,hideError:m,onBlur:g,onFocus:v,onChange:S,registry:b,title:_}=e,{fields:E,schemaUtils:R,translateString:w,globalUiOptions:T}=b,{OptionalDataControlsField:x}=E,O=R.retrieveSchema(t,i,!0),C=kt(r,T),{properties:M={}}=O,D=e.childFieldPathId??l,$=C.title??O.title??_??c,q=C.description??O.description,L=e1(b,O,f,r),V=Dm(i);let F=[];const re=j.useCallback((N,I)=>{const{duplicateKeySuffixSeparator:U="-"}=kt(r,T);let P=0,G=N;for(;Mn(I,G);)G=`${N}${U}${++P}`;return G},[r,T]),ae=j.useCallback(()=>{if(!(O.additionalProperties||O.patternProperties))return;const{translateString:N}=b,I={...i},U=re("newKey",I);if(O.patternProperties)Gn(I,U,null);else{let P,G,ee;if(In(O.additionalProperties)){P=O.additionalProperties.type,G=O.additionalProperties.const,ee=O.additionalProperties.default;let ve=O.additionalProperties;if(vr in ve){const{schemaUtils:Ee}=b;ve=Ee.retrieveSchema({[vr]:ve[vr]},i),P=ve.type,G=ve.const,ee=ve.default}!P&&($n in ve||pn in ve)&&(P="object")}const ue=G??ee??Xde(N,P);Gn(I,U,ue)}S(I,D.path)},[i,S,b,D,re,O]),K=j.useCallback((N,I)=>{if(N!==I){const U=re(I,i),P={...i},G={[N]:U},ee=Object.keys(P).map(ve=>({[G[ve]||ve]:P[ve]})),ue=Object.assign({},...ee);S(ue,D.path)}},[i,S,D,re]),B=j.useCallback(N=>{S(HP,[...D.path,N])},[S,D]);if(!L||V)try{const N=Object.keys(M);F=tfe(N,C.order)}catch(N){return k.jsxs("div",{children:[k.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:k.jsx(t1,{options:{disableParsingRawHTML:!0},children:w(gn.InvalidObjectField,[c||"root",N.message])})}),k.jsx("pre",{children:JSON.stringify(O)})]})}const Y=Ut("ObjectFieldTemplate",b,C),fe=L?k.jsx(x,{...e,fieldPathId:D,schema:O}):void 0,ie={title:C.label===!1?"":$,description:C.label===!1?void 0:q,properties:F.map(N=>{const I=Mn(O,[Un,N,lc]),U=I?r.additionalProperties:r[N],P=kt(U).widget==="hidden";return{content:k.jsx(Qde,{propertyName:N,required:Zde(O,N),schema:Ve(O,[Un,N],{}),uiSchema:U,errorSchema:Ve(s,[N]),fieldPathId:D,formData:Ve(i,[N]),handleKeyRename:K,handleRemoveProperty:B,addedByAdditionalProperties:I,onChange:S,onBlur:g,onFocus:v,registry:b,disabled:d,readonly:h,hideError:m},N),name:N,readonly:h,disabled:d,required:f,hidden:P}}),readonly:h,disabled:d,required:f,fieldPathId:l,uiSchema:r,errorSchema:s,schema:O,formData:i,registry:b,optionalDataControl:fe,className:L?"rjsf-optional-object-field":void 0};return k.jsx(Y,{...ie,onAddProperty:ae})}function Jde(e){const{schema:t,uiSchema:r={},formData:i,disabled:s=!1,readonly:l=!1,onChange:c,errorSchema:f,fieldPathId:d,registry:h}=e,{globalUiOptions:m={},schemaUtils:g,translateString:v}=h,S=kt(r,m),b=Ut("OptionalDataControlsTemplate",h,S),_=Dm(i);let E,R,w,T;if(s||l)E=Y_(d,"Msg"),R=_?void 0:v(gn.OptionalObjectEmptyMsg);else{const x=_?gn.OptionalObjectRemove:gn.OptionalObjectAdd;R=v(x),_?(E=Y_(d,"Remove"),T=()=>c(void 0,d.path,f)):(E=Y_(d,"Add"),w=()=>{let O=g.getDefaultFormState(t,i,"excludeObjectChildren");O===void 0&&(O=hl(t)==="array"?[]:{}),c(O,d.path,f)})}return R&&k.jsx(b,{id:E,registry:h,schema:t,uiSchema:r,label:R,onAddClick:w,onRemoveClick:T})}const ehe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function the(e,t,r){const i=t.field,{fields:s}=r;if(typeof i=="function")return i;if(typeof i=="string"&&i in s)return s[i];const l=hl(e),c=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=ehe[c];return f&&f in s&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in s?s[d]:s.FallbackField}function nhe(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s,errorSchema:l,name:c,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g=!1,registry:v,wasPropertyKeyModified:S=!1}=e,{schemaUtils:b,globalFormOptions:_,globalUiOptions:E,fields:R}=v,{AnyOfField:w,OneOfField:T}=R,x=kt(i,E),O=Ut("FieldTemplate",v,x),C=Ut("DescriptionFieldTemplate",v,x),M=Ut("FieldHelpTemplate",v,x),D=Ut("FieldErrorTemplate",v,x),$=b.retrieveSchema(t,s),q=r[or],L=j.useCallback((Te,Pe,Ge,Ce)=>f(Te,Pe,Ge,Ce||q),[q,f]),V=the($,x,v),F=!!(x.disabled??e.disabled),re=!!(x.readonly??(e.readonly||e.schema.readOnly||$.readOnly)),ae=x.hideError,K=ae===void 0?e.hideError:!!ae,B=!!(x.autofocus??e.autofocus);if(Object.keys($).length===0)return null;let Y=b.getDisplayLabel($,i,E);const fe=x.field&&x.fieldReplacesAnyOrOneOf===!0;let ie,N,I={fieldPathId:r};if(($n in $||pn in $)&&!fe&&!b.isSelect($)){$[$n]?(ie=w,N=$[$n].map(Ge=>b.retrieveSchema(In(Ge)?Ge:{},s))):$[pn]&&(ie=T,N=$[pn].map(Ge=>b.retrieveSchema(In(Ge)?Ge:{},s)));const Te=e1(v,$,g,i),Pe=Dm(s);Y=Y&&(!Te||Pe),I={childFieldPathId:r,fieldPathId:ms("XxxOf",_,r)}}const{__errors:U,...P}=l||{},G=lb(i,["ui:classNames","classNames","ui:style"]);Ic in G&&(G[Ic]=lb(G[Ic],["classNames","style"]));const ee=k.jsx(V,{...e,onChange:L,...I,schema:$,uiSchema:G,disabled:F,readonly:re,hideError:K,autofocus:B,errorSchema:P,rawErrors:U}),ue=r[or];let ve;S?ve=c:ve=lc in $?c:x.title||e.schema.title||$.title||e.title||c;const Ee=x.description||e.schema.description||$.description||"",Oe=x.help,de=x.widget==="hidden",te=["rjsf-field",`rjsf-field-${hl($)}`];!K&&U&&U.length>0&&te.push("rjsf-field-error"),x.classNames&&te.push(x.classNames);const Se=k.jsx(M,{help:Oe,fieldPathId:r,schema:$,uiSchema:i,hasErrors:!K&&U&&U.length>0,registry:v}),we=K||ie&&!b.isSelect($)?void 0:k.jsx(D,{errors:U,errorSchema:l,fieldPathId:r,schema:$,uiSchema:i,registry:v}),$e={description:k.jsx(C,{id:op(ue),description:Ee,schema:$,uiSchema:i,registry:v}),rawDescription:Ee,help:Se,rawHelp:typeof Oe=="string"?Oe:void 0,errors:we,rawErrors:K?void 0:U,fieldPathId:r,id:ue,label:ve,hidden:de,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g,disabled:F,readonly:re,hideError:K,displayLabel:Y,classNames:te.join(" ").trim(),style:x.style,formData:s,schema:$,uiSchema:i,registry:v};return k.jsx(O,{...$e,children:k.jsxs(k.Fragment,{children:[ee,ie&&k.jsx(ie,{name:c,disabled:F,readonly:re,hideError:K,errorSchema:l,formData:s,fieldPathId:r,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N,registry:v,required:g,schema:$,uiSchema:i})]})})}class rhe extends j.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:r}}=this.props,{experimental_componentUpdateStrategy:i="customDeep"}=r;return jP(this,t,this.state,i)}render(){return k.jsx(nhe,{...this.props})}}function ahe(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,required:c,disabled:f=!1,readonly:d=!1,autofocus:h=!1,onChange:m,onBlur:g,onFocus:v,registry:S,rawErrors:b,hideError:_,title:E}=e,{title:R,format:w}=t,{widgets:T,schemaUtils:x,globalUiOptions:O}=S,C=x.isSelect(t)?um(t,i):void 0;let M=C?"select":"text";w&&Wce(t,w,T)&&(M=w);const{widget:D=M,placeholder:$="",title:q,...L}=kt(i),V=x.getDisplayLabel(t,i,O),F=q??E??R??r,re=zl(t,D,T),ae=j.useCallback((K,B,Y)=>m(K,s.path,B,Y),[m,s]);return k.jsx(re,{options:{...L,enumOptions:C},schema:t,uiSchema:i,id:s.$id,name:r,label:F,hideLabel:!V,hideError:_,value:l,onChange:ae,onBlur:g,onFocus:v,required:c,disabled:f,readonly:d,autofocus:h,registry:S,placeholder:$,rawErrors:b,htmlName:s.name})}function ihe(e){const{formData:t,onChange:r,fieldPathId:i}=e;return j.useEffect(()=>{t===void 0&&r(null,i.path)},[i,t,r]),null}function ohe(){return{AnyOfField:Lk,ArrayField:wfe,BooleanField:Efe,FallbackField:Cfe,LayoutGridField:qA,LayoutHeaderField:Lfe,LayoutMultiSchemaField:Ufe,NumberField:Ffe,ObjectField:Wde,OneOfField:Lk,OptionalDataControlsField:Jde,SchemaField:rhe,StringField:ahe,NullField:ihe}}function she(e){const{fieldPathId:t,description:r,registry:i,schema:s,uiSchema:l}=e,c=kt(l,i.globalUiOptions),{label:f=!0}=c;if(!r||!f)return null;const d=Ut("DescriptionFieldTemplate",i,c);return k.jsx(d,{id:op(t),description:r,schema:s,uiSchema:l,registry:i})}function lhe(e){const{children:t,className:r,buttonsProps:i,displayLabel:s,hasDescription:l,hasToolbar:c,registry:f,uiSchema:d}=e,h=kt(d),m=Ut("ArrayFieldItemButtonsTemplate",f,h),g={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},v=l?31:9,S={display:"flex",alignItems:s?"center":"baseline"},b={display:"flex",justifyContent:"flex-end",marginTop:s?`${v}px`:0};return k.jsxs("div",{className:r,style:S,children:[k.jsx("div",{className:c?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),c&&k.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:k.jsx("div",{className:"btn-group",style:b,children:k.jsx(m,{...i,style:g})})})]})}function uhe(e){const{disabled:t,hasCopy:r,hasMoveDown:i,hasMoveUp:s,hasRemove:l,fieldPathId:c,onCopyItem:f,onRemoveItem:d,onMoveDownItem:h,onMoveUpItem:m,readonly:g,registry:v,uiSchema:S}=e,{CopyButton:b,MoveDownButton:_,MoveUpButton:E,RemoveButton:R}=v.templates.ButtonTemplates;return k.jsxs(k.Fragment,{children:[(s||i)&&k.jsx(E,{id:Rl(c,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||g||!s,onClick:m,uiSchema:S,registry:v}),(s||i)&&k.jsx(_,{id:Rl(c,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||g||!i,onClick:h,uiSchema:S,registry:v}),r&&k.jsx(b,{id:Rl(c,"copy"),className:"rjsf-array-item-copy",disabled:t||g,onClick:f,uiSchema:S,registry:v}),l&&k.jsx(R,{id:Rl(c,"remove"),className:"rjsf-array-item-remove",disabled:t||g,onClick:d,uiSchema:S,registry:v})]})}function che(e){const{canAdd:t,className:r,disabled:i,fieldPathId:s,uiSchema:l,items:c,optionalDataControl:f,onAddClick:d,readonly:h,registry:m,required:g,schema:v,title:S}=e,b=kt(l),_=Ut("ArrayFieldDescriptionTemplate",m,b),E=Ut("ArrayFieldTitleTemplate",m,b),R=!h&&!i,{ButtonTemplates:{AddButton:w}}=m.templates;return k.jsxs("fieldset",{className:r,id:s.$id,children:[k.jsx(E,{fieldPathId:s,title:b.title||S,required:g,schema:v,uiSchema:l,registry:m,optionalDataControl:R?f:void 0}),k.jsx(_,{fieldPathId:s,description:b.description||v.description,schema:v,uiSchema:l,registry:m}),R?void 0:f,k.jsx("div",{className:"row array-item-list",children:c}),t&&k.jsx(w,{id:Rl(s,"add"),className:"rjsf-array-item-add",onClick:d,disabled:i||h,uiSchema:l,registry:m})]})}function fhe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:c,optionalDataControl:f}=e,d=kt(s,c.globalUiOptions),{label:h=!0}=d;if(!r||!h)return null;const m=Ut("TitleFieldTemplate",c,d);return k.jsx(m,{id:m2(t),title:r,required:l,schema:i,uiSchema:s,registry:c,optionalDataControl:f})}function dhe(e){const{id:t,name:r,htmlName:i,value:s,readonly:l,disabled:c,autofocus:f,onBlur:d,onFocus:h,onChange:m,onChangeOverride:g,options:v,schema:S,uiSchema:b,registry:_,rawErrors:E,type:R,hideLabel:w,hideError:T,...x}=e,{ClearButton:O}=_.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const C={...x,...RP(S,R,v)};let M;C.type==="number"||C.type==="integer"?M=s||s===0?s:"":M=s??"";const D=j.useCallback(({target:{value:V}})=>m(V===""?v.emptyValue:V),[m,v]),$=j.useCallback(({target:V})=>d(t,V&&V.value),[d,t]),q=j.useCallback(({target:V})=>h(t,V&&V.value),[h,t]),L=j.useCallback(V=>{V.preventDefault(),V.stopPropagation(),m(v.emptyValue??"")},[m,v.emptyValue]);return k.jsxs(k.Fragment,{children:[k.jsx("input",{id:t,name:i||t,className:"form-control",readOnly:l,disabled:c,autoFocus:f,value:M,...C,list:S.examples?wb(t):void 0,onChange:g||D,onBlur:$,onFocus:q,"aria-describedby":uo(t,!!S.examples)}),v.allowClearTextInputs&&!l&&!c&&M&&k.jsx(O,{registry:_,onClick:L}),Array.isArray(S.examples)&&k.jsx("datalist",{id:wb(t),children:S.examples.concat(S.default&&!S.examples.includes(S.default)?[S.default]:[]).map(V=>k.jsx("option",{value:V},V))},`datalist_${t}`)]})}function hhe({uiSchema:e}){const{submitText:t,norender:r,props:i={}}=AP(e);return r?null:k.jsx("div",{children:k.jsx("button",{type:"submit",...i,className:`btn btn-info ${i.className||""}`,children:t})})}function ef(e){const{iconType:t="default",icon:r,className:i,uiSchema:s,registry:l,...c}=e;return k.jsx("button",{type:"button",className:`btn btn-${t} ${i}`,...c,children:k.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function phe(e){const{registry:{translateString:t}}=e;return k.jsx(ef,{title:t(gn.CopyButton),...e,icon:"copy"})}function mhe(e){const{registry:{translateString:t}}=e;return k.jsx(ef,{title:t(gn.MoveDownButton),...e,icon:"arrow-down"})}function ghe(e){const{registry:{translateString:t}}=e;return k.jsx(ef,{title:t(gn.MoveUpButton),...e,icon:"arrow-up"})}function yhe(e){const{registry:{translateString:t}}=e;return k.jsx(ef,{title:t(gn.RemoveButton),...e,iconType:"danger",icon:"remove"})}function vhe({id:e,className:t,onClick:r,disabled:i,registry:s,...l}){const{translateString:c}=s;return k.jsx(ef,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:c(gn.ClearButton),onClick:r,disabled:i,registry:s,...l})}function bhe({id:e,className:t,onClick:r,disabled:i,registry:s}){const{translateString:l}=s;return k.jsx("div",{className:"row",children:k.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:k.jsx(ef,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:l(gn.AddButton),onClick:r,disabled:i,registry:s})})})}function She(){return{SubmitButton:hhe,AddButton:bhe,CopyButton:phe,MoveDownButton:mhe,MoveUpButton:ghe,RemoveButton:yhe,ClearButton:vhe}}const GP=zA();function HA({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return kt(r,i).enableMarkdownInDescription&&typeof e=="string"?k.jsx(t1,{options:{disableParsingRawHTML:!0},"data-testid":GP.markdown,children:e}):e}HA.TEST_IDS=GP;function whe(e){const{id:t,description:r,registry:i,uiSchema:s}=e;return r?k.jsx("div",{id:t,className:"field-description",children:k.jsx(HA,{description:r,registry:i,uiSchema:s})}):null}function Ehe({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs("div",{className:"panel panel-danger errors",children:[k.jsx("div",{className:"panel-heading",children:k.jsx("h3",{className:"panel-title",children:r(gn.ErrorsLabel)})}),k.jsx("ul",{className:"list-group",children:e.map((i,s)=>k.jsx("li",{className:"list-group-item text-danger",children:i.stack},s))})]})}function xhe(e){const{schema:t,registry:r,typeSelector:i,schemaField:s}=e,l=Ut("MultiSchemaFieldTemplate",r);return k.jsx(l,{selector:i,optionSchemaField:s,schema:t,registry:r})}const _he="*";function KP(e){const{label:t,required:r,id:i}=e;return t?k.jsxs("label",{className:"control-label",htmlFor:i,children:[t,r&&k.jsx("span",{className:"required",children:_he})]}):null}function The(e){const{id:t,label:r,children:i,errors:s,help:l,description:c,hidden:f,required:d,displayLabel:h,registry:m,uiSchema:g}=e,v=kt(g),S=Ut("WrapIfAdditionalTemplate",m,v);if(f)return k.jsx("div",{className:"hidden",children:i});const b=v.widget==="checkbox";return k.jsxs(S,{...e,children:[h&&!b&&k.jsx(KP,{label:r,required:d,id:t}),h&&c?c:null,i,s,l]})}function Che(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=$A(r);return k.jsx("div",{children:k.jsx("ul",{id:i,className:"error-detail bs-callout bs-callout-info",children:t.filter(s=>!!s).map((s,l)=>k.jsx("li",{className:"text-danger",children:s},l))})})}const YP=zA();function GA({help:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return kt(r,i).enableMarkdownInHelp&&typeof e=="string"?k.jsx(t1,{options:{disableParsingRawHTML:!0},"data-testid":YP.markdown,children:e}):e}GA.TEST_IDS=YP;function Ohe(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s}=e;return r?k.jsx("div",{id:PA(t),className:"help-block",children:k.jsx(GA,{help:r,registry:s,uiSchema:i})}):null}function Rhe(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:i,...s,children:t})}function Ahe(e){const{selector:t,optionSchemaField:r}=e;return k.jsxs("div",{className:"panel panel-default panel-body",children:[k.jsx("div",{className:"form-group",children:t}),r]})}function Mhe(e){const{className:t,description:r,disabled:i,formData:s,fieldPathId:l,onAddProperty:c,optionalDataControl:f,properties:d,readonly:h,registry:m,required:g,schema:v,title:S,uiSchema:b}=e,_=kt(b),E=Ut("TitleFieldTemplate",m,_),R=Ut("DescriptionFieldTemplate",m,_);if((v.oneOf||v.anyOf)&&!v.properties&&d.length===0)return null;const T=!h&&!i,{ButtonTemplates:{AddButton:x}}=m.templates;return k.jsxs("fieldset",{className:t,id:l.$id,children:[S&&k.jsx(E,{id:m2(l),title:S,required:g,schema:v,uiSchema:b,registry:m,optionalDataControl:T?f:void 0}),r&&k.jsx(R,{id:op(l),description:r,schema:v,uiSchema:b,registry:m}),T?void 0:f,d.map(O=>O.content),eP(v,b,s)&&k.jsx(x,{id:Rl(l,"add"),className:"rjsf-object-property-expand",onClick:c,disabled:i||h,uiSchema:b,registry:m})]})}function jhe(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx(ef,{id:t,registry:r,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:s,title:i}):l?k.jsx(ef,{id:t,registry:r,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:l,title:i}):k.jsx("em",{id:t,children:i})}const khe="*";function Dhe(e){const{id:t,title:r,required:i,optionalDataControl:s}=e;return k.jsxs("legend",{id:t,children:[r,i&&k.jsx("span",{className:"required",children:khe}),s&&k.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:s})]})}function Nhe(e){const{schema:t,fieldPathId:r,reason:i,registry:s}=e,{translateString:l}=s;let c=gn.UnsupportedField;const f=[];return r&&r.$id&&(c=gn.UnsupportedFieldWithId,f.push(r.$id)),i&&(c=c===gn.UnsupportedField?gn.UnsupportedFieldWithReason:gn.UnsupportedFieldWithIdAndReason,f.push(i)),k.jsxs("div",{className:"unsupported-field",children:[k.jsx("p",{children:k.jsx(t1,{options:{disableParsingRawHTML:!0},children:l(c,f)})}),t&&k.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function zhe(e){const{id:t,classNames:r,style:i,disabled:s,displayLabel:l,label:c,onKeyRenameBlur:f,onRemoveProperty:d,rawDescription:h,readonly:m,required:g,schema:v,hideError:S,rawErrors:b,children:_,uiSchema:E,registry:R}=e,{templates:w,translateString:T}=R,{RemoveButton:x}=w.ButtonTemplates,O=T(gn.KeyLabel,[c]),C=lc in v,M=!!h,D=["form-group",r];!S&&b&&b.length>0&&D.push("has-error has-danger");const $=D.join(" ").trim();if(!C)return k.jsx("div",{className:$,style:i,children:_});const q=M?46:26;return k.jsx("div",{className:$,style:i,children:k.jsxs("div",{className:"row",children:[k.jsx("div",{className:"col-xs-5 form-additional",children:k.jsxs("div",{className:"form-group",children:[l&&k.jsx(KP,{label:O,required:g,id:`${t}-key`}),l&&h&&k.jsx("div",{children:" "}),k.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:f,defaultValue:c})]})}),k.jsx("div",{className:"form-additional form-group col-xs-5",children:_}),k.jsx("div",{className:"col-xs-2",style:{marginTop:l?`${q}px`:void 0},children:k.jsx(x,{id:Rl(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:s||m,onClick:d,uiSchema:E,registry:R})})]})})}function $he(){return{ArrayFieldDescriptionTemplate:she,ArrayFieldItemTemplate:lhe,ArrayFieldItemButtonsTemplate:uhe,ArrayFieldTemplate:che,ArrayFieldTitleTemplate:fhe,ButtonTemplates:She(),BaseInputTemplate:dhe,DescriptionFieldTemplate:whe,ErrorListTemplate:Ehe,FallbackFieldTemplate:xhe,FieldTemplate:The,FieldErrorTemplate:Che,FieldHelpTemplate:Ohe,GridTemplate:Rhe,MultiSchemaFieldTemplate:Ahe,ObjectFieldTemplate:Mhe,OptionalDataControlsTemplate:jhe,TitleFieldTemplate:Dhe,UnsupportedFieldTemplate:Nhe,WrapIfAdditionalTemplate:zhe}}function Phe(e){const{disabled:t=!1,readonly:r=!1,autofocus:i=!1,options:s,id:l,name:c,registry:f,onBlur:d,onFocus:h}=e,{translateString:m}=f,{elements:g,handleChange:v,handleClear:S,handleSetNow:b}=ife(e);return k.jsxs("ul",{className:"list-inline",children:[g.map((_,E)=>k.jsx("li",{className:"list-inline-item",children:k.jsx(afe,{rootId:l,name:c,select:v,..._,disabled:t,readonly:r,registry:f,onBlur:d,onFocus:h,autofocus:i&&E===0})},E)),(s.hideNowButton!=="undefined"?!s.hideNowButton:!0)&&k.jsx("li",{className:"list-inline-item",children:k.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:b,children:m(gn.NowLabel)})}),(s.hideClearButton!=="undefined"?!s.hideClearButton:!0)&&k.jsx("li",{className:"list-inline-item",children:k.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:S,children:m(gn.ClearLabel)})})]})}function Ihe({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return k.jsx(r,{time:e,...t})}function Lhe({schema:e,uiSchema:t,options:r,id:i,value:s,disabled:l,readonly:c,label:f,hideLabel:d,autofocus:h=!1,onBlur:m,onFocus:g,onChange:v,registry:S,htmlName:b}){const _=Ut("DescriptionFieldTemplate",S,r),E=Wv(e),R=j.useCallback(M=>v(M.target.checked),[v]),w=j.useCallback(M=>m(i,M.target.checked),[m,i]),T=j.useCallback(M=>g(i,M.target.checked),[g,i]),C=kt(t).widget==="checkbox"?void 0:r.description??e.description;return k.jsxs("div",{className:`checkbox ${l||c?"disabled":""}`,children:[!d&&C&&k.jsx(_,{id:op(i),description:C,schema:e,uiSchema:t,registry:S}),k.jsxs("label",{children:[k.jsx("input",{type:"checkbox",id:i,name:b||i,checked:typeof s>"u"?!1:s,required:E,disabled:l||c,autoFocus:h,onChange:R,onBlur:w,onFocus:T,"aria-describedby":uo(i)}),MP(k.jsx("span",{children:f}),d)]})]})}function Uhe({id:e,disabled:t,options:{inline:r=!1,enumOptions:i,enumDisabled:s,emptyValue:l},value:c,autofocus:f=!1,readonly:d,onChange:h,onBlur:m,onFocus:g,htmlName:v}){const S=Array.isArray(c)?c:[c],b=j.useCallback(({target:E})=>m(e,Na(E&&E.value,i,l)),[m,e,i,l]),_=j.useCallback(({target:E})=>g(e,Na(E&&E.value,i,l)),[g,e,i,l]);return k.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(i)&&i.map((E,R)=>{const w=Jb(E.value,S),T=Array.isArray(s)&&s.indexOf(E.value)!==-1,x=t||T||d?"disabled":"",O=M=>{M.target.checked?h(TP(R,S,i)):h(xP(R,S,i))},C=k.jsxs("span",{children:[k.jsx("input",{type:"checkbox",id:$h(e,R),name:v||e,checked:w,value:String(R),disabled:t||T||d,autoFocus:f&&R===0,onChange:O,onBlur:b,onFocus:_,"aria-describedby":uo(e)}),k.jsx("span",{children:E.label})]});return r?k.jsx("label",{className:`checkbox-inline ${x}`,children:C},R):k.jsx("div",{className:`checkbox ${x}`,children:k.jsx("label",{children:C})},R)})})}function qhe(e){const{disabled:t,readonly:r,options:i,registry:s}=e,l=Ut("BaseInputTemplate",s,i);return k.jsx(l,{type:"color",...e,disabled:t||r})}function Vhe(e){const{onChange:t,options:r,registry:i}=e,s=Ut("BaseInputTemplate",i,r),l=j.useCallback(c=>t(c||void 0),[t]);return k.jsx(s,{type:"date",...e,onChange:l})}function Fhe(e){const{onChange:t,value:r,options:i,registry:s}=e,l=Ut("BaseInputTemplate",s,i);return k.jsx(l,{type:"datetime-local",...e,value:cfe(r),onChange:c=>t(efe(c))})}function Bhe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"email",...e})}function Hhe({fileInfo:e,registry:t}){const{translateString:r}=t,{dataURL:i,type:s,name:l}=e;return i?["image/jpeg","image/png"].includes(s)?k.jsx("img",{src:i,style:{maxWidth:"100%"},className:"file-preview"}):k.jsxs(k.Fragment,{children:[" ",k.jsx("a",{download:`preview-${l}`,href:i,className:"file-download",children:r(gn.PreviewLabel)})]}):null}function Ghe({filesInfo:e,registry:t,preview:r,onRemove:i,options:s}){if(e.length===0)return null;const{translateString:l}=t,{RemoveButton:c}=Ut("ButtonTemplates",t,s);return k.jsx("ul",{className:"file-info",children:e.map((f,d)=>{const{name:h,size:m,type:g}=f,v=()=>i(d);return k.jsxs("li",{children:[k.jsx(t1,{children:l(gn.FilesInfo,[h,g,String(m)])}),r&&k.jsx(Hhe,{fileInfo:f,registry:t}),k.jsx(c,{onClick:v,registry:t})]},d)})})}function Khe(e){const{disabled:t,readonly:r,required:i,multiple:s,onChange:l,value:c,options:f,registry:d}=e,{filesInfo:h,handleChange:m,handleRemove:g}=ufe(c,l,s),v=Ut("BaseInputTemplate",d,f),S=b=>{b.target.files&&m(b.target.files)};return k.jsxs("div",{children:[k.jsx(v,{...e,disabled:t||r,type:"file",required:c?!1:i,onChangeOverride:S,value:"",accept:f.accept?String(f.accept):void 0}),k.jsx(Ghe,{filesInfo:h,onRemove:g,registry:d,preview:f.filePreview,options:f})]})}function Yhe({id:e,value:t,htmlName:r}){return k.jsx("input",{type:"hidden",id:e,name:r||e,value:typeof t>"u"?"":t})}function Zhe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"password",...e})}function Xhe({options:e,value:t,required:r,disabled:i,readonly:s,autofocus:l=!1,onBlur:c,onFocus:f,onChange:d,id:h,htmlName:m}){const{enumOptions:g,enumDisabled:v,inline:S,emptyValue:b}=e,_=j.useCallback(({target:R})=>c(h,Na(R&&R.value,g,b)),[c,g,b,h]),E=j.useCallback(({target:R})=>f(h,Na(R&&R.value,g,b)),[f,g,b,h]);return k.jsx("div",{className:"field-radio-group",id:h,role:"radiogroup",children:Array.isArray(g)&&g.map((R,w)=>{const T=Jb(R.value,t),x=Array.isArray(v)&&v.indexOf(R.value)!==-1,O=i||x||s?"disabled":"",C=()=>d(R.value),M=k.jsxs("span",{children:[k.jsx("input",{type:"radio",id:$h(h,w),checked:T,name:m||h,required:r,value:String(w),disabled:i||x||s,autoFocus:l&&w===0,onChange:C,onBlur:_,onFocus:E,"aria-describedby":uo(h)}),k.jsx("span",{children:R.label})]});return S?k.jsx("label",{className:`radio-inline ${O}`,children:M},w):k.jsx("div",{className:`radio ${O}`,children:k.jsx("label",{children:M})},w)})})}function Qhe(e){const{value:t,registry:{templates:{BaseInputTemplate:r}}}=e;return k.jsxs("div",{className:"field-range-wrapper",children:[k.jsx(r,{type:"range",...e}),k.jsx("span",{className:"range-view",children:t})]})}function Whe({id:e,value:t,required:r,disabled:i,readonly:s,autofocus:l,onChange:c,onFocus:f,onBlur:d,schema:h,options:m,htmlName:g}){const{stars:v=5,shape:S="star"}=m,b=h.maximum?Math.min(h.maximum,5):Math.min(Math.max(v,1),5),_=h.minimum||0,E=j.useCallback(x=>{!i&&!s&&c(x)},[c,i,s]),R=j.useCallback(x=>{if(f){const O=Number(x.target.dataset.value);f(e,O)}},[f,e]),w=j.useCallback(x=>{if(d){const O=Number(x.target.dataset.value);d(e,O)}},[d,e]),T=x=>S==="heart"?x?"♥":"♡":x?"★":"☆";return k.jsx(k.Fragment,{children:k.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:i||s?"default":"pointer"},children:[[...Array(b)].map((x,O)=>{const C=_+O,M=C<=t;return k.jsx("span",{onClick:()=>E(C),onFocus:R,onBlur:w,"data-value":C,tabIndex:i||s?-1:0,role:"radio","aria-checked":C===t,"aria-label":`${C} ${S==="heart"?"heart":"star"}${C===1?"":"s"}`,style:{color:M?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:T(M)},O)}),k.jsx("input",{type:"hidden",id:e,name:g||e,value:t||"",required:r,disabled:i||s,"aria-hidden":"true"})]})})}function tT(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function Jhe({schema:e,id:t,options:r,value:i,required:s,disabled:l,readonly:c,multiple:f=!1,autofocus:d=!1,onChange:h,onBlur:m,onFocus:g,placeholder:v,htmlName:S}){const{enumOptions:b,enumDisabled:_,emptyValue:E}=r,R=f?[]:"",w=j.useCallback(M=>{const D=tT(M,f);return g(t,Na(D,b,E))},[g,t,f,b,E]),T=j.useCallback(M=>{const D=tT(M,f);return m(t,Na(D,b,E))},[m,t,f,b,E]),x=j.useCallback(M=>{const D=tT(M,f);return h(Na(D,b,E))},[h,f,b,E]),O=_P(i,b,f),C=!f&&e.default===void 0;return k.jsxs("select",{id:t,name:S||t,multiple:f,role:"combobox",className:"form-control",value:typeof O>"u"?R:O,required:s,disabled:l||c,autoFocus:d,onBlur:T,onFocus:w,onChange:x,"aria-describedby":uo(t),children:[C&&k.jsx("option",{value:"",children:v}),Array.isArray(b)&&b.map(({value:M,label:D},$)=>{const q=_&&_.indexOf(M)!==-1;return k.jsx("option",{value:String($),disabled:q,children:D},$)})]})}function epe({id:e,options:t={},placeholder:r,value:i,required:s,disabled:l,readonly:c,autofocus:f=!1,onChange:d,onBlur:h,onFocus:m,htmlName:g}){const v=j.useCallback(({target:{value:_}})=>d(_===""?t.emptyValue:_),[d,t.emptyValue]),S=j.useCallback(({target:_})=>h(e,_&&_.value),[h,e]),b=j.useCallback(({target:_})=>m(e,_&&_.value),[e,m]);return k.jsx("textarea",{id:e,name:g||e,className:"form-control",value:i||"",placeholder:r,required:s,disabled:l,readOnly:c,autoFocus:f,rows:t.rows,onBlur:S,onFocus:b,onChange:v,"aria-describedby":uo(e)})}function tpe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{...e})}function npe(e){const{onChange:t,options:r,registry:i}=e,s=Ut("BaseInputTemplate",i,r),l=j.useCallback(c=>t(c?`${c}:00`:void 0),[t]);return k.jsx(s,{type:"time",...e,onChange:l})}function rpe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"url",...e})}function ape(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"number",...e})}function ipe(){return{AltDateWidget:Phe,AltDateTimeWidget:Ihe,CheckboxWidget:Lhe,CheckboxesWidget:Uhe,ColorWidget:qhe,DateWidget:Vhe,DateTimeWidget:Fhe,EmailWidget:Bhe,FileWidget:Khe,HiddenWidget:Yhe,PasswordWidget:Zhe,RadioWidget:Xhe,RangeWidget:Qhe,RatingWidget:Whe,SelectWidget:Jhe,TextWidget:tpe,TextareaWidget:epe,TimeWidget:npe,UpDownWidget:ape,URLWidget:rpe}}function ope(){return{fields:ohe(),templates:$he(),widgets:ipe(),rootSchema:{},formContext:{},translateString:Fce,globalFormOptions:{idPrefix:Q8,idSeparator:W8,useFallbackUiForUnsupportedType:!1}}}function bp(e,t){return{...sR(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class spe extends j.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:r,initialFormData:i,onChange:s}=t,l=r??i;this.state=this.getStateFromProps(t,l,void 0,void 0,void 0,!0),s&&!yr(this.state.formData,l)&&s(bp(this.state)),this.formElement=j.createRef()}getSnapshotBeforeUpdate(t,r){if(!yr(this.props,t)){const i=Ok(this.props.formData,t.formData),s=Ok(this.props.formData,this.state.formData),l=!yr(t.schema,this.props.schema),c=i.length>0||!yr(t.formData,this.props.formData),f=s.length>0||!yr(this.state.formData,this.props.formData),d=this.getStateFromProps(this.props,this.props.formData,l||c?void 0:this.state.retrievedSchema,l,i,!f),h=!yr(d,r);return{nextState:d,shouldUpdate:h}}return{shouldUpdate:!1}}componentDidUpdate(t,r,i){if(i.shouldUpdate){const{nextState:s}=i,l=!yr(s.formData,this.props.formData),c=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,c&&l)return;l&&!yr(s.formData,r.formData)&&this.props.onChange&&this.props.onChange(bp(s)),this.setState(s)}}getStateFromProps(t,r,i,s=!1,l=[],c=!1){const f=this.state||{},d="schema"in t?t.schema:this.props.schema,h="validator"in t?t.validator:this.props.validator,m=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},g=t.formData===void 0&&this.props.formData===void 0,v=typeof r<"u",S="liveValidate"in t?t.liveValidate:this.props.liveValidate,b=v&&!t.noValidate&&S,_="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,E="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let R=f.schemaUtils;(!R||R.doesSchemaUtilsDiffer(h,d,_,E))&&(R=Uce(h,d,_,E));const w=R.getRootSchema();let T=r;r===rD?T=void 0:r===void 0&&g&&(T=f.formData);const x=R.getDefaultFormState(w,T,!1,f.initialDefaultsGenerated),O=this.updateRetrievedSchema(i??R.retrieveSchema(w,x)),C=()=>t.noValidate||s?{errors:[],errorSchema:{}}:t.liveValidate?{errors:f.errors||[],errorSchema:f.errorSchema||{}}:{errors:f.schemaValidationErrors||[],errorSchema:f.schemaValidationErrorSchema||{}};let M,D,$=f.schemaValidationErrors,q=f.schemaValidationErrorSchema;if(b&&!c){const ae=this.liveValidate(w,R,f.errorSchema,x,void 0,f.customErrors,i,i!==void 0);M=ae.errors,D=ae.errorSchema,$=ae.schemaValidationErrors,q=ae.schemaValidationErrorSchema}else{const ae=C();if(M=ae.errors,D=ae.errorSchema,l.length>0&&!b){const B=l.reduce((Y,fe)=>(Y[fe]=void 0,Y),{});D=q=Sb(ae.errorSchema,B,"preventDuplicates")}const K=this.mergeErrors({errorSchema:D,errors:M},t.extraErrors,f.customErrors);M=K.errors,D=K.errorSchema}const L=this.getRegistry(t,w,R),V=yr(f.registry,L)?f.registry:L,F=f.fieldPathId&&f.fieldPathId?.[or]===V.globalFormOptions.idPrefix?f.fieldPathId:ms("",V.globalFormOptions);return{schemaUtils:R,schema:w,uiSchema:m,fieldPathId:F,formData:x,edit:v,errors:M,errorSchema:D,schemaValidationErrors:$,schemaValidationErrorSchema:q,retrievedSchema:O,initialDefaultsGenerated:!0,registry:V}}shouldComponentUpdate(t,r){const{experimental_componentUpdateStrategy:i="customDeep"}=this.props;return jP(this,t,r,i)}validate(t,r=this.state.schema,i,s){const l=i||this.state.schemaUtils,{customValidate:c,transformErrors:f,uiSchema:d}=this.props,h=s??l.retrieveSchema(r,t);return l.getValidator().validateFormData(t,h,c,f,d)}renderErrors(t){const{errors:r,errorSchema:i,schema:s,uiSchema:l}=this.state,c=kt(l),f=Ut("ErrorListTemplate",t,c);return r&&r.length?k.jsx(f,{errors:r,errorSchema:i||{},schema:s,uiSchema:l,registry:t}):null}mergeErrors(t,r,i){let s=t.errorSchema,l=t.errors;if(r){const c=FS(t,r);s=c.errorSchema,l=c.errors}if(i){const c=FS(t,i.ErrorSchema,!0);s=c.errorSchema,l=c.errors}return{errors:l,errorSchema:s}}liveValidate(t,r,i,s,l,c,f,d=!1){const h=this.validate(s,t,r,f),m=h.errors;let g=h.errorSchema;d&&(g=Sb(i,h.errorSchema,"preventDuplicates"));const v=m,S=g;return{...this.mergeErrors({errorSchema:g,errors:m},l,c),schemaValidationErrors:v,schemaValidationErrorSchema:S}}getUsedFormData=(t,r)=>SP(t,r);getFieldNames=(t,r)=>wP(t,r);omitExtraData=t=>{const{schema:r,schemaUtils:i}=this.state;return i.omitExtraData(r,t)};setFieldValue=(t,r)=>{const{registry:i}=this.state,s=Array.isArray(t)?t:t.split("."),l=ms("",i.globalFormOptions,s);this.onChange(r,s,void 0,l[or])};onChange=(t,r,i,s)=>{this.pendingChanges.push({newValue:t,path:r,newErrorSchema:i,id:s}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:t,path:r,id:i}=this.pendingChanges[0],{newErrorSchema:s}=this.pendingChanges[0],{extraErrors:l,omitExtraData:c,liveOmit:f,noValidate:d,liveValidate:h,onChange:m}=this.props,{formData:g,schemaUtils:v,schema:S,fieldPathId:b,schemaValidationErrorSchema:_,errors:E}=this.state;let{customErrors:R,errorSchema:w}=this.state;const T=b.path[0]||"",x=!r||r.length===0||r.length===1&&r[0]===T;let O=this.state.retrievedSchema,C=x?t:Ub(g);const M=Rn(C)&&Object.keys(C).length>0&&Object.values(C).every(F=>F===void 0),D=g==null,$=M&&D?void 0:C;if(Rn(C)||Array.isArray(C)){t===HP?hY(C,r):x||Gn(C,r,t);const F=this.getStateFromProps(this.props,$,void 0,void 0,void 0,!0);C=F.formData,O=F.retrievedSchema}const q=!d&&(h===!0||h==="onChange");let L={formData:C,schema:S},V=C;if(c===!0&&(f===!0||f==="onChange")&&(V=this.omitExtraData(C),L={formData:V}),s){const F=x?_:Ve(_,r);if(!oa(F))x?w=s:Gn(w,r,s);else if(R||(R=new CP),x){const re=Ve(s,pi);re&&R.setErrors(re)}else Gn(R.ErrorSchema,r,s)}else R&&Ve(R.ErrorSchema,[...r,pi])&&R.clearErrors(r);if(q&&this.pendingChanges.length===1){const F=this.liveValidate(S,v,w,V,l,R,O);L={formData:V,...F,customErrors:R}}else if(!d&&s){const F=this.mergeErrors({errorSchema:w,errors:E},l,R);L={formData:V,...F,customErrors:R}}this.setState(L,()=>{m&&m(bp({...this.state,...L}),i),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return yr(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:r=rD,onChange:i}=this.props,c={formData:this.getStateFromProps(this.props,t??r,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(c,()=>i&&i(bp({...this.state,...c})))};onBlur=(t,r)=>{const{onBlur:i,omitExtraData:s,liveOmit:l,liveValidate:c}=this.props;if(i&&i(t,r),s===!0&&l==="onBlur"||c==="onBlur"){const{onChange:f,extraErrors:d}=this.props,{formData:h}=this.state;let m=h,g={formData:m};if(s===!0&&l==="onBlur"&&(m=this.omitExtraData(h),g={formData:m}),c==="onBlur"){const{schema:S,schemaUtils:b,errorSchema:_,customErrors:E,retrievedSchema:R}=this.state,w=this.liveValidate(S,b,_,m,d,E,R);g={formData:m,...w,customErrors:E}}const v=Object.keys(g).filter(S=>!S.startsWith("schemaValidation")).some(S=>{const b=Ve(this.state,S),_=Ve(g,S);return!yr(b,_)});this.setState(g,()=>{f&&v&&f(bp({...this.state,...g}),t)})}};onFocus=(t,r)=>{const{onFocus:i}=this.props;i&&i(t,r)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:r,extraErrors:i,noValidate:s,onSubmit:l}=this.props;let{formData:c}=this.state;if(r===!0&&(c=this.omitExtraData(c)),s||this.validateFormWithFormData(c)){const f=i||{},d=i?LA(i):[];this.setState({formData:c,errors:d,errorSchema:f,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{l&&l(bp({...this.state,formData:c},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:r={},experimental_componentUpdateStrategy:i,idSeparator:s=W8,idPrefix:l=Q8,nameGenerator:c,useFallbackUiForUnsupportedType:f=!1}=t;return{idPrefix:r["ui:rootFieldId"]||l,idSeparator:s,useFallbackUiForUnsupportedType:f,...i!==void 0&&{experimental_componentUpdateStrategy:i},...c!==void 0&&{nameGenerator:c}}}getRegistry(t,r,i){const{translateString:s,uiSchema:l={}}=t,{fields:c,templates:f,widgets:d,formContext:h,translateString:m}=ope();return{fields:{...c,...t.fields},templates:{...f,...t.templates,ButtonTemplates:{...f.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...d,...t.widgets},rootSchema:r,formContext:t.formContext||h,schemaUtils:i,translateString:s||m,globalUiOptions:l[XC],globalFormOptions:this.getGlobalFormOptions(t)}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:r="root",idSeparator:i="_"}=this.props,{property:s}=t,l=l6(s);l[0]===""?l[0]=r:l.unshift(r);const c=l.join(i);let f=this.formElement.current.elements[c];f||(f=this.formElement.current.querySelector(`input[id^="${c}"`)),f&&f.length&&(f=f[0]),f&&f.focus()}validateFormWithFormData=t=>{const{extraErrors:r,extraErrorsBlockSubmit:i,focusOnFirstError:s,onError:l}=this.props,{errors:c}=this.state,f=this.validate(t);let d=f.errors,h=f.errorSchema;const m=d,g=h,v=d.length>0||r&&i;if(v){if(r){const S=FS(f,r);h=S.errorSchema,d=S.errors}s&&(typeof s=="function"?s(d[0]):this.focusOnError(d[0])),this.setState({errors:d,errorSchema:h,schemaValidationErrors:m,schemaValidationErrorSchema:g},()=>{l?l(d):console.error("Form validation failed",d)})}else c.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!v};validateForm(){const{omitExtraData:t}=this.props;let{formData:r}=this.state;return t===!0&&(r=this.omitExtraData(r)),this.validateFormWithFormData(r)}render(){const{children:t,id:r,className:i="",tagName:s,name:l,method:c,target:f,action:d,autoComplete:h,enctype:m,acceptCharset:g,noHtml5Validate:v=!1,disabled:S,readonly:b,showErrorList:_="top",_internalFormWrapper:E}=this.props,{schema:R,uiSchema:w,formData:T,errorSchema:x,fieldPathId:O,registry:C}=this.state,{SchemaField:M}=C.fields,{SubmitButton:D}=C.templates.ButtonTemplates,$=E?s:void 0,q=E||s||"form";let{[_w]:L={}}=kt(w);S&&(L={...L,props:{...L.props,disabled:!0}});const V={[Ic]:{[_w]:L}};return k.jsxs(q,{className:i||"rjsf",id:r,name:l,method:c,target:f,action:d,autoComplete:h,encType:m,acceptCharset:g,noValidate:v,onSubmit:this.onSubmit,as:$,ref:this.formElement,children:[_==="top"&&this.renderErrors(C),k.jsx(M,{name:"",schema:R,uiSchema:w,errorSchema:x,fieldPathId:O,formData:T,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:C,disabled:S,readonly:b}),t||k.jsx(D,{uiSchema:V,registry:C}),_==="bottom"&&this.renderErrors(C)]})}}function lpe(e){return j.forwardRef(({fields:t,widgets:r,templates:i,...s},l)=>(t={...e?.fields,...t},r={...e?.widgets,...r},i={...e?.templates,...i,ButtonTemplates:{...e?.templates?.ButtonTemplates,...i?.ButtonTemplates}},k.jsx(spe,{...e,...s,fields:t,widgets:r,templates:i,ref:l})))}var pS={exports:{}},nT={},aD;function upe(){return aD||(aD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t($,q){return{validate:$,compare:q}}e.fullFormats={date:t(l,c),time:t(d,h),"date-time":t(g,v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:D,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:R,int32:{type:"number",validate:x},int64:{type:"number",validate:O},float:{type:"number",validate:C},double:{type:"number",validate:C},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r($){return $%4===0&&($%100!==0||$%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l($){const q=i.exec($);if(!q)return!1;const L=+q[1],V=+q[2],F=+q[3];return V>=1&&V<=12&&F>=1&&F<=(V===2&&r(L)?29:s[V])}function c($,q){if($&&q)return $>q?1:$<q?-1:0}const f=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function d($,q){const L=f.exec($);if(!L)return!1;const V=+L[1],F=+L[2],re=+L[3],ae=L[5];return(V<=23&&F<=59&&re<=59||V===23&&F===59&&re===60)&&(!q||ae!=="")}function h($,q){if(!($&&q))return;const L=f.exec($),V=f.exec(q);if(L&&V)return $=L[1]+L[2]+L[3]+(L[4]||""),q=V[1]+V[2]+V[3]+(V[4]||""),$>q?1:$<q?-1:0}const m=/t|\s/i;function g($){const q=$.split(m);return q.length===2&&l(q[0])&&d(q[1],!0)}function v($,q){if(!($&&q))return;const[L,V]=$.split(m),[F,re]=q.split(m),ae=c(L,F);if(ae!==void 0)return ae||h(V,re)}const S=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _($){return S.test($)&&b.test($)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function R($){return E.lastIndex=0,E.test($)}const w=-2147483648,T=2**31-1;function x($){return Number.isInteger($)&&$<=T&&$>=w}function O($){return Number.isInteger($)}function C(){return!0}const M=/[^\\]\\Z/;function D($){if(M.test($))return!1;try{return new RegExp($),!0}catch{return!1}}})(nT)),nT}var rT={},iD;function cpe(){return iD||(iD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=LR(),r=dn(),i=r.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:f,schemaCode:d})=>r.str`should be ${s[f].okStr} ${d}`,params:({keyword:f,schemaCode:d})=>r._`{comparison: ${s[f].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(f){const{gen:d,data:h,schemaCode:m,keyword:g,it:v}=f,{opts:S,self:b}=v;if(!S.validateFormats)return;const _=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");_.$data?E():R();function E(){const T=d.scopeValue("formats",{ref:b.formats,code:S.code.formats}),x=d.const("fmt",r._`${T}[${_.schemaCode}]`);f.fail$data(r.or(r._`typeof ${x} != "object"`,r._`${x} instanceof RegExp`,r._`typeof ${x}.compare != "function"`,w(x)))}function R(){const T=_.schema,x=b.formats[T];if(!x||x===!0)return;if(typeof x!="object"||x instanceof RegExp||typeof x.compare!="function")throw new Error(`"${g}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:x,code:S.code.formats?r._`${S.code.formats}${r.getProperty(T)}`:void 0});f.fail$data(w(O))}function w(T){return r._`${T}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const c=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=c})(rT)),rT}var oD;function fpe(){return oD||(oD=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=upe(),i=cpe(),s=dn(),l=new s.Name("fullFormats"),c=new s.Name("fastFormats"),f=(h,m={keywords:!0})=>{if(Array.isArray(m))return d(h,m,r.fullFormats,l),h;const[g,v]=m.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,l],S=m.formats||r.formatNames;return d(h,S,g,v),m.keywords&&i.default(h),h};f.get=(h,m="full")=>{const v=(m==="fast"?r.fastFormats:r.fullFormats)[h];if(!v)throw new Error(`Unknown format "${h}"`);return v};function d(h,m,g,v){var S,b;(S=(b=h.opts.code).formats)!==null&&S!==void 0||(b.formats=s._`require("ajv-formats/dist/formats").${v}`);for(const _ of m)h.addFormat(_,g[_])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(pS,pS.exports)),pS.exports}var dpe=fpe();const sD=$l(dpe),hpe={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},ppe=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,mpe=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function gpe(e,t,r={},i,s=P9,l){let c=new s({...hpe,...r});return i?sD(c,i):i!==!1&&sD(c),c.addFormat("data-url",mpe),c.addFormat("color",ppe),c.addKeyword(lc),c.addKeyword(OA),Array.isArray(e)&&c.addMetaSchema(e),In(t)&&Object.keys(t).forEach(f=>{c.addFormat(f,t[f])}),l&&(c=l(c)),c}function ype(e=[],t){return e.map(i=>{var s;const{instancePath:l,keyword:c,params:f,schemaPath:d,parentSchema:h,...m}=i;let{message:g=""}=m,v=l.replace(/\//g,"."),S=`${v} ${g}`.trim(),b="";const _=[...((s=f.deps)===null||s===void 0?void 0:s.split(", "))||[],f.missingProperty,f.property].filter(E=>E);if(_.length>0)_.forEach(E=>{const R=v?`${v}.${E}`:E;let w=kt(Ve(t,`${R.replace(/^\./,"")}`)).title;if(w===void 0){const T=d.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([E]);w=kt(Ve(t,T)).title}if(w)g=g.replace(`'${E}'`,`'${w}'`),b=w;else{const T=Ve(h,[Un,E,"title"]);T&&(g=g.replace(`'${E}'`,`'${T}'`),b=T)}}),S=g;else{const E=kt(Ve(t,`${v.replace(/^\./,"")}`)).title;if(E)S=`'${E}' ${g}`.trim(),b=E;else{const R=h?.title;R&&(S=`'${R}' ${g}`.trim(),b=R)}}return"missingProperty"in f&&(v=v?`${v}.${f.missingProperty}`:f.missingProperty),{name:c,property:v,message:g,params:f,stack:S,schemaPath:d,title:b}}).reduce((i,s)=>{const{message:l,schemaPath:c}=s,f=c?.indexOf(`/${$n}/`),d=c?.indexOf(`/${pn}/`);let h;return f&&f>=0?h=c?.substring(0,f):d&&d>=0&&(h=c?.substring(0,d)),h&&i.find(g=>{var v;return g.message===l&&((v=g.schemaPath)===null||v===void 0?void 0:v.startsWith(h))})||i.push(s),i},[])}function vpe(e,t,r,i,s,l,c){const{validationError:f}=t;let d=ype(t.errors,c);f&&(d=[...d,{stack:f.message}]),typeof l=="function"&&(d=l(d,c));let h=nfe(d);if(f&&(h={...h,$schema:{__errors:[f.message]}}),typeof s!="function")return{errors:d,errorSchema:h};const m=gP(e,i,r,i,!0),g=s(m,QC(m),c,h),v=kP(g);return FS({errors:d,errorSchema:h},v)}class bpe{constructor(t,r){const{additionalMetaSchemas:i,customFormats:s,ajvOptionsOverrides:l,ajvFormatOptions:c,AjvClass:f,extenderFn:d}=t;this.ajv=gpe(i,s,l,c,f,d),this.localizer=r}reset(){this.ajv.removeSchema()}rawValidation(t,r){var i,s;let l,c;try{t[or]&&(c=this.ajv.getSchema(t[or])),c===void 0&&(c=this.ajv.compile(t)),c(r)}catch(d){l=d}let f;return c&&(typeof this.localizer=="function"&&(((i=c.errors)!==null&&i!==void 0?i:[]).forEach(d=>{var h;["missingProperty","property"].forEach(m=>{var g;!((g=d.params)===null||g===void 0)&&g[m]&&(d.params[m]=`'${d.params[m]}'`)}),!((h=d.params)===null||h===void 0)&&h.deps&&(d.params.deps=d.params.deps.split(", ").map(m=>`'${m}'`).join(", "))}),this.localizer(c.errors),((s=c.errors)!==null&&s!==void 0?s:[]).forEach(d=>{var h;["missingProperty","property"].forEach(m=>{var g;!((g=d.params)===null||g===void 0)&&g[m]&&(d.params[m]=d.params[m].slice(1,-1))}),!((h=d.params)===null||h===void 0)&&h.deps&&(d.params.deps=d.params.deps.split(", ").map(m=>m.slice(1,-1)).join(", "))})),f=c.errors||void 0,c.errors=null),{errors:f,validationError:l}}validateFormData(t,r,i,s,l){const c=this.rawValidation(r,t);return vpe(this,c,t,r,i,s,l)}handleSchemaUpdate(t){var r,i;const s=(r=t[or])!==null&&r!==void 0?r:J8;this.ajv.getSchema(s)===void 0?this.ajv.addSchema(t,s):yr(t,(i=this.ajv.getSchema(s))===null||i===void 0?void 0:i.schema)||(this.ajv.removeSchema(s),this.ajv.addSchema(t,s))}isValid(t,r,i){var s;try{this.handleSchemaUpdate(i);const l=UA(t),c=(s=l[or])!==null&&s!==void 0?s:Qce(l);let f;return f=this.ajv.getSchema(c),f===void 0&&(f=this.ajv.addSchema(l,c).getSchema(c)||this.ajv.compile(l)),f(r)}catch(l){return console.warn("Error encountered compiling schema:",l),!1}}}function Spe(e={},t){return new bpe(e,t)}const wpe=Spe();const Epe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xpe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),lD=e=>{const t=xpe(e);return t.charAt(0).toUpperCase()+t.slice(1)},ZP=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),_pe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Tpe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Cpe=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Tpe,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:ZP("lucide",s),...!l&&!_pe(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const Ll=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(Cpe,{ref:l,iconNode:t,className:ZP(`lucide-${Epe(lD(e))}`,`lucide-${e}`,i),...s}));return r.displayName=lD(e),r};const Ope=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Rpe=Ll("check",Ope);const Ape=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],XP=Ll("chevron-down",Ape);const Mpe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jpe=Ll("chevron-up",Mpe);const kpe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Dpe=Ll("circle-alert",kpe);const Npe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],QP=Ll("circle-plus",Npe);const zpe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],$pe=Ll("circle",zpe);const Ppe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ipe=Ll("copy",Ppe);const Lpe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Upe=Ll("search",Lpe);const qpe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Vpe=Ll("trash-2",qpe);const Fpe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],WP=Ll("x",Fpe);function uD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tf(...e){return t=>{let r=!1;const i=e.map(s=>{const l=uD(s,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():uD(e[s],null)}}}}function sa(...e){return j.useCallback(tf(...e),e)}var Bpe=Symbol.for("react.lazy"),Cw=jb[" use ".trim().toString()];function Hpe(e){return typeof e=="object"&&e!==null&&"then"in e}function JP(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Bpe&&"_payload"in e&&Hpe(e._payload)}function eI(e){const t=Gpe(e),r=j.forwardRef((i,s)=>{let{children:l,...c}=i;JP(l)&&typeof Cw=="function"&&(l=Cw(l._payload));const f=j.Children.toArray(l),d=f.find(Ype);if(d){const h=d.props.children,m=f.map(g=>g===d?j.Children.count(h)>1?j.Children.only(null):j.isValidElement(h)?h.props.children:null:g);return k.jsx(t,{...c,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...c,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}var tI=eI("Slot");function Gpe(e){const t=j.forwardRef((r,i)=>{let{children:s,...l}=r;if(JP(s)&&typeof Cw=="function"&&(s=Cw(s._payload)),j.isValidElement(s)){const c=Xpe(s),f=Zpe(l,s.props);return s.type!==j.Fragment&&(f.ref=i?tf(i,c):c),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kpe=Symbol("radix.slottable");function Ype(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kpe}function Zpe(e,t){const r={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?r[i]=(...f)=>{const d=l(...f);return s(...f),d}:s&&(r[i]=s):i==="style"?r[i]={...s,...l}:i==="className"&&(r[i]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function Xpe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function wn(...e){return d$(KR(e))}const Qpe=vc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function KA({className:e,variant:t,size:r,asChild:i=!1,...s}){const l=i?tI:"button";return k.jsx(l,{"data-slot":"button",className:wn(Qpe({variant:t,size:r,className:e})),...s})}function Wpe({uiSchema:e,registry:t,className:r,...i}){const{translateString:s}=t;return k.jsx("div",{className:"p-0 m-0",children:k.jsxs(KA,{...i,className:wn("w-fit gap-2",r),variant:"outline",type:"button",children:[k.jsx(QP,{size:16})," ",s(gn.AddItemButton)]})})}function Jpe(e){const{children:t,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:l,uiSchema:c,registry:f}=e,d=kt(c),h=Ut("ArrayFieldItemButtonsTemplate",f,d),m=s?-6:22;return k.jsx("div",{children:k.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[k.jsx("div",{className:"grow shrink",children:t}),k.jsx("div",{className:"flex items-end justify-end p-0.5",children:l&&k.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:i?`${m}px`:void 0},children:k.jsx(h,{...r})})})]})})}function eme(e){const{canAdd:t,disabled:r,fieldPathId:i,uiSchema:s,items:l,optionalDataControl:c,onAddClick:f,readonly:d,registry:h,required:m,schema:g,title:v}=e,S=kt(s),b=Ut("ArrayFieldDescriptionTemplate",h,S),_=Ut("ArrayFieldTitleTemplate",h,S),E=!d&&!r,{ButtonTemplates:{AddButton:R}}=h.templates;return k.jsx("div",{children:k.jsx("div",{className:"m-0 flex p-0",children:k.jsxs("div",{className:"m-0 w-full p-0",children:[k.jsx(_,{fieldPathId:i,title:S.title||v,schema:g,uiSchema:s,required:m,registry:h,optionalDataControl:E?c:void 0}),k.jsx(b,{fieldPathId:i,description:S.description||g.description,schema:g,uiSchema:s,registry:h}),k.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[E?void 0:c,l,t&&k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(R,{id:Rl(i,"add"),className:"rjsf-array-item-add",onClick:f,disabled:r||d,uiSchema:s,registry:h})})]},`array-item-list-${i.$id}`)]})})})}function nI({className:e,type:t,...r}){return k.jsx("input",{type:t,"data-slot":"input",className:wn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}function tme({id:e,htmlName:t,placeholder:r,required:i,readonly:s,disabled:l,type:c,value:f,onChange:d,onChangeOverride:h,onBlur:m,onFocus:g,autofocus:v,options:S,schema:b,rawErrors:_=[],children:E,extraProps:R,className:w,registry:T}){const{ClearButton:x}=T.templates.ButtonTemplates,O={...R,...RP(b,c,S)},C=({target:{value:q}})=>d(q===""?S.emptyValue:q),M=({target:q})=>m(e,q&&q.value),D=({target:q})=>g(e,q&&q.value),$=j.useCallback(q=>{var L;q.preventDefault(),q.stopPropagation(),d((L=S.emptyValue)!==null&&L!==void 0?L:"")},[d,S.emptyValue]);return k.jsxs("div",{className:"p-0.5",children:[k.jsx(nI,{id:e,name:t||e,type:c,placeholder:r,autoFocus:v,required:i,disabled:l,readOnly:s,className:wn({"border-destructive focus-visible:ring-0":_.length>0},w),list:b.examples?wb(e):void 0,...O,value:f||f===0?f:"",onChange:h||C,onBlur:M,onFocus:D,"aria-describedby":uo(e,!!b.examples)}),S.allowClearTextInputs&&!s&&!l&&f&&k.jsx(x,{onClick:$,registry:T}),E,Array.isArray(b.examples)?k.jsx("datalist",{id:wb(e),children:b.examples.concat(b.default&&!b.examples.includes(b.default)?[b.default]:[]).map(q=>k.jsx("option",{value:q},q))}):null]})}function nme({id:e,description:t,registry:r,uiSchema:i}){return t?k.jsx("div",{children:k.jsx("div",{id:e,className:"text-sm text-muted-foreground",children:k.jsx(HA,{description:t,registry:r,uiSchema:i})})}):null}const rme=vc("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function ame({className:e,variant:t,...r}){return k.jsx("div",{"data-slot":"alert",role:"alert",className:wn(rme({variant:t}),e),...r})}function ime({className:e,...t}){return k.jsx("div",{"data-slot":"alert-title",className:wn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function ome({className:e,...t}){return k.jsx("div",{"data-slot":"alert-description",className:wn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function sme({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs(ame,{variant:"destructive",className:"mb-2",children:[k.jsx(Dpe,{className:"h-4 w-4"}),k.jsx(ime,{children:r(gn.ErrorsLabel)}),k.jsx(ome,{className:"flex flex-col gap-1",children:e.map((i,s)=>k.jsxs("span",{children:["• ",i.stack]},s))})]})}function lme(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=$A(r);return k.jsx("div",{className:"flex flex-col gap-1",id:i,children:t.map((s,l)=>k.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:s},l))})}function ume(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s,hasErrors:l}=e;return r?k.jsx("span",{className:wn("text-xs font-medium text-muted-foreground",{"text-destructive":l}),id:PA(t),children:k.jsx(GA,{help:r,registry:s,uiSchema:i})}):null}function cme({id:e,children:t,displayLabel:r,rawErrors:i=[],errors:s,help:l,description:c,rawDescription:f,classNames:d,style:h,disabled:m,label:g,hidden:v,onKeyRename:S,onKeyRenameBlur:b,onRemoveProperty:_,readonly:E,required:R,schema:w,uiSchema:T,registry:x}){const O=kt(T),C=Ut("WrapIfAdditionalTemplate",x,O);if(v)return k.jsx("div",{className:"hidden",children:t});const M=O.widget==="checkbox";return k.jsx(C,{classNames:d,style:h,disabled:m,id:e,label:g,displayLabel:r,onKeyRename:S,onKeyRenameBlur:b,onRemoveProperty:_,rawDescription:f,readonly:E,required:R,schema:w,uiSchema:T,registry:x,children:k.jsxs("div",{className:"flex flex-col gap-2",children:[r&&!M&&k.jsxs("label",{className:wn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":i.length>0}),htmlFor:e,children:[g,R?"*":null]}),t,r&&f&&!M&&k.jsx("span",{className:wn("text-xs font-medium text-muted-foreground",{" text-destructive":i.length>0}),children:c}),s,l]})})}function fme(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:wn("grid gap-2",i),...s,children:t})}function Nm(e){const{icon:t,iconType:r,className:i,uiSchema:s,registry:l,...c}=e;return k.jsx(KA,{size:"icon",variant:"outline",className:i,...c,type:"button",children:t})}function dme(e){const{registry:{translateString:t}}=e;return k.jsx(Nm,{title:t(gn.CopyButton),...e,icon:k.jsx(Ipe,{className:"h-4 w-4"})})}function hme(e){const{registry:{translateString:t}}=e;return k.jsx(Nm,{title:t(gn.MoveDownButton),...e,icon:k.jsx(XP,{className:"h-4 w-4"})})}function pme(e){const{registry:{translateString:t}}=e;return k.jsx(Nm,{title:t(gn.MoveUpButton),...e,icon:k.jsx(jpe,{className:"h-4 w-4"})})}function rI(e){const{registry:{translateString:t}}=e;return k.jsx(Nm,{title:t(gn.RemoveButton),...e,className:"border-destructive",icon:k.jsx(Vpe,{className:"h-4 w-4 stroke-destructive"})})}function mme(e){const{registry:{translateString:t}}=e;return k.jsx(Nm,{title:t(gn.ClearButton),...e,icon:k.jsx(WP,{})})}function gme({selector:e,optionSchemaField:t}){return k.jsxs("div",{className:wn("p-4 border rounded-md bg-background shadow-sm"),children:[k.jsx("div",{className:wn("mb-4"),children:e}),t]})}function yme({description:e,title:t,properties:r,required:i,uiSchema:s,fieldPathId:l,schema:c,formData:f,optionalDataControl:d,onAddProperty:h,disabled:m,readonly:g,registry:v}){const S=kt(s),b=Ut("TitleFieldTemplate",v,S),_=Ut("DescriptionFieldTemplate",v,S),E=!g&&!m,{ButtonTemplates:{AddButton:R}}=v.templates;return k.jsxs(k.Fragment,{children:[t&&k.jsx(b,{id:m2(l),title:t,required:i,schema:c,uiSchema:s,registry:v,optionalDataControl:E?d:void 0}),e&&k.jsx(_,{id:op(l),description:e,schema:c,uiSchema:s,registry:v}),k.jsxs("div",{className:"flex flex-col gap-2",children:[E?void 0:d,r.map((w,T)=>k.jsx("div",{className:`${w.hidden?"hidden":""} flex`,children:k.jsx("div",{className:"w-full",children:w.content})},T)),eP(c,s,f)?k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(R,{id:Rl(l,"add"),onClick:h,disabled:m||g,className:"rjsf-object-property-expand",uiSchema:s,registry:v})}):null]})]})}function vme(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx(Nm,{id:t,registry:r,className:"rjsf-add-optional-data",onClick:s,title:i,icon:k.jsx(QP,{}),size:"xs"}):l?k.jsx(rI,{id:t,registry:r,className:"rjsf-remove-optional-data",onClick:l,title:i,size:"xs"}):k.jsx("em",{id:t,children:i})}function bme(e){const{submitText:t,norender:r,props:i}=AP(e.uiSchema);return r?null:k.jsx("div",{children:k.jsx(KA,{type:"submit",...i,className:wn("my-2",i?.className),children:t})})}var gs=UN();const Sme=$l(gs);var wme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ul=wme.reduce((e,t)=>{const r=eI(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:c,...f}=s,d=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(d,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),Eme="Separator",cD="horizontal",xme=["horizontal","vertical"],aI=j.forwardRef((e,t)=>{const{decorative:r,orientation:i=cD,...s}=e,l=_me(i)?i:cD,f=r?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return k.jsx(Ul.div,{"data-orientation":l,...f,...s,ref:t})});aI.displayName=Eme;function _me(e){return xme.includes(e)}var Tme=aI;function iI({className:e,orientation:t="horizontal",decorative:r=!0,...i}){return k.jsx(Tme,{"data-slot":"separator",decorative:r,orientation:t,className:wn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function Cme({id:e,title:t,uiSchema:r,optionalDataControl:i}){const s=kt(r);let l=k.jsx("h5",{children:s.title||t});return i&&(l=k.jsxs("div",{className:"flex flex-row",children:[k.jsx("div",{className:"flex-grow",children:l}),k.jsx("div",{className:"flex",children:i})]})),k.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[l,k.jsx(iI,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Ome({classNames:e,style:t,children:r,disabled:i,id:s,label:l,displayLabel:c,onRemoveProperty:f,onKeyRenameBlur:d,rawDescription:h,readonly:m,required:g,schema:v,uiSchema:S,registry:b}){const{templates:_,translateString:E}=b,{RemoveButton:R}=_.ButtonTemplates,w=E(gn.KeyLabel,[l]);if(!(lc in v))return k.jsx("div",{className:e,style:t,children:r});const O=c?22+(h?-28:0):0,C=`${s}-key`;return k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[k.jsx("div",{className:"grid gap-2 col-span-5",children:k.jsxs("div",{className:"flex flex-col gap-2",children:[c&&k.jsx("label",{htmlFor:C,className:"text-sm font-medium text-muted-foreground leading-none",children:w}),k.jsx("div",{className:"pl-0.5",children:k.jsx(nI,{required:g,defaultValue:l,disabled:i||m,id:C,name:C,onBlur:m?void 0:d,type:"text",className:"w-full border shadow-sm"})}),!!h&&k.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:k.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),k.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:r}),k.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${O}px`},children:k.jsx(R,{id:Rl(s,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:i||m,onClick:f,uiSchema:S,registry:b})})]}),k.jsx(iI,{dir:"horizontal",className:"mt-2"})]})}function Rme(){return{ArrayFieldItemTemplate:Jpe,ArrayFieldTemplate:eme,BaseInputTemplate:tme,ButtonTemplates:{AddButton:Wpe,CopyButton:dme,MoveDownButton:hme,MoveUpButton:pme,RemoveButton:rI,SubmitButton:bme,ClearButton:mme},DescriptionFieldTemplate:nme,ErrorListTemplate:sme,FieldErrorTemplate:lme,FieldHelpTemplate:ume,FieldTemplate:cme,GridTemplate:fme,MultiSchemaFieldTemplate:gme,ObjectFieldTemplate:yme,OptionalDataControlsTemplate:vme,TitleFieldTemplate:Cme,WrapIfAdditionalTemplate:Ome}}function Ame(e,t){const r=j.createContext(t),i=l=>{const{children:c,...f}=l,d=j.useMemo(()=>f,Object.values(f));return k.jsx(r.Provider,{value:d,children:c})};i.displayName=e+"Provider";function s(l){const c=j.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,s]}function lp(e,t=[]){let r=[];function i(l,c){const f=j.createContext(c),d=r.length;r=[...r,c];const h=g=>{const{scope:v,children:S,...b}=g,_=v?.[e]?.[d]||f,E=j.useMemo(()=>b,Object.values(b));return k.jsx(_.Provider,{value:E,children:S})};h.displayName=l+"Provider";function m(g,v){const S=v?.[e]?.[d]||f,b=j.useContext(S);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[h,m]}const s=()=>{const l=r.map(c=>j.createContext(c));return function(f){const d=f?.[e]||l;return j.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return s.scopeName=e,[i,Mme(s,...t)]}function Mme(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const c=i.reduce((f,{useScope:d,scopeName:h})=>{const g=d(l)[`__scope${h}`];return{...f,...g}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function Dr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e?.(s),r===!1||!s.defaultPrevented)return t?.(s)}}var fm=globalThis?.document?j.useLayoutEffect:()=>{},jme=jb[" useInsertionEffect ".trim().toString()]||fm;function n1({prop:e,defaultProp:t,onChange:r=()=>{},caller:i}){const[s,l,c]=kme({defaultProp:t,onChange:r}),f=e!==void 0,d=f?e:s;{const m=j.useRef(e!==void 0);j.useEffect(()=>{const g=m.current;g!==f&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=f},[f,i])}const h=j.useCallback(m=>{if(f){const g=Dme(m)?m(e):m;g!==e&&c.current?.(g)}else l(m)},[f,e,l,c]);return[d,h]}function kme({defaultProp:e,onChange:t}){const[r,i]=j.useState(e),s=j.useRef(r),l=j.useRef(t);return jme(()=>{l.current=t},[t]),j.useEffect(()=>{s.current!==r&&(l.current?.(r),s.current=r)},[r,s]),[r,i,l]}function Dme(e){return typeof e=="function"}function YA(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ZA(e){const[t,r]=j.useState(void 0);return fm(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const d=l.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}function Nme(e,t){return j.useReducer((r,i)=>t[r][i]??r,e)}var zm=e=>{const{present:t,children:r}=e,i=zme(t),s=typeof r=="function"?r({present:i.isPresent}):j.Children.only(r),l=sa(i.ref,$me(s));return typeof r=="function"||i.isPresent?j.cloneElement(s,{ref:l}):null};zm.displayName="Presence";function zme(e){const[t,r]=j.useState(),i=j.useRef(null),s=j.useRef(e),l=j.useRef("none"),c=e?"mounted":"unmounted",[f,d]=Nme(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const h=mS(i.current);l.current=f==="mounted"?h:"none"},[f]),fm(()=>{const h=i.current,m=s.current;if(m!==e){const v=l.current,S=mS(h);e?d("MOUNT"):S==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&v!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),fm(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=S=>{const _=mS(i.current).includes(CSS.escape(S.animationName));if(S.target===t&&_&&(d("ANIMATION_END"),!s.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},v=S=>{S.target===t&&(l.current=mS(i.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:j.useCallback(h=>{i.current=h?getComputedStyle(h):null,r(h)},[])}}function mS(e){return e?.animationName||"none"}function $me(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Ow(e){const t=Pme(e),r=j.forwardRef((i,s)=>{const{children:l,...c}=i,f=j.Children.toArray(l),d=f.find(Lme);if(d){const h=d.props.children,m=f.map(g=>g===d?j.Children.count(h)>1?j.Children.only(null):j.isValidElement(h)?h.props.children:null:g);return k.jsx(t,{...c,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...c,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}function Pme(e){const t=j.forwardRef((r,i)=>{const{children:s,...l}=r;if(j.isValidElement(s)){const c=qme(s),f=Ume(l,s.props);return s.type!==j.Fragment&&(f.ref=i?tf(i,c):c),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ime=Symbol("radix.slottable");function Lme(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ime}function Ume(e,t){const r={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?r[i]=(...f)=>{const d=l(...f);return s(...f),d}:s&&(r[i]=s):i==="style"?r[i]={...s,...l}:i==="className"&&(r[i]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function qme(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Vme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qr=Vme.reduce((e,t)=>{const r=Ow(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:c,...f}=s,d=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(d,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Fme(e,t){e&&gs.flushSync(()=>e.dispatchEvent(t))}var v2="Checkbox",[Bme]=lp(v2),[Hme,XA]=Bme(v2);function Gme(e){const{__scopeCheckbox:t,checked:r,children:i,defaultChecked:s,disabled:l,form:c,name:f,onCheckedChange:d,required:h,value:m="on",internal_do_not_use_render:g}=e,[v,S]=n1({prop:r,defaultProp:s??!1,onChange:d,caller:v2}),[b,_]=j.useState(null),[E,R]=j.useState(null),w=j.useRef(!1),T=b?!!c||!!b.closest("form"):!0,x={checked:v,disabled:l,setChecked:S,control:b,setControl:_,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:w,required:h,defaultChecked:qc(s)?!1:s,isFormControl:T,bubbleInput:E,setBubbleInput:R};return k.jsx(Hme,{scope:t,...x,children:Kme(g)?g(x):i})}var oI="CheckboxTrigger",sI=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...i},s)=>{const{control:l,value:c,disabled:f,checked:d,required:h,setControl:m,setChecked:g,hasConsumerStoppedPropagationRef:v,isFormControl:S,bubbleInput:b}=XA(oI,e),_=sa(s,m),E=j.useRef(d);return j.useEffect(()=>{const R=l?.form;if(R){const w=()=>g(E.current);return R.addEventListener("reset",w),()=>R.removeEventListener("reset",w)}},[l,g]),k.jsx(Qr.button,{type:"button",role:"checkbox","aria-checked":qc(d)?"mixed":d,"aria-required":h,"data-state":hI(d),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:_,onKeyDown:Dr(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:Dr(r,R=>{g(w=>qc(w)?!0:!w),b&&S&&(v.current=R.isPropagationStopped(),v.current||R.stopPropagation())})})});sI.displayName=oI;var lI=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:i,checked:s,defaultChecked:l,required:c,disabled:f,value:d,onCheckedChange:h,form:m,...g}=e;return k.jsx(Gme,{__scopeCheckbox:r,checked:s,defaultChecked:l,disabled:f,required:c,onCheckedChange:h,name:i,form:m,value:d,internal_do_not_use_render:({isFormControl:v})=>k.jsxs(k.Fragment,{children:[k.jsx(sI,{...g,ref:t,__scopeCheckbox:r}),v&&k.jsx(dI,{__scopeCheckbox:r})]})})});lI.displayName=v2;var uI="CheckboxIndicator",cI=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:i,...s}=e,l=XA(uI,r);return k.jsx(zm,{present:i||qc(l.checked)||l.checked===!0,children:k.jsx(Qr.span,{"data-state":hI(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});cI.displayName=uI;var fI="CheckboxBubbleInput",dI=j.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:i,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:c,required:f,disabled:d,name:h,value:m,form:g,bubbleInput:v,setBubbleInput:S}=XA(fI,e),b=sa(r,S),_=YA(l),E=ZA(i);j.useEffect(()=>{const w=v;if(!w)return;const T=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(T,"checked").set,C=!s.current;if(_!==l&&O){const M=new Event("click",{bubbles:C});w.indeterminate=qc(l),O.call(w,qc(l)?!1:l),w.dispatchEvent(M)}},[v,_,l,s]);const R=j.useRef(qc(l)?!1:l);return k.jsx(Qr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??R.current,required:f,disabled:d,name:h,value:m,form:g,...t,tabIndex:-1,ref:b,style:{...t.style,...E,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dI.displayName=fI;function Kme(e){return typeof e=="function"}function qc(e){return e==="indeterminate"}function hI(e){return qc(e)?"indeterminate":e?"checked":"unchecked"}function Yme(e,t){if(e==null)return{};var r={},i=Object.keys(e),s,l;for(l=0;l<i.length;l++)s=i[l],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var Zme=["color"],Xme=j.forwardRef(function(e,t){var r=e.color,i=r===void 0?"currentColor":r,s=Yme(e,Zme);return j.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:t}),j.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});function pI({className:e,...t}){return k.jsx(lI,{"data-slot":"checkbox",className:wn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:k.jsx(cI,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:k.jsx(Xme,{className:"size-3.5"})})})}var Qme="Label",mI=j.forwardRef((e,t)=>k.jsx(Ul.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));mI.displayName=Qme;var Wme=mI;function QA({className:e,...t}){return k.jsx(Wme,{"data-slot":"label",className:wn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Jme(e){const{id:t,htmlName:r,value:i,disabled:s,readonly:l,label:c,hideLabel:f,schema:d,autofocus:h,options:m,onChange:g,onBlur:v,onFocus:S,registry:b,uiSchema:_,className:E}=e,R=Wv(d),w=Ut("DescriptionFieldTemplate",b,m),T=M=>g(M),x=()=>v(t,i),O=()=>S(t,i),C=m.description||d.description;return k.jsxs("div",{className:`relative ${s||l?"cursor-not-allowed opacity-50":""}`,"aria-describedby":uo(t),children:[!f&&C&&k.jsx(w,{id:op(t),description:C,schema:d,uiSchema:_,registry:b}),k.jsxs("div",{className:"flex items-center gap-2 my-2",children:[k.jsx(pI,{id:t,name:r||t,checked:typeof i>"u"?!1:!!i,required:R,disabled:s||l,autoFocus:h,onCheckedChange:T,onBlur:x,onFocus:O,className:E}),k.jsx(QA,{className:"leading-tight",htmlFor:t,children:MP(c,f||!c)})]})]})}function ege({id:e,htmlName:t,disabled:r,options:i,value:s,autofocus:l,readonly:c,required:f,onChange:d,onBlur:h,onFocus:m,className:g}){const{enumOptions:v,enumDisabled:S,inline:b,emptyValue:_}=i,E=Array.isArray(s)?s:[s],R=({target:T})=>h(e,Na(T&&T.value,v,_)),w=({target:T})=>m(e,Na(T&&T.value,v,_));return k.jsx("div",{className:wn({"flex flex-col gap-2":!b,"flex flex-row gap-4 flex-wrap":b}),children:Array.isArray(v)&&v.map((T,x)=>{const O=Jb(T.value,E),C=Array.isArray(S)&&S.indexOf(T.value)!==-1,M=$h(e,x);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(pI,{id:M,name:t||e,required:f,disabled:r||C||c,onCheckedChange:D=>{d(D?TP(x,E,v):xP(x,E,v))},className:g,checked:O,autoFocus:l&&x===0,onBlur:R,onFocus:w,"aria-describedby":uo(e)}),k.jsx(QA,{className:"leading-tight",htmlFor:$h(e,x),children:T.label})]},M)})})}function gI(e){const t=e+"CollectionProvider",[r,i]=lp(t),[s,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=_=>{const{scope:E,children:R}=_,w=Bo.useRef(null),T=Bo.useRef(new Map).current;return k.jsx(s,{scope:E,itemMap:T,collectionRef:w,children:R})};c.displayName=t;const f=e+"CollectionSlot",d=Ow(f),h=Bo.forwardRef((_,E)=>{const{scope:R,children:w}=_,T=l(f,R),x=sa(E,T.collectionRef);return k.jsx(d,{ref:x,children:w})});h.displayName=f;const m=e+"CollectionItemSlot",g="data-radix-collection-item",v=Ow(m),S=Bo.forwardRef((_,E)=>{const{scope:R,children:w,...T}=_,x=Bo.useRef(null),O=sa(E,x),C=l(m,R);return Bo.useEffect(()=>(C.itemMap.set(x,{ref:x,...T}),()=>{C.itemMap.delete(x)})),k.jsx(v,{[g]:"",ref:O,children:w})});S.displayName=m;function b(_){const E=l(e+"CollectionConsumer",_);return Bo.useCallback(()=>{const w=E.collectionRef.current;if(!w)return[];const T=Array.from(w.querySelectorAll(`[${g}]`));return Array.from(E.itemMap.values()).sort((C,M)=>T.indexOf(C.ref.current)-T.indexOf(M.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:c,Slot:h,ItemSlot:S},b,i]}var tge=jb[" useId ".trim().toString()]||(()=>{}),nge=0;function jl(e){const[t,r]=j.useState(tge());return fm(()=>{r(i=>i??String(nge++))},[e]),t?`radix-${t}`:""}function dm(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>t.current?.(...r),[])}var rge=j.createContext(void 0);function WA(e){const t=j.useContext(rge);return e||t||"ltr"}var aT="rovingFocusGroup.onEntryFocus",age={bubbles:!1,cancelable:!0},r1="RovingFocusGroup",[aO,yI,ige]=gI(r1),[oge,vI]=lp(r1,[ige]),[sge,lge]=oge(r1),bI=j.forwardRef((e,t)=>k.jsx(aO.Provider,{scope:e.__scopeRovingFocusGroup,children:k.jsx(aO.Slot,{scope:e.__scopeRovingFocusGroup,children:k.jsx(uge,{...e,ref:t})})}));bI.displayName=r1;var uge=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,v=j.useRef(null),S=sa(t,v),b=WA(l),[_,E]=n1({prop:c,defaultProp:f??null,onChange:d,caller:r1}),[R,w]=j.useState(!1),T=dm(h),x=yI(r),O=j.useRef(!1),[C,M]=j.useState(0);return j.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(aT,T),()=>D.removeEventListener(aT,T)},[T]),k.jsx(sge,{scope:r,orientation:i,dir:b,loop:s,currentTabStopId:_,onItemFocus:j.useCallback(D=>E(D),[E]),onItemShiftTab:j.useCallback(()=>w(!0),[]),onFocusableItemAdd:j.useCallback(()=>M(D=>D+1),[]),onFocusableItemRemove:j.useCallback(()=>M(D=>D-1),[]),children:k.jsx(Qr.div,{tabIndex:R||C===0?-1:0,"data-orientation":i,...g,ref:S,style:{outline:"none",...e.style},onMouseDown:Dr(e.onMouseDown,()=>{O.current=!0}),onFocus:Dr(e.onFocus,D=>{const $=!O.current;if(D.target===D.currentTarget&&$&&!R){const q=new CustomEvent(aT,age);if(D.currentTarget.dispatchEvent(q),!q.defaultPrevented){const L=x().filter(K=>K.focusable),V=L.find(K=>K.active),F=L.find(K=>K.id===_),ae=[V,F,...L].filter(Boolean).map(K=>K.ref.current);EI(ae,m)}}O.current=!1}),onBlur:Dr(e.onBlur,()=>w(!1))})})}),SI="RovingFocusGroupItem",wI=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:l,children:c,...f}=e,d=jl(),h=l||d,m=lge(SI,r),g=m.currentTabStopId===h,v=yI(r),{onFocusableItemAdd:S,onFocusableItemRemove:b,currentTabStopId:_}=m;return j.useEffect(()=>{if(i)return S(),()=>b()},[i,S,b]),k.jsx(aO.ItemSlot,{scope:r,id:h,focusable:i,active:s,children:k.jsx(Qr.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...f,ref:t,onMouseDown:Dr(e.onMouseDown,E=>{i?m.onItemFocus(h):E.preventDefault()}),onFocus:Dr(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:Dr(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){m.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const R=dge(E,m.orientation,m.dir);if(R!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let T=v().filter(x=>x.focusable).map(x=>x.ref.current);if(R==="last")T.reverse();else if(R==="prev"||R==="next"){R==="prev"&&T.reverse();const x=T.indexOf(E.currentTarget);T=m.loop?hge(T,x+1):T.slice(x+1)}setTimeout(()=>EI(T))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:_!=null}):c})})});wI.displayName=SI;var cge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fge(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dge(e,t,r){const i=fge(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return cge[i]}function EI(e,t=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}function hge(e,t){return e.map((r,i)=>e[(t+i)%e.length])}var pge=bI,mge=wI,JA="Radio",[gge,xI]=lp(JA),[yge,vge]=gge(JA),_I=j.forwardRef((e,t)=>{const{__scopeRadio:r,name:i,checked:s=!1,required:l,disabled:c,value:f="on",onCheck:d,form:h,...m}=e,[g,v]=j.useState(null),S=sa(t,E=>v(E)),b=j.useRef(!1),_=g?h||!!g.closest("form"):!0;return k.jsxs(yge,{scope:r,checked:s,disabled:c,children:[k.jsx(Qr.button,{type:"button",role:"radio","aria-checked":s,"data-state":RI(s),"data-disabled":c?"":void 0,disabled:c,value:f,...m,ref:S,onClick:Dr(e.onClick,E=>{s||d?.(),_&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})}),_&&k.jsx(OI,{control:g,bubbles:!b.current,name:i,value:f,checked:s,required:l,disabled:c,form:h,style:{transform:"translateX(-100%)"}})]})});_I.displayName=JA;var TI="RadioIndicator",CI=j.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:i,...s}=e,l=vge(TI,r);return k.jsx(zm,{present:i||l.checked,children:k.jsx(Qr.span,{"data-state":RI(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t})})});CI.displayName=TI;var bge="RadioBubbleInput",OI=j.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:i=!0,...s},l)=>{const c=j.useRef(null),f=sa(c,l),d=YA(r),h=ZA(t);return j.useEffect(()=>{const m=c.current;if(!m)return;const g=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(g,"checked").set;if(d!==r&&S){const b=new Event("click",{bubbles:i});S.call(m,r),m.dispatchEvent(b)}},[d,r,i]),k.jsx(Qr.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:f,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});OI.displayName=bge;function RI(e){return e?"checked":"unchecked"}var Sge=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],b2="RadioGroup",[wge]=lp(b2,[vI,xI]),AI=vI(),MI=xI(),[Ege,xge]=wge(b2),jI=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:i,defaultValue:s,value:l,required:c=!1,disabled:f=!1,orientation:d,dir:h,loop:m=!0,onValueChange:g,...v}=e,S=AI(r),b=WA(h),[_,E]=n1({prop:l,defaultProp:s??null,onChange:g,caller:b2});return k.jsx(Ege,{scope:r,name:i,required:c,disabled:f,value:_,onValueChange:E,children:k.jsx(pge,{asChild:!0,...S,orientation:d,dir:b,loop:m,children:k.jsx(Qr.div,{role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":f?"":void 0,dir:b,...v,ref:t})})})});jI.displayName=b2;var kI="RadioGroupItem",DI=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:i,...s}=e,l=xge(kI,r),c=l.disabled||i,f=AI(r),d=MI(r),h=j.useRef(null),m=sa(t,h),g=l.value===s.value,v=j.useRef(!1);return j.useEffect(()=>{const S=_=>{Sge.includes(_.key)&&(v.current=!0)},b=()=>v.current=!1;return document.addEventListener("keydown",S),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",S),document.removeEventListener("keyup",b)}},[]),k.jsx(mge,{asChild:!0,...f,focusable:!c,active:g,children:k.jsx(_I,{disabled:c,required:l.required,checked:g,...d,...s,name:l.name,ref:m,onCheck:()=>l.onValueChange(s.value),onKeyDown:Dr(S=>{S.key==="Enter"&&S.preventDefault()}),onFocus:Dr(s.onFocus,()=>{v.current&&h.current?.click()})})})});DI.displayName=kI;var _ge="RadioGroupIndicator",NI=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...i}=e,s=MI(r);return k.jsx(CI,{...s,...i,ref:t})});NI.displayName=_ge;var Tge=jI,Cge=DI,Oge=NI;function Rge({className:e,...t}){return k.jsx(Tge,{"data-slot":"radio-group",className:wn("grid gap-3",e),...t})}function Age({className:e,...t}){return k.jsx(Cge,{"data-slot":"radio-group-item",className:wn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:k.jsx(Oge,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:k.jsx($pe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function Mge({id:e,options:t,value:r,required:i,disabled:s,readonly:l,onChange:c,onBlur:f,onFocus:d,className:h}){const{enumOptions:m,enumDisabled:g,emptyValue:v}=t,S=R=>c(Na(R,m,v)),b=({target:R})=>f(e,Na(R&&R.value,m,v)),_=({target:R})=>d(e,Na(R&&R.value,m,v)),E=!!(t&&t.inline);return k.jsx("div",{className:"mb-0",children:k.jsx(Rge,{defaultValue:r?.toString(),required:i,disabled:s||l,onValueChange:R=>{S(R)},onBlur:b,onFocus:_,"aria-describedby":uo(e),orientation:E?"horizontal":"vertical",className:wn("flex flex-wrap",{"flex-col":!E},h),children:Array.isArray(m)&&m.map((R,w)=>{const T=Array.isArray(g)&&g.indexOf(R.value)!==-1,x=Jb(R.value,r);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(Age,{checked:x,value:w.toString(),id:$h(e,w),disabled:T}),k.jsx(QA,{className:"leading-tight",htmlFor:$h(e,w),children:R.label})]},$h(e,w))})})})}function zI(e,[t,r]){return Math.min(r,Math.max(t,e))}var $I=["PageUp","PageDown"],PI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],II={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},$m="Slider",[iO,jge,kge]=gI($m),[LI]=lp($m,[kge]),[Dge,S2]=LI($m),UI=j.forwardRef((e,t)=>{const{name:r,min:i=0,max:s=100,step:l=1,orientation:c="horizontal",disabled:f=!1,minStepsBetweenThumbs:d=0,defaultValue:h=[i],value:m,onValueChange:g=()=>{},onValueCommit:v=()=>{},inverted:S=!1,form:b,..._}=e,E=j.useRef(new Set),R=j.useRef(0),T=c==="horizontal"?Nge:zge,[x=[],O]=n1({prop:m,defaultProp:h,onChange:L=>{[...E.current][R.current]?.focus(),g(L)}}),C=j.useRef(x);function M(L){const V=Uge(x,L);q(L,V)}function D(L){q(L,R.current)}function $(){const L=C.current[R.current];x[R.current]!==L&&v(x)}function q(L,V,{commit:F}={commit:!1}){const re=Bge(l),ae=Hge(Math.round((L-i)/l)*l+i,re),K=zI(ae,[i,s]);O((B=[])=>{const Y=Ige(B,K,V);if(Fge(Y,d*l)){R.current=Y.indexOf(K);const fe=String(Y)!==String(B);return fe&&F&&v(Y),fe?Y:B}else return B})}return k.jsx(Dge,{scope:e.__scopeSlider,name:r,disabled:f,min:i,max:s,valueIndexToChangeRef:R,thumbs:E.current,values:x,orientation:c,form:b,children:k.jsx(iO.Provider,{scope:e.__scopeSlider,children:k.jsx(iO.Slot,{scope:e.__scopeSlider,children:k.jsx(T,{"aria-disabled":f,"data-disabled":f?"":void 0,..._,ref:t,onPointerDown:Dr(_.onPointerDown,()=>{f||(C.current=x)}),min:i,max:s,inverted:S,onSlideStart:f?void 0:M,onSlideMove:f?void 0:D,onSlideEnd:f?void 0:$,onHomeKeyDown:()=>!f&&q(i,0,{commit:!0}),onEndKeyDown:()=>!f&&q(s,x.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:V})=>{if(!f){const ae=$I.includes(L.key)||L.shiftKey&&PI.includes(L.key)?10:1,K=R.current,B=x[K],Y=l*ae*V;q(B+Y,K,{commit:!0})}}})})})})});UI.displayName=$m;var[qI,VI]=LI($m,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nge=j.forwardRef((e,t)=>{const{min:r,max:i,dir:s,inverted:l,onSlideStart:c,onSlideMove:f,onSlideEnd:d,onStepKeyDown:h,...m}=e,[g,v]=j.useState(null),S=sa(t,T=>v(T)),b=j.useRef(void 0),_=WA(s),E=_==="ltr",R=E&&!l||!E&&l;function w(T){const x=b.current||g.getBoundingClientRect(),O=[0,x.width],M=e5(O,R?[r,i]:[i,r]);return b.current=x,M(T-x.left)}return k.jsx(qI,{scope:e.__scopeSlider,startEdge:R?"left":"right",endEdge:R?"right":"left",direction:R?1:-1,size:"width",children:k.jsx(FI,{dir:_,"data-orientation":"horizontal",...m,ref:S,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const x=w(T.clientX);c?.(x)},onSlideMove:T=>{const x=w(T.clientX);f?.(x)},onSlideEnd:()=>{b.current=void 0,d?.()},onStepKeyDown:T=>{const O=II[R?"from-left":"from-right"].includes(T.key);h?.({event:T,direction:O?-1:1})}})})}),zge=j.forwardRef((e,t)=>{const{min:r,max:i,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:f,onStepKeyDown:d,...h}=e,m=j.useRef(null),g=sa(t,m),v=j.useRef(void 0),S=!s;function b(_){const E=v.current||m.current.getBoundingClientRect(),R=[0,E.height],T=e5(R,S?[i,r]:[r,i]);return v.current=E,T(_-E.top)}return k.jsx(qI,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:k.jsx(FI,{"data-orientation":"vertical",...h,ref:g,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:_=>{const E=b(_.clientY);l?.(E)},onSlideMove:_=>{const E=b(_.clientY);c?.(E)},onSlideEnd:()=>{v.current=void 0,f?.()},onStepKeyDown:_=>{const R=II[S?"from-bottom":"from-top"].includes(_.key);d?.({event:_,direction:R?-1:1})}})})}),FI=j.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onHomeKeyDown:c,onEndKeyDown:f,onStepKeyDown:d,...h}=e,m=S2($m,r);return k.jsx(Qr.span,{...h,ref:t,onKeyDown:Dr(e.onKeyDown,g=>{g.key==="Home"?(c(g),g.preventDefault()):g.key==="End"?(f(g),g.preventDefault()):$I.concat(PI).includes(g.key)&&(d(g),g.preventDefault())}),onPointerDown:Dr(e.onPointerDown,g=>{const v=g.target;v.setPointerCapture(g.pointerId),g.preventDefault(),m.thumbs.has(v)?v.focus():i(g)}),onPointerMove:Dr(e.onPointerMove,g=>{g.target.hasPointerCapture(g.pointerId)&&s(g)}),onPointerUp:Dr(e.onPointerUp,g=>{const v=g.target;v.hasPointerCapture(g.pointerId)&&(v.releasePointerCapture(g.pointerId),l(g))})})}),BI="SliderTrack",HI=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=S2(BI,r);return k.jsx(Qr.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...i,ref:t})});HI.displayName=BI;var oO="SliderRange",GI=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=S2(oO,r),l=VI(oO,r),c=j.useRef(null),f=sa(t,c),d=s.values.length,h=s.values.map(v=>ZI(v,s.min,s.max)),m=d>1?Math.min(...h):0,g=100-Math.max(...h);return k.jsx(Qr.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...i,ref:f,style:{...e.style,[l.startEdge]:m+"%",[l.endEdge]:g+"%"}})});GI.displayName=oO;var sO="SliderThumb",KI=j.forwardRef((e,t)=>{const r=jge(e.__scopeSlider),[i,s]=j.useState(null),l=sa(t,f=>s(f)),c=j.useMemo(()=>i?r().findIndex(f=>f.ref.current===i):-1,[r,i]);return k.jsx($ge,{...e,ref:l,index:c})}),$ge=j.forwardRef((e,t)=>{const{__scopeSlider:r,index:i,name:s,...l}=e,c=S2(sO,r),f=VI(sO,r),[d,h]=j.useState(null),m=sa(t,w=>h(w)),g=d?c.form||!!d.closest("form"):!0,v=ZA(d),S=c.values[i],b=S===void 0?0:ZI(S,c.min,c.max),_=Lge(i,c.values.length),E=v?.[f.size],R=E?qge(E,b,f.direction):0;return j.useEffect(()=>{if(d)return c.thumbs.add(d),()=>{c.thumbs.delete(d)}},[d,c.thumbs]),k.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${b}% + ${R}px)`},children:[k.jsx(iO.ItemSlot,{scope:e.__scopeSlider,children:k.jsx(Qr.span,{role:"slider","aria-label":e["aria-label"]||_,"aria-valuemin":c.min,"aria-valuenow":S,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:m,style:S===void 0?{display:"none"}:e.style,onFocus:Dr(e.onFocus,()=>{c.valueIndexToChangeRef.current=i})})}),g&&k.jsx(YI,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:S},i)]})});KI.displayName=sO;var Pge="RadioBubbleInput",YI=j.forwardRef(({__scopeSlider:e,value:t,...r},i)=>{const s=j.useRef(null),l=sa(s,i),c=YA(t);return j.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==t&&m){const g=new Event("input",{bubbles:!0});m.call(f,t),f.dispatchEvent(g)}},[c,t]),k.jsx(Qr.input,{style:{display:"none"},...r,ref:l,defaultValue:t})});YI.displayName=Pge;function Ige(e=[],t,r){const i=[...e];return i[r]=t,i.sort((s,l)=>s-l)}function ZI(e,t,r){const l=100/(r-t)*(e-t);return zI(l,[0,100])}function Lge(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Uge(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),i=Math.min(...r);return r.indexOf(i)}function qge(e,t,r){const i=e/2,l=e5([0,50],[0,i]);return(i-l(t)*r)*r}function Vge(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function Fge(e,t){if(t>0){const r=Vge(e);return Math.min(...r)>=t}return!0}function e5(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(r-e[0])}}function Bge(e){return(String(e).split(".")[1]||"").length}function Hge(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var Gge=UI,Kge=HI,Yge=GI,Zge=KI;function Xge({className:e,defaultValue:t,value:r,min:i=0,max:s=100,...l}){const c=j.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[i,s],[r,t,i,s]);return k.jsxs(Gge,{"data-slot":"slider",defaultValue:t,value:r,min:i,max:s,className:wn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[k.jsx(Kge,{"data-slot":"slider-track",className:wn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:k.jsx(Yge,{"data-slot":"slider-range",className:wn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(f,d)=>k.jsx(Zge,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},d))]})}const Qge=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Wge({value:e,readonly:t,disabled:r,options:i,schema:s,onChange:l,label:c,id:f}){const d=g=>l(g[0]),h={...OP(s)},m={id:f,...sR(i.props||{},Qge)};return k.jsxs(k.Fragment,{children:[k.jsx(Xge,{disabled:r||t,min:h.min,max:h.max,step:h.step,value:[e],onValueChange:d,...m,"aria-describedby":uo(f)}),e]})}var fD=1,Jge=.9,eye=.8,tye=.17,iT=.1,oT=.999,nye=.9999,rye=.99,aye=/[\\\/_+.#"@\[\(\{&]/,iye=/[\\\/_+.#"@\[\(\{&]/g,oye=/[\s-]/,XI=/[\s-]/g;function lO(e,t,r,i,s,l,c){if(l===t.length)return s===e.length?fD:rye;var f=`${s},${l}`;if(c[f]!==void 0)return c[f];for(var d=i.charAt(l),h=r.indexOf(d,s),m=0,g,v,S,b;h>=0;)g=lO(e,t,r,i,h+1,l+1,c),g>m&&(h===s?g*=fD:aye.test(e.charAt(h-1))?(g*=eye,S=e.slice(s,h-1).match(iye),S&&s>0&&(g*=Math.pow(oT,S.length))):oye.test(e.charAt(h-1))?(g*=Jge,b=e.slice(s,h-1).match(XI),b&&s>0&&(g*=Math.pow(oT,b.length))):(g*=tye,s>0&&(g*=Math.pow(oT,h-s))),e.charAt(h)!==t.charAt(l)&&(g*=nye)),(g<iT&&r.charAt(h-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&r.charAt(h-1)!==i.charAt(l))&&(v=lO(e,t,r,i,h+1,l+2,c),v*iT>g&&(g=v*iT)),g>m&&(m=g),h=r.indexOf(d,h+1);return c[f]=m,m}function dD(e){return e.toLowerCase().replace(XI," ")}function sye(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,lO(e,t,dD(e),dD(t),0,0,{})}function lye(e,t=globalThis?.document){const r=dm(e);j.useEffect(()=>{const i=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[r,t])}var uye="DismissableLayer",uO="dismissableLayer.update",cye="dismissableLayer.pointerDownOutside",fye="dismissableLayer.focusOutside",hD,QI=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),WI=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...d}=e,h=j.useContext(QI),[m,g]=j.useState(null),v=m?.ownerDocument??globalThis?.document,[,S]=j.useState({}),b=sa(t,M=>g(M)),_=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=_.indexOf(E),w=m?_.indexOf(m):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,x=w>=R,O=pye(M=>{const D=M.target,$=[...h.branches].some(q=>q.contains(D));!x||$||(s?.(M),c?.(M),M.defaultPrevented||f?.())},v),C=mye(M=>{const D=M.target;[...h.branches].some(q=>q.contains(D))||(l?.(M),c?.(M),M.defaultPrevented||f?.())},v);return lye(M=>{w===h.layers.size-1&&(i?.(M),!M.defaultPrevented&&f&&(M.preventDefault(),f()))},v),j.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(hD=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),pD(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=hD)}},[m,v,r,h]),j.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),pD())},[m,h]),j.useEffect(()=>{const M=()=>S({});return document.addEventListener(uO,M),()=>document.removeEventListener(uO,M)},[]),k.jsx(Qr.div,{...d,ref:b,style:{pointerEvents:T?x?"auto":"none":void 0,...e.style},onFocusCapture:Dr(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Dr(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Dr(e.onPointerDownCapture,O.onPointerDownCapture)})});WI.displayName=uye;var dye="DismissableLayerBranch",hye=j.forwardRef((e,t)=>{const r=j.useContext(QI),i=j.useRef(null),s=sa(t,i);return j.useEffect(()=>{const l=i.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),k.jsx(Qr.div,{...e,ref:s})});hye.displayName=dye;function pye(e,t=globalThis?.document){const r=dm(e),i=j.useRef(!1),s=j.useRef(()=>{});return j.useEffect(()=>{const l=f=>{if(f.target&&!i.current){let d=function(){JI(cye,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}function mye(e,t=globalThis?.document){const r=dm(e),i=j.useRef(!1);return j.useEffect(()=>{const s=l=>{l.target&&!i.current&&JI(fye,r,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function pD(){const e=new CustomEvent(uO);document.dispatchEvent(e)}function JI(e,t,r,{discrete:i}){const s=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),i?Fme(s,l):s.dispatchEvent(l)}var sT="focusScope.autoFocusOnMount",lT="focusScope.autoFocusOnUnmount",mD={bubbles:!1,cancelable:!0},gye="FocusScope",e7=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...c}=e,[f,d]=j.useState(null),h=dm(s),m=dm(l),g=j.useRef(null),v=sa(t,_=>d(_)),S=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(i){let _=function(T){if(S.paused||!f)return;const x=T.target;f.contains(x)?g.current=x:Mc(g.current,{select:!0})},E=function(T){if(S.paused||!f)return;const x=T.relatedTarget;x!==null&&(f.contains(x)||Mc(g.current,{select:!0}))},R=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&Mc(f)};document.addEventListener("focusin",_),document.addEventListener("focusout",E);const w=new MutationObserver(R);return f&&w.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",E),w.disconnect()}}},[i,f,S.paused]),j.useEffect(()=>{if(f){yD.add(S);const _=document.activeElement;if(!f.contains(_)){const R=new CustomEvent(sT,mD);f.addEventListener(sT,h),f.dispatchEvent(R),R.defaultPrevented||(yye(Eye(t7(f)),{select:!0}),document.activeElement===_&&Mc(f))}return()=>{f.removeEventListener(sT,h),setTimeout(()=>{const R=new CustomEvent(lT,mD);f.addEventListener(lT,m),f.dispatchEvent(R),R.defaultPrevented||Mc(_??document.body,{select:!0}),f.removeEventListener(lT,m),yD.remove(S)},0)}}},[f,h,m,S]);const b=j.useCallback(_=>{if(!r&&!i||S.paused)return;const E=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,R=document.activeElement;if(E&&R){const w=_.currentTarget,[T,x]=vye(w);T&&x?!_.shiftKey&&R===x?(_.preventDefault(),r&&Mc(T,{select:!0})):_.shiftKey&&R===T&&(_.preventDefault(),r&&Mc(x,{select:!0})):R===w&&_.preventDefault()}},[r,i,S.paused]);return k.jsx(Qr.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})});e7.displayName=gye;function yye(e,{select:t=!1}={}){const r=document.activeElement;for(const i of e)if(Mc(i,{select:t}),document.activeElement!==r)return}function vye(e){const t=t7(e),r=gD(t,e),i=gD(t.reverse(),e);return[r,i]}function t7(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gD(e,t){for(const r of e)if(!bye(r,{upTo:t}))return r}function bye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sye(e){return e instanceof HTMLInputElement&&"select"in e}function Mc(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sye(e)&&t&&e.select()}}var yD=wye();function wye(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=vD(e,t),e.unshift(t)},remove(t){e=vD(e,t),e[0]?.resume()}}}function vD(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function Eye(e){return e.filter(t=>t.tagName!=="A")}var xye="Portal",n7=j.forwardRef((e,t)=>{const{container:r,...i}=e,[s,l]=j.useState(!1);fm(()=>l(!0),[]);const c=r||s&&globalThis?.document?.body;return c?Sme.createPortal(k.jsx(Qr.div,{...i,ref:t}),c):null});n7.displayName=xye;var uT=0;function _ye(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bD()),document.body.insertAdjacentElement("beforeend",e[1]??bD()),uT++,()=>{uT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),uT--}},[])}function bD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tl=function(){return Tl=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},Tl.apply(this,arguments)};function r7(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}function cO(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Tye(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var HS="right-scroll-bar-position",GS="width-before-scroll-bar",Cye="with-scroll-bars-hidden",Oye="--removed-body-scroll-bar-size";function cT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rye(e,t){var r=j.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=t,r.facade}var Aye=typeof window<"u"?j.useLayoutEffect:j.useEffect,SD=new WeakMap;function Mye(e,t){var r=Rye(null,function(i){return e.forEach(function(s){return cT(s,i)})});return Aye(function(){var i=SD.get(r);if(i){var s=new Set(i),l=new Set(e),c=r.current;s.forEach(function(f){l.has(f)||cT(f,null)}),l.forEach(function(f){s.has(f)||cT(f,c)})}SD.set(r,e)},[e]),r}function jye(e){return e}function kye(e,t){t===void 0&&(t=jye);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(l){var c=t(l,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(l){for(i=!0;r.length;){var c=r;r=[],c.forEach(l)}r={push:function(f){return l(f)},filter:function(){return r}}},assignMedium:function(l){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(l),c=r}var d=function(){var m=c;c=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return s}function Dye(e){e===void 0&&(e={});var t=kye(null);return t.options=Tl({async:!0,ssr:!1},e),t}var a7=function(e){var t=e.sideCar,r=r7(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return j.createElement(i,Tl({},r))};a7.isSideCarExport=!0;function Nye(e,t){return e.useMedium(t),a7}var i7=Dye(),fT=function(){},w2=j.forwardRef(function(e,t){var r=j.useRef(null),i=j.useState({onScrollCapture:fT,onWheelCapture:fT,onTouchMoveCapture:fT}),s=i[0],l=i[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,S=e.noRelative,b=e.noIsolation,_=e.inert,E=e.allowPinchZoom,R=e.as,w=R===void 0?"div":R,T=e.gapMode,x=r7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=v,C=Mye([r,t]),M=Tl(Tl({},x),s);return j.createElement(j.Fragment,null,m&&j.createElement(O,{sideCar:i7,removeScrollBar:h,shards:g,noRelative:S,noIsolation:b,inert:_,setCallbacks:l,allowPinchZoom:!!E,lockRef:r,gapMode:T}),c?j.cloneElement(j.Children.only(f),Tl(Tl({},M),{ref:C})):j.createElement(w,Tl({},M,{className:d,ref:C}),f))});w2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};w2.classNames={fullWidth:GS,zeroRight:HS};var zye=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $ye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zye();return t&&e.setAttribute("nonce",t),e}function Pye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Iye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Lye=function(){var e=0,t=null;return{add:function(r){e==0&&(t=$ye())&&(Pye(t,r),Iye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Uye=function(){var e=Lye();return function(t,r){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},o7=function(){var e=Uye(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},qye={left:0,top:0,right:0,gap:0},dT=function(e){return parseInt(e||"",10)||0},Vye=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[dT(r),dT(i),dT(s)]},Fye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qye;var t=Vye(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},Bye=o7(),Hp="data-scroll-locked",Hye=function(e,t,r,i){var s=e.left,l=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
84
+ .`.concat(Cye,` {
85
+ overflow: hidden `).concat(i,`;
86
+ padding-right: `).concat(f,"px ").concat(i,`;
87
+ }
88
+ body[`).concat(Hp,`] {
89
+ overflow: hidden `).concat(i,`;
90
+ overscroll-behavior: contain;
91
+ `).concat([t&&"position: relative ".concat(i,";"),r==="margin"&&`
92
+ padding-left: `.concat(s,`px;
93
+ padding-top: `).concat(l,`px;
94
+ padding-right: `).concat(c,`px;
95
+ margin-left:0;
96
+ margin-top:0;
97
+ margin-right: `).concat(f,"px ").concat(i,`;
98
+ `),r==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
99
+ }
100
+
101
+ .`).concat(HS,` {
102
+ right: `).concat(f,"px ").concat(i,`;
103
+ }
104
+
105
+ .`).concat(GS,` {
106
+ margin-right: `).concat(f,"px ").concat(i,`;
107
+ }
108
+
109
+ .`).concat(HS," .").concat(HS,` {
110
+ right: 0 `).concat(i,`;
111
+ }
112
+
113
+ .`).concat(GS," .").concat(GS,` {
114
+ margin-right: 0 `).concat(i,`;
115
+ }
116
+
117
+ body[`).concat(Hp,`] {
118
+ `).concat(Oye,": ").concat(f,`px;
119
+ }
120
+ `)},wD=function(){var e=parseInt(document.body.getAttribute(Hp)||"0",10);return isFinite(e)?e:0},Gye=function(){j.useEffect(function(){return document.body.setAttribute(Hp,(wD()+1).toString()),function(){var e=wD()-1;e<=0?document.body.removeAttribute(Hp):document.body.setAttribute(Hp,e.toString())}},[])},Kye=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;Gye();var l=j.useMemo(function(){return Fye(s)},[s]);return j.createElement(Bye,{styles:Hye(l,!t,s,r?"":"!important")})},fO=!1;if(typeof window<"u")try{var gS=Object.defineProperty({},"passive",{get:function(){return fO=!0,!0}});window.addEventListener("test",gS,gS),window.removeEventListener("test",gS,gS)}catch{fO=!1}var Sp=fO?{passive:!1}:!1,Yye=function(e){return e.tagName==="TEXTAREA"},s7=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yye(e)&&r[t]==="visible")},Zye=function(e){return s7(e,"overflowY")},Xye=function(e){return s7(e,"overflowX")},ED=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=l7(e,i);if(s){var l=u7(e,i),c=l[1],f=l[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},Qye=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},Wye=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},l7=function(e,t){return e==="v"?Zye(t):Xye(t)},u7=function(e,t){return e==="v"?Qye(t):Wye(t)},Jye=function(e,t){return e==="h"&&t==="rtl"?-1:1},e0e=function(e,t,r,i,s){var l=Jye(e,window.getComputedStyle(t).direction),c=l*i,f=r.target,d=t.contains(f),h=!1,m=c>0,g=0,v=0;do{if(!f)break;var S=u7(e,f),b=S[0],_=S[1],E=S[2],R=_-E-l*b;(b||R)&&l7(e,f)&&(g+=R,v+=b);var w=f.parentNode;f=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!d&&f!==document.body||d&&(t.contains(f)||t===f));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},yS=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xD=function(e){return[e.deltaX,e.deltaY]},_D=function(e){return e&&"current"in e?e.current:e},t0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},n0e=function(e){return`
121
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
122
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
123
+ `)},r0e=0,wp=[];function a0e(e){var t=j.useRef([]),r=j.useRef([0,0]),i=j.useRef(),s=j.useState(r0e++)[0],l=j.useState(o7)[0],c=j.useRef(e);j.useEffect(function(){c.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var _=Tye([e.lockRef.current],(e.shards||[]).map(_D),!0).filter(Boolean);return _.forEach(function(E){return E.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),_.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=j.useCallback(function(_,E){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!c.current.allowPinchZoom;var R=yS(_),w=r.current,T="deltaX"in _?_.deltaX:w[0]-R[0],x="deltaY"in _?_.deltaY:w[1]-R[1],O,C=_.target,M=Math.abs(T)>Math.abs(x)?"h":"v";if("touches"in _&&M==="h"&&C.type==="range")return!1;var D=window.getSelection(),$=D&&D.anchorNode,q=$?$===C||$.contains(C):!1;if(q)return!1;var L=ED(M,C);if(!L)return!0;if(L?O=M:(O=M==="v"?"h":"v",L=ED(M,C)),!L)return!1;if(!i.current&&"changedTouches"in _&&(T||x)&&(i.current=O),!O)return!0;var V=i.current||O;return e0e(V,E,_,V==="h"?T:x)},[]),d=j.useCallback(function(_){var E=_;if(!(!wp.length||wp[wp.length-1]!==l)){var R="deltaY"in E?xD(E):yS(E),w=t.current.filter(function(O){return O.name===E.type&&(O.target===E.target||E.target===O.shadowParent)&&t0e(O.delta,R)})[0];if(w&&w.should){E.cancelable&&E.preventDefault();return}if(!w){var T=(c.current.shards||[]).map(_D).filter(Boolean).filter(function(O){return O.contains(E.target)}),x=T.length>0?f(E,T[0]):!c.current.noIsolation;x&&E.cancelable&&E.preventDefault()}}},[]),h=j.useCallback(function(_,E,R,w){var T={name:_,delta:E,target:R,should:w,shadowParent:i0e(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(x){return x!==T})},1)},[]),m=j.useCallback(function(_){r.current=yS(_),i.current=void 0},[]),g=j.useCallback(function(_){h(_.type,xD(_),_.target,f(_,e.lockRef.current))},[]),v=j.useCallback(function(_){h(_.type,yS(_),_.target,f(_,e.lockRef.current))},[]);j.useEffect(function(){return wp.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Sp),document.addEventListener("touchmove",d,Sp),document.addEventListener("touchstart",m,Sp),function(){wp=wp.filter(function(_){return _!==l}),document.removeEventListener("wheel",d,Sp),document.removeEventListener("touchmove",d,Sp),document.removeEventListener("touchstart",m,Sp)}},[]);var S=e.removeScrollBar,b=e.inert;return j.createElement(j.Fragment,null,b?j.createElement(l,{styles:n0e(s)}):null,S?j.createElement(Kye,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function i0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const o0e=Nye(i7,a0e);var c7=j.forwardRef(function(e,t){return j.createElement(w2,Tl({},e,{ref:t,sideCar:o0e}))});c7.classNames=w2.classNames;var s0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ep=new WeakMap,vS=new WeakMap,bS={},hT=0,f7=function(e){return e&&(e.host||f7(e.parentNode))},l0e=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=f7(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},u0e=function(e,t,r,i){var s=l0e(t,Array.isArray(e)?e:[e]);bS[r]||(bS[r]=new WeakMap);var l=bS[r],c=[],f=new Set,d=new Set(s),h=function(g){!g||f.has(g)||(f.add(g),h(g.parentNode))};s.forEach(h);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(v){if(f.has(v))m(v);else try{var S=v.getAttribute(i),b=S!==null&&S!=="false",_=(Ep.get(v)||0)+1,E=(l.get(v)||0)+1;Ep.set(v,_),l.set(v,E),c.push(v),_===1&&b&&vS.set(v,!0),E===1&&v.setAttribute(r,"true"),b||v.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",v,R)}})};return m(t),f.clear(),hT++,function(){c.forEach(function(g){var v=Ep.get(g)-1,S=l.get(g)-1;Ep.set(g,v),l.set(g,S),v||(vS.has(g)||g.removeAttribute(i),vS.delete(g)),S||g.removeAttribute(r)}),hT--,hT||(Ep=new WeakMap,Ep=new WeakMap,vS=new WeakMap,bS={})}},c0e=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=s0e(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),u0e(i,s,r,"aria-hidden")):function(){return null}},E2="Dialog",[d7]=lp(E2),[f0e,ml]=d7(E2),h7=e=>{const{__scopeDialog:t,children:r,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,f=j.useRef(null),d=j.useRef(null),[h,m]=n1({prop:i,defaultProp:s??!1,onChange:l,caller:E2});return k.jsx(f0e,{scope:t,triggerRef:f,contentRef:d,contentId:jl(),titleId:jl(),descriptionId:jl(),open:h,onOpenChange:m,onOpenToggle:j.useCallback(()=>m(g=>!g),[m]),modal:c,children:r})};h7.displayName=E2;var p7="DialogTrigger",d0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=ml(p7,r),l=sa(t,s.triggerRef);return k.jsx(Qr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":r5(s.open),...i,ref:l,onClick:Dr(e.onClick,s.onOpenToggle)})});d0e.displayName=p7;var t5="DialogPortal",[h0e,m7]=d7(t5,{forceMount:void 0}),g7=e=>{const{__scopeDialog:t,forceMount:r,children:i,container:s}=e,l=ml(t5,t);return k.jsx(h0e,{scope:t,forceMount:r,children:j.Children.map(i,c=>k.jsx(zm,{present:r||l.open,children:k.jsx(n7,{asChild:!0,container:s,children:c})}))})};g7.displayName=t5;var Rw="DialogOverlay",y7=j.forwardRef((e,t)=>{const r=m7(Rw,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=ml(Rw,e.__scopeDialog);return l.modal?k.jsx(zm,{present:i||l.open,children:k.jsx(m0e,{...s,ref:t})}):null});y7.displayName=Rw;var p0e=Ow("DialogOverlay.RemoveScroll"),m0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=ml(Rw,r);return k.jsx(c7,{as:p0e,allowPinchZoom:!0,shards:[s.contentRef],children:k.jsx(Qr.div,{"data-state":r5(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Gh="DialogContent",v7=j.forwardRef((e,t)=>{const r=m7(Gh,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=ml(Gh,e.__scopeDialog);return k.jsx(zm,{present:i||l.open,children:l.modal?k.jsx(g0e,{...s,ref:t}):k.jsx(y0e,{...s,ref:t})})});v7.displayName=Gh;var g0e=j.forwardRef((e,t)=>{const r=ml(Gh,e.__scopeDialog),i=j.useRef(null),s=sa(t,r.contentRef,i);return j.useEffect(()=>{const l=i.current;if(l)return c0e(l)},[]),k.jsx(b7,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Dr(e.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Dr(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&l.preventDefault()}),onFocusOutside:Dr(e.onFocusOutside,l=>l.preventDefault())})}),y0e=j.forwardRef((e,t)=>{const r=ml(Gh,e.__scopeDialog),i=j.useRef(!1),s=j.useRef(!1);return k.jsx(b7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||r.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=l.target;r.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),b7=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...c}=e,f=ml(Gh,r),d=j.useRef(null),h=sa(t,d);return _ye(),k.jsxs(k.Fragment,{children:[k.jsx(e7,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:k.jsx(WI,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":r5(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(w0e,{titleId:f.titleId}),k.jsx(x0e,{contentRef:d,descriptionId:f.descriptionId})]})]})}),n5="DialogTitle",v0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=ml(n5,r);return k.jsx(Qr.h2,{id:s.titleId,...i,ref:t})});v0e.displayName=n5;var S7="DialogDescription",b0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=ml(S7,r);return k.jsx(Qr.p,{id:s.descriptionId,...i,ref:t})});b0e.displayName=S7;var w7="DialogClose",S0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=ml(w7,r);return k.jsx(Qr.button,{type:"button",...i,ref:t,onClick:Dr(e.onClick,()=>s.onOpenChange(!1))})});S0e.displayName=w7;function r5(e){return e?"open":"closed"}var E7="DialogTitleWarning",[WEe,x7]=Ame(E7,{contentName:Gh,titleName:n5,docsSlug:"dialog"}),w0e=({titleId:e})=>{const t=x7(E7),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
124
+
125
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
126
+
127
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},E0e="DialogDescriptionWarning",x0e=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${x7(E0e).contentName}}.`;return j.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},_0e=h7,T0e=g7,C0e=y7,O0e=v7,Mv='[cmdk-group=""]',pT='[cmdk-group-items=""]',R0e='[cmdk-group-heading=""]',_7='[cmdk-item=""]',TD=`${_7}:not([aria-disabled="true"])`,dO="cmdk-item-select",Tp="data-value",A0e=(e,t,r)=>sye(e,t,r),T7=j.createContext(void 0),a1=()=>j.useContext(T7),C7=j.createContext(void 0),a5=()=>j.useContext(C7),O7=j.createContext(void 0),R7=j.forwardRef((e,t)=>{let r=Cp(()=>{var I,U;return{search:"",value:(U=(I=e.value)!=null?I:e.defaultValue)!=null?U:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Cp(()=>new Set),s=Cp(()=>new Map),l=Cp(()=>new Map),c=Cp(()=>new Set),f=A7(e),{label:d,children:h,value:m,onValueChange:g,filter:v,shouldFilter:S,loop:b,disablePointerSelection:_=!1,vimBindings:E=!0,...R}=e,w=jl(),T=jl(),x=jl(),O=j.useRef(null),C=U0e();Kh(()=>{if(m!==void 0){let I=m.trim();r.current.value=I,M.emit()}},[m]),Kh(()=>{C(6,F)},[]);let M=j.useMemo(()=>({subscribe:I=>(c.current.add(I),()=>c.current.delete(I)),snapshot:()=>r.current,setState:(I,U,P)=>{var G,ee,ue,ve;if(!Object.is(r.current[I],U)){if(r.current[I]=U,I==="search")V(),q(),C(1,L);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ee=document.getElementById(x);Ee?Ee.focus():(G=document.getElementById(w))==null||G.focus()}if(C(7,()=>{var Ee;r.current.selectedItemId=(Ee=re())==null?void 0:Ee.id,M.emit()}),P||C(5,F),((ee=f.current)==null?void 0:ee.value)!==void 0){let Ee=U??"";(ve=(ue=f.current).onValueChange)==null||ve.call(ue,Ee);return}}M.emit()}},emit:()=>{c.current.forEach(I=>I())}}),[]),D=j.useMemo(()=>({value:(I,U,P)=>{var G;U!==((G=l.current.get(I))==null?void 0:G.value)&&(l.current.set(I,{value:U,keywords:P}),r.current.filtered.items.set(I,$(U,P)),C(2,()=>{q(),M.emit()}))},item:(I,U)=>(i.current.add(I),U&&(s.current.has(U)?s.current.get(U).add(I):s.current.set(U,new Set([I]))),C(3,()=>{V(),q(),r.current.value||L(),M.emit()}),()=>{l.current.delete(I),i.current.delete(I),r.current.filtered.items.delete(I);let P=re();C(4,()=>{V(),P?.getAttribute("id")===I&&L(),M.emit()})}),group:I=>(s.current.has(I)||s.current.set(I,new Set),()=>{l.current.delete(I),s.current.delete(I)}),filter:()=>f.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:w,inputId:x,labelId:T,listInnerRef:O}),[]);function $(I,U){var P,G;let ee=(G=(P=f.current)==null?void 0:P.filter)!=null?G:A0e;return I?ee(I,r.current.search,U):0}function q(){if(!r.current.search||f.current.shouldFilter===!1)return;let I=r.current.filtered.items,U=[];r.current.filtered.groups.forEach(G=>{let ee=s.current.get(G),ue=0;ee.forEach(ve=>{let Ee=I.get(ve);ue=Math.max(Ee,ue)}),U.push([G,ue])});let P=O.current;ae().sort((G,ee)=>{var ue,ve;let Ee=G.getAttribute("id"),Oe=ee.getAttribute("id");return((ue=I.get(Oe))!=null?ue:0)-((ve=I.get(Ee))!=null?ve:0)}).forEach(G=>{let ee=G.closest(pT);ee?ee.appendChild(G.parentElement===ee?G:G.closest(`${pT} > *`)):P.appendChild(G.parentElement===P?G:G.closest(`${pT} > *`))}),U.sort((G,ee)=>ee[1]-G[1]).forEach(G=>{var ee;let ue=(ee=O.current)==null?void 0:ee.querySelector(`${Mv}[${Tp}="${encodeURIComponent(G[0])}"]`);ue?.parentElement.appendChild(ue)})}function L(){let I=ae().find(P=>P.getAttribute("aria-disabled")!=="true"),U=I?.getAttribute(Tp);M.setState("value",U||void 0)}function V(){var I,U,P,G;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let ee=0;for(let ue of i.current){let ve=(U=(I=l.current.get(ue))==null?void 0:I.value)!=null?U:"",Ee=(G=(P=l.current.get(ue))==null?void 0:P.keywords)!=null?G:[],Oe=$(ve,Ee);r.current.filtered.items.set(ue,Oe),Oe>0&&ee++}for(let[ue,ve]of s.current)for(let Ee of ve)if(r.current.filtered.items.get(Ee)>0){r.current.filtered.groups.add(ue);break}r.current.filtered.count=ee}function F(){var I,U,P;let G=re();G&&(((I=G.parentElement)==null?void 0:I.firstChild)===G&&((P=(U=G.closest(Mv))==null?void 0:U.querySelector(R0e))==null||P.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function re(){var I;return(I=O.current)==null?void 0:I.querySelector(`${_7}[aria-selected="true"]`)}function ae(){var I;return Array.from(((I=O.current)==null?void 0:I.querySelectorAll(TD))||[])}function K(I){let U=ae()[I];U&&M.setState("value",U.getAttribute(Tp))}function B(I){var U;let P=re(),G=ae(),ee=G.findIndex(ve=>ve===P),ue=G[ee+I];(U=f.current)!=null&&U.loop&&(ue=ee+I<0?G[G.length-1]:ee+I===G.length?G[0]:G[ee+I]),ue&&M.setState("value",ue.getAttribute(Tp))}function Y(I){let U=re(),P=U?.closest(Mv),G;for(;P&&!G;)P=I>0?I0e(P,Mv):L0e(P,Mv),G=P?.querySelector(TD);G?M.setState("value",G.getAttribute(Tp)):B(I)}let fe=()=>K(ae().length-1),ie=I=>{I.preventDefault(),I.metaKey?fe():I.altKey?Y(1):B(1)},N=I=>{I.preventDefault(),I.metaKey?K(0):I.altKey?Y(-1):B(-1)};return j.createElement(Ul.div,{ref:t,tabIndex:-1,...R,"cmdk-root":"",onKeyDown:I=>{var U;(U=R.onKeyDown)==null||U.call(R,I);let P=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||P))switch(I.key){case"n":case"j":{E&&I.ctrlKey&&ie(I);break}case"ArrowDown":{ie(I);break}case"p":case"k":{E&&I.ctrlKey&&N(I);break}case"ArrowUp":{N(I);break}case"Home":{I.preventDefault(),K(0);break}case"End":{I.preventDefault(),fe();break}case"Enter":{I.preventDefault();let G=re();if(G){let ee=new Event(dO);G.dispatchEvent(ee)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:V0e},d),x2(e,I=>j.createElement(C7.Provider,{value:M},j.createElement(T7.Provider,{value:D},I))))}),M0e=j.forwardRef((e,t)=>{var r,i;let s=jl(),l=j.useRef(null),c=j.useContext(O7),f=a1(),d=A7(e),h=(i=(r=d.current)==null?void 0:r.forceMount)!=null?i:c?.forceMount;Kh(()=>{if(!h)return f.item(s,c?.id)},[h]);let m=M7(s,l,[e.value,e.children,l],e.keywords),g=a5(),v=nf(C=>C.value&&C.value===m.current),S=nf(C=>h||f.filter()===!1?!0:C.search?C.filtered.items.get(s)>0:!0);j.useEffect(()=>{let C=l.current;if(!(!C||e.disabled))return C.addEventListener(dO,b),()=>C.removeEventListener(dO,b)},[S,e.onSelect,e.disabled]);function b(){var C,M;_(),(M=(C=d.current).onSelect)==null||M.call(C,m.current)}function _(){g.setState("value",m.current,!0)}if(!S)return null;let{disabled:E,value:R,onSelect:w,forceMount:T,keywords:x,...O}=e;return j.createElement(Ul.div,{ref:tf(l,t),...O,id:s,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!v,"data-disabled":!!E,"data-selected":!!v,onPointerMove:E||f.getDisablePointerSelection()?void 0:_,onClick:E?void 0:b},e.children)}),j0e=j.forwardRef((e,t)=>{let{heading:r,children:i,forceMount:s,...l}=e,c=jl(),f=j.useRef(null),d=j.useRef(null),h=jl(),m=a1(),g=nf(S=>s||m.filter()===!1?!0:S.search?S.filtered.groups.has(c):!0);Kh(()=>m.group(c),[]),M7(c,f,[e.value,e.heading,d]);let v=j.useMemo(()=>({id:c,forceMount:s}),[s]);return j.createElement(Ul.div,{ref:tf(f,t),...l,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&j.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),x2(e,S=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},j.createElement(O7.Provider,{value:v},S))))}),k0e=j.forwardRef((e,t)=>{let{alwaysRender:r,...i}=e,s=j.useRef(null),l=nf(c=>!c.search);return!r&&!l?null:j.createElement(Ul.div,{ref:tf(s,t),...i,"cmdk-separator":"",role:"separator"})}),D0e=j.forwardRef((e,t)=>{let{onValueChange:r,...i}=e,s=e.value!=null,l=a5(),c=nf(h=>h.search),f=nf(h=>h.selectedItemId),d=a1();return j.useEffect(()=>{e.value!=null&&l.setState("search",e.value)},[e.value]),j.createElement(Ul.input,{ref:t,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":f,id:d.inputId,type:"text",value:s?e.value:c,onChange:h=>{s||l.setState("search",h.target.value),r?.(h.target.value)}})}),N0e=j.forwardRef((e,t)=>{let{children:r,label:i="Suggestions",...s}=e,l=j.useRef(null),c=j.useRef(null),f=nf(h=>h.selectedItemId),d=a1();return j.useEffect(()=>{if(c.current&&l.current){let h=c.current,m=l.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let S=h.offsetHeight;m.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),j.createElement(Ul.div,{ref:tf(l,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":i,id:d.listId},x2(e,h=>j.createElement("div",{ref:tf(c,d.listInnerRef),"cmdk-list-sizer":""},h)))}),z0e=j.forwardRef((e,t)=>{let{open:r,onOpenChange:i,overlayClassName:s,contentClassName:l,container:c,...f}=e;return j.createElement(_0e,{open:r,onOpenChange:i},j.createElement(T0e,{container:c},j.createElement(C0e,{"cmdk-overlay":"",className:s}),j.createElement(O0e,{"aria-label":e.label,"cmdk-dialog":"",className:l},j.createElement(R7,{ref:t,...f}))))}),$0e=j.forwardRef((e,t)=>nf(r=>r.filtered.count===0)?j.createElement(Ul.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),P0e=j.forwardRef((e,t)=>{let{progress:r,children:i,label:s="Loading...",...l}=e;return j.createElement(Ul.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},x2(e,c=>j.createElement("div",{"aria-hidden":!0},c)))}),es=Object.assign(R7,{List:N0e,Item:M0e,Input:D0e,Group:j0e,Separator:k0e,Dialog:z0e,Empty:$0e,Loading:P0e});function I0e(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function L0e(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function A7(e){let t=j.useRef(e);return Kh(()=>{t.current=e}),t}var Kh=typeof window>"u"?j.useEffect:j.useLayoutEffect;function Cp(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function nf(e){let t=a5(),r=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,r,r)}function M7(e,t,r,i=[]){let s=j.useRef(),l=a1();return Kh(()=>{var c;let f=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():s.current}})(),d=i.map(h=>h.trim());l.value(e,f,d),(c=t.current)==null||c.setAttribute(Tp,f),s.current=f}),s}var U0e=()=>{let[e,t]=j.useState(),r=Cp(()=>new Map);return Kh(()=>{r.current.forEach(i=>i()),r.current=new Map},[e]),(i,s)=>{r.current.set(i,s),t({})}};function q0e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function x2({asChild:e,children:t},r){return e&&j.isValidElement(t)?j.cloneElement(q0e(t),{ref:t.ref},r(t.props.children)):r(t)}var V0e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const F0e=vc("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function B0e({className:e,variant:t,asChild:r=!1,...i}){const s=r?tI:"span";return k.jsx(s,{"data-slot":"badge",className:wn(F0e({variant:t}),e),...i})}const j7=j.forwardRef(({className:e,...t},r)=>k.jsx(es,{ref:r,"data-slot":"command",className:wn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),H0e=j.forwardRef(({className:e,...t},r)=>k.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[k.jsx(Upe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),k.jsx(es.Input,{ref:r,className:wn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));H0e.displayName=es.Input.displayName;function k7({className:e,...t}){return k.jsx(es.List,{"data-slot":"command-list",className:wn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function D7({className:e,...t}){return k.jsx(es.Group,{"data-slot":"command-group",className:wn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function N7({className:e,...t}){return k.jsx(es.Item,{"data-slot":"command-item",className:wn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function G0e({multiple:e,items:t=[],selected:r,onValueChange:i,autoFocus:s=!1,disabled:l=!1,ariaDescribedby:c,ariaPlaceholder:f,onFocus:d,onBlur:h,className:m,id:g}){const v=j.useRef(null),[S,b]=j.useState(!1),[_,E]=j.useState(""),R=j.useMemo(()=>t.filter(M=>r.some(D=>$c(M.value,D))),[t,r]),w=j.useMemo(()=>t.filter(M=>!R.some(D=>$c(D.value,M.value))),[t,R]),T=j.useCallback(M=>{if(l)return;const D=R.filter($=>!$c($.value,M.value));i?.(D.map($=>$.index))},[R,i,l]),x=j.useCallback(M=>{if(!(l||!v.current||v.current.value!==""))if(M.key==="Delete"||M.key==="Backspace"){const D=R.slice(0,-1);i?.(D.map($=>$.index))}else M.key==="Escape"&&v.current.blur()},[R,i,l]),O=j.useCallback(M=>{if(l)return;E("");const D=e?[...R,M]:[M];i?.(D.map($=>$.index))},[e,R,i,l]),C=j.useCallback(M=>{l||b(!0),d?.(M)},[l,d]);return k.jsxs(j7,{onKeyDown:x,className:wn("overflow-visible bg-transparent",m),autoFocus:s,"aria-disabled":l,onBlur:h,onFocus:C,"aria-describedby":c,"aria-placeholder":f,children:[k.jsx("div",{className:wn("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",l&&"opacity-50 cursor-not-allowed"),children:k.jsxs("div",{className:"flex gap-1 flex-wrap",children:[R.map(M=>k.jsxs(B0e,{variant:"secondary",children:[M.label,k.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:D=>D.key==="Enter"&&!l&&T(M),onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:()=>T(M),disabled:l,children:k.jsx(WP,{className:wn("h-3 w-3 text-muted-foreground hover:text-foreground",l&&"pointer-events-none")})})]},M.value)),k.jsx(es.Input,{ref:v,value:_,onValueChange:E,onBlur:()=>b(!1),onFocus:()=>!l&&b(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:l,"aria-controls":`command-item-input-${g}`,"aria-labelledby":`command-item-input-${g}`,id:`command-item-input-${g}`})]})}),S&&!l&&w.length>0&&k.jsx("div",{className:"relative mt-2",children:k.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:k.jsx(D7,{className:"h-full overflow-auto",children:k.jsx(k7,{children:w.map(M=>k.jsx(N7,{disabled:M.disabled,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},"aria-controls":`${M.value}-command-item`,"aria-labelledby":`${M.value}-command-item`,id:`${M.value}-command-item`,onSelect:()=>O(M),className:"cursor-pointer",children:M.label},`${M.value}-command-item`))})})})})]})}function K0e({items:e,selected:t,onValueChange:r,autoFocus:i=!1,disabled:s=!1,required:l=!1,placeholder:c="Select...",ariaDescribedby:f,ariaPlaceholder:d,onFocus:h,onBlur:m,className:g}){const[v,S]=j.useState(!1),b=e?.find(w=>w.value===t),_=j.useRef(null),E=j.useRef(null);j.useEffect(()=>{v&&_.current&&requestAnimationFrame(()=>{var w;(w=_.current)===null||w===void 0||w.scrollIntoView({block:"nearest"})})},[v]);const R=w=>{E.current&&!E.current.contains(w.relatedTarget)&&S(!1),m?.(w)};return k.jsxs(j7,{ref:E,className:wn("overflow-visible bg-transparent",g),autoFocus:i,"aria-disabled":s,onBlur:R,onFocus:h,"aria-describedby":f,"aria-placeholder":d,children:[k.jsxs("div",{onClick:()=>!s&&S(!v),className:wn("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!b&&l&&"border-red-500",s&&"opacity-50 cursor-not-allowed",g),children:[k.jsx("span",{className:wn("flex-1 line-clamp-1",!b&&"text-muted-foreground"),children:b?.label||c}),k.jsx(XP,{className:"h-4 w-4 opacity-50"})]}),k.jsx("div",{className:"relative",children:v&&e&&e.length>0?k.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:k.jsx(D7,{className:"h-full overflow-auto",children:k.jsx(k7,{children:e.map(w=>k.jsxs(N7,{ref:w.value===t?_:void 0,onMouseDown:T=>{T.preventDefault(),T.stopPropagation()},onSelect:()=>{w.disabled||(r?.(w.value),S(!1))},className:wn("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",w.value===t&&"font-semibold",w.disabled&&"opacity-50 cursor-not-allowed"),children:[k.jsx("span",{children:w.label}),k.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:w.value===t&&k.jsx(Rpe,{className:"h-4 w-4"})})]},w.value))})})}):null})]})}function Y0e({id:e,options:t,required:r,disabled:i,readonly:s,value:l,multiple:c,autofocus:f,onChange:d,onBlur:h,onFocus:m,defaultValue:g,placeholder:v,rawErrors:S=[],className:b}){const{enumOptions:_,enumDisabled:E,emptyValue:R}=t,w=()=>{m(e,Na(l,_,R))},T=()=>{h(e,Na(l,_,R))},x=_?.map(({value:C,label:M},D)=>({value:c?C:D.toString(),label:M,index:D,disabled:Array.isArray(E)&&E.includes(C)})),O=wn({"border-destructive":S.length>0},b);return k.jsx("div",{className:"p-0.5",children:c?k.jsx(G0e,{id:e,autoFocus:f,disabled:i||s,multiple:!0,className:O,items:x,selected:l,onValueChange:C=>{d(Na(C,_,R))},onFocus:w,onBlur:T}):k.jsx(K0e,{items:x,selected:_P(l??g,_,!1),onValueChange:C=>{d(Na(C,_,R))},autoFocus:f,disabled:i||s,required:r,placeholder:v,className:O,onFocus:w,onBlur:T,ariaDescribedby:uo(e)})})}function Z0e({className:e,...t}){return k.jsx("textarea",{"data-slot":"textarea",className:wn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function X0e({id:e,htmlName:t,placeholder:r,value:i,required:s,disabled:l,autofocus:c,readonly:f,onBlur:d,onFocus:h,onChange:m,options:g,className:v}){const S=({target:{value:E}})=>m(E===""?g.emptyValue:E),b=({target:E})=>d(e,E&&E.value),_=({target:E})=>h(e,E&&E.value);return k.jsx("div",{className:"flex p-0.5",children:k.jsx(Z0e,{id:e,name:t||e,placeholder:r,disabled:l,readOnly:f,value:i??"",required:s,autoFocus:c,rows:g.rows||5,onChange:S,onBlur:b,onFocus:_,"aria-describedby":uo(e),className:v})})}function Q0e(){return{CheckboxWidget:Jme,CheckboxesWidget:ege,RadioWidget:Mge,RangeWidget:Wge,SelectWidget:Y0e,TextareaWidget:X0e}}function W0e(){return{templates:Rme(),widgets:Q0e()}}function J0e(){return lpe(W0e())}const eve=J0e();function tve({className:e,size:t="default",...r}){return k.jsx("div",{"data-slot":"card","data-size":t,className:en("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-none py-4 text-xs/relaxed ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col",e),...r})}function nve({className:e,...t}){return k.jsx("div",{"data-slot":"card-content",className:en("px-4 group-data-[size=sm]/card:px-3",e),...t})}var z7=function(e){return typeof e=="function"},rve=function(e){return typeof e=="string"},$7=function(e){return typeof e=="number"};function CD(e,t){if(e===t)return!0;for(var r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function hO(e){var t=j.useRef(e);return t.current=e,t}var ave=function(e){var t=hO(e);j.useEffect(function(){return function(){t.current()}},[])},ive=!!(typeof window<"u"&&window.document&&window.document.createElement);function P7(e,t){if(ive){if(!e)return t;var r;return z7(e)?r=e():"current"in e?r=e.current:r=e,r}}var ove=function(e){var t=function(r,i,s){var l=j.useRef(!1),c=j.useRef([]),f=j.useRef([]),d=j.useRef(void 0);e(function(){var h,m=Array.isArray(s)?s:[s],g=m.map(function(v){return P7(v)});if(!l.current){l.current=!0,c.current=g,f.current=i,d.current=r();return}(g.length!==c.current.length||!CD(c.current,g)||!CD(f.current,i))&&((h=d.current)===null||h===void 0||h.call(d),c.current=g,f.current=i,d.current=r())}),ave(function(){var h;(h=d.current)===null||h===void 0||h.call(d),l.current=!1})};return t},sve=ove(j.useEffect),mT,OD;function lve(){if(OD)return mT;OD=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(l,c){if(l===c)return!0;if(l&&c&&typeof l=="object"&&typeof c=="object"){if(l.constructor!==c.constructor)return!1;var f,d,h;if(Array.isArray(l)){if(f=l.length,f!=c.length)return!1;for(d=f;d--!==0;)if(!s(l[d],c[d]))return!1;return!0}var m;if(t&&l instanceof Map&&c instanceof Map){if(l.size!==c.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!c.has(d.value[0]))return!1;for(m=l.entries();!(d=m.next()).done;)if(!s(d.value[1],c.get(d.value[0])))return!1;return!0}if(r&&l instanceof Set&&c instanceof Set){if(l.size!==c.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!c.has(d.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(l)&&ArrayBuffer.isView(c)){if(f=l.length,f!=c.length)return!1;for(d=f;d--!==0;)if(l[d]!==c[d])return!1;return!0}if(l.constructor===RegExp)return l.source===c.source&&l.flags===c.flags;if(l.valueOf!==Object.prototype.valueOf&&typeof l.valueOf=="function"&&typeof c.valueOf=="function")return l.valueOf()===c.valueOf();if(l.toString!==Object.prototype.toString&&typeof l.toString=="function"&&typeof c.toString=="function")return l.toString()===c.toString();if(h=Object.keys(l),f=h.length,f!==Object.keys(c).length)return!1;for(d=f;d--!==0;)if(!Object.prototype.hasOwnProperty.call(c,h[d]))return!1;if(e&&l instanceof Element)return!1;for(d=f;d--!==0;)if(!((h[d]==="_owner"||h[d]==="__v"||h[d]==="__o")&&l.$$typeof)&&!s(l[h[d]],c[h[d]]))return!1;return!0}return l!==l&&c!==c}return mT=function(c,f){try{return s(c,f)}catch(d){if((d.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw d}},mT}var uve=lve();const cve=$l(uve);var fve=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),cve(e,t)},dve=function(e,t,r){var i=j.useRef(void 0),s=j.useRef(0);fve(t,i.current)||(s.current+=1),i.current=t,sve(e,[s.current],r)},hve=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),I7={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:hve?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},pO={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type==="keyup"?I7.meta.includes(e.keyCode):e.metaKey}};function L7(e){return rve(e)||$7(e)}function pve(e){var t=Object.keys(pO).reduce(function(r,i){return pO[i](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function RD(e,t,r){var i,s;if(!e.key)return!1;if($7(t))return e.keyCode===t?t:!1;var l=t.split("."),c=0;try{for(var f=cO(l),d=f.next();!d.done;d=f.next()){var h=d.value,m=pO[h],g=I7[h.toLowerCase()];(m&&m(e)||g&&g===e.keyCode)&&c++}}catch(v){i={error:v}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return r?c===l.length&&pve(e)===l.length?t:!1:c===l.length?t:!1}function mve(e,t){return z7(e)?e:L7(e)?function(r){return RD(r,e,t)}:Array.isArray(e)?function(r){return e.find(function(i){return RD(r,i,t)})}:function(){return!!e}}var gve=["keydown"];function yve(e,t,r){var i={},s=i.events,l=s===void 0?gve:s,c=i.target,f=i.exactMatch,d=f===void 0?!1:f,h=i.useCapture,m=h===void 0?!1:h,g=hO(t),v=hO(e);dve(function(){var S,b,_,E=P7(c,window);if(E){var R=function(O){var C,M=O,D=mve(v.current,d),$=D(M),q=L7($)?$:M.key;if($)return(C=g.current)===null||C===void 0?void 0:C.call(g,M,q)};try{for(var w=cO(l),T=w.next();!T.done;T=w.next()){var x=T.value;(_=E?.addEventListener)===null||_===void 0||_.call(E,x,R,m)}}catch(O){S={error:O}}finally{try{T&&!T.done&&(b=w.return)&&b.call(w)}finally{if(S)throw S.error}}return function(){var O,C,M;try{for(var D=cO(l),$=D.next();!$.done;$=D.next()){var q=$.value;(M=E?.removeEventListener)===null||M===void 0||M.call(E,q,R,m)}}catch(L){O={error:L}}finally{try{$&&!$.done&&(C=D.return)&&C.call(D)}finally{if(O)throw O.error}}}}},[l],c)}const vve=({validateForm:e,formData:t})=>{const r=ff(),{mutateAsync:i,isPending:s}=tre(),l=async()=>{e&&!await e()||t&&await i({toolName:r.name,args:t})};return yve("Enter",l),k.jsx("div",{className:"flex flex-col items-end gap-1",children:k.jsxs(Xc,{onClick:l,variant:"default",disabled:s,children:[s?k.jsx(Sre,{className:"h-4 w-4 animate-spin"}):k.jsx(_re,{className:"h-4 w-4"}),"Call Tool"]})})};var KS={exports:{}},bve=KS.exports,AD;function Sve(){return AD||(AD=1,(function(e,t){(function(r,i){e.exports=i(bm())})(bve,r=>(()=>{var i={9735:(f,d)=>{d.__esModule=!0,d.default={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},f.exports=d.default},294:(f,d)=>{d.__esModule=!0,d.default={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},f.exports=d.default},1733:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},f.exports=d.default},8974:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},f.exports=d.default},6933:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},f.exports=d.default},523:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},f.exports=d.default},1223:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},f.exports=d.default},1233:(f,d)=>{d.__esModule=!0,d.default={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},f.exports=d.default},2847:(f,d)=>{d.__esModule=!0,d.default={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},f.exports=d.default},8120:(f,d)=>{d.__esModule=!0,d.default={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},f.exports=d.default},6305:(f,d)=>{d.__esModule=!0,d.default={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},f.exports=d.default},525:(f,d)=>{d.__esModule=!0,d.default={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},f.exports=d.default},4124:(f,d)=>{d.__esModule=!0,d.default={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},f.exports=d.default},7167:(f,d)=>{d.__esModule=!0,d.default={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},f.exports=d.default},4582:(f,d)=>{d.__esModule=!0,d.default={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},f.exports=d.default},7096:(f,d)=>{d.__esModule=!0,d.default={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},f.exports=d.default},9887:(f,d)=>{d.__esModule=!0,d.default={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},f.exports=d.default},7199:(f,d)=>{d.__esModule=!0,d.default={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},f.exports=d.default},1985:(f,d)=>{d.__esModule=!0,d.default={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},f.exports=d.default},8093:(f,d)=>{d.__esModule=!0,d.default={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},f.exports=d.default},1615:(f,d)=>{d.__esModule=!0,d.default={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},f.exports=d.default},9063:(f,d)=>{d.__esModule=!0,d.default={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},f.exports=d.default},9446:(f,d,h)=>{function m(te){return te&&te.__esModule?te.default:te}d.__esModule=!0;var g=h(1308);d.threezerotwofour=m(g);var v=h(9735);d.apathy=m(v);var S=h(294);d.ashes=m(S);var b=h(1733);d.atelierDune=m(b);var _=h(8974);d.atelierForest=m(_);var E=h(6933);d.atelierHeath=m(E);var R=h(523);d.atelierLakeside=m(R);var w=h(1223);d.atelierSeaside=m(w);var T=h(1233);d.bespin=m(T);var x=h(2847);d.brewer=m(x);var O=h(8120);d.bright=m(O);var C=h(6305);d.chalk=m(C);var M=h(525);d.codeschool=m(M);var D=h(4124);d.colors=m(D);var $=h(7167);d.default=m($);var q=h(4582);d.eighties=m(q);var L=h(7096);d.embers=m(L);var V=h(9887);d.flat=m(V);var F=h(7199);d.google=m(F);var re=h(1985);d.grayscale=m(re);var ae=h(8093);d.greenscreen=m(ae);var K=h(1615);d.harmonic=m(K);var B=h(9063);d.hopscotch=m(B);var Y=h(9033);d.isotope=m(Y);var fe=h(4112);d.marrakesh=m(fe);var ie=h(9600);d.mocha=m(ie);var N=h(1240);d.monokai=m(N);var I=h(9768);d.ocean=m(I);var U=h(8293);d.paraiso=m(U);var P=h(3093);d.pop=m(P);var G=h(1951);d.railscasts=m(G);var ee=h(6368);d.shapeshifter=m(ee);var ue=h(2317);d.solarized=m(ue);var ve=h(1091);d.summerfruit=m(ve);var Ee=h(6943);d.tomorrow=m(Ee);var Oe=h(5670);d.tube=m(Oe);var de=h(2536);d.twilight=m(de)},9033:(f,d)=>{d.__esModule=!0,d.default={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},f.exports=d.default},4112:(f,d)=>{d.__esModule=!0,d.default={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},f.exports=d.default},9600:(f,d)=>{d.__esModule=!0,d.default={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},f.exports=d.default},1240:(f,d)=>{d.__esModule=!0,d.default={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},f.exports=d.default},9768:(f,d)=>{d.__esModule=!0,d.default={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},f.exports=d.default},8293:(f,d)=>{d.__esModule=!0,d.default={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},f.exports=d.default},3093:(f,d)=>{d.__esModule=!0,d.default={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},f.exports=d.default},1951:(f,d)=>{d.__esModule=!0,d.default={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},f.exports=d.default},6368:(f,d)=>{d.__esModule=!0,d.default={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},f.exports=d.default},2317:(f,d)=>{d.__esModule=!0,d.default={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},f.exports=d.default},1091:(f,d)=>{d.__esModule=!0,d.default={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},f.exports=d.default},1308:(f,d)=>{d.__esModule=!0,d.default={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},f.exports=d.default},6943:(f,d)=>{d.__esModule=!0,d.default={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},f.exports=d.default},5670:(f,d)=>{d.__esModule=!0,d.default={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},f.exports=d.default},2536:(f,d)=>{d.__esModule=!0,d.default={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},f.exports=d.default},6481:(f,d,h)=>{var m=h(4176),g={};for(var v in m)m.hasOwnProperty(v)&&(g[m[v]]=v);var S=f.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var b in S)if(S.hasOwnProperty(b)){if(!("channels"in S[b]))throw new Error("missing channels property: "+b);if(!("labels"in S[b]))throw new Error("missing channel labels property: "+b);if(S[b].labels.length!==S[b].channels)throw new Error("channel and label counts mismatch: "+b);var _=S[b].channels,E=S[b].labels;delete S[b].channels,delete S[b].labels,Object.defineProperty(S[b],"channels",{value:_}),Object.defineProperty(S[b],"labels",{value:E})}function R(w,T){return Math.pow(w[0]-T[0],2)+Math.pow(w[1]-T[1],2)+Math.pow(w[2]-T[2],2)}S.rgb.hsl=function(w){var T,x,O=w[0]/255,C=w[1]/255,M=w[2]/255,D=Math.min(O,C,M),$=Math.max(O,C,M),q=$-D;return $===D?T=0:O===$?T=(C-M)/q:C===$?T=2+(M-O)/q:M===$&&(T=4+(O-C)/q),(T=Math.min(60*T,360))<0&&(T+=360),x=(D+$)/2,[T,100*($===D?0:x<=.5?q/($+D):q/(2-$-D)),100*x]},S.rgb.hsv=function(w){var T,x,O,C,M,D=w[0]/255,$=w[1]/255,q=w[2]/255,L=Math.max(D,$,q),V=L-Math.min(D,$,q),F=function(re){return(L-re)/6/V+.5};return V===0?C=M=0:(M=V/L,T=F(D),x=F($),O=F(q),D===L?C=O-x:$===L?C=.3333333333333333+T-O:q===L&&(C=.6666666666666666+x-T),C<0?C+=1:C>1&&(C-=1)),[360*C,100*M,100*L]},S.rgb.hwb=function(w){var T=w[0],x=w[1],O=w[2];return[S.rgb.hsl(w)[0],100*(.00392156862745098*Math.min(T,Math.min(x,O))),100*(O=1-.00392156862745098*Math.max(T,Math.max(x,O)))]},S.rgb.cmyk=function(w){var T,x=w[0]/255,O=w[1]/255,C=w[2]/255;return[100*((1-x-(T=Math.min(1-x,1-O,1-C)))/(1-T)||0),100*((1-O-T)/(1-T)||0),100*((1-C-T)/(1-T)||0),100*T]},S.rgb.keyword=function(w){var T=g[w];if(T)return T;var x,O=1/0;for(var C in m)if(m.hasOwnProperty(C)){var M=R(w,m[C]);M<O&&(O=M,x=C)}return x},S.keyword.rgb=function(w){return m[w]},S.rgb.xyz=function(w){var T=w[0]/255,x=w[1]/255,O=w[2]/255;return[100*(.4124*(T=T>.04045?Math.pow((T+.055)/1.055,2.4):T/12.92)+.3576*(x=x>.04045?Math.pow((x+.055)/1.055,2.4):x/12.92)+.1805*(O=O>.04045?Math.pow((O+.055)/1.055,2.4):O/12.92)),100*(.2126*T+.7152*x+.0722*O),100*(.0193*T+.1192*x+.9505*O)]},S.rgb.lab=function(w){var T=S.rgb.xyz(w),x=T[0],O=T[1],C=T[2];return O/=100,C/=108.883,x=(x/=95.047)>.008856?Math.pow(x,.3333333333333333):7.787*x+.13793103448275862,[116*(O=O>.008856?Math.pow(O,.3333333333333333):7.787*O+.13793103448275862)-16,500*(x-O),200*(O-(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862))]},S.hsl.rgb=function(w){var T,x,O,C,M,D=w[0]/360,$=w[1]/100,q=w[2]/100;if($===0)return[M=255*q,M,M];T=2*q-(x=q<.5?q*(1+$):q+$-q*$),C=[0,0,0];for(var L=0;L<3;L++)(O=D+.3333333333333333*-(L-1))<0&&O++,O>1&&O--,M=6*O<1?T+6*(x-T)*O:2*O<1?x:3*O<2?T+(x-T)*(.6666666666666666-O)*6:T,C[L]=255*M;return C},S.hsl.hsv=function(w){var T=w[0],x=w[1]/100,O=w[2]/100,C=x,M=Math.max(O,.01);return x*=(O*=2)<=1?O:2-O,C*=M<=1?M:2-M,[T,100*(O===0?2*C/(M+C):2*x/(O+x)),100*((O+x)/2)]},S.hsv.rgb=function(w){var T=w[0]/60,x=w[1]/100,O=w[2]/100,C=Math.floor(T)%6,M=T-Math.floor(T),D=255*O*(1-x),$=255*O*(1-x*M),q=255*O*(1-x*(1-M));switch(O*=255,C){case 0:return[O,q,D];case 1:return[$,O,D];case 2:return[D,O,q];case 3:return[D,$,O];case 4:return[q,D,O];case 5:return[O,D,$]}},S.hsv.hsl=function(w){var T,x,O,C=w[0],M=w[1]/100,D=w[2]/100,$=Math.max(D,.01);return O=(2-M)*D,x=M*$,[C,100*(x=(x/=(T=(2-M)*$)<=1?T:2-T)||0),100*(O/=2)]},S.hwb.rgb=function(w){var T,x,O,C,M,D,$,q=w[0]/360,L=w[1]/100,V=w[2]/100,F=L+V;switch(F>1&&(L/=F,V/=F),O=6*q-(T=Math.floor(6*q)),1&T&&(O=1-O),C=L+O*((x=1-V)-L),T){default:case 6:case 0:M=x,D=C,$=L;break;case 1:M=C,D=x,$=L;break;case 2:M=L,D=x,$=C;break;case 3:M=L,D=C,$=x;break;case 4:M=C,D=L,$=x;break;case 5:M=x,D=L,$=C}return[255*M,255*D,255*$]},S.cmyk.rgb=function(w){var T=w[0]/100,x=w[1]/100,O=w[2]/100,C=w[3]/100;return[255*(1-Math.min(1,T*(1-C)+C)),255*(1-Math.min(1,x*(1-C)+C)),255*(1-Math.min(1,O*(1-C)+C))]},S.xyz.rgb=function(w){var T,x,O,C=w[0]/100,M=w[1]/100,D=w[2]/100;return x=-.9689*C+1.8758*M+.0415*D,O=.0557*C+-.204*M+1.057*D,T=(T=3.2406*C+-1.5372*M+-.4986*D)>.0031308?1.055*Math.pow(T,.4166666666666667)-.055:12.92*T,x=x>.0031308?1.055*Math.pow(x,.4166666666666667)-.055:12.92*x,O=O>.0031308?1.055*Math.pow(O,.4166666666666667)-.055:12.92*O,[255*(T=Math.min(Math.max(0,T),1)),255*(x=Math.min(Math.max(0,x),1)),255*(O=Math.min(Math.max(0,O),1))]},S.xyz.lab=function(w){var T=w[0],x=w[1],O=w[2];return x/=100,O/=108.883,T=(T/=95.047)>.008856?Math.pow(T,.3333333333333333):7.787*T+.13793103448275862,[116*(x=x>.008856?Math.pow(x,.3333333333333333):7.787*x+.13793103448275862)-16,500*(T-x),200*(x-(O=O>.008856?Math.pow(O,.3333333333333333):7.787*O+.13793103448275862))]},S.lab.xyz=function(w){var T,x,O,C=w[0];T=w[1]/500+(x=(C+16)/116),O=x-w[2]/200;var M=Math.pow(x,3),D=Math.pow(T,3),$=Math.pow(O,3);return x=M>.008856?M:(x-.13793103448275862)/7.787,T=D>.008856?D:(T-.13793103448275862)/7.787,O=$>.008856?$:(O-.13793103448275862)/7.787,[T*=95.047,x*=100,O*=108.883]},S.lab.lch=function(w){var T,x=w[0],O=w[1],C=w[2];return(T=360*Math.atan2(C,O)/2/Math.PI)<0&&(T+=360),[x,Math.sqrt(O*O+C*C),T]},S.lch.lab=function(w){var T,x=w[0],O=w[1];return T=w[2]/360*2*Math.PI,[x,O*Math.cos(T),O*Math.sin(T)]},S.rgb.ansi16=function(w){var T=w[0],x=w[1],O=w[2],C=1 in arguments?arguments[1]:S.rgb.hsv(w)[2];if((C=Math.round(C/50))===0)return 30;var M=30+(Math.round(O/255)<<2|Math.round(x/255)<<1|Math.round(T/255));return C===2&&(M+=60),M},S.hsv.ansi16=function(w){return S.rgb.ansi16(S.hsv.rgb(w),w[2])},S.rgb.ansi256=function(w){var T=w[0],x=w[1],O=w[2];return T===x&&x===O?T<8?16:T>248?231:Math.round((T-8)/247*24)+232:16+36*Math.round(T/255*5)+6*Math.round(x/255*5)+Math.round(O/255*5)},S.ansi16.rgb=function(w){var T=w%10;if(T===0||T===7)return w>50&&(T+=3.5),[T=T/10.5*255,T,T];var x=.5*(1+~~(w>50));return[(1&T)*x*255,(T>>1&1)*x*255,(T>>2&1)*x*255]},S.ansi256.rgb=function(w){if(w>=232){var T=10*(w-232)+8;return[T,T,T]}var x;return w-=16,[Math.floor(w/36)/5*255,Math.floor((x=w%36)/6)/5*255,x%6/5*255]},S.rgb.hex=function(w){var T=(((255&Math.round(w[0]))<<16)+((255&Math.round(w[1]))<<8)+(255&Math.round(w[2]))).toString(16).toUpperCase();return"000000".substring(T.length)+T},S.hex.rgb=function(w){var T=w.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!T)return[0,0,0];var x=T[0];T[0].length===3&&(x=x.split("").map(function(C){return C+C}).join(""));var O=parseInt(x,16);return[O>>16&255,O>>8&255,255&O]},S.rgb.hcg=function(w){var T,x=w[0]/255,O=w[1]/255,C=w[2]/255,M=Math.max(Math.max(x,O),C),D=Math.min(Math.min(x,O),C),$=M-D;return T=$<=0?0:M===x?(O-C)/$%6:M===O?2+(C-x)/$:4+(x-O)/$+4,T/=6,[360*(T%=1),100*$,100*($<1?D/(1-$):0)]},S.hsl.hcg=function(w){var T=w[1]/100,x=w[2]/100,O=1,C=0;return(O=x<.5?2*T*x:2*T*(1-x))<1&&(C=(x-.5*O)/(1-O)),[w[0],100*O,100*C]},S.hsv.hcg=function(w){var T=w[1]/100,x=w[2]/100,O=T*x,C=0;return O<1&&(C=(x-O)/(1-O)),[w[0],100*O,100*C]},S.hcg.rgb=function(w){var T=w[0]/360,x=w[1]/100,O=w[2]/100;if(x===0)return[255*O,255*O,255*O];var C,M=[0,0,0],D=T%1*6,$=D%1,q=1-$;switch(Math.floor(D)){case 0:M[0]=1,M[1]=$,M[2]=0;break;case 1:M[0]=q,M[1]=1,M[2]=0;break;case 2:M[0]=0,M[1]=1,M[2]=$;break;case 3:M[0]=0,M[1]=q,M[2]=1;break;case 4:M[0]=$,M[1]=0,M[2]=1;break;default:M[0]=1,M[1]=0,M[2]=q}return C=(1-x)*O,[255*(x*M[0]+C),255*(x*M[1]+C),255*(x*M[2]+C)]},S.hcg.hsv=function(w){var T=w[1]/100,x=T+w[2]/100*(1-T),O=0;return x>0&&(O=T/x),[w[0],100*O,100*x]},S.hcg.hsl=function(w){var T=w[1]/100,x=w[2]/100*(1-T)+.5*T,O=0;return x>0&&x<.5?O=T/(2*x):x>=.5&&x<1&&(O=T/(2*(1-x))),[w[0],100*O,100*x]},S.hcg.hwb=function(w){var T=w[1]/100,x=T+w[2]/100*(1-T);return[w[0],100*(x-T),100*(1-x)]},S.hwb.hcg=function(w){var T=w[1]/100,x=1-w[2]/100,O=x-T,C=0;return O<1&&(C=(x-O)/(1-O)),[w[0],100*O,100*C]},S.apple.rgb=function(w){return[w[0]/65535*255,w[1]/65535*255,w[2]/65535*255]},S.rgb.apple=function(w){return[w[0]/255*65535,w[1]/255*65535,w[2]/255*65535]},S.gray.rgb=function(w){return[w[0]/100*255,w[0]/100*255,w[0]/100*255]},S.gray.hsl=S.gray.hsv=function(w){return[0,0,w[0]]},S.gray.hwb=function(w){return[0,100,w[0]]},S.gray.cmyk=function(w){return[0,0,0,w[0]]},S.gray.lab=function(w){return[w[0],0,0]},S.gray.hex=function(w){var T=255&Math.round(w[0]/100*255),x=((T<<16)+(T<<8)+T).toString(16).toUpperCase();return"000000".substring(x.length)+x},S.rgb.gray=function(w){return[(w[0]+w[1]+w[2])/3/255*100]}},4732:(f,d,h)=>{var m=h(6481),g=h(1157),v={};Object.keys(m).forEach(function(S){v[S]={},Object.defineProperty(v[S],"channels",{value:m[S].channels}),Object.defineProperty(v[S],"labels",{value:m[S].labels});var b=g(S);Object.keys(b).forEach(function(_){var E=b[_];v[S][_]=(function(R){var w=function(T){if(T==null)return T;arguments.length>1&&(T=Array.prototype.slice.call(arguments));var x=R(T);if(typeof x=="object")for(var O=x.length,C=0;C<O;C++)x[C]=Math.round(x[C]);return x};return"conversion"in R&&(w.conversion=R.conversion),w})(E),v[S][_].raw=(function(R){var w=function(T){return T==null?T:(arguments.length>1&&(T=Array.prototype.slice.call(arguments)),R(T))};return"conversion"in R&&(w.conversion=R.conversion),w})(E)})}),f.exports=v},1157:(f,d,h)=>{var m=h(6481);function g(b){var _=(function(){for(var M={},D=Object.keys(m),$=D.length,q=0;q<$;q++)M[D[q]]={distance:-1,parent:null};return M})(),E=[b];for(_[b].distance=0;E.length;)for(var R=E.pop(),w=Object.keys(m[R]),T=w.length,x=0;x<T;x++){var O=w[x],C=_[O];C.distance===-1&&(C.distance=_[R].distance+1,C.parent=R,E.unshift(O))}return _}function v(b,_){return function(E){return _(b(E))}}function S(b,_){for(var E=[_[b].parent,b],R=m[_[b].parent][b],w=_[b].parent;_[w].parent;)E.unshift(_[w].parent),R=v(m[_[w].parent][w],R),w=_[w].parent;return R.conversion=E,R}f.exports=function(b){for(var _=g(b),E={},R=Object.keys(_),w=R.length,T=0;T<w;T++){var x=R[T];_[x].parent!==null&&(E[x]=S(x,_))}return E}},4176:f=>{f.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},4877:f=>{f.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6138:(f,d,h)=>{var m=h(4877),g=h(3403),v=Object.hasOwnProperty,S=Object.create(null);for(var b in m)v.call(m,b)&&(S[m[b]]=b);var _=f.exports={to:{},get:{}};function E(w,T,x){return Math.min(Math.max(T,w),x)}function R(w){var T=Math.round(w).toString(16).toUpperCase();return T.length<2?"0"+T:T}_.get=function(w){var T,x;switch(w.substring(0,3).toLowerCase()){case"hsl":T=_.get.hsl(w),x="hsl";break;case"hwb":T=_.get.hwb(w),x="hwb";break;default:T=_.get.rgb(w),x="rgb"}return T?{model:x,value:T}:null},_.get.rgb=function(w){if(!w)return null;var T,x,O,C=[0,0,0,1];if(T=w.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(O=T[2],T=T[1],x=0;x<3;x++){var M=2*x;C[x]=parseInt(T.slice(M,M+2),16)}O&&(C[3]=parseInt(O,16)/255)}else if(T=w.match(/^#([a-f0-9]{3,4})$/i)){for(O=(T=T[1])[3],x=0;x<3;x++)C[x]=parseInt(T[x]+T[x],16);O&&(C[3]=parseInt(O+O,16)/255)}else if(T=w.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(x=0;x<3;x++)C[x]=parseInt(T[x+1],0);T[4]&&(T[5]?C[3]=.01*parseFloat(T[4]):C[3]=parseFloat(T[4]))}else{if(!(T=w.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(T=w.match(/^(\w+)$/))?T[1]==="transparent"?[0,0,0,0]:v.call(m,T[1])?((C=m[T[1]])[3]=1,C):null:null;for(x=0;x<3;x++)C[x]=Math.round(2.55*parseFloat(T[x+1]));T[4]&&(T[5]?C[3]=.01*parseFloat(T[4]):C[3]=parseFloat(T[4]))}for(x=0;x<3;x++)C[x]=E(C[x],0,255);return C[3]=E(C[3],0,1),C},_.get.hsl=function(w){if(!w)return null;var T=w.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(T){var x=parseFloat(T[4]);return[(parseFloat(T[1])%360+360)%360,E(parseFloat(T[2]),0,100),E(parseFloat(T[3]),0,100),E(isNaN(x)?1:x,0,1)]}return null},_.get.hwb=function(w){if(!w)return null;var T=w.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(T){var x=parseFloat(T[4]);return[(parseFloat(T[1])%360+360)%360,E(parseFloat(T[2]),0,100),E(parseFloat(T[3]),0,100),E(isNaN(x)?1:x,0,1)]}return null},_.to.hex=function(){var w=g(arguments);return"#"+R(w[0])+R(w[1])+R(w[2])+(w[3]<1?R(Math.round(255*w[3])):"")},_.to.rgb=function(){var w=g(arguments);return w.length<4||w[3]===1?"rgb("+Math.round(w[0])+", "+Math.round(w[1])+", "+Math.round(w[2])+")":"rgba("+Math.round(w[0])+", "+Math.round(w[1])+", "+Math.round(w[2])+", "+w[3]+")"},_.to.rgb.percent=function(){var w=g(arguments),T=Math.round(w[0]/255*100),x=Math.round(w[1]/255*100),O=Math.round(w[2]/255*100);return w.length<4||w[3]===1?"rgb("+T+"%, "+x+"%, "+O+"%)":"rgba("+T+"%, "+x+"%, "+O+"%, "+w[3]+")"},_.to.hsl=function(){var w=g(arguments);return w.length<4||w[3]===1?"hsl("+w[0]+", "+w[1]+"%, "+w[2]+"%)":"hsla("+w[0]+", "+w[1]+"%, "+w[2]+"%, "+w[3]+")"},_.to.hwb=function(){var w=g(arguments),T="";return w.length>=4&&w[3]!==1&&(T=", "+w[3]),"hwb("+w[0]+", "+w[1]+"%, "+w[2]+"%"+T+")"},_.to.keyword=function(w){return S[w.slice(0,3)]}},3639:(f,d,h)=>{var m=h(6138),g=h(4732),v=[].slice,S=["keyword","gray","hex"],b={};Object.keys(g).forEach(function(x){b[v.call(g[x].labels).sort().join("")]=x});var _={};function E(x,O){if(!(this instanceof E))return new E(x,O);if(O&&O in S&&(O=null),O&&!(O in g))throw new Error("Unknown model: "+O);var C,M;if(x==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(x instanceof E)this.model=x.model,this.color=x.color.slice(),this.valpha=x.valpha;else if(typeof x=="string"){var D=m.get(x);if(D===null)throw new Error("Unable to parse color from string: "+x);this.model=D.model,M=g[this.model].channels,this.color=D.value.slice(0,M),this.valpha=typeof D.value[M]=="number"?D.value[M]:1}else if(x.length){this.model=O||"rgb",M=g[this.model].channels;var $=v.call(x,0,M);this.color=T($,M),this.valpha=typeof x[M]=="number"?x[M]:1}else if(typeof x=="number")x&=16777215,this.model="rgb",this.color=[x>>16&255,x>>8&255,255&x],this.valpha=1;else{this.valpha=1;var q=Object.keys(x);"alpha"in x&&(q.splice(q.indexOf("alpha"),1),this.valpha=typeof x.alpha=="number"?x.alpha:0);var L=q.sort().join("");if(!(L in b))throw new Error("Unable to parse color from object: "+JSON.stringify(x));this.model=b[L];var V=g[this.model].labels,F=[];for(C=0;C<V.length;C++)F.push(x[V[C]]);this.color=T(F)}if(_[this.model])for(M=g[this.model].channels,C=0;C<M;C++){var re=_[this.model][C];re&&(this.color[C]=re(this.color[C]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function R(x,O,C){return(x=Array.isArray(x)?x:[x]).forEach(function(M){(_[M]||(_[M]=[]))[O]=C}),x=x[0],function(M){var D;return arguments.length?(C&&(M=C(M)),(D=this[x]()).color[O]=M,D):(D=this[x]().color[O],C&&(D=C(D)),D)}}function w(x){return function(O){return Math.max(0,Math.min(x,O))}}function T(x,O){for(var C=0;C<O;C++)typeof x[C]!="number"&&(x[C]=0);return x}E.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(x){var O=this.model in m.to?this:this.rgb(),C=(O=O.round(typeof x=="number"?x:1)).valpha===1?O.color:O.color.concat(this.valpha);return m.to[O.model](C)},percentString:function(x){var O=this.rgb().round(typeof x=="number"?x:1),C=O.valpha===1?O.color:O.color.concat(this.valpha);return m.to.rgb.percent(C)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var x={},O=g[this.model].channels,C=g[this.model].labels,M=0;M<O;M++)x[C[M]]=this.color[M];return this.valpha!==1&&(x.alpha=this.valpha),x},unitArray:function(){var x=this.rgb().color;return x[0]/=255,x[1]/=255,x[2]/=255,this.valpha!==1&&x.push(this.valpha),x},unitObject:function(){var x=this.rgb().object();return x.r/=255,x.g/=255,x.b/=255,this.valpha!==1&&(x.alpha=this.valpha),x},round:function(x){return x=Math.max(x||0,0),new E(this.color.map((function(O){return function(C){return(function(M,D){return Number(M.toFixed(D))})(C,O)}})(x)).concat(this.valpha),this.model)},alpha:function(x){return arguments.length?new E(this.color.concat(Math.max(0,Math.min(1,x))),this.model):this.valpha},red:R("rgb",0,w(255)),green:R("rgb",1,w(255)),blue:R("rgb",2,w(255)),hue:R(["hsl","hsv","hsl","hwb","hcg"],0,function(x){return(x%360+360)%360}),saturationl:R("hsl",1,w(100)),lightness:R("hsl",2,w(100)),saturationv:R("hsv",1,w(100)),value:R("hsv",2,w(100)),chroma:R("hcg",1,w(100)),gray:R("hcg",2,w(100)),white:R("hwb",1,w(100)),wblack:R("hwb",2,w(100)),cyan:R("cmyk",0,w(100)),magenta:R("cmyk",1,w(100)),yellow:R("cmyk",2,w(100)),black:R("cmyk",3,w(100)),x:R("xyz",0,w(100)),y:R("xyz",1,w(100)),z:R("xyz",2,w(100)),l:R("lab",0,w(100)),a:R("lab",1),b:R("lab",2),keyword:function(x){return arguments.length?new E(x):g[this.model].keyword(this.color)},hex:function(x){return arguments.length?new E(x):m.to.hex(this.rgb().round().color)},rgbNumber:function(){var x=this.rgb().color;return(255&x[0])<<16|(255&x[1])<<8|255&x[2]},luminosity:function(){for(var x=this.rgb().color,O=[],C=0;C<x.length;C++){var M=x[C]/255;O[C]=M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4)}return .2126*O[0]+.7152*O[1]+.0722*O[2]},contrast:function(x){var O=this.luminosity(),C=x.luminosity();return O>C?(O+.05)/(C+.05):(C+.05)/(O+.05)},level:function(x){var O=this.contrast(x);return O>=7.1?"AAA":O>=4.5?"AA":""},isDark:function(){var x=this.rgb().color;return(299*x[0]+587*x[1]+114*x[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var x=this.rgb(),O=0;O<3;O++)x.color[O]=255-x.color[O];return x},lighten:function(x){var O=this.hsl();return O.color[2]+=O.color[2]*x,O},darken:function(x){var O=this.hsl();return O.color[2]-=O.color[2]*x,O},saturate:function(x){var O=this.hsl();return O.color[1]+=O.color[1]*x,O},desaturate:function(x){var O=this.hsl();return O.color[1]-=O.color[1]*x,O},whiten:function(x){var O=this.hwb();return O.color[1]+=O.color[1]*x,O},blacken:function(x){var O=this.hwb();return O.color[2]+=O.color[2]*x,O},grayscale:function(){var x=this.rgb().color,O=.3*x[0]+.59*x[1]+.11*x[2];return E.rgb(O,O,O)},fade:function(x){return this.alpha(this.valpha-this.valpha*x)},opaquer:function(x){return this.alpha(this.valpha+this.valpha*x)},rotate:function(x){var O=this.hsl(),C=O.color[0];return C=(C=(C+x)%360)<0?360+C:C,O.color[0]=C,O},mix:function(x,O){if(!x||!x.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof x);var C=x.rgb(),M=this.rgb(),D=O===void 0?.5:O,$=2*D-1,q=C.alpha()-M.alpha(),L=(($*q===-1?$:($+q)/(1+$*q))+1)/2,V=1-L;return E.rgb(L*C.red()+V*M.red(),L*C.green()+V*M.green(),L*C.blue()+V*M.blue(),C.alpha()*D+M.alpha()*(1-D))}},Object.keys(g).forEach(function(x){if(S.indexOf(x)===-1){var O=g[x].channels;E.prototype[x]=function(){if(this.model===x)return new E(this);if(arguments.length)return new E(arguments,x);var C,M=typeof arguments[O]=="number"?O:this.valpha;return new E((C=g[this.model][x].raw(this.color),Array.isArray(C)?C:[C]).concat(M),x)},E[x]=function(C){return typeof C=="number"&&(C=T(v.call(arguments),O)),new E(C,x)}}}),f.exports=E},9784:f=>{var d,h=typeof Reflect=="object"?Reflect:null,m=h&&typeof h.apply=="function"?h.apply:function(M,D,$){return Function.prototype.apply.call(M,D,$)};d=h&&typeof h.ownKeys=="function"?h.ownKeys:Object.getOwnPropertySymbols?function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:function(M){return Object.getOwnPropertyNames(M)};var g=Number.isNaN||function(M){return M!=M};function v(){v.init.call(this)}f.exports=v,f.exports.once=function(M,D){return new Promise(function($,q){function L(F){M.removeListener(D,V),q(F)}function V(){typeof M.removeListener=="function"&&M.removeListener("error",L),$([].slice.call(arguments))}C(M,D,V,{once:!0}),D!=="error"&&(function(F,re,ae){typeof F.on=="function"&&C(F,"error",re,ae)})(M,L,{once:!0})})},v.EventEmitter=v,v.prototype._events=void 0,v.prototype._eventsCount=0,v.prototype._maxListeners=void 0;var S=10;function b(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}function _(M){return M._maxListeners===void 0?v.defaultMaxListeners:M._maxListeners}function E(M,D,$,q){var L,V,F,re;if(b($),(V=M._events)===void 0?(V=M._events=Object.create(null),M._eventsCount=0):(V.newListener!==void 0&&(M.emit("newListener",D,$.listener?$.listener:$),V=M._events),F=V[D]),F===void 0)F=V[D]=$,++M._eventsCount;else if(typeof F=="function"?F=V[D]=q?[$,F]:[F,$]:q?F.unshift($):F.push($),(L=_(M))>0&&F.length>L&&!F.warned){F.warned=!0;var ae=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");ae.name="MaxListenersExceededWarning",ae.emitter=M,ae.type=D,ae.count=F.length,re=ae,console&&console.warn&&console.warn(re)}return M}function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(M,D,$){var q={fired:!1,wrapFn:void 0,target:M,type:D,listener:$},L=R.bind(q);return L.listener=$,q.wrapFn=L,L}function T(M,D,$){var q=M._events;if(q===void 0)return[];var L=q[D];return L===void 0?[]:typeof L=="function"?$?[L.listener||L]:[L]:$?(function(V){for(var F=new Array(V.length),re=0;re<F.length;++re)F[re]=V[re].listener||V[re];return F})(L):O(L,L.length)}function x(M){var D=this._events;if(D!==void 0){var $=D[M];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}function O(M,D){for(var $=new Array(D),q=0;q<D;++q)$[q]=M[q];return $}function C(M,D,$,q){if(typeof M.on=="function")q.once?M.once(D,$):M.on(D,$);else{if(typeof M.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M);M.addEventListener(D,function L(V){q.once&&M.removeEventListener(D,L),$(V)})}}Object.defineProperty(v,"defaultMaxListeners",{enumerable:!0,get:function(){return S},set:function(M){if(typeof M!="number"||M<0||g(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");S=M}}),v.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},v.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||g(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this},v.prototype.getMaxListeners=function(){return _(this)},v.prototype.emit=function(M){for(var D=[],$=1;$<arguments.length;$++)D.push(arguments[$]);var q=M==="error",L=this._events;if(L!==void 0)q=q&&L.error===void 0;else if(!q)return!1;if(q){var V;if(D.length>0&&(V=D[0]),V instanceof Error)throw V;var F=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw F.context=V,F}var re=L[M];if(re===void 0)return!1;if(typeof re=="function")m(re,this,D);else{var ae=re.length,K=O(re,ae);for($=0;$<ae;++$)m(K[$],this,D)}return!0},v.prototype.addListener=function(M,D){return E(this,M,D,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(M,D){return E(this,M,D,!0)},v.prototype.once=function(M,D){return b(D),this.on(M,w(this,M,D)),this},v.prototype.prependOnceListener=function(M,D){return b(D),this.prependListener(M,w(this,M,D)),this},v.prototype.removeListener=function(M,D){var $,q,L,V,F;if(b(D),(q=this._events)===void 0)return this;if(($=q[M])===void 0)return this;if($===D||$.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete q[M],q.removeListener&&this.emit("removeListener",M,$.listener||D));else if(typeof $!="function"){for(L=-1,V=$.length-1;V>=0;V--)if($[V]===D||$[V].listener===D){F=$[V].listener,L=V;break}if(L<0)return this;L===0?$.shift():(function(re,ae){for(;ae+1<re.length;ae++)re[ae]=re[ae+1];re.pop()})($,L),$.length===1&&(q[M]=$[0]),q.removeListener!==void 0&&this.emit("removeListener",M,F||D)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(M){var D,$,q;if(($=this._events)===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[M]),this;if(arguments.length===0){var L,V=Object.keys($);for(q=0;q<V.length;++q)(L=V[q])!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(D=$[M])=="function")this.removeListener(M,D);else if(D!==void 0)for(q=D.length-1;q>=0;q--)this.removeListener(M,D[q]);return this},v.prototype.listeners=function(M){return T(this,M,!0)},v.prototype.rawListeners=function(M){return T(this,M,!1)},v.listenerCount=function(M,D){return typeof M.listenerCount=="function"?M.listenerCount(D):x.call(M,D)},v.prototype.listenerCount=x,v.prototype.eventNames=function(){return this._eventsCount>0?d(this._events):[]}},2094:f=>{f.exports=function(d){return!(!d||typeof d=="string")&&(d instanceof Array||Array.isArray(d)||d.length>=0&&(d.splice instanceof Function||Object.getOwnPropertyDescriptor(d,d.length-1)&&d.constructor.name!=="String"))}},3989:f=>{var d="__lodash_placeholder__",h=32,m=1/0,g=NaN,v=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",h],["partialRight",64],["rearg",256]],S="[object Function]",b="[object GeneratorFunction]",_=/^\s+|\s+$/g,E=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,R=/\{\n\/\* \[wrapped with (.+)\] \*/,w=/,? & /,T=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,O=/^\[object .+?Constructor\]$/,C=/^0o[0-7]+$/i,M=/^(?:0|[1-9]\d*)$/,D=parseInt,$=typeof f1=="object"&&f1&&f1.Object===Object&&f1,q=typeof self=="object"&&self&&self.Object===Object&&self,L=$||q||Function("return this")();function V(Ae,xe,Ne){switch(Ne.length){case 0:return Ae.call(xe);case 1:return Ae.call(xe,Ne[0]);case 2:return Ae.call(xe,Ne[0],Ne[1]);case 3:return Ae.call(xe,Ne[0],Ne[1],Ne[2])}return Ae.apply(xe,Ne)}function F(Ae,xe){return!!(Ae&&Ae.length)&&(function(Ne,Ke,vt){if(Ke!=Ke)return(function(wt,Ht,Rt,Qt){for(var _n=wt.length,Gt=Rt+-1;++Gt<_n;)if(Ht(wt[Gt],Gt,wt))return Gt;return-1})(Ne,re,vt);for(var Xt=vt-1,Vt=Ne.length;++Xt<Vt;)if(Ne[Xt]===Ke)return Xt;return-1})(Ae,xe,0)>-1}function re(Ae){return Ae!=Ae}function ae(Ae,xe){for(var Ne=-1,Ke=Ae.length,vt=0,Xt=[];++Ne<Ke;){var Vt=Ae[Ne];Vt!==xe&&Vt!==d||(Ae[Ne]=d,Xt[vt++]=Ne)}return Xt}var K,B,Y,fe=Function.prototype,ie=Object.prototype,N=L["__core-js_shared__"],I=(K=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",U=fe.toString,P=ie.hasOwnProperty,G=ie.toString,ee=RegExp("^"+U.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ue=Object.create,ve=Math.max,Ee=Math.min,Oe=(B=Pe(Object,"defineProperty"),(Y=Pe.name)&&Y.length>2?B:void 0);function de(Ae){if(!Ue(Ae)||(function(Ne){return!!I&&I in Ne})(Ae))return!1;var xe=(function(Ne){var Ke=Ue(Ne)?G.call(Ne):"";return Ke==S||Ke==b})(Ae)||(function(Ne){var Ke=!1;if(Ne!=null&&typeof Ne.toString!="function")try{Ke=!!(Ne+"")}catch{}return Ke})(Ae)?ee:O;return xe.test((function(Ne){if(Ne!=null){try{return U.call(Ne)}catch{}try{return Ne+""}catch{}}return""})(Ae))}function te(Ae){return function(){var xe=arguments;switch(xe.length){case 0:return new Ae;case 1:return new Ae(xe[0]);case 2:return new Ae(xe[0],xe[1]);case 3:return new Ae(xe[0],xe[1],xe[2]);case 4:return new Ae(xe[0],xe[1],xe[2],xe[3]);case 5:return new Ae(xe[0],xe[1],xe[2],xe[3],xe[4]);case 6:return new Ae(xe[0],xe[1],xe[2],xe[3],xe[4],xe[5]);case 7:return new Ae(xe[0],xe[1],xe[2],xe[3],xe[4],xe[5],xe[6])}var Ne,Ke=Ue(Ne=Ae.prototype)?ue(Ne):{},vt=Ae.apply(Ke,xe);return Ue(vt)?vt:Ke}}function Se(Ae,xe,Ne,Ke,vt,Xt,Vt,wt,Ht,Rt){var Qt=128&xe,_n=1&xe,Gt=2&xe,Tn=24&xe,En=512&xe,Pn=Gt?void 0:te(Ae);return function Dt(){for(var xn=arguments.length,Kt=Array(xn),sr=xn;sr--;)Kt[sr]=arguments[sr];if(Tn)var Sr=Te(Dt),qr=(function(on,Cn){for(var Ft=on.length,Vr=0;Ft--;)on[Ft]===Cn&&Vr++;return Vr})(Kt,Sr);if(Ke&&(Kt=(function(on,Cn,Ft,Vr){for(var Pr=-1,$a=on.length,tr=Ft.length,$t=-1,sn=Cn.length,Ir=ve($a-tr,0),Ua=Array(sn+Ir),ts=!Vr;++$t<sn;)Ua[$t]=Cn[$t];for(;++Pr<tr;)(ts||Pr<$a)&&(Ua[Ft[Pr]]=on[Pr]);for(;Ir--;)Ua[$t++]=on[Pr++];return Ua})(Kt,Ke,vt,Tn)),Xt&&(Kt=(function(on,Cn,Ft,Vr){for(var Pr=-1,$a=on.length,tr=-1,$t=Ft.length,sn=-1,Ir=Cn.length,Ua=ve($a-$t,0),ts=Array(Ua+Ir),gf=!Vr;++Pr<Ua;)ts[Pr]=on[Pr];for(var gl=Pr;++sn<Ir;)ts[gl+sn]=Cn[sn];for(;++tr<$t;)(gf||Pr<$a)&&(ts[gl+Ft[tr]]=on[Pr++]);return ts})(Kt,Xt,Vt,Tn)),xn-=qr,Tn&&xn<Rt){var ft=ae(Kt,Sr);return we(Ae,xe,Se,Dt.placeholder,Ne,Kt,ft,wt,Ht,Rt-xn)}var tn=_n?Ne:this,Fn=Gt?tn[Ae]:Ae;return xn=Kt.length,wt?Kt=(function(on,Cn){for(var Ft=on.length,Vr=Ee(Cn.length,Ft),Pr=(function(tr,$t){var sn=-1,Ir=tr.length;for($t||($t=Array(Ir));++sn<Ir;)$t[sn]=tr[sn];return $t})(on);Vr--;){var $a=Cn[Vr];on[Vr]=Be($a,Ft)?Pr[$a]:void 0}return on})(Kt,wt):En&&xn>1&&Kt.reverse(),Qt&&Ht<xn&&(Kt.length=Ht),this&&this!==L&&this instanceof Dt&&(Fn=Pn||te(Fn)),Fn.apply(tn,Kt)}}function we(Ae,xe,Ne,Ke,vt,Xt,Vt,wt,Ht,Rt){var Qt=8&xe;xe|=Qt?h:64,4&(xe&=~(Qt?64:h))||(xe&=-4);var _n=Ne(Ae,xe,vt,Qt?Xt:void 0,Qt?Vt:void 0,Qt?void 0:Xt,Qt?void 0:Vt,wt,Ht,Rt);return _n.placeholder=Ke,Fe(_n,Ae,xe)}function $e(Ae,xe,Ne,Ke,vt,Xt,Vt,wt){var Ht=2&xe;if(!Ht&&typeof Ae!="function")throw new TypeError("Expected a function");var Rt=Ke?Ke.length:0;if(Rt||(xe&=-97,Ke=vt=void 0),Vt=Vt===void 0?Vt:ve(Mt(Vt),0),wt=wt===void 0?wt:Mt(wt),Rt-=vt?vt.length:0,64&xe){var Qt=Ke,_n=vt;Ke=vt=void 0}var Gt=[Ae,xe,Ne,Ke,vt,Qt,_n,Xt,Vt,wt];if(Ae=Gt[0],xe=Gt[1],Ne=Gt[2],Ke=Gt[3],vt=Gt[4],!(wt=Gt[9]=Gt[9]==null?Ht?0:Ae.length:ve(Gt[9]-Rt,0))&&24&xe&&(xe&=-25),xe&&xe!=1)Tn=xe==8||xe==16?(function(En,Pn,Dt){var xn=te(En);return function Kt(){for(var sr=arguments.length,Sr=Array(sr),qr=sr,ft=Te(Kt);qr--;)Sr[qr]=arguments[qr];var tn=sr<3&&Sr[0]!==ft&&Sr[sr-1]!==ft?[]:ae(Sr,ft);return(sr-=tn.length)<Dt?we(En,Pn,Se,Kt.placeholder,void 0,Sr,tn,void 0,void 0,Dt-sr):V(this&&this!==L&&this instanceof Kt?xn:En,this,Sr)}})(Ae,xe,wt):xe!=h&&xe!=33||vt.length?Se.apply(void 0,Gt):(function(En,Pn,Dt,xn){var Kt=1&Pn,sr=te(En);return function Sr(){for(var qr=-1,ft=arguments.length,tn=-1,Fn=xn.length,on=Array(Fn+ft),Cn=this&&this!==L&&this instanceof Sr?sr:En;++tn<Fn;)on[tn]=xn[tn];for(;ft--;)on[tn++]=arguments[++qr];return V(Cn,Kt?Dt:this,on)}})(Ae,xe,Ne,Ke);else var Tn=(function(En,Pn,Dt){var xn=1&Pn,Kt=te(En);return function sr(){return(this&&this!==L&&this instanceof sr?Kt:En).apply(xn?Dt:this,arguments)}})(Ae,xe,Ne);return Fe(Tn,Ae,xe)}function Te(Ae){return Ae.placeholder}function Pe(Ae,xe){var Ne=(function(Ke,vt){return Ke?.[vt]})(Ae,xe);return de(Ne)?Ne:void 0}function Ge(Ae){var xe=Ae.match(R);return xe?xe[1].split(w):[]}function Ce(Ae,xe){var Ne=xe.length,Ke=Ne-1;return xe[Ke]=(Ne>1?"& ":"")+xe[Ke],xe=xe.join(Ne>2?", ":" "),Ae.replace(E,`{
128
+ /* [wrapped with `+xe+`] */
129
+ `)}function Be(Ae,xe){return!!(xe=xe??9007199254740991)&&(typeof Ae=="number"||M.test(Ae))&&Ae>-1&&Ae%1==0&&Ae<xe}var Fe=Oe?function(Ae,xe,Ne){var Ke,vt=xe+"";return Oe(Ae,"toString",{configurable:!0,enumerable:!1,value:(Ke=Ce(vt,Je(Ge(vt),Ne)),function(){return Ke})})}:function(Ae){return Ae};function Je(Ae,xe){return(function(Ne,Ke){for(var vt=-1,Xt=Ne?Ne.length:0;++vt<Xt&&Ke(Ne[vt],vt,Ne)!==!1;);})(v,function(Ne){var Ke="_."+Ne[0];xe&Ne[1]&&!F(Ae,Ke)&&Ae.push(Ke)}),Ae.sort()}function ke(Ae,xe,Ne){var Ke=$e(Ae,8,void 0,void 0,void 0,void 0,void 0,xe=Ne?void 0:xe);return Ke.placeholder=ke.placeholder,Ke}function Ue(Ae){var xe=typeof Ae;return!!Ae&&(xe=="object"||xe=="function")}function Xe(Ae){return Ae?(Ae=(function(xe){if(typeof xe=="number")return xe;if((function(vt){return typeof vt=="symbol"||(function(Xt){return!!Xt&&typeof Xt=="object"})(vt)&&G.call(vt)=="[object Symbol]"})(xe))return g;if(Ue(xe)){var Ne=typeof xe.valueOf=="function"?xe.valueOf():xe;xe=Ue(Ne)?Ne+"":Ne}if(typeof xe!="string")return xe===0?xe:+xe;xe=xe.replace(_,"");var Ke=x.test(xe);return Ke||C.test(xe)?D(xe.slice(2),Ke?2:8):T.test(xe)?g:+xe})(Ae))===m||Ae===-1/0?17976931348623157e292*(Ae<0?-1:1):Ae==Ae?Ae:0:Ae===0?Ae:0}function Mt(Ae){var xe=Xe(Ae),Ne=xe%1;return xe==xe?Ne?xe-Ne:xe:0}ke.placeholder={},f.exports=ke},3403:(f,d,h)=>{var m=h(2094),g=Array.prototype.concat,v=Array.prototype.slice,S=f.exports=function(b){for(var _=[],E=0,R=b.length;E<R;E++){var w=b[E];m(w)?_=g.call(_,v.call(w)):_.push(w)}return _};S.wrap=function(b){return function(){return b(S(arguments))}}},4119:f=>{f.exports=r}},s={};function l(f){var d=s[f];if(d!==void 0)return d.exports;var h=s[f]={exports:{}};return i[f](h,h.exports,l),h.exports}l.n=f=>{var d=f&&f.__esModule?()=>f.default:()=>f;return l.d(d,{a:d}),d},l.d=(f,d)=>{for(var h in d)l.o(d,h)&&!l.o(f,h)&&Object.defineProperty(f,h,{enumerable:!0,get:d[h]})},l.o=(f,d)=>Object.prototype.hasOwnProperty.call(f,d),l.r=f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})};var c={};return(()=>{function f(ne){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},f(ne)}function d(ne){var Z=(function(X,W){if(f(X)!="object"||!X)return X;var ge=X[Symbol.toPrimitive];if(ge!==void 0){var Re=ge.call(X,W);if(f(Re)!="object")return Re;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(X)})(ne,"string");return f(Z)=="symbol"?Z:Z+""}function h(ne,Z,X){return(Z=d(Z))in ne?Object.defineProperty(ne,Z,{value:X,enumerable:!0,configurable:!0,writable:!0}):ne[Z]=X,ne}function m(ne,Z){var X=Object.keys(ne);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(ne);Z&&(W=W.filter(function(ge){return Object.getOwnPropertyDescriptor(ne,ge).enumerable})),X.push.apply(X,W)}return X}function g(ne){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z]!=null?arguments[Z]:{};Z%2?m(Object(X),!0).forEach(function(W){h(ne,W,X[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(X)):m(Object(X)).forEach(function(W){Object.defineProperty(ne,W,Object.getOwnPropertyDescriptor(X,W))})}return ne}function v(ne,Z){if(!(ne instanceof Z))throw new TypeError("Cannot call a class as a function")}function S(ne,Z){for(var X=0;X<Z.length;X++){var W=Z[X];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(ne,d(W.key),W)}}function b(ne,Z,X){return Z&&S(ne.prototype,Z),X&&S(ne,X),Object.defineProperty(ne,"prototype",{writable:!1}),ne}function _(ne){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},_(ne)}function E(){try{var ne=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E=function(){return!!ne})()}function R(ne,Z){if(Z&&(f(Z)=="object"||typeof Z=="function"))return Z;if(Z!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(X){if(X===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return X})(ne)}function w(ne,Z,X){return Z=_(Z),R(ne,E()?Reflect.construct(Z,X||[],_(ne).constructor):Z.apply(ne,X))}function T(ne,Z){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,W){return X.__proto__=W,X},T(ne,Z)}function x(ne,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Super expression must either be null or a function");ne.prototype=Object.create(Z&&Z.prototype,{constructor:{value:ne,writable:!0,configurable:!0}}),Object.defineProperty(ne,"prototype",{writable:!1}),Z&&T(ne,Z)}l.r(c),l.d(c,{default:()=>bf});var O=l(4119),C=l.n(O);function M(){var ne=this.constructor.getDerivedStateFromProps(this.props,this.state);ne!=null&&this.setState(ne)}function D(ne){this.setState((function(Z){var X=this.constructor.getDerivedStateFromProps(ne,Z);return X??null}).bind(this))}function $(ne,Z){try{var X=this.props,W=this.state;this.props=ne,this.state=Z,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(X,W)}finally{this.props=X,this.state=W}}function q(ne){var Z=ne.prototype;if(!Z||!Z.isReactComponent)throw new Error("Can only polyfill class components");if(typeof ne.getDerivedStateFromProps!="function"&&typeof Z.getSnapshotBeforeUpdate!="function")return ne;var X=null,W=null,ge=null;if(typeof Z.componentWillMount=="function"?X="componentWillMount":typeof Z.UNSAFE_componentWillMount=="function"&&(X="UNSAFE_componentWillMount"),typeof Z.componentWillReceiveProps=="function"?W="componentWillReceiveProps":typeof Z.UNSAFE_componentWillReceiveProps=="function"&&(W="UNSAFE_componentWillReceiveProps"),typeof Z.componentWillUpdate=="function"?ge="componentWillUpdate":typeof Z.UNSAFE_componentWillUpdate=="function"&&(ge="UNSAFE_componentWillUpdate"),X!==null||W!==null||ge!==null){var Re=ne.displayName||ne.name,_e=typeof ne.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
130
+
131
+ `+Re+" uses "+_e+" but also contains the following legacy lifecycles:"+(X!==null?`
132
+ `+X:"")+(W!==null?`
133
+ `+W:"")+(ge!==null?`
134
+ `+ge:"")+`
135
+
136
+ The above lifecycles should be removed. Learn more about this warning here:
137
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof ne.getDerivedStateFromProps=="function"&&(Z.componentWillMount=M,Z.componentWillReceiveProps=D),typeof Z.getSnapshotBeforeUpdate=="function"){if(typeof Z.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");Z.componentWillUpdate=$;var ye=Z.componentDidUpdate;Z.componentDidUpdate=function(Me,Ie,Ye){var He=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Ye;ye.call(this,Me,Ie,He)}}return ne}function L(ne,Z){if(ne==null)return{};var X={};for(var W in ne)if({}.hasOwnProperty.call(ne,W)){if(Z.indexOf(W)!==-1)continue;X[W]=ne[W]}return X}function V(ne,Z){if(ne==null)return{};var X,W,ge=L(ne,Z);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(ne);for(W=0;W<Re.length;W++)X=Re[W],Z.indexOf(X)===-1&&{}.propertyIsEnumerable.call(ne,X)&&(ge[X]=ne[X])}return ge}function F(ne,Z){if(Z&&ne?.constructor===Z)return"bigNumber";var X=(function(W){return{}.toString.call(W).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(ne);return X==="number"&&(X=isNaN(ne)?"nan":(0|ne)!=ne?"float":"integer"),X}function re(ne){return ne.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}M.__suppressDeprecationWarning=!0,D.__suppressDeprecationWarning=!0,$.__suppressDeprecationWarning=!0;var ae={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},K={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"};const B={globalFontFamily:"monospace",globalCursor:"default",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px",commaColor:"#666",commaFontSize:"12px",commaMarginRight:"4px"};function Y(ne,Z){(Z==null||Z>ne.length)&&(Z=ne.length);for(var X=0,W=Array(Z);X<Z;X++)W[X]=ne[X];return W}function fe(ne,Z){if(ne){if(typeof ne=="string")return Y(ne,Z);var X={}.toString.call(ne).slice(8,-1);return X==="Object"&&ne.constructor&&(X=ne.constructor.name),X==="Map"||X==="Set"?Array.from(ne):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?Y(ne,Z):void 0}}function ie(ne,Z){return(function(X){if(Array.isArray(X))return X})(ne)||(function(X,W){var ge=X==null?null:typeof Symbol<"u"&&X[Symbol.iterator]||X["@@iterator"];if(ge!=null){var Re,_e,ye,Me,Ie=[],Ye=!0,He=!1;try{if(ye=(ge=ge.call(X)).next,W===0){if(Object(ge)!==ge)return;Ye=!1}else for(;!(Ye=(Re=ye.call(ge)).done)&&(Ie.push(Re.value),Ie.length!==W);Ye=!0);}catch(lt){He=!0,_e=lt}finally{try{if(!Ye&&ge.return!=null&&(Me=ge.return(),Object(Me)!==Me))return}finally{if(He)throw _e}}return Ie}})(ne,Z)||fe(ne,Z)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
138
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var N=l(9446),I=l(3639),U=l.n(I),P=l(3989),G=l.n(P);function ee(ne,Z){var X=Object.keys(ne);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(ne);Z&&(W=W.filter(function(ge){return Object.getOwnPropertyDescriptor(ne,ge).enumerable})),X.push.apply(X,W)}return X}function ue(ne){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z]!=null?arguments[Z]:{};Z%2?ee(Object(X),!0).forEach(function(W){h(ne,W,X[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(X)):ee(Object(X)).forEach(function(W){Object.defineProperty(ne,W,Object.getOwnPropertyDescriptor(X,W))})}return ne}var ve=N.default,Ee=Object.keys(ve),Oe=function(ne){var Z,X=(function(Me){var Ie=Me[0]/255,Ye=Me[1]/255,He=Me[2]/255;return[.299*Ie+.587*Ye+.114*He,-.14713*Ie+-.28886*Ye+.436*He,.615*Ie+-.51499*Ye+-.10001*He]})(U()(ne).array()),W=ie(X,3),ge=W[0],Re=W[1],_e=W[2],ye=(function(Me){var Ie,Ye,He,lt=Me[0],We=Me[1],Bt=Me[2];return Ie=1*lt+0*We+1.13983*Bt,Ye=1*lt+-.39465*We+-.5806*Bt,He=1*lt+2.02311*We+0*Bt,[255*(Ie=Math.min(Math.max(0,Ie),1)),255*(Ye=Math.min(Math.max(0,Ye),1)),255*(He=Math.min(Math.max(0,He),1))]})([(Z=ge,Z<.25?1:Z<.5?.9-Z:1.1-Z),Re,_e]);return U().rgb(ye).hex()},de=function(ne){return function(Z){return{className:[Z.className,ne.className].filter(Boolean).join(" "),style:ue(ue({},Z.style||{}),ne.style||{})}}},te=function(ne,Z){var X=Object.keys(Z);for(var W in ne)X.indexOf(W)===-1&&X.push(W);return X.reduce(function(ge,Re){return ge[Re]=(function(_e,ye){if(_e===void 0)return ye;if(ye===void 0)return _e;var Me=f(_e),Ie=f(ye);switch(Me){case"string":switch(Ie){case"string":return[ye,_e].filter(Boolean).join(" ");case"object":return de({className:_e,style:ye});case"function":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return de({className:_e})(ye.apply(void 0,[Ye].concat(lt)))}}break;case"object":switch(Ie){case"string":return de({className:ye,style:_e});case"object":return ue(ue({},ye),_e);case"function":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return de({style:_e})(ye.apply(void 0,[Ye].concat(lt)))}}break;case"function":switch(Ie){case"string":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return _e.apply(void 0,[de(Ye)({className:ye})].concat(lt))};case"object":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return _e.apply(void 0,[de(Ye)({style:ye})].concat(lt))};case"function":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return _e.apply(void 0,[ye.apply(void 0,[Ye].concat(lt))].concat(lt))}}}})(ne[Re],Z[Re]),ge},{})},Se=function(ne,Z){for(var X=arguments.length,W=new Array(X>2?X-2:0),ge=2;ge<X;ge++)W[ge-2]=arguments[ge];if(Z===null)return ne;Array.isArray(Z)||(Z=[Z]);var Re=Z.map(function(_e){return ne[_e]}).filter(Boolean).reduce(function(_e,ye){return typeof ye=="string"?_e.className=[_e.className,ye].filter(Boolean).join(" "):f(ye)==="object"?_e.style=ue(ue({},_e.style),ye):typeof ye=="function"&&(_e=ue(ue({},_e),ye.apply(void 0,[_e].concat(W)))),_e},{className:"",style:{}});return Re.className||delete Re.className,Object.keys(Re.style).length===0&&delete Re.style,Re},we=function(ne){return Object.keys(ne).reduce(function(Z,X){return Z[X]=/^base/.test(X)?Oe(ne[X]):X==="scheme"?ne[X]+":inverted":ne[X],Z},{})},$e=G()(function(ne){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},W=Z.defaultBase16,ge=W===void 0?ve:W,Re=Z.base16Themes,_e=Pe(X,Re===void 0?null:Re);_e&&(X=ue(ue({},_e),X));for(var ye=Ee.reduce(function(Bt,hn){return Bt[hn]=X[hn]||ge[hn],Bt},{}),Me=Object.keys(X).reduce(function(Bt,hn){return Ee.indexOf(hn)===-1&&(Bt[hn]=X[hn]),Bt},{}),Ie=ne(ye),Ye=te(Me,Ie),He=arguments.length,lt=new Array(He>3?He-3:0),We=3;We<He;We++)lt[We-3]=arguments[We];return G()(Se,2).apply(void 0,[Ye].concat(lt))},3),Te=function(ne){return!!ne.extend},Pe=function(ne,Z){if(ne&&Te(ne)&&ne.extend&&(ne=ne.extend),typeof ne=="string"){var X=ie(ne.split(":"),2),W=X[0],ge=X[1];ne=Z?Z[W]:N[W],ge==="inverted"&&(ne=we(ne))}return ne&&Object.prototype.hasOwnProperty.call(ne,"base00")?ne:void 0},Ge=function(ne){var Z=(function(X){return{backgroundColor:X.base00,ellipsisColor:X.base09,braceColor:X.base07,expandedIcon:X.base0D,collapsedIcon:X.base0E,keyColor:X.base07,arrayKeyColor:X.base0C,objectSize:X.base04,copyToClipboard:X.base0F,copyToClipboardCheck:X.base0D,objectBorder:X.base02,dataTypes:{boolean:X.base0E,date:X.base0D,float:X.base0B,function:X.base0D,integer:X.base0F,string:X.base09,nan:X.base08,null:X.base0A,undefined:X.base05,regexp:X.base0A,background:X.base02,bigNumber:X.base09},editVariable:{editIcon:X.base0E,cancelIcon:X.base09,removeIcon:X.base09,addIcon:X.base0E,checkIcon:X.base0E,background:X.base01,color:X.base0A,border:X.base07},addKeyModal:{background:X.base05,border:X.base04,color:X.base0A,labelColor:X.base01},validationFailure:{background:X.base09,iconColor:X.base01,fontColor:X.base01}}})(ne);return{"app-container":{fontFamily:B.globalFontFamily,cursor:B.globalCursor,backgroundColor:Z.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:Z.ellipsisColor,fontSize:B.ellipsisFontSize,lineHeight:B.ellipsisLineHeight,cursor:B.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:B.braceCursor,fontWeight:B.braceFontWeight,color:Z.braceColor},"expanded-icon":{color:Z.expandedIcon},"collapsed-icon":{color:Z.collapsedIcon},colon:{display:"inline-block",margin:B.keyMargin,color:Z.keyColor,verticalAlign:"top"},objectKeyVal:function(X,W){return{style:g({paddingTop:B.keyValPaddingTop,paddingRight:B.keyValPaddingRight,paddingBottom:B.keyValPaddingBottom,borderLeft:B.keyValBorderLeft+" "+Z.objectBorder,":hover":{paddingLeft:W.paddingLeft-1+"px",borderLeft:B.keyValBorderHover+" "+Z.objectBorder}},W)}},"object-key-val-no-border":{padding:B.keyValPadding},"pushed-content":{marginLeft:B.pushedContentMarginLeft},variableValue:function(X,W){return{style:g({display:"inline-block",paddingRight:B.variableValuePaddingRight,position:"relative"},W)}},"object-name":{display:"inline-block",color:Z.keyColor,letterSpacing:B.keyLetterSpacing,fontStyle:B.keyFontStyle,verticalAlign:B.keyVerticalAlign,opacity:B.keyOpacity,":hover":{opacity:B.keyOpacityHover}},"array-key":{display:"inline-block",color:Z.arrayKeyColor,letterSpacing:B.keyLetterSpacing,fontStyle:B.keyFontStyle,verticalAlign:B.keyVerticalAlign,opacity:B.keyOpacity,":hover":{opacity:B.keyOpacityHover}},"object-size":{color:Z.objectSize,borderRadius:B.objectSizeBorderRadius,fontStyle:B.objectSizeFontStyle,margin:B.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:B.dataTypeFontSize,marginRight:B.dataTypeMarginRight,opacity:B.datatypeOpacity},boolean:{display:"inline-block",color:Z.dataTypes.boolean},date:{display:"inline-block",color:Z.dataTypes.date},"date-value":{marginLeft:B.dateValueMarginLeft},float:{display:"inline-block",color:Z.dataTypes.float},function:{display:"inline-block",color:Z.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:Z.dataTypes.integer},bigNumber:{display:"inline-block",color:Z.dataTypes.bigNumber},string:{display:"inline-block",color:Z.dataTypes.string},nan:{display:"inline-block",color:Z.dataTypes.nan,fontSize:B.nanFontSize,fontWeight:B.nanFontWeight,backgroundColor:Z.dataTypes.background,padding:B.nanPadding,borderRadius:B.nanBorderRadius},null:{display:"inline-block",color:Z.dataTypes.null,fontSize:B.nullFontSize,fontWeight:B.nullFontWeight,backgroundColor:Z.dataTypes.background,padding:B.nullPadding,borderRadius:B.nullBorderRadius},undefined:{display:"inline-block",color:Z.dataTypes.undefined,fontSize:B.undefinedFontSize,padding:B.undefinedPadding,borderRadius:B.undefinedBorderRadius,backgroundColor:Z.dataTypes.background},regexp:{display:"inline-block",color:Z.dataTypes.regexp},"copy-to-clipboard":{cursor:B.clipboardCursor},"copy-icon":{color:Z.copyToClipboard,fontSize:B.iconFontSize,marginRight:B.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:Z.copyToClipboardCheck,marginLeft:B.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:B.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:B.metaDataPadding},"icon-container":{display:"inline-block",width:B.iconContainerWidth},tooltip:{padding:B.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:Z.editVariable.removeIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:Z.editVariable.addIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:Z.editVariable.editIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:B.iconCursor,color:Z.editVariable.checkIcon,fontSize:B.iconFontSize,paddingRight:B.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:B.iconCursor,color:Z.editVariable.cancelIcon,fontSize:B.iconFontSize,paddingRight:B.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:B.editInputMinWidth,borderRadius:B.editInputBorderRadius,backgroundColor:Z.editVariable.background,color:Z.editVariable.color,padding:B.editInputPadding,marginRight:B.editInputMarginRight,fontFamily:B.editInputFontFamily},"detected-row":{paddingTop:B.detectedRowPaddingTop},"key-modal-request":{position:B.addKeyCoverPosition,top:B.addKeyCoverPositionPx,left:B.addKeyCoverPositionPx,right:B.addKeyCoverPositionPx,bottom:B.addKeyCoverPositionPx,backgroundColor:B.addKeyCoverBackground},"key-modal":{width:B.addKeyModalWidth,backgroundColor:Z.addKeyModal.background,marginLeft:B.addKeyModalMargin,marginRight:B.addKeyModalMargin,padding:B.addKeyModalPadding,borderRadius:B.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:Z.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:Z.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:Z.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:Z.addKeyModal.labelColor,fontSize:B.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:Z.editVariable.addIcon,fontSize:B.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:Z.ellipsisColor,fontSize:B.ellipsisFontSize,lineHeight:B.ellipsisLineHeight,cursor:B.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:Z.validationFailure.fontColor,backgroundColor:Z.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:Z.validationFailure.iconColor,fontSize:B.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:B.commaColor,fontSize:B.commaFontSize,marginRight:B.commaMarginRight,cursor:"default"}}};function Ce(ne,Z,X){return ne||console.error("theme has not been set"),(function(W){var ge=ae;return W!==!1&&W!=="none"||(ge=K),$e(Ge,{defaultBase16:ge})(W)})(ne)(Z,X)}var Be=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=(X.rjvId,X.type_name),ge=X.displayDataTypes,Re=X.theme;return ge?C().createElement("span",Object.assign({className:"data-type-label"},Ce(Re,"data-type-label")),W):null}}])})(C().PureComponent),Fe=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"boolean"),C().createElement(Be,Object.assign({type_name:"bool"},X)),X.value?"true":"false")}}])})(C().PureComponent),Je=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"date"),C().createElement(Be,Object.assign({type_name:"date"},X)),C().createElement("span",Object.assign({className:"date-value"},Ce(X.theme,"date-value")),X.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(C().PureComponent),ke=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"float"),C().createElement(Be,Object.assign({type_name:"float"},X)),this.props.value)}}])})(C().PureComponent);function Ue(ne){return(function(Z){if(Array.isArray(Z))return Y(Z)})(ne)||(function(Z){if(typeof Symbol<"u"&&Z[Symbol.iterator]!=null||Z["@@iterator"]!=null)return Array.from(Z)})(ne)||fe(ne)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var Xe=l(9784),Mt=(function(){return b(function ne(){v(this,ne),this.handler=function(){}},[{key:"register",value:function(ne){this.handler=ne}},{key:"dispatch",value:function(ne){var Z;(Z=this.handler)===null||Z===void 0||Z.call(this,ne)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new Mt);const Ae=globalThis.__globalDispatcherInstance;var xe=new((function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=w(this,Z,[].concat(ge))).objects={},X.set=function(_e,ye,Me,Ie){X.objects[_e]===void 0&&(X.objects[_e]={}),X.objects[_e][ye]===void 0&&(X.objects[_e][ye]={}),X.objects[_e][ye][Me]=Ie},X.get=function(_e,ye,Me,Ie){return X.objects[_e]===void 0||X.objects[_e][ye]===void 0||X.objects[_e][ye][Me]==null?Ie:X.objects[_e][ye][Me]},X.handleAction=function(_e){var ye=_e.rjvId,Me=_e.data;switch(_e.name){case"RESET":X.emit("reset-"+ye);break;case"VARIABLE_UPDATED":_e.data.updated_src=X.updateSrc(ye,Me),X.set(ye,"action","variable-update",g(g({},Me),{},{type:"variable-edited"})),X.emit("variable-update-"+ye);break;case"VARIABLE_REMOVED":_e.data.updated_src=X.updateSrc(ye,Me),X.set(ye,"action","variable-update",g(g({},Me),{},{type:"variable-removed"})),X.emit("variable-update-"+ye);break;case"VARIABLE_ADDED":_e.data.updated_src=X.updateSrc(ye,Me),X.set(ye,"action","variable-update",g(g({},Me),{},{type:"variable-added"})),X.emit("variable-update-"+ye);break;case"ADD_VARIABLE_KEY_REQUEST":X.set(ye,"action","new-key-request",Me),X.emit("add-key-request-"+ye)}},X.updateSrc=function(_e,ye){var Me=ye.name,Ie=ye.namespace,Ye=ye.new_value,He=(ye.existing_value,ye.variable_removed);Ie.shift();var lt,We=X.get(_e,"global","src"),Bt=X.deepCopy(We,Ue(Ie)),hn=Bt,bt=(function(jt,wr){var An=typeof Symbol<"u"&&jt[Symbol.iterator]||jt["@@iterator"];if(!An){if(Array.isArray(jt)||(An=fe(jt))||wr){An&&(jt=An);var rr=0,Jr=function(){};return{s:Jr,n:function(){return rr>=jt.length?{done:!0}:{done:!1,value:jt[rr++]}},e:function(la){throw la},f:Jr}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ji,rs=!0,Ei=!1;return{s:function(){An=An.call(jt)},n:function(){var la=An.next();return rs=la.done,la},e:function(la){Ei=!0,ji=la},f:function(){try{rs||An.return==null||An.return()}finally{if(Ei)throw ji}}}})(Ie);try{for(bt.s();!(lt=bt.n()).done;)hn=hn[lt.value]}catch(jt){bt.e(jt)}finally{bt.f()}return He?F(hn)=="array"?hn.splice(Me,1):delete hn[Me]:Me!==null?hn[Me]=Ye:Bt=Ye,X.set(_e,"global","src",Bt),Bt},X.deepCopy=function(_e,ye){var Me,Ie=F(_e),Ye=ye.shift();return Ie=="array"?Me=Ue(_e):Ie=="object"&&(Me=g({},_e)),Ye!==void 0&&(Me[Ye]=X.deepCopy(_e[Ye],ye)),Me},X}return x(Z,ne),b(Z)})(Xe.EventEmitter));Ae.register(xe.handleAction.bind(xe));const Ne=xe;var Ke=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).toggleCollapsed=function(){W.setState({collapsed:!W.state.collapsed},function(){Ne.set(W.props.rjvId,W.props.namespace,"collapsed",W.state.collapsed)})},W.getFunctionDisplay=function(ge){var Re=W.props;return ge?C().createElement("span",null,W.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),C().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},C().createElement("span",null,"{"),C().createElement("span",Ce(Re.theme,"ellipsis"),"..."),C().createElement("span",null,"}"))):W.props.value.toString().slice(9,-1)},W.state={collapsed:Ne.get(X.rjvId,X.namespace,"collapsed",!0)},W}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=this.state.collapsed;return C().createElement("div",Ce(X.theme,"function"),C().createElement(Be,Object.assign({type_name:"function"},X)),C().createElement("span",Object.assign({},Ce(X.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(W)))}}])})(C().PureComponent),vt=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){return C().createElement("div",Ce(this.props.theme,"nan"),"NaN")}}])})(C().PureComponent),Xt=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){return C().createElement("div",Ce(this.props.theme,"null"),"NULL")}}])})(C().PureComponent),Vt=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"integer"),C().createElement(Be,Object.assign({type_name:"int"},X)),this.props.value)}}])})(C().PureComponent),wt=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"regexp"),C().createElement(Be,Object.assign({type_name:"regexp"},X)),this.props.value.toString())}}])})(C().PureComponent),Ht=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).toggleCollapsed=function(){W.setState({collapsed:!W.state.collapsed},function(){Ne.set(W.props.rjvId,W.props.namespace,"collapsed",W.state.collapsed)})},W.state={collapsed:Ne.get(X.rjvId,X.namespace,"collapsed",!0)},W}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.state.collapsed,W=this.props,ge=W.collapseStringsAfterLength,Re=W.theme,_e=W.escapeStrings,ye=W.value,Me=F(ge)==="integer",Ie={style:{cursor:"default",wordBreak:"break-all"}};return _e&&(ye=re(ye)),Me&&ye.length>ge&&(Ie.style.cursor="pointer",X&&(ye=C().createElement("span",null,ye.substring(0,ge),C().createElement("span",Ce(Re,"ellipsis")," ...")))),C().createElement("div",Ce(Re,"string"),C().createElement(Be,Object.assign({type_name:"string"},W)),C().createElement("span",Object.assign({className:"string-value"},Ie,{onClick:this.toggleCollapsed}),'"',ye,'"'))}}])})(C().PureComponent),Rt=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){return C().createElement("div",Ce(this.props.theme,"undefined"),"undefined")}}])})(C().PureComponent),Qt=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"bigNumber"),C().createElement(Be,Object.assign({type_name:"bigNumber"},X)),this.props.value.toString())}}])})(C().PureComponent);function _n(){return _n=Object.assign?Object.assign.bind():function(ne){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z];for(var W in X)({}).hasOwnProperty.call(X,W)&&(ne[W]=X[W])}return ne},_n.apply(null,arguments)}var Gt=O.useLayoutEffect,Tn=function(ne,Z){typeof ne!="function"?ne.current=Z:ne(Z)},En={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Pn=function(ne){Object.keys(En).forEach(function(Z){ne.style.setProperty(Z,En[Z],"important")})},Dt=null,xn=function(ne,Z){var X=ne.scrollHeight;return Z.sizingStyle.boxSizing==="border-box"?X+Z.borderSize:X-Z.paddingSize},Kt=function(){},sr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Sr=!!document.documentElement.currentStyle,qr=function(ne){var Z=window.getComputedStyle(ne);if(Z===null)return null;var X,W=(X=Z,sr.reduce(function(Re,_e){return Re[_e]=X[_e],Re},{})),ge=W.boxSizing;return ge===""?null:(Sr&&ge==="border-box"&&(W.width=parseFloat(W.width)+parseFloat(W.borderRightWidth)+parseFloat(W.borderLeftWidth)+parseFloat(W.paddingRight)+parseFloat(W.paddingLeft)+"px"),{sizingStyle:W,paddingSize:parseFloat(W.paddingBottom)+parseFloat(W.paddingTop),borderSize:parseFloat(W.borderBottomWidth)+parseFloat(W.borderTopWidth)})};function ft(ne,Z,X){var W,ge,Re=(W=X,ge=C().useRef(W),Gt(function(){ge.current=W}),ge);O.useLayoutEffect(function(){var _e=function(ye){return Re.current(ye)};if(ne)return ne.addEventListener(Z,_e),function(){return ne.removeEventListener(Z,_e)}},[])}var tn=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Fn=function(ne,Z){var X=ne.cacheMeasurements,W=ne.maxRows,ge=ne.minRows,Re=ne.onChange,_e=Re===void 0?Kt:Re,ye=ne.onHeightChange,Me=ye===void 0?Kt:ye,Ie=L(ne,tn),Ye=Ie.value!==void 0,He=O.useRef(null),lt=(function(bt,jt){var wr=C().useRef();return C().useCallback(function(An){bt.current=An,wr.current&&Tn(wr.current,null),wr.current=jt,jt&&Tn(jt,An)},[jt])})(He,Z),We=O.useRef(0),Bt=O.useRef(),hn=function(){var bt=He.current,jt=X&&Bt.current?Bt.current:qr(bt);if(jt){Bt.current=jt;var wr=(function(Jr,ji,rs,Ei){rs===void 0&&(rs=1),Ei===void 0&&(Ei=1/0),Dt||((Dt=document.createElement("textarea")).setAttribute("tabindex","-1"),Dt.setAttribute("aria-hidden","true"),Pn(Dt)),Dt.parentNode===null&&document.body.appendChild(Dt);var la=Jr.paddingSize,wc=Jr.borderSize,Ln=Jr.sizingStyle,Ia=Ln.boxSizing;Object.keys(Ln).forEach(function(Kl){var no=Kl;Dt.style[no]=Ln[no]}),Pn(Dt),Dt.value=ji;var ki=xn(Dt,Jr);Dt.value=ji,ki=xn(Dt,Jr),Dt.value="x";var Di=Dt.scrollHeight-la,Sf=Di*rs;Ia==="border-box"&&(Sf=Sf+la+wc),ki=Math.max(Sf,ki);var Es=Di*Ei;return Ia==="border-box"&&(Es=Es+la+wc),[ki=Math.min(Es,ki),Di]})(jt,bt.value||bt.placeholder||"x",ge,W),An=wr[0],rr=wr[1];We.current!==An&&(We.current=An,bt.style.setProperty("height",An+"px","important"),Me(An,{rowHeight:rr}))}};return O.useLayoutEffect(hn),(function(bt,jt){ft(document.body,"reset",function(wr){bt.current.form===wr.target&&jt(wr)})})(He,function(){if(!Ye){var bt=He.current.value;requestAnimationFrame(function(){var jt=He.current;jt&&bt!==jt.value&&hn()})}}),ft(window,"resize",hn),(function(bt){ft(document.fonts,"loadingdone",bt)})(hn),O.createElement("textarea",_n({},Ie,{onChange:function(bt){Ye||hn(),_e(bt)},ref:lt}))},on=O.forwardRef(Fn);function Cn(ne,Z){ne=ne.trim();try{if((ne=structuredClone(ne))[0]==="[")return Ft("array",JSON.parse(ne));if(ne[0]==="{")return Ft("object",JSON.parse(ne));if(ne.match(/\-?\d+\.\d+/)&&ne.match(/\-?\d+\.\d+/)[0]===ne)return Z&&parseFloat(ne).toString()!==ne?Ft("bigNumber",ne):Ft("float",parseFloat(ne));if(ne.match(/\-?\d+e-\d+/)&&ne.match(/\-?\d+e-\d+/)[0]===ne)return Ft("float",Number(ne));if(ne.match(/\-?\d+/)&&ne.match(/\-?\d+/)[0]===ne)return Z&&parseInt(ne).toString()!==ne?Ft("bigNumber",ne):Ft("integer",parseInt(ne));if(ne.match(/\-?\d+e\+\d+/)&&ne.match(/\-?\d+e\+\d+/)[0]===ne)return Ft("integer",Number(ne))}catch{}switch(ne=ne.toLowerCase()){case"undefined":return Ft("undefined",void 0);case"nan":return Ft("nan",NaN);case"null":return Ft("null",null);case"true":return Ft("boolean",!0);case"false":return Ft("boolean",!1);default:if(ne=Date.parse(ne))return Ft("date",new Date(ne))}return Ft(!1,null)}function Ft(ne,Z){return{type:ne,value:Z}}var Vr=["style"],Pr=["style"],$a=["style"],tr=["style"],$t=["style"],sn=["style"],Ir=["style"],Ua=["style"],ts=["style"],gf=["style"],gl=["style"],co=["style"],Vl=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Vr);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}])})(C().PureComponent),Oi=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Pr);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}])})(C().PureComponent),Ri=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,$a),Re=Pa(W).style;return C().createElement("span",ge,C().createElement("svg",{fill:Re.color,width:Re.height,height:Re.width,style:Re,viewBox:"0 0 1792 1792"},C().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(C().PureComponent),fo=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,tr),Re=Pa(W).style;return C().createElement("span",ge,C().createElement("svg",{fill:Re.color,width:Re.height,height:Re.width,style:Re,viewBox:"0 0 1792 1792"},C().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(C().PureComponent),Ai=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,$t);return C().createElement("span",ge,C().createElement("svg",{style:g(g({},Pa(W).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},C().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(C().PureComponent),yn=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,sn);return C().createElement("span",ge,C().createElement("svg",{style:g(g({},Pa(W).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},C().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(C().PureComponent),bc=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Ir);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}])})(C().PureComponent),Fl=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Ua);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(C().PureComponent),qa=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,ts);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(C().PureComponent),wi=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,gf);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(C().PureComponent),Fm=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,gl);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}])})(C().PureComponent),Bl=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,co);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(C().PureComponent);function Pa(ne){return ne||(ne={}),{style:g(g({verticalAlign:"middle"},ne),{},{color:ne.color?ne.color:"#000000",height:"1em",width:"1em"})}}var fp=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).copiedTimer=null,W.copyToClipboardFallback=function(ge){var Re=document.createElement("textarea");Re.value=ge,document.body.appendChild(Re),Re.select(),document.execCommand("copy"),document.body.removeChild(Re)},W.handleCopy=function(){var ge=W.props,Re=ge.clickCallback,_e=ge.src,ye=ge.namespace,Me=JSON.stringify(W.clipboardValue(_e),null," ");navigator.clipboard?navigator.clipboard.writeText(Me).catch(function(){W.copyToClipboardFallback(Me)}):W.copyToClipboardFallback(Me),W.copiedTimer=setTimeout(function(){W.setState({copied:!1})},5500),W.setState({copied:!0},function(){typeof Re=="function"&&Re({src:_e,namespace:ye,name:ye[ye.length-1]})})},W.getClippyIcon=function(){var ge=W.props.theme;return W.state.copied?C().createElement("span",null,C().createElement(bc,Object.assign({className:"copy-icon"},Ce(ge,"copy-icon"))),C().createElement("span",Ce(ge,"copy-icon-copied"),"✔")):C().createElement(bc,Object.assign({className:"copy-icon"},Ce(ge,"copy-icon")))},W.clipboardValue=function(ge){switch(F(ge)){case"function":case"regexp":return ge.toString();default:return ge}},W.state={copied:!1},W}return x(Z,ne),b(Z,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var X=this.props,W=(X.src,X.theme),ge=X.hidden,Re=X.rowHovered,_e=Ce(W,"copy-to-clipboard").style,ye="inline";return ge&&(ye="none"),C().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:Re?"inline-block":"none"}},C().createElement("span",{style:g(g({},_e),{},{display:ye}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(C().PureComponent);const ws=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).getEditIcon=function(){var ge=W.props,Re=ge.variable,_e=ge.theme;return C().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:W.state.hovered?"inline-block":"none"}},C().createElement(Fm,Object.assign({className:"click-to-edit-icon"},Ce(_e,"editVarIcon"),{onClick:function(){W.prepopInput(Re)}})))},W.prepopInput=function(ge){if(W.props.onEdit!==!1){var Re=(function(ye,Me){var Ie;switch(F(ye,Me)){case"undefined":Ie="undefined";break;case"nan":Ie="NaN";break;case"string":Ie=ye;break;case"bigNumber":case"date":case"function":case"regexp":Ie=ye.toString();break;default:try{Ie=JSON.stringify(ye,null," ")}catch{Ie=""}}return Ie})(ge.value,W.props.bigNumber),_e=Cn(Re,W.props.bigNumber);W.setState({editMode:!0,editValue:Re,parsedInput:{type:_e.type,value:_e.value}})}},W.getRemoveIcon=function(){var ge=W.props,Re=ge.variable,_e=ge.namespace,ye=ge.theme,Me=ge.rjvId;return C().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:W.state.hovered?"inline-block":"none"}},C().createElement(Fl,Object.assign({className:"click-to-remove-icon"},Ce(ye,"removeVarIcon"),{onClick:function(){Ae.dispatch({name:"VARIABLE_REMOVED",rjvId:Me,data:{name:Re.name,namespace:_e,existing_value:Re.value,variable_removed:!0}})}})))},W.getValue=function(ge,Re){var _e=!Re&&ge.type,ye=W.props;switch(_e){case!1:return W.getEditInput();case"string":return C().createElement(Ht,Object.assign({value:ge.value},ye));case"integer":return C().createElement(Vt,Object.assign({value:ge.value},ye));case"float":return C().createElement(ke,Object.assign({value:ge.value},ye));case"boolean":return C().createElement(Fe,Object.assign({value:ge.value},ye));case"function":return C().createElement(Ke,Object.assign({value:ge.value},ye));case"null":return C().createElement(Xt,ye);case"nan":return C().createElement(vt,ye);case"undefined":return C().createElement(Rt,ye);case"date":return C().createElement(Je,Object.assign({value:ge.value},ye));case"regexp":return C().createElement(wt,Object.assign({value:ge.value},ye));case"bigNumber":return C().createElement(Qt,Object.assign({value:ge.value},ye));default:return C().createElement("div",{className:"object-value"},JSON.stringify(ge.value))}},W.getEditInput=function(){var ge=W.props,Re=ge.keyModifier,_e=ge.selectOnFocus,ye=ge.theme,Me=W.state.editValue;return C().createElement("div",null,C().createElement(on,Object.assign({type:"text",ref:function(Ie){Ie&&Ie[_e?"select":"focus"]()},value:Me,className:"variable-editor",onChange:function(Ie){var Ye=Ie.target.value,He=Cn(Ye,W.props.bigNumber);W.setState({editValue:Ye,parsedInput:{type:He.type,value:He.value}})},onKeyDown:function(Ie){switch(Ie.key){case"Escape":W.setState({editMode:!1,editValue:""});break;case"Enter":Re(Ie,"submit")&&W.submitEdit(!0)}Ie.stopPropagation()},placeholder:"update this value",minRows:2},Ce(ye,"edit-input"))),C().createElement("div",Ce(ye,"edit-icon-container"),C().createElement(Fl,Object.assign({className:"edit-cancel"},Ce(ye,"cancel-icon"),{onClick:function(Ie){Ie&&Ie.stopPropagation(),W.setState({editMode:!1,editValue:""})}})),C().createElement(Bl,Object.assign({className:"edit-check string-value"},Ce(ye,"check-icon"),{onClick:function(Ie){Ie&&Ie.stopPropagation(),W.submitEdit()}})),C().createElement("div",null,W.showDetected())))},W.submitEdit=function(ge){var Re=W.props,_e=Re.variable,ye=Re.namespace,Me=Re.rjvId,Ie=Re.bigNumber,Ye=W.state,He=Ye.editValue,lt=Ye.parsedInput,We=He;ge&&lt.type&&(We=lt.value,Ie&&lt.type==="bigNumber"&&(We=new Ie(We))),W.setState({editMode:!1}),Ae.dispatch({name:"VARIABLE_UPDATED",rjvId:Me,data:{name:_e.name,namespace:ye,existing_value:_e.value,new_value:We,variable_removed:!1}})},W.showDetected=function(){var ge=W.props,Re=ge.theme,_e=(ge.variable,ge.namespace,ge.rjvId,W.state.parsedInput),ye=(_e.type,_e.value,W.getDetectedInput());if(ye)return C().createElement("div",null,C().createElement("div",Ce(Re,"detected-row"),ye,C().createElement(Bl,{className:"edit-check detected",style:g({verticalAlign:"top",paddingLeft:"3px"},Ce(Re,"check-icon").style),onClick:function(Me){Me&&Me.stopPropagation(),W.submitEdit(!0)}})))},W.getDetectedInput=function(){var ge=W.state.parsedInput,Re=ge.type,_e=ge.value,ye=W.props,Me=ye.theme;if(Re!==!1)switch(Re.toLowerCase()){case"object":return C().createElement("span",null,C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"{"),C().createElement("span",{style:g(g({},Ce(Me,"ellipsis").style),{},{cursor:"default"})},"..."),C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"}"));case"array":return C().createElement("span",null,C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"["),C().createElement("span",{style:g(g({},Ce(Me,"ellipsis").style),{},{cursor:"default"})},"..."),C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"]"));case"string":return C().createElement(Ht,Object.assign({value:_e},ye));case"integer":return C().createElement(Vt,Object.assign({value:_e},ye));case"float":return C().createElement(ke,Object.assign({value:_e},ye));case"boolean":return C().createElement(Fe,Object.assign({value:_e},ye));case"function":return C().createElement(Ke,Object.assign({value:_e},ye));case"null":return C().createElement(Xt,ye);case"nan":return C().createElement(vt,ye);case"undefined":return C().createElement(Rt,ye);case"date":return C().createElement(Je,Object.assign({value:new Date(_e)},ye));case"bignumber":return C().createElement(Qt,Object.assign({value:_e},ye))}},W.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},W}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this,W=this.props,ge=W.variable,Re=W.singleIndent,_e=W.type,ye=W.theme,Me=W.namespace,Ie=W.indentWidth,Ye=W.enableClipboard,He=W.onEdit,lt=W.onDelete,We=W.onSelect,Bt=W.displayArrayKey,hn=W.quotesOnKeys,bt=W.keyModifier,jt=W.showComma,wr=W.isLast,An=this.state.editMode;return C().createElement("div",Object.assign({},Ce(ye,"objectKeyVal",{paddingLeft:Ie*Re}),{onMouseEnter:function(){return X.setState(g(g({},X.state),{},{hovered:!0}))},onMouseLeave:function(){return X.setState(g(g({},X.state),{},{hovered:!1}))},className:"variable-row",key:ge.name}),_e=="array"?Bt?C().createElement("span",Object.assign({},Ce(ye,"array-key"),{key:ge.name+"_"+Me}),ge.name,C().createElement("div",Ce(ye,"colon"),":")):null:C().createElement("span",null,C().createElement("span",Object.assign({},Ce(ye,"object-name"),{className:"object-key",key:ge.name+"_"+Me}),!!hn&&C().createElement("span",{style:{verticalAlign:"top"}},'"'),C().createElement("span",{style:{display:"inline-block"}},re(ge.name)),!!hn&&C().createElement("span",{style:{verticalAlign:"top"}},'"')),C().createElement("span",Ce(ye,"colon"),":")),C().createElement("div",Object.assign({className:"variable-value",onClick:We===!1&&He===!1?null:function(rr){var Jr=Ue(Me);bt(rr,"edit")&&He!==!1?X.prepopInput(ge):We!==!1&&(Jr.shift(),We(g(g({},ge),{},{namespace:Jr})))}},Ce(ye,"variableValue",{cursor:We===!1?"default":"pointer"})),this.getValue(ge,An)),jt&&!wr&&C().createElement("span",Ce(ye,"comma"),","),Ye?C().createElement(fp,{rowHovered:this.state.hovered,hidden:An,src:ge.value,clickCallback:Ye,theme:ye,namespace:[].concat(Ue(Me),[ge.name])}):null,He!==!1&&An==0?this.getEditIcon():null,lt!==!1&&An==0?this.getRemoveIcon():null)}}])})(C().PureComponent);var ns=(function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=w(this,Z,[].concat(ge))).getObjectSize=function(){var _e=X.props,ye=_e.size,Me=_e.theme;if(_e.displayObjectSize)return C().createElement("span",Object.assign({className:"object-size"},Ce(Me,"object-size")),ye," item",ye===1?"":"s")},X.getAddAttribute=function(_e){var ye=X.props,Me=ye.theme,Ie=ye.namespace,Ye=ye.name,He=ye.src,lt=ye.rjvId,We=ye.depth;return C().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},C().createElement(qa,Object.assign({className:"click-to-add-icon"},Ce(Me,"addVarIcon"),{onClick:function(){var Bt={name:We>0?Ye:null,namespace:Ie.splice(0,Ie.length-1),existing_value:He,variable_removed:!1,key_name:null};F(He)==="object"?Ae.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:lt,data:Bt}):Ae.dispatch({name:"VARIABLE_ADDED",rjvId:lt,data:g(g({},Bt),{},{new_value:[].concat(Ue(He),[null])})})}})))},X.getRemoveObject=function(_e){var ye=X.props,Me=ye.theme,Ie=(ye.hover,ye.namespace),Ye=ye.name,He=ye.src,lt=ye.rjvId;if(Ie.length!==1)return C().createElement("span",{className:"click-to-remove",style:{display:_e?"inline-block":"none"}},C().createElement(Fl,Object.assign({className:"click-to-remove-icon"},Ce(Me,"removeVarIcon"),{onClick:function(){Ae.dispatch({name:"VARIABLE_REMOVED",rjvId:lt,data:{name:Ye,namespace:Ie.splice(0,Ie.length-1),existing_value:He,variable_removed:!0}})}})))},X.render=function(){var _e=X.props,ye=_e.theme,Me=_e.onDelete,Ie=_e.onAdd,Ye=_e.enableClipboard,He=_e.src,lt=_e.namespace,We=_e.rowHovered;return C().createElement("div",Object.assign({},Ce(ye,"object-meta-data"),{className:"object-meta-data",onClick:function(Bt){Bt.stopPropagation()}}),X.getObjectSize(),Ye?C().createElement(fp,{rowHovered:We,clickCallback:Ye,src:He,theme:ye,namespace:lt}):null,Ie!==!1?X.getAddAttribute(We):null,Me!==!1?X.getRemoveObject(We):null)},X}return x(Z,ne),b(Z)})(C().PureComponent);function Wr(ne){var Z=ne.parent_type,X=ne.namespace,W=ne.quotesOnKeys,ge=ne.theme,Re=ne.jsvRoot,_e=ne.name,ye=ne.displayArrayKey,Me=ne.name?ne.name:"";return!Re||_e!==!1&&_e!==null?Z=="array"?ye?C().createElement("span",Object.assign({},Ce(ge,"array-key"),{key:X}),C().createElement("span",{className:"array-key"},Me),C().createElement("span",Ce(ge,"colon"),":")):C().createElement("span",null):C().createElement("span",Object.assign({},Ce(ge,"object-name"),{key:X}),C().createElement("span",{className:"object-key"},W&&C().createElement("span",{style:{verticalAlign:"top"}},'"'),C().createElement("span",null,Me),W&&C().createElement("span",{style:{verticalAlign:"top"}},'"')),C().createElement("span",Ce(ge,"colon"),":")):C().createElement("span",null)}function nr(ne){var Z=ne.theme;switch(ne.iconStyle){case"triangle":return C().createElement(yn,Object.assign({},Ce(Z,"expanded-icon"),{className:"expanded-icon"}));case"square":return C().createElement(Ri,Object.assign({},Ce(Z,"expanded-icon"),{className:"expanded-icon"}));default:return C().createElement(Vl,Object.assign({},Ce(Z,"expanded-icon"),{className:"expanded-icon"}))}}function Sc(ne){var Z=ne.theme;switch(ne.iconStyle){case"triangle":return C().createElement(Ai,Object.assign({},Ce(Z,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return C().createElement(fo,Object.assign({},Ce(Z,"collapsed-icon"),{className:"collapsed-icon"}));default:return C().createElement(Oi,Object.assign({},Ce(Z,"collapsed-icon"),{className:"collapsed-icon"}))}}var Bm=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],yl=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).toggleCollapsed=function(ge){for(var Re=W.state.expanded,_e=[],ye=Math.max(Re.length||0,ge+1),Me=0;Me<ye;Me++)_e[Me]=Re[Me]===!0;_e[ge]=!_e[ge],W.setState({expanded:_e})},W.state={expanded:[]},W}return x(Z,ne),b(Z,[{key:"getExpandedIcon",value:function(X){var W=this.props,ge=W.theme,Re=W.iconStyle;return this.state.expanded[X]?C().createElement(nr,{theme:ge,iconStyle:Re}):C().createElement(Sc,{theme:ge,iconStyle:Re})}},{key:"render",value:function(){var X=this,W=this.props,ge=W.src,Re=W.groupArraysAfterLength,_e=(W.depth,W.name),ye=W.theme,Me=W.jsvRoot,Ie=W.namespace,Ye=(W.parent_type,V(W,Bm)),He=0,lt=5*this.props.indentWidth;Me||(He=5*this.props.indentWidth);var We=Re,Bt=Math.ceil(ge.length/We);return C().createElement("div",Object.assign({className:"object-key-val"},Ce(ye,Me?"jsv-root":"objectKeyVal",{paddingLeft:He})),C().createElement(Wr,this.props),C().createElement("span",null,C().createElement(ns,Object.assign({size:ge.length},this.props))),Ue(Array(Bt)).map(function(hn,bt){return C().createElement("div",Object.assign({key:bt,className:"object-key-val array-group"},Ce(ye,"objectKeyVal",{marginLeft:6,paddingLeft:lt})),C().createElement("span",Ce(ye,"brace-row"),C().createElement("div",Object.assign({className:"icon-container"},Ce(ye,"icon-container"),{onClick:function(jt){X.toggleCollapsed(bt)}}),X.getExpandedIcon(bt)),X.state.expanded[bt]?C().createElement(Bn,Object.assign({key:_e+bt,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:We,index_offset:bt*We,src:ge.slice(bt*We,bt*We+We),namespace:Ie,type:"array",parent_type:"array_group",theme:ye,showComma:X.props.showComma,isLast:bt===Bt-1},Ye)):C().createElement("span",Object.assign({},Ce(ye,"brace"),{onClick:function(jt){X.toggleCollapsed(bt)},className:"array-group-brace"}),"[",C().createElement("div",Object.assign({},Ce(ye,"array-group-meta-data"),{className:"array-group-meta-data"}),C().createElement("span",Object.assign({className:"object-size"},Ce(ye,"object-size")),bt*We," - ",bt*We+We>ge.length?ge.length:bt*We+We)),"]")))}))}}])})(C().PureComponent),yf=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],ho=(function(ne){function Z(X){var W;v(this,Z),(W=w(this,Z,[X])).toggleCollapsed=function(){W.setState({expanded:!W.state.expanded},function(){Ne.set(W.props.rjvId,W.props.namespace,"expanded",W.state.expanded)})},W.getObjectContent=function(Re,_e,ye){return C().createElement("div",{className:"pushed-content object-container"},C().createElement("div",Object.assign({className:"object-content"},Ce(W.props.theme,"pushed-content")),W.renderObjectContents(_e,ye)))},W.getEllipsis=function(){return W.state.size===0?null:C().createElement("div",Object.assign({},Ce(W.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:W.toggleCollapsed}),"...")},W.getObjectMetaData=function(Re){var _e=W.props,ye=(_e.rjvId,_e.theme,W.state),Me=ye.size,Ie=ye.hovered;return C().createElement(ns,Object.assign({rowHovered:Ie,size:Me},W.props))},W.renderObjectContents=function(Re,_e){var ye,Me=W.props,Ie=Me.depth,Ye=Me.parent_type,He=Me.index_offset,lt=Me.groupArraysAfterLength,We=Me.namespace,Bt=Me.showComma,hn=W.state.object_type,bt=[],jt=Object.keys(Re||{});return W.props.sortKeys&&hn!=="array"&&(jt=jt.sort()),jt.forEach(function(wr,An){ye=new Hm(wr,Re[wr],_e.bigNumber);var rr=An===jt.length-1;if(Ye==="array_group"&&He&&(ye.name=parseInt(ye.name)+He),Object.prototype.hasOwnProperty.call(Re,wr))if(ye.type==="object")bt.push(C().createElement(Bn,Object.assign({key:ye.name,depth:Ie+1,name:ye.name,src:ye.value,namespace:We.concat(ye.name),parent_type:hn,isLast:rr,showComma:Bt},_e)));else if(ye.type==="array"){var Jr=Bn;lt&&ye.value.length>lt&&(Jr=yl),bt.push(C().createElement(Jr,Object.assign({key:ye.name,depth:Ie+1,name:ye.name,src:ye.value,namespace:We.concat(ye.name),type:"array",parent_type:hn,isLast:rr,showComma:Bt},_e)))}else bt.push(C().createElement(ws,Object.assign({key:ye.name+"_"+We,variable:ye,singleIndent:5,namespace:We,type:W.props.type,isLast:rr,showComma:Bt},_e)))}),bt};var ge=Z.getState(X);return W.state=g(g({},ge),{},{prevProps:{}}),W}return x(Z,ne),b(Z,[{key:"getBraceStart",value:function(X,W){var ge=this,Re=this.props,_e=(Re.src,Re.theme),ye=Re.iconStyle;if(Re.parent_type==="array_group")return C().createElement("span",null,C().createElement("span",Ce(_e,"brace"),X==="array"?"[":"{"));var Me=W?nr:Sc;return C().createElement("span",null,C().createElement("span",Object.assign({onClick:function(Ie){ge.toggleCollapsed()}},Ce(_e,"brace-row")),C().createElement("div",Object.assign({className:"icon-container"},Ce(_e,"icon-container")),C().createElement(Me,{theme:_e,iconStyle:ye})),C().createElement(Wr,this.props),C().createElement("span",Ce(_e,"brace"),X==="array"?"[":"{")))}},{key:"render",value:function(){var X=this,W=this.props,ge=W.depth,Re=W.src,_e=(W.namespace,W.name,W.type,W.parent_type),ye=W.theme,Me=W.jsvRoot,Ie=W.iconStyle,Ye=W.showComma,He=W.isLast,lt=V(W,yf),We=this.state,Bt=We.object_type,hn=We.expanded,bt={};return Me||_e==="array_group"?_e==="array_group"&&(bt.borderLeft=0,bt.display="inline"):bt.paddingLeft=5*this.props.indentWidth,C().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return X.setState(g(g({},X.state),{},{hovered:!0}))},onMouseLeave:function(){return X.setState(g(g({},X.state),{},{hovered:!1}))}},Ce(ye,Me?"jsv-root":"objectKeyVal",bt)),this.getBraceStart(Bt,hn),hn?this.getObjectContent(ge,Re,g({theme:ye,iconStyle:Ie},lt)):this.getEllipsis(),C().createElement("span",{className:"brace-row"},C().createElement("span",{style:g(g({},Ce(ye,"brace").style),{},{paddingLeft:hn?"3px":"0px"})},Bt==="array"?"]":"}")),Ye&&!He&&!Me&&C().createElement("span",Ce(ye,"comma"),","),this.getObjectMetaData(Re))}}],[{key:"getDerivedStateFromProps",value:function(X,W){var ge=W.prevProps;return X.src!==ge.src||X.collapsed!==ge.collapsed||X.name!==ge.name||X.namespace!==ge.namespace||X.rjvId!==ge.rjvId?g(g({},Z.getState(X)),{},{prevProps:X}):null}}])})(C().PureComponent);ho.getState=function(ne){var Z=Object.keys(ne.src).length,X=(ne.collapsed===!1||ne.collapsed!==!0&&ne.collapsed>ne.depth)&&(!ne.shouldCollapse||ne.shouldCollapse({name:ne.name,src:ne.src,type:F(ne.src),namespace:ne.namespace})===!1)&&Z!==0;return{expanded:Ne.get(ne.rjvId,ne.namespace,"expanded",X),object_type:ne.type==="array"?"array":"object",parent_type:ne.type==="array"?"array":"object",size:Z,hovered:!1}};var Hm=b(function ne(Z,X,W){v(this,ne),this.name=Z,this.value=X,this.type=F(X,W)});q(ho);const Bn=ho;var Hl=(function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=w(this,Z,[].concat(ge))).render=function(){var _e,ye,Me,Ie,Ye=X.props,He=[Ye.name],lt=Bn;return typeof Ye.name!="object"||Array.isArray(Ye.name)||(He=[((_e=Ye.name)===null||_e===void 0?void 0:_e.displayName)||((ye=Ye.name)===null||ye===void 0?void 0:ye.name)||((Me=Ye.name)===null||Me===void 0||(Ie=Me.type)===null||Ie===void 0?void 0:Ie.name)||"Anonymous"]),Array.isArray(Ye.src)&&Ye.groupArraysAfterLength&&Ye.src.length>Ye.groupArraysAfterLength&&(lt=yl),C().createElement("div",{className:"pretty-json-container object-container"},C().createElement("div",{className:"object-content"},C().createElement(lt,Object.assign({namespace:He,depth:0,jsvRoot:!0},Ye))))},X}return x(Z,ne),b(Z)})(C().PureComponent),vf=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).closeModal=function(){Ae.dispatch({rjvId:W.props.rjvId,name:"RESET"})},W.submit=function(){W.props.submit(W.state.input)},W.state={input:X.input?X.input:""},W}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this,W=this.props,ge=W.theme,Re=W.rjvId,_e=W.isValid,ye=this.state.input,Me=_e(ye);return C().createElement("div",Object.assign({className:"key-modal-request"},Ce(ge,"key-modal-request"),{onClick:this.closeModal}),C().createElement("div",Object.assign({},Ce(ge,"key-modal"),{onClick:function(Ie){Ie.stopPropagation()}}),C().createElement("div",Ce(ge,"key-modal-label"),"Key Name:"),C().createElement("div",{style:{position:"relative"}},C().createElement("input",Object.assign({},Ce(ge,"key-modal-input"),{className:"key-modal-input",ref:function(Ie){return Ie&&Ie.focus()},spellCheck:!1,value:ye,placeholder:"...",onChange:function(Ie){X.setState({input:Ie.target.value})},onKeyPress:function(Ie){Me&&Ie.key==="Enter"?X.submit():Ie.key==="Escape"&&X.closeModal()}})),Me?C().createElement(Bl,Object.assign({},Ce(ge,"key-modal-submit"),{className:"key-modal-submit",onClick:function(Ie){return X.submit()}})):null),C().createElement("span",Ce(ge,"key-modal-cancel"),C().createElement(wi,Object.assign({},Ce(ge,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ae.dispatch({rjvId:Re,name:"RESET"})}})))))}}])})(C().PureComponent),Gl=(function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=w(this,Z,[].concat(ge))).isValid=function(_e){var ye=X.props.rjvId,Me=Ne.get(ye,"action","new-key-request");return _e!=""&&Object.keys(Me.existing_value).indexOf(_e)===-1},X.submit=function(_e){var ye=X.props.rjvId,Me=Ne.get(ye,"action","new-key-request");Me.new_value=g({},Me.existing_value),Me.new_value[_e]=X.props.defaultValue,Ae.dispatch({name:"VARIABLE_ADDED",rjvId:ye,data:Me})},X}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.active,ge=X.theme,Re=X.rjvId;return W?C().createElement(vf,{rjvId:Re,theme:ge,isValid:this.isValid,submit:this.submit}):null}}])})(C().PureComponent),Mi=(function(ne){function Z(){return v(this,Z),w(this,Z,arguments)}return x(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.message,ge=X.active,Re=X.theme,_e=X.rjvId;return ge?C().createElement("div",Object.assign({className:"validation-failure"},Ce(Re,"validation-failure"),{onClick:function(){Ae.dispatch({rjvId:_e,name:"RESET"})}}),C().createElement("span",Ce(Re,"validation-failure-label"),W),C().createElement(wi,Ce(Re,"validation-failure-clear"))):null}}])})(C().PureComponent),vl=(function(ne){function Z(X){var W;return v(this,Z),(W=w(this,Z,[X])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),W.getListeners=function(){return{reset:W.resetState,"variable-update":W.updateSrc,"add-key-request":W.addKeyRequest}},W.updateSrc=function(){var ge,Re=Ne.get(W.rjvId,"action","variable-update"),_e=Re.name,ye=Re.namespace,Me=Re.new_value,Ie=Re.existing_value,Ye=Re.updated_src,He=Re.type,lt=W.props,We=lt.onEdit,Bt=lt.onDelete,hn=lt.onAdd,bt={existing_src:W.state.src,new_value:Me,updated_src:Ye,name:_e,namespace:ye,existing_value:Ie};switch(He){case"variable-added":ge=hn(bt);break;case"variable-edited":ge=We(bt);break;case"variable-removed":ge=Bt(bt)}ge!==!1?(Ne.set(W.rjvId,"global","src",Ye),W.setState({src:Ye})):W.setState({validationFailure:!0})},W.addKeyRequest=function(){W.setState({addKeyRequest:!0})},W.resetState=function(){W.setState({validationFailure:!1,addKeyRequest:!1})},W.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:Z.defaultProps.src,name:Z.defaultProps.name,theme:Z.defaultProps.theme,validationMessage:Z.defaultProps.validationMessage,prevSrc:Z.defaultProps.src,prevName:Z.defaultProps.name,prevTheme:Z.defaultProps.theme},W}return x(Z,ne),b(Z,[{key:"componentDidMount",value:function(){Ne.set(this.rjvId,"global","src",this.state.src);var X=this.getListeners();for(var W in X)Ne.on(W+"-"+this.rjvId,X[W]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(X,W){W.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),W.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),X.src!==this.state.src&&Ne.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var X=this.getListeners();for(var W in X)Ne.removeListener(W+"-"+this.rjvId,X[W])}},{key:"render",value:function(){var X=this.state,W=X.validationFailure,ge=X.validationMessage,Re=X.addKeyRequest,_e=X.theme,ye=X.src,Me=X.name,Ie=this.props,Ye=Ie.style,He=Ie.defaultValue;return C().createElement("div",{className:"react-json-view",style:g(g({},Ce(_e,"app-container").style),Ye)},C().createElement(Mi,{message:ge,active:W,theme:_e,rjvId:this.rjvId}),C().createElement(Hl,Object.assign({},this.props,{src:ye,name:Me,theme:_e,type:F(ye),rjvId:this.rjvId})),C().createElement(Gl,{active:Re,theme:_e,rjvId:this.rjvId,defaultValue:He}))}}],[{key:"getDerivedStateFromProps",value:function(X,W){if(X.src!==W.prevSrc||X.name!==W.prevName||X.theme!==W.prevTheme){var ge={src:X.src,name:X.name,theme:X.theme,validationMessage:X.validationMessage,prevSrc:X.src,prevName:X.name,prevTheme:X.theme};return Z.validateState(ge)}return null}}])})(C().PureComponent);vl.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(ne){return ne.metaKey||ne.ctrlKey},bigNumber:null,showComma:!0},vl.validateState=function(ne){var Z={};return F(ne.theme)!=="object"||(function(X){var W=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(F(X)==="object"){for(var ge=0;ge<W.length;ge++)if(!(W[ge]in X))return!1;return!0}return!1})(ne.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),Z.theme="rjv-default"),F(ne.src)!=="object"&&F(ne.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),Z.name="ERROR",Z.src={message:"src property must be a valid json object"}),g(g({},ne),Z)},q(vl);const bf=vl})(),c})())})(KS)),KS.exports}var wve=Sve();const _2=$l(wve),U7=j.createContext(void 0);function Pm(e){const t=j.useContext(U7);if(e===!1&&t===void 0)throw new Error(Si(27));return t}let Eb=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Eve={[Eb.startingStyle]:""},xve={[Eb.endingStyle]:""},i1={transitionStatus(e){return e==="starting"?Eve:e==="ending"?xve:null}};let kh=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Eb.startingStyle]="startingStyle",e[e.endingStyle=Eb.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),mO=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const _ve={[mO.popupOpen]:""},Tve={[mO.popupOpen]:"",[mO.pressed]:""},Cve={[kh.open]:""},Ove={[kh.closed]:""},Rve={[kh.anchorHidden]:""},q7={open(e){return e?_ve:null}},V7={open(e){return e?Tve:null}},Im={open(e){return e?Cve:Ove},anchorHidden(e){return e?Rve:null}},Ave={...Im,...i1},Mve=j.forwardRef(function(t,r){const{render:i,className:s,forceRender:l=!1,...c}=t,{store:f}=Pm(),d=f.useState("open"),h=f.useState("nested"),m=f.useState("mounted"),g=f.useState("transitionStatus"),v=j.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return mr("div",t,{state:v,ref:[f.context.backdropRef,r],stateAttributesMapping:Ave,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},c],enabled:l||!h})}),rf="none",Vc="trigger-press",Ho="trigger-hover",i5="outside-press",gT="item-press",jve="close-press",Yh="focus-out",F7="escape-key",yT="list-navigation",kve="cancel-open",B7="imperative-action",Dve="window-resize";function mn(e,t,r,i){let s=!1,l=!1;const c=i??Da;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){l=!0},get isCanceled(){return s},get isPropagationAllowed(){return l},trigger:r,...c}}const Nve=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:c=!0,...f}=t,{store:d}=Pm(),h=d.useState("open");function m(b){h&&d.setOpen(!1,mn(jve,b.nativeEvent))}const{getButtonProps:g,buttonRef:v}=ap({disabled:l,native:c}),S=j.useMemo(()=>({disabled:l}),[l]);return mr("button",t,{state:S,ref:[r,v],props:[{onClick:m},f,g]})}),zve={...jb};let MD=0;function $ve(e,t="mui"){const[r,i]=j.useState(e),s=e||r;return j.useEffect(()=>{r==null&&(MD+=1,i(`${t}-${MD}`))},[r,t]),s}const jD=zve.useId;function Lm(e,t){if(jD!==void 0){const r=jD();return e??(t?`${t}-${r}`:r)}return $ve(e,t)}function Um(e){return Lm(e,"base-ui")}const Pve=[];function o5(e){j.useEffect(e,Pve)}const jv=0;class af{static create(){return new af}currentId=jv;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=jv,r()},t)}isStarted(){return this.currentId!==jv}clear=()=>{this.currentId!==jv&&(clearTimeout(this.currentId),this.currentId=jv)};disposeEffect=()=>this.clear}function to(){const e=oo(af.create).current;return o5(e.disposeEffect),e}function ka(e){const t=oo(Ive,e).current;return t.next=e,ct(t.effect),t}function Ive(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const qm=typeof navigator<"u",vT=qve(),H7=Fve(),G7=Vve(),K7=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Y7=vT.platform==="MacIntel"&&vT.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(vT.platform),Lve=qm&&/apple/i.test(navigator.vendor),gO=qm&&/android/i.test(H7)||/android/i.test(G7);qm&&H7.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Uve=G7.includes("jsdom/");function qve(){if(!qm)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Vve(){if(!qm)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function Fve(){if(!qm)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const yO="data-base-ui-focusable",Z7="active",X7="selected",Q7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Fc="ArrowLeft",Bc="ArrowRight",s5="ArrowUp",o1="ArrowDown";function ic(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function zn(e,t){if(!e||!t)return!1;const r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&wC(r)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ro(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ll(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Bve(e){return e.matches("html,body")}function fa(e){return e?.ownerDocument||document}function W7(e){return Gr(e)&&e.matches(Q7)}function vO(e){return e?e.getAttribute("role")==="combobox"&&W7(e):!1}function xb(e){return e?e.hasAttribute(yO)?e:e.querySelector(`[${yO}]`)||e:null}function Ph(e,t,r=!0){return e.filter(s=>s.parentId===t&&(!r||s.context?.open)).flatMap(s=>[s,...Ph(e,s.id,r)])}function kD(e,t){let r=[],i=e.find(s=>s.id===t)?.parentId;for(;i;){const s=e.find(l=>l.id===i);i=s?.parentId,s&&(r=r.concat(s))}return r}function Ti(e){e.preventDefault(),e.stopPropagation()}function Hve(e){return"nativeEvent"in e}function J7(e){return e.mozInputSource===0&&e.isTrusted?!0:gO&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function eL(e){return Uve?!1:!gO&&e.width===0&&e.height===0||gO&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function hm(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function tL(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Gve=["top","right","bottom","left"],pm=Math.min,Go=Math.max,Aw=Math.round,Lp=Math.floor,kl=e=>({x:e,y:e}),Kve={left:"right",right:"left",bottom:"top",top:"bottom"},Yve={start:"end",end:"start"};function bO(e,t,r){return Go(e,pm(t,r))}function hc(e,t){return typeof e=="function"?e(t):e}function io(e){return e.split("-")[0]}function pf(e){return e.split("-")[1]}function l5(e){return e==="x"?"y":"x"}function u5(e){return e==="y"?"height":"width"}const Zve=new Set(["top","bottom"]);function cs(e){return Zve.has(io(e))?"y":"x"}function c5(e){return l5(cs(e))}function Xve(e,t,r){r===void 0&&(r=!1);const i=pf(e),s=c5(e),l=u5(s);let c=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=Mw(c)),[c,Mw(c)]}function Qve(e){const t=Mw(e);return[SO(e),t,SO(t)]}function SO(e){return e.replace(/start|end/g,t=>Yve[t])}const DD=["left","right"],ND=["right","left"],Wve=["top","bottom"],Jve=["bottom","top"];function ebe(e,t,r){switch(e){case"top":case"bottom":return r?t?ND:DD:t?DD:ND;case"left":case"right":return t?Wve:Jve;default:return[]}}function tbe(e,t,r,i){const s=pf(e);let l=ebe(io(e),r==="start",i);return s&&(l=l.map(c=>c+"-"+s),t&&(l=l.concat(l.map(SO)))),l}function Mw(e){return e.replace(/left|right|bottom|top/g,t=>Kve[t])}function nbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function nL(e){return typeof e!="number"?nbe(e):{top:e,right:e,bottom:e,left:e}}function jw(e){const{x:t,y:r,width:i,height:s}=e;return{width:i,height:s,top:r,left:t,right:t+i,bottom:r+s,x:t,y:r}}function SS(e,t,r){return Math.floor(e/t)!==r}function Gp(e,t){return t<0||t>=e.current.length}function YS(e,t){return di(e,{disabledIndices:t})}function wO(e,t){return di(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function di(e,{startingIndex:t=-1,decrement:r=!1,disabledIndices:i,amount:s=1}={}){let l=t;do l+=r?-s:s;while(l>=0&&l<=e.current.length-1&&Hc(e,l,i));return l}function rL(e,{event:t,orientation:r,loopFocus:i,rtl:s,cols:l,disabledIndices:c,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}){let g=h;const v=[],S={};let b=!1;{let R=null,w=-1;e.current.forEach((T,x)=>{if(T==null)return;const O=T.closest('[role="row"]');O&&(b=!0),(O!==R||w===-1)&&(R=O,w+=1,v[w]=[]),v[w].push(x),S[x]=w})}const _=b&&v.length>0&&v.some(R=>R.length!==l);function E(R){if(!_||h===-1)return;const w=S[h];if(w==null)return;const T=v[w].indexOf(h);let x=R==="up"?w-1:w+1;i&&(x<0?x=v.length-1:x>=v.length&&(x=0));const O=new Set;for(;x>=0&&x<v.length&&!O.has(x);){O.add(x);const C=v[x];if(C.length===0){x=R==="up"?x-1:x+1;continue}const M=Math.min(T,C.length-1);for(let D=M;D>=0;D-=1){const $=C[D];if(!Hc(e,$,c))return $}x=R==="up"?x-1:x+1,i&&(x<0?x=v.length-1:x>=v.length&&(x=0))}}if(t.key===s5){const R=E("up");if(R!==void 0)m&&Ti(t),g=R;else{if(m&&Ti(t),h===-1)g=d;else if(g=di(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),i&&(h-l<f||g<0)){const w=h%l,T=d%l,x=d-(T-w);T===w?g=d:g=T>w?x:x-l}Gp(e,g)&&(g=h)}}if(t.key===o1){const R=E("down");R!==void 0?(m&&Ti(t),g=R):(m&&Ti(t),h===-1?g=f:(g=di(e,{startingIndex:h,amount:l,disabledIndices:c}),i&&h+l>d&&(g=di(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),Gp(e,g)&&(g=h))}if(r==="both"){const R=Lp(h/l);t.key===(s?Fc:Bc)&&(m&&Ti(t),h%l!==l-1?(g=di(e,{startingIndex:h,disabledIndices:c}),i&&SS(g,l,R)&&(g=di(e,{startingIndex:h-h%l-1,disabledIndices:c}))):i&&(g=di(e,{startingIndex:h-h%l-1,disabledIndices:c})),SS(g,l,R)&&(g=h)),t.key===(s?Bc:Fc)&&(m&&Ti(t),h%l!==0?(g=di(e,{startingIndex:h,decrement:!0,disabledIndices:c}),i&&SS(g,l,R)&&(g=di(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):i&&(g=di(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),SS(g,l,R)&&(g=h));const w=Lp(d/l)===R;Gp(e,g)&&(i&&w?g=t.key===(s?Bc:Fc)?d:di(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function aL(e,t,r){const i=[];let s=0;return e.forEach(({width:l,height:c},f)=>{let d=!1;for(r&&(s=0);!d;){const h=[];for(let m=0;m<l;m+=1)for(let g=0;g<c;g+=1)h.push(s+m+g*t);s%t+l<=t&&h.every(m=>i[m]==null)?(h.forEach(m=>{i[m]=f}),d=!0):s+=1}}),[...i]}function iL(e,t,r,i,s){if(e===-1)return-1;const l=r.indexOf(e),c=t[e];switch(s){case"tl":return l;case"tr":return c?l+c.width-1:l;case"bl":return c?l+(c.height-1)*i:l;case"br":return r.lastIndexOf(e);default:return-1}}function oL(e,t){return t.flatMap((r,i)=>e.includes(r)?[i]:[])}function Hc(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);const i=e.current[t];return i?i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true":!1}var rbe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],kw=rbe.join(","),sL=typeof Element>"u",mm=sL?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Dw=!sL&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Nw=function(t,r){var i;r===void 0&&(r=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),l=s===""||s==="true",c=l||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Nw(t.parentNode));return c},abe=function(t){var r,i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return i===""||i==="true"},lL=function(t,r,i){if(Nw(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(kw));return r&&mm.call(t,kw)&&s.unshift(t),s=s.filter(i),s},zw=function(t,r,i){for(var s=[],l=Array.from(t);l.length;){var c=l.shift();if(!Nw(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),d=f.length?f:c.children,h=zw(d,!0,i);i.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})}else{var m=mm.call(c,kw);m&&i.filter(c)&&(r||!t.includes(c))&&s.push(c);var g=c.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(c),v=!Nw(g,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(g&&v){var S=zw(g===!0?c.children:g.children,!0,i);i.flatten?s.push.apply(s,S):s.push({scopeParent:c,candidates:S})}else l.unshift.apply(l,c.children)}}return s},uL=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},cL=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||abe(t))&&!uL(t)?0:t.tabIndex},ibe=function(t,r){var i=cL(t);return i<0&&r&&!uL(t)?0:i},obe=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},fL=function(t){return t.tagName==="INPUT"},sbe=function(t){return fL(t)&&t.type==="hidden"},lbe=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},ube=function(t,r){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===r)return t[i]},cbe=function(t){if(!t.name)return!0;var r=t.form||Dw(t),i=function(f){return r.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var l=ube(s,t.form);return!l||l===t},fbe=function(t){return fL(t)&&t.type==="radio"},dbe=function(t){return fbe(t)&&!cbe(t)},hbe=function(t){var r,i=t&&Dw(t),s=(r=i)===null||r===void 0?void 0:r.host,l=!1;if(i&&i!==t){var c,f,d;for(l=!!((c=s)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!l&&s;){var h,m,g;i=Dw(s),s=(h=i)===null||h===void 0?void 0:h.host,l=!!((m=s)!==null&&m!==void 0&&(g=m.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return l},zD=function(t){var r=t.getBoundingClientRect(),i=r.width,s=r.height;return i===0&&s===0},pbe=function(t,r){var i=r.displayCheck,s=r.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var c=mm.call(t,"details>summary:first-of-type"),f=c?t.parentElement:t;if(mm.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var h=t.parentElement,m=Dw(t);if(h&&!h.shadowRoot&&s(h)===!0)return zD(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=d}if(hbe(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return zD(t);return!1},mbe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var s=r.children.item(i);if(s.tagName==="LEGEND")return mm.call(r,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}r=r.parentElement}return!1},EO=function(t,r){return!(r.disabled||sbe(r)||pbe(r,t)||lbe(r)||mbe(r))},xO=function(t,r){return!(dbe(r)||cL(r)<0||!EO(t,r))},gbe=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},dL=function(t){var r=[],i=[];return t.forEach(function(s,l){var c=!!s.scopeParent,f=c?s.scopeParent:s,d=ibe(f,c),h=c?dL(s.candidates):f;d===0?c?r.push.apply(r,h):r.push(f):i.push({documentOrder:l,tabIndex:d,item:s,isScope:c,content:h})}),i.sort(obe).reduce(function(s,l){return l.isScope?s.push.apply(s,l.content):s.push(l.content),s},[]).concat(r)},s1=function(t,r){r=r||{};var i;return r.getShadowRoot?i=zw([t],r.includeContainer,{filter:xO.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:gbe}):i=lL(t,r.includeContainer,xO.bind(null,r)),dL(i)},ybe=function(t,r){r=r||{};var i;return r.getShadowRoot?i=zw([t],r.includeContainer,{filter:EO.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=lL(t,r.includeContainer,EO.bind(null,r)),i},hL=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return mm.call(t,kw)===!1?!1:xO(r,t)};const Vm=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pL(e,t){const r=s1(e,Vm()),i=r.length;if(i===0)return;const s=ic(fa(e)),l=r.indexOf(s),c=l===-1?t===1?0:i-1:l+t;return r[c]}function f5(e){return pL(fa(e).body,1)||e}function mL(e){return pL(fa(e).body,-1)||e}function gL(e,t){if(!e)return null;const r=s1(fa(e).body,Vm()),i=r.length;if(i===0)return null;const s=r.indexOf(e);if(s===-1)return null;const l=(s+t+i)%i;return r[l]}function vbe(e){return gL(e,1)}function bbe(e){return gL(e,-1)}function Kp(e,t){const r=t||e.currentTarget,i=e.relatedTarget;return!i||!zn(r,i)}function Sbe(e){s1(e,Vm()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function $D(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const i=r.dataset.tabindex;delete r.dataset.tabindex,i?r.setAttribute("tabindex",i):r.removeAttribute("tabindex")})}function yL(){const e=new Map;return{emit(t,r){e.get(t)?.forEach(i=>i(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}class wbe{nodesRef={current:[]};events=yL();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const r=this.nodesRef.current.findIndex(i=>i===t);r!==-1&&this.nodesRef.current.splice(r,1)}}const vL=j.createContext(null),bL=j.createContext(null),mf=()=>j.useContext(vL)?.id||null,up=e=>{const t=j.useContext(bL);return e??t};function Ebe(e){const t=Lm(),r=up(e),i=mf();return ct(()=>{if(!t)return;const s={id:t,parentId:i};return r?.addNode(s),()=>{r?.removeNode(s)}},[r,t,i]),t}function xbe(e){const{children:t,id:r}=e,i=mf();return k.jsx(vL.Provider,{value:j.useMemo(()=>({id:r,parentId:i}),[r,i]),children:t})}function _be(e){const{children:t,externalTree:r}=e,i=oo(()=>r??new wbe).current;return k.jsx(bL.Provider,{value:i,children:t})}function _b(e){return`data-base-ui-${e}`}function bT(e,t,r){if(r&&!hm(r))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[t]}return e?.[t]}const SL={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},T2={...SL,position:"fixed",top:0,left:0},wL={...SL,position:"absolute"},wS=null;class Tbe{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const r=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s<r.length;s+=1)r[s]?.(t)};request(t){const r=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(t){const r=t-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const ES=new Tbe;class _l{static create(){return new _l}static request(t){return ES.request(t)}static cancel(t){return ES.cancel(t)}currentId=wS;request(t){this.cancel(),this.currentId=ES.request(()=>{this.currentId=wS,t()})}cancel=()=>{this.currentId!==wS&&(ES.cancel(this.currentId),this.currentId=wS)};disposeEffect=()=>this.cancel}function C2(){const e=oo(_l.create).current;return o5(e.disposeEffect),e}function ys(e){return e?.ownerDocument||document}const gm=j.forwardRef(function(t,r){const[i,s]=j.useState();ct(()=>{Lve&&s("button")},[]);const l={tabIndex:0,role:i};return k.jsx("span",{...t,ref:r,style:T2,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})});let PD=0;function ZS(e,t={}){const{preventScroll:r=!1,cancelPrevious:i=!0,sync:s=!1}=t;i&&cancelAnimationFrame(PD);const l=()=>e?.focus({preventScroll:r});s?l():PD=requestAnimationFrame(l)}const Yp={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ID(e){return e==="inert"?Yp.inert:e==="aria-hidden"?Yp["aria-hidden"]:Yp.none}let xS=new WeakSet,_S={},ST=0;const EL=e=>e&&(e.host||EL(e.parentNode)),Cbe=(e,t)=>t.map(r=>{if(e.contains(r))return r;const i=EL(r);return e.contains(i)?i:null}).filter(r=>r!=null);function Obe(e,t,r,i){const s="data-base-ui-inert",l=i?"inert":r?"aria-hidden":null,c=Cbe(t,e),f=new Set,d=new Set(c),h=[];_S[s]||(_S[s]=new WeakMap);const m=_S[s];c.forEach(g),v(t),f.clear();function g(S){!S||f.has(S)||(f.add(S),S.parentNode&&g(S.parentNode))}function v(S){!S||d.has(S)||[].forEach.call(S.children,b=>{if(df(b)!=="script")if(f.has(b))v(b);else{const _=l?b.getAttribute(l):null,E=_!==null&&_!=="false",R=ID(l),w=(R.get(b)||0)+1,T=(m.get(b)||0)+1;R.set(b,w),m.set(b,T),h.push(b),w===1&&E&&xS.add(b),T===1&&b.setAttribute(s,""),!E&&l&&b.setAttribute(l,l==="inert"?"":"true")}})}return ST+=1,()=>{h.forEach(S=>{const b=ID(l),E=(b.get(S)||0)-1,R=(m.get(S)||0)-1;b.set(S,E),m.set(S,R),E||(!xS.has(S)&&l&&S.removeAttribute(l),xS.delete(S)),R||S.removeAttribute(s)}),ST-=1,ST||(Yp.inert=new WeakMap,Yp["aria-hidden"]=new WeakMap,Yp.none=new WeakMap,xS=new WeakSet,_S={})}}function Rbe(e,t=!1,r=!1){const i=fa(e[0]).body;return Obe(e.concat(Array.from(i.querySelectorAll("[aria-live]"))),i,t,r)}const xL=j.createContext(null),_L=()=>j.useContext(xL),Abe=_b("portal");function Mbe(e={}){const{ref:t,container:r,componentProps:i=Da,elementProps:s,elementState:l}=e,c=Lm(),d=_L()?.portalNode,[h,m]=j.useState(null),[g,v]=j.useState(null),S=ot(R=>{R!==null&&v(R)}),b=j.useRef(null);ct(()=>{if(r===null){b.current&&(b.current=null,v(null),m(null));return}if(c==null)return;const R=(r&&(BR(r)?r:r.current))??d??document.body;if(R==null){b.current&&(b.current=null,v(null),m(null));return}b.current!==R&&(b.current=R,v(null),m(R))},[r,d,c]);const _=mr("div",i,{ref:[t,S],state:l,props:[{id:c,[Abe]:""},s]});return{portalNode:g,portalSubtree:h&&_?gs.createPortal(_,h):null}}const d5=j.forwardRef(function(t,r){const{children:i,container:s,className:l,render:c,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:m}=Mbe({container:s,ref:r,componentProps:t,elementProps:d}),g=j.useRef(null),v=j.useRef(null),S=j.useRef(null),b=j.useRef(null),[_,E]=j.useState(null),R=_?.modal,w=_?.open,T=typeof f=="boolean"?f:!!_&&!_.modal&&_.open&&!!h;j.useEffect(()=>{if(!h||R)return;function O(C){h&&C.relatedTarget&&Kp(C)&&(C.type==="focusin"?$D:Sbe)(h)}return h.addEventListener("focusin",O,!0),h.addEventListener("focusout",O,!0),()=>{h.removeEventListener("focusin",O,!0),h.removeEventListener("focusout",O,!0)}},[h,R]),j.useEffect(()=>{!h||w||$D(h)},[w,h]);const x=j.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:S,afterInsideRef:b,portalNode:h,setFocusManagerState:E}),[h]);return k.jsxs(j.Fragment,{children:[m,k.jsxs(xL.Provider,{value:x,children:[T&&h&&k.jsx(gm,{"data-type":"outside",ref:g,onFocus:O=>{if(Kp(O,h))S.current?.focus();else{const C=_?_.domReference:null;mL(C)?.focus()}}}),T&&h&&k.jsx("span",{"aria-owns":h.id,style:cae}),h&&gs.createPortal(i,h),T&&h&&k.jsx(gm,{"data-type":"outside",ref:v,onFocus:O=>{if(Kp(O,h))b.current?.focus();else{const C=_?_.domReference:null;f5(C)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,mn(Yh,O.nativeEvent))}}})]})]})});function rc(e){return e==null?e:"current"in e?e.current:e}function jbe(e,t){const r=ha(e.target);return e instanceof r.KeyboardEvent?"keyboard":e instanceof r.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof r.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const LD=20;let Nc=[];function h5(){Nc=Nc.filter(e=>e.isConnected)}function kbe(e){h5(),e&&df(e)!=="body"&&(Nc.push(e),Nc.length>LD&&(Nc=Nc.slice(-LD)))}function wT(){return h5(),Nc[Nc.length-1]}function Dbe(e){if(!e)return null;const t=Vm();return hL(e,t)?e:s1(e,t)[0]||e}function Nbe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Qo(e).display!=="none"}function UD(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=Vm(),s=ybe(e,r).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return hL(c,r)||c.hasAttribute("data-tabindex")&&!f.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function p5(e){const{context:t,children:r,disabled:i=!1,order:s=["content"],initialFocus:l=!0,returnFocus:c=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:m="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:S,beforeContentFocusGuardRef:b,externalTree:_}=e,E="rootStore"in t?t.rootStore:t,R=E.useState("open"),w=E.useState("domReferenceElement"),T=E.useState("floatingElement"),{events:x,dataRef:O}=E.context,C=ot(()=>O.current.floatingContext?.nodeId),M=ot(g),D=l===!1,$=vO(w)&&D,q=ka(s),L=ka(l),V=ka(c),F=ka(m),re=up(_),ae=_L(),K=j.useRef(null),B=j.useRef(null),Y=j.useRef(!1),fe=j.useRef(!1),ie=j.useRef(!1),N=j.useRef(-1),I=j.useRef(""),U=j.useRef(""),P=j.useRef(null),G=j.useRef(null),ee=cc(P,b,ae?.beforeInsideRef),ue=cc(G,ae?.afterInsideRef),ve=to(),Ee=to(),Oe=C2(),de=ae!=null,te=xb(T),Se=ot((Te=te)=>Te?s1(Te,Vm()):[]),we=ot(Te=>{const Pe=Se(Te);return q.current.map(()=>Pe).filter(Boolean).flat()});j.useEffect(()=>{if(i||!d)return;function Te(Ge){Ge.key==="Tab"&&zn(te,ic(fa(te)))&&Se().length===0&&!$&&Ti(Ge)}const Pe=fa(te);return Pe.addEventListener("keydown",Te),()=>{Pe.removeEventListener("keydown",Te)}},[i,w,te,d,q,$,Se,we]),j.useEffect(()=>{if(i||!T)return;function Te(Pe){const Ge=ro(Pe),Be=Se().indexOf(Ge);Be!==-1&&(N.current=Be)}return T.addEventListener("focusin",Te),()=>{T.removeEventListener("focusin",Te)}},[i,T,Se]),j.useEffect(()=>{if(i||!R)return;const Te=fa(te);function Pe(){ie.current=!1}function Ge(Be){const Fe=ro(Be),Je=zn(T,Fe)||zn(w,Fe)||zn(ae?.portalNode,Fe);ie.current=!Je,U.current=Be.pointerType||"keyboard"}function Ce(){U.current="keyboard"}return Te.addEventListener("pointerdown",Ge,!0),Te.addEventListener("pointerup",Pe,!0),Te.addEventListener("pointercancel",Pe,!0),Te.addEventListener("keydown",Ce,!0),()=>{Te.removeEventListener("pointerdown",Ge,!0),Te.removeEventListener("pointerup",Pe,!0),Te.removeEventListener("pointercancel",Pe,!0),Te.removeEventListener("keydown",Ce,!0)}},[i,T,w,te,R,ae]),j.useEffect(()=>{if(i||!h)return;function Te(){fe.current=!0,Ee.start(0,()=>{fe.current=!1})}function Pe(Fe){const Je=Fe.relatedTarget,ke=Fe.currentTarget,Ue=ro(Fe);queueMicrotask(()=>{const Xe=C(),Mt=E.context.triggerElements,Ae=Je?.hasAttribute(_b("focus-guard"))&&[P.current,G.current,ae?.beforeInsideRef.current,ae?.afterInsideRef.current,ae?.beforeOutsideRef.current,ae?.afterOutsideRef.current,rc(S),rc(v)].includes(Je),xe=!(zn(w,Je)||zn(T,Je)||zn(Je,T)||zn(ae?.portalNode,Je)||Je!=null&&Mt.hasElement(Je)||Mt.hasMatchingElement(Ne=>zn(Ne,Je))||Ae||re&&(Ph(re.nodesRef.current,Xe).find(Ne=>zn(Ne.context?.elements.floating,Je)||zn(Ne.context?.elements.domReference,Je))||kD(re.nodesRef.current,Xe).find(Ne=>[Ne.context?.elements.floating,xb(Ne.context?.elements.floating)].includes(Je)||Ne.context?.elements.domReference===Je)));if(ke===w&&te&&UD(te,q),f&&ke!==w&&!Nbe(Ue)&&ic(fa(te))===fa(te).body){if(Gr(te)&&(te.focus(),f==="popup")){Oe.request(()=>{te.focus()});return}const Ne=N.current,Ke=Se(),vt=Ke[Ne]||Ke[Ke.length-1]||te;Gr(vt)&&vt.focus()}if(O.current.insideReactTree){O.current.insideReactTree=!1;return}($||!d)&&Je&&xe&&!fe.current&&($||Je!==wT())&&(Y.current=!0,E.setOpen(!1,mn(Yh,Fe)))})}function Ge(){ie.current||(O.current.insideReactTree=!0,ve.start(0,()=>{O.current.insideReactTree=!1}))}const Ce=Gr(w)?w:null,Be=[];if(!(!T&&!Ce))return Ce&&(Ce.addEventListener("focusout",Pe),Ce.addEventListener("pointerdown",Te),Be.push(()=>{Ce.removeEventListener("focusout",Pe),Ce.removeEventListener("pointerdown",Te)})),T&&(T.addEventListener("focusout",Pe),ae&&(T.addEventListener("focusout",Ge,!0),Be.push(()=>{T.removeEventListener("focusout",Ge,!0)})),Be.push(()=>{T.removeEventListener("focusout",Pe)})),()=>{Be.forEach(Fe=>{Fe()})}},[i,w,T,te,d,re,ae,E,h,f,Se,$,C,q,O,ve,Ee,Oe,v,S]),j.useEffect(()=>{if(i||!T||!R)return;const Te=Array.from(ae?.portalNode?.querySelectorAll(`[${_b("portal")}]`)||[]),Ge=(re?kD(re.nodesRef.current,C()):[]).find(Fe=>vO(Fe.context?.elements.domReference||null))?.context?.elements.domReference,Ce=[T,Ge,...Te,...M(),K.current,B.current,P.current,G.current,ae?.beforeOutsideRef.current,ae?.afterOutsideRef.current,rc(S),rc(v),$?w:null].filter(Fe=>Fe!=null),Be=Rbe(Ce,d||$);return()=>{Be()}},[R,i,w,T,d,q,ae,$,re,C,M,v,S]),ct(()=>{if(!R||i||!Gr(te))return;const Te=fa(te),Pe=ic(Te);queueMicrotask(()=>{const Ge=we(te),Ce=L.current,Be=typeof Ce=="function"?Ce(F.current||""):Ce;if(Be===void 0||Be===!1)return;let Fe;Be===!0||Be===null?Fe=Ge[0]||te:Fe=rc(Be),Fe=Fe||Ge[0]||te,!zn(te,Pe)&&ZS(Fe,{preventScroll:Fe===te})})},[i,R,te,D,we,L,F]),ct(()=>{if(i||!te)return;const Te=fa(te),Pe=ic(Te);kbe(Pe);function Ge(Fe){if(Fe.open||(I.current=jbe(Fe.nativeEvent,U.current)),Fe.reason===Ho&&Fe.nativeEvent.type==="mouseleave"&&(Y.current=!0),Fe.reason===i5)if(Fe.nested)Y.current=!1;else if(J7(Fe.nativeEvent)||eL(Fe.nativeEvent))Y.current=!1;else{let Je=!1;document.createElement("div").focus({get preventScroll(){return Je=!0,!1}}),Je?Y.current=!1:Y.current=!0}}x.on("openchange",Ge);const Ce=Te.createElement("span");Ce.setAttribute("tabindex","-1"),Ce.setAttribute("aria-hidden","true"),Object.assign(Ce.style,T2),de&&w&&w.insertAdjacentElement("afterend",Ce);function Be(){const Fe=V.current;let Je=typeof Fe=="function"?Fe(I.current):Fe;if(Je===void 0||Je===!1)return null;if(Je===null&&(Je=!0),typeof Je=="boolean"){const Ue=w||wT();return Ue&&Ue.isConnected?Ue:Ce}const ke=w||wT()||Ce;return rc(Je)||ke}return()=>{x.off("openchange",Ge);const Fe=ic(Te),Je=zn(T,Fe)||re&&Ph(re.nodesRef.current,C(),!1).some(Ue=>zn(Ue.context?.elements.floating,Fe)),ke=Be();queueMicrotask(()=>{const Ue=Dbe(ke),Xe=typeof V.current!="boolean";V.current&&!Y.current&&Gr(Ue)&&(!(!Xe&&Ue!==Fe&&Fe!==Te.body)||Je)&&Ue.focus({preventScroll:!0}),Ce.remove()})}},[i,T,te,V,O,x,re,de,w,C]),j.useEffect(()=>{queueMicrotask(()=>{Y.current=!1})},[i]),j.useEffect(()=>{if(i||!R)return;function Te(Ge){ro(Ge)?.closest(`[${W9}]`)&&(fe.current=!0)}const Pe=fa(te);return Pe.addEventListener("pointerdown",Te,!0),()=>{Pe.removeEventListener("pointerdown",Te,!0)}},[i,R,te]),ct(()=>{if(!i&&ae)return ae.setFocusManagerState({modal:d,closeOnFocusOut:h,open:R,onOpenChange:E.setOpen,domReference:w}),()=>{ae.setFocusManagerState(null)}},[i,ae,d,R,E,h,w]),ct(()=>{if(!(i||!te))return UD(te,q),()=>{queueMicrotask(h5)}},[i,te,q]);const $e=!i&&(d?!$:!0)&&(de||d);return k.jsxs(j.Fragment,{children:[$e&&k.jsx(gm,{"data-type":"inside",ref:ee,onFocus:Te=>{if(d){const Pe=we();ZS(Pe[Pe.length-1])}else ae?.portalNode&&(Y.current=!1,Kp(Te,ae.portalNode)?f5(w)?.focus():rc(S??ae.beforeOutsideRef)?.focus())}}),r,$e&&k.jsx(gm,{"data-type":"inside",ref:ue,onFocus:Te=>{d?ZS(we()[0]):ae?.portalNode&&(h&&(Y.current=!0),Kp(Te,ae.portalNode)?mL(w)?.focus():rc(v??ae.afterOutsideRef)?.focus())}})]})}function TL(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.context.dataRef,{enabled:s=!0,event:l="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:h=0}=t,m=j.useRef(void 0),g=C2(),v=to(),S=j.useMemo(()=>({onPointerDown(b){m.current=b.pointerType},onMouseDown(b){const _=m.current,E=b.nativeEvent,R=r.select("open");if(b.button!==0||l==="click"||hm(_,!0)&&f)return;const w=i.current.openEvent,T=w?.type,x=r.select("domReferenceElement")!==b.currentTarget,O=R&&x||!(R&&c&&(!(w&&d)||T==="click"||T==="mousedown"));if(W7(E.target)){const M=mn(Vc,E,E.target);O&&_==="touch"&&h>0?v.start(h,()=>{r.setOpen(!0,M)}):r.setOpen(O,M);return}const C=b.currentTarget;g.request(()=>{const M=mn(Vc,E,C);O&&_==="touch"&&h>0?v.start(h,()=>{r.setOpen(!0,M)}):r.setOpen(O,M)})},onClick(b){if(l==="mousedown-only")return;const _=m.current;if(l==="mousedown"&&_){m.current=void 0;return}if(hm(_,!0)&&f)return;const E=r.select("open"),R=i.current.openEvent,w=r.select("domReferenceElement")!==b.currentTarget,T=E&&w||!(E&&c&&(!(R&&d)||tL(R))),x=mn(Vc,b.nativeEvent,b.currentTarget);T&&_==="touch"&&h>0?v.start(h,()=>{r.setOpen(!0,x)}):r.setOpen(T,x)},onKeyDown(){m.current=void 0}}),[i,l,f,r,d,c,g,v,h]);return j.useMemo(()=>s?{reference:S}:Da,[s,S])}function qD(e,t,r){let{reference:i,floating:s}=e;const l=cs(t),c=c5(t),f=u5(c),d=io(t),h=l==="y",m=i.x+i.width/2-s.width/2,g=i.y+i.height/2-s.height/2,v=i[f]/2-s[f]/2;let S;switch(d){case"top":S={x:m,y:i.y-s.height};break;case"bottom":S={x:m,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:g};break;case"left":S={x:i.x-s.width,y:g};break;default:S={x:i.x,y:i.y}}switch(pf(t)){case"start":S[c]-=v*(r&&h?-1:1);break;case"end":S[c]+=v*(r&&h?-1:1);break}return S}const zbe=async(e,t,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:c}=r,f=l.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:g}=qD(h,i,d),v=i,S={},b=0;for(let _=0;_<f.length;_++){const{name:E,fn:R}=f[_],{x:w,y:T,data:x,reset:O}=await R({x:m,y:g,initialPlacement:i,placement:v,strategy:s,middlewareData:S,rects:h,platform:c,elements:{reference:e,floating:t}});m=w??m,g=T??g,S={...S,[E]:{...S[E],...x}},O&&b<=50&&(b++,typeof O=="object"&&(O.placement&&(v=O.placement),O.rects&&(h=O.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):O.rects),{x:m,y:g}=qD(h,v,d)),_=-1)}return{x:m,y:g,placement:v,strategy:s,middlewareData:S}};async function Tb(e,t){var r;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:S=0}=hc(t,e),b=nL(S),E=f[v?g==="floating"?"reference":"floating":g],R=jw(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(E)))==null||r?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),w=g==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),x=await(l.isElement==null?void 0:l.isElement(T))?await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1}:{x:1,y:1},O=jw(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:w,offsetParent:T,strategy:d}):w);return{top:(R.top-O.top+b.top)/x.y,bottom:(O.bottom-R.bottom+b.bottom)/x.y,left:(R.left-O.left+b.left)/x.x,right:(O.right-R.right+b.right)/x.x}}const $be=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:s,middlewareData:l,rects:c,initialPlacement:f,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:_=!0,...E}=hc(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const R=io(s),w=cs(f),T=io(f)===f,x=await(d.isRTL==null?void 0:d.isRTL(h.floating)),O=v||(T||!_?[Mw(f)]:Qve(f)),C=b!=="none";!v&&C&&O.push(...tbe(f,_,b,x));const M=[f,...O],D=await Tb(t,E),$=[];let q=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&$.push(D[R]),g){const re=Xve(s,c,x);$.push(D[re[0]],D[re[1]])}if(q=[...q,{placement:s,overflows:$}],!$.every(re=>re<=0)){var L,V;const re=(((L=l.flip)==null?void 0:L.index)||0)+1,ae=M[re];if(ae&&(!(g==="alignment"?w!==cs(ae):!1)||q.every(Y=>cs(Y.placement)===w?Y.overflows[0]>0:!0)))return{data:{index:re,overflows:q},reset:{placement:ae}};let K=(V=q.filter(B=>B.overflows[0]<=0).sort((B,Y)=>B.overflows[1]-Y.overflows[1])[0])==null?void 0:V.placement;if(!K)switch(S){case"bestFit":{var F;const B=(F=q.filter(Y=>{if(C){const fe=cs(Y.placement);return fe===w||fe==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(fe=>fe>0).reduce((fe,ie)=>fe+ie,0)]).sort((Y,fe)=>Y[1]-fe[1])[0])==null?void 0:F[0];B&&(K=B);break}case"initialPlacement":K=f;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function VD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FD(e){return Gve.some(t=>e[t]>=0)}const Pbe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:i="referenceHidden",...s}=hc(e,t);switch(i){case"referenceHidden":{const l=await Tb(t,{...s,elementContext:"reference"}),c=VD(l,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:FD(c)}}}case"escaped":{const l=await Tb(t,{...s,altBoundary:!0}),c=VD(l,r.floating);return{data:{escapedOffsets:c,escaped:FD(c)}}}default:return{}}}}},CL=new Set(["left","top"]);async function Ibe(e,t){const{placement:r,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=io(r),f=pf(r),d=cs(r)==="y",h=CL.has(c)?-1:1,m=l&&d?-1:1,g=hc(t,e);let{mainAxis:v,crossAxis:S,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof b=="number"&&(S=f==="end"?b*-1:b),d?{x:S*m,y:v*h}:{x:v*h,y:S*m}}const Lbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:s,y:l,placement:c,middlewareData:f}=t,d=await Ibe(t,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:s+d.x,y:l+d.y,data:{...d,placement:c}}}}},Ube=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:E=>{let{x:R,y:w}=E;return{x:R,y:w}}},...d}=hc(e,t),h={x:r,y:i},m=await Tb(t,d),g=cs(io(s)),v=l5(g);let S=h[v],b=h[g];if(l){const E=v==="y"?"top":"left",R=v==="y"?"bottom":"right",w=S+m[E],T=S-m[R];S=bO(w,S,T)}if(c){const E=g==="y"?"top":"left",R=g==="y"?"bottom":"right",w=b+m[E],T=b-m[R];b=bO(w,b,T)}const _=f.fn({...t,[v]:S,[g]:b});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[v]:l,[g]:c}}}}}},qbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:s,rects:l,middlewareData:c}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=hc(e,t),m={x:r,y:i},g=cs(s),v=l5(g);let S=m[v],b=m[g];const _=hc(f,t),E=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(d){const T=v==="y"?"height":"width",x=l.reference[v]-l.floating[T]+E.mainAxis,O=l.reference[v]+l.reference[T]-E.mainAxis;S<x?S=x:S>O&&(S=O)}if(h){var R,w;const T=v==="y"?"width":"height",x=CL.has(io(s)),O=l.reference[g]-l.floating[T]+(x&&((R=c.offset)==null?void 0:R[g])||0)+(x?0:E.crossAxis),C=l.reference[g]+l.reference[T]+(x?0:((w=c.offset)==null?void 0:w[g])||0)-(x?E.crossAxis:0);b<O?b=O:b>C&&(b=C)}return{[v]:S,[g]:b}}}},Vbe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:s,rects:l,platform:c,elements:f}=t,{apply:d=()=>{},...h}=hc(e,t),m=await Tb(t,h),g=io(s),v=pf(s),S=cs(s)==="y",{width:b,height:_}=l.floating;let E,R;g==="top"||g==="bottom"?(E=g,R=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(R=g,E=v==="end"?"top":"bottom");const w=_-m.top-m.bottom,T=b-m.left-m.right,x=pm(_-m[E],w),O=pm(b-m[R],T),C=!t.middlewareData.shift;let M=x,D=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=T),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=w),C&&!v){const q=Go(m.left,0),L=Go(m.right,0),V=Go(m.top,0),F=Go(m.bottom,0);S?D=b-2*(q!==0||L!==0?q+L:Go(m.left,m.right)):M=_-2*(V!==0||F!==0?V+F:Go(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:M});const $=await c.getDimensions(f.floating);return b!==$.width||_!==$.height?{reset:{rects:!0}}:{}}}};function OL(e){const t=Qo(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Gr(e),l=s?e.offsetWidth:r,c=s?e.offsetHeight:i,f=Aw(r)!==l||Aw(i)!==c;return f&&(r=l,i=c),{width:r,height:i,$:f}}function m5(e){return ir(e)?e:e.contextElement}function Zp(e){const t=m5(e);if(!Gr(t))return kl(1);const r=t.getBoundingClientRect(),{width:i,height:s,$:l}=OL(t);let c=(l?Aw(r.width):r.width)/i,f=(l?Aw(r.height):r.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const Fbe=kl(0);function RL(e){const t=ha(e);return!l2()||!t.visualViewport?Fbe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bbe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ha(e)?!1:t}function Zh(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),l=m5(e);let c=kl(1);t&&(i?ir(i)&&(c=Zp(i)):c=Zp(e));const f=Bbe(l,r,i)?RL(l):kl(0);let d=(s.left+f.x)/c.x,h=(s.top+f.y)/c.y,m=s.width/c.x,g=s.height/c.y;if(l){const v=ha(l),S=i&&ir(i)?ha(i):i;let b=v,_=EC(b);for(;_&&i&&S!==b;){const E=Zp(_),R=_.getBoundingClientRect(),w=Qo(_),T=R.left+(_.clientLeft+parseFloat(w.paddingLeft))*E.x,x=R.top+(_.clientTop+parseFloat(w.paddingTop))*E.y;d*=E.x,h*=E.y,m*=E.x,g*=E.y,d+=T,h+=x,b=ha(_),_=EC(b)}}return jw({width:m,height:g,x:d,y:h})}function O2(e,t){const r=u2(e).scrollLeft;return t?t.left+r:Zh(Il(e)).left+r}function AL(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-O2(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function Hbe(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e;const l=s==="fixed",c=Il(i),f=t?s2(t.floating):!1;if(i===c||f&&l)return r;let d={scrollLeft:0,scrollTop:0},h=kl(1);const m=kl(0),g=Gr(i);if((g||!g&&!l)&&((df(i)!=="body"||rp(c))&&(d=u2(i)),Gr(i))){const S=Zh(i);h=Zp(i),m.x=S.x+i.clientLeft,m.y=S.y+i.clientTop}const v=c&&!g&&!l?AL(c,d):kl(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+v.x,y:r.y*h.y-d.scrollTop*h.y+m.y+v.y}}function Gbe(e){return Array.from(e.getClientRects())}function Kbe(e){const t=Il(e),r=u2(e),i=e.ownerDocument.body,s=Go(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Go(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+O2(e);const f=-r.scrollTop;return Qo(i).direction==="rtl"&&(c+=Go(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:c,y:f}}const BD=25;function Ybe(e,t){const r=ha(e),i=Il(e),s=r.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,d=0;if(s){l=s.width,c=s.height;const m=l2();(!m||m&&t==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}const h=O2(i);if(h<=0){const m=i.ownerDocument,g=m.body,v=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(i.clientWidth-g.clientWidth-S);b<=BD&&(l-=b)}else h<=BD&&(l+=h);return{width:l,height:c,x:f,y:d}}const Zbe=new Set(["absolute","fixed"]);function Xbe(e,t){const r=Zh(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,l=Gr(e)?Zp(e):kl(1),c=e.clientWidth*l.x,f=e.clientHeight*l.y,d=s*l.x,h=i*l.y;return{width:c,height:f,x:d,y:h}}function HD(e,t,r){let i;if(t==="viewport")i=Ybe(e,r);else if(t==="document")i=Kbe(Il(e));else if(ir(t))i=Xbe(t,r);else{const s=RL(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return jw(i)}function ML(e,t){const r=uc(e);return r===t||!ir(r)||oc(r)?!1:Qo(r).position==="fixed"||ML(r,t)}function Qbe(e,t){const r=t.get(e);if(r)return r;let i=Pc(e,[],!1).filter(f=>ir(f)&&df(f)!=="body"),s=null;const l=Qo(e).position==="fixed";let c=l?uc(e):e;for(;ir(c)&&!oc(c);){const f=Qo(c),d=HR(c);!d&&f.position==="fixed"&&(s=null),(l?!d&&!s:!d&&f.position==="static"&&!!s&&Zbe.has(s.position)||rp(c)&&!d&&ML(e,c))?i=i.filter(m=>m!==c):s=f,c=uc(c)}return t.set(e,i),i}function Wbe(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e;const c=[...r==="clippingAncestors"?s2(t)?[]:Qbe(t,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const g=HD(t,m,s);return h.top=Go(g.top,h.top),h.right=pm(g.right,h.right),h.bottom=pm(g.bottom,h.bottom),h.left=Go(g.left,h.left),h},HD(t,f,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Jbe(e){const{width:t,height:r}=OL(e);return{width:t,height:r}}function e1e(e,t,r){const i=Gr(t),s=Il(t),l=r==="fixed",c=Zh(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const d=kl(0);function h(){d.x=O2(s)}if(i||!i&&!l)if((df(t)!=="body"||rp(s))&&(f=u2(t)),i){const S=Zh(t,!0,l,t);d.x=S.x+t.clientLeft,d.y=S.y+t.clientTop}else s&&h();l&&!i&&s&&h();const m=s&&!i&&!l?AL(s,f):kl(0),g=c.left+f.scrollLeft-d.x-m.x,v=c.top+f.scrollTop-d.y-m.y;return{x:g,y:v,width:c.width,height:c.height}}function ET(e){return Qo(e).position==="static"}function GD(e,t){if(!Gr(e)||Qo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Il(e)===r&&(r=r.ownerDocument.body),r}function jL(e,t){const r=ha(e);if(s2(e))return r;if(!Gr(e)){let s=uc(e);for(;s&&!oc(s);){if(ir(s)&&!ET(s))return s;s=uc(s)}return r}let i=GD(e,t);for(;i&&zre(i)&&ET(i);)i=GD(i,t);return i&&oc(i)&&ET(i)&&!HR(i)?r:i||Ure(e)||r}const t1e=async function(e){const t=this.getOffsetParent||jL,r=this.getDimensions,i=await r(e.floating);return{reference:e1e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function n1e(e){return Qo(e).direction==="rtl"}const r1e={convertOffsetParentRelativeRectToViewportRelativeRect:Hbe,getDocumentElement:Il,getClippingRect:Wbe,getOffsetParent:jL,getElementRects:t1e,getClientRects:Gbe,getDimensions:Jbe,getScale:Zp,isElement:ir,isRTL:n1e};function kL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function a1e(e,t){let r=null,i;const s=Il(e);function l(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:m,top:g,width:v,height:S}=h;if(f||t(),!v||!S)return;const b=Lp(g),_=Lp(s.clientWidth-(m+v)),E=Lp(s.clientHeight-(g+S)),R=Lp(m),T={rootMargin:-b+"px "+-_+"px "+-E+"px "+-R+"px",threshold:Go(0,pm(1,d))||1};let x=!0;function O(C){const M=C[0].intersectionRatio;if(M!==d){if(!x)return c();M?c(!1,M):i=setTimeout(()=>{c(!1,1e-7)},1e3)}M===1&&!kL(h,e.getBoundingClientRect())&&c(),x=!1}try{r=new IntersectionObserver(O,{...T,root:s.ownerDocument})}catch{r=new IntersectionObserver(O,T)}r.observe(e)}return c(!0),l}function KD(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=m5(e),m=s||l?[...h?Pc(h):[],...Pc(t)]:[];m.forEach(R=>{s&&R.addEventListener("scroll",r,{passive:!0}),l&&R.addEventListener("resize",r)});const g=h&&f?a1e(h,r):null;let v=-1,S=null;c&&(S=new ResizeObserver(R=>{let[w]=R;w&&w.target===h&&S&&(S.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=S)==null||T.observe(t)})),r()}),h&&!d&&S.observe(h),S.observe(t));let b,_=d?Zh(e):null;d&&E();function E(){const R=Zh(e);_&&!kL(_,R)&&r(),_=R,b=requestAnimationFrame(E)}return r(),()=>{var R;m.forEach(w=>{s&&w.removeEventListener("scroll",r),l&&w.removeEventListener("resize",r)}),g?.(),(R=S)==null||R.disconnect(),S=null,d&&cancelAnimationFrame(b)}}const i1e=Lbe,o1e=Ube,s1e=$be,l1e=Vbe,u1e=Pbe,c1e=qbe,f1e=(e,t,r)=>{const i=new Map,s={platform:r1e,...r},l={...s.platform,_c:i};return zbe(e,t,{...s,platform:l})};var d1e=typeof document<"u",h1e=function(){},XS=d1e?j.useLayoutEffect:h1e;function $w(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(i=r;i--!==0;)if(!$w(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;){const l=s[i];if(!(l==="_owner"&&e.$$typeof)&&!$w(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function DL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YD(e,t){const r=DL(e);return Math.round(t*r)/r}function xT(e){const t=j.useRef(e);return XS(()=>{t.current=e}),t}function p1e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,g]=j.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,S]=j.useState(i);$w(v,i)||S(i);const[b,_]=j.useState(null),[E,R]=j.useState(null),w=j.useCallback(Y=>{Y!==C.current&&(C.current=Y,_(Y))},[]),T=j.useCallback(Y=>{Y!==M.current&&(M.current=Y,R(Y))},[]),x=l||b,O=c||E,C=j.useRef(null),M=j.useRef(null),D=j.useRef(m),$=d!=null,q=xT(d),L=xT(s),V=xT(h),F=j.useCallback(()=>{if(!C.current||!M.current)return;const Y={placement:t,strategy:r,middleware:v};L.current&&(Y.platform=L.current),f1e(C.current,M.current,Y).then(fe=>{const ie={...fe,isPositioned:V.current!==!1};re.current&&!$w(D.current,ie)&&(D.current=ie,gs.flushSync(()=>{g(ie)}))})},[v,t,r,L,V]);XS(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[h]);const re=j.useRef(!1);XS(()=>(re.current=!0,()=>{re.current=!1}),[]),XS(()=>{if(x&&(C.current=x),O&&(M.current=O),x&&O){if(q.current)return q.current(x,O,F);F()}},[x,O,F,q,$]);const ae=j.useMemo(()=>({reference:C,floating:M,setReference:w,setFloating:T}),[w,T]),K=j.useMemo(()=>({reference:x,floating:O}),[x,O]),B=j.useMemo(()=>{const Y={position:r,left:0,top:0};if(!K.floating)return Y;const fe=YD(K.floating,m.x),ie=YD(K.floating,m.y);return f?{...Y,transform:"translate("+fe+"px, "+ie+"px)",...DL(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:ie}},[r,f,K.floating,m.x,m.y]);return j.useMemo(()=>({...m,update:F,refs:ae,elements:K,floatingStyles:B}),[m,F,ae,K,B])}const m1e=(e,t)=>({...i1e(e),options:[e,t]}),g1e=(e,t)=>({...o1e(e),options:[e,t]}),y1e=(e,t)=>({...c1e(e),options:[e,t]}),v1e=(e,t)=>({...s1e(e),options:[e,t]}),b1e=(e,t)=>({...l1e(e),options:[e,t]}),S1e=(e,t)=>({...u1e(e),options:[e,t]}),w1e={intentional:"onClick",sloppy:"onPointerDown"};function E1e(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function g5(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("referenceElement"),c=r.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=r.context,{enabled:h=!0,escapeKey:m=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:S=!1,referencePressEvent:b="sloppy",ancestorScroll:_=!1,bubbles:E,externalTree:R}=t,w=up(R),T=ot(typeof g=="function"?g:()=>!1),x=typeof g=="function"?T:g,O=j.useRef(!1),{escapeKey:C,outsidePress:M}=E1e(E),D=j.useRef(null),$=to(),q=to(),L=ot(()=>{q.clear(),d.current.insideReactTree=!1}),V=j.useRef(!1),F=j.useRef(""),re=ot(te=>{F.current=te.pointerType}),ae=ot(()=>{const te=F.current,Se=te==="pen"||!te?"mouse":te,we=typeof v=="function"?v():v;return typeof we=="string"?we:we[Se]}),K=ot(te=>{if(!i||!h||!m||te.key!=="Escape"||V.current)return;const Se=d.current.floatingContext?.nodeId,we=w?Ph(w.nodesRef.current,Se):[];if(!C&&we.length>0){let Pe=!0;if(we.forEach(Ge=>{Ge.context?.open&&!Ge.context.dataRef.current.__escapeKeyBubbles&&(Pe=!1)}),!Pe)return}const $e=Hve(te)?te.nativeEvent:te,Te=mn(F7,$e);r.setOpen(!1,Te),!C&&!Te.isPropagationAllowed&&te.stopPropagation()}),B=ot(te=>{const Se=ae();return Se==="intentional"&&te.type!=="click"||Se==="sloppy"&&te.type==="click"}),Y=ot(()=>{d.current.insideReactTree=!0,q.start(0,L)}),fe=ot((te,Se=!1)=>{if(B(te)){L();return}if(d.current.insideReactTree){L();return}if(ae()==="intentional"&&Se||typeof x=="function"&&!x(te))return;const we=ro(te),$e=`[${_b("inert")}]`,Te=fa(r.select("floatingElement")).querySelectorAll($e),Pe=r.context.triggerElements;if(we&&(Pe.hasElement(we)||Pe.hasMatchingElement(Je=>zn(Je,we))))return;let Ge=ir(we)?we:null;for(;Ge&&!oc(Ge);){const Je=uc(Ge);if(oc(Je)||!ir(Je))break;Ge=Je}if(Te.length&&ir(we)&&!Bve(we)&&!zn(we,r.select("floatingElement"))&&Array.from(Te).every(Je=>!zn(Ge,Je)))return;if(Gr(we)&&!("touches"in te)){const Je=oc(we),ke=Qo(we),Ue=/auto|scroll/,Xe=Je||Ue.test(ke.overflowX),Mt=Je||Ue.test(ke.overflowY),Ae=Xe&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,xe=Mt&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,Ne=ke.direction==="rtl",Ke=xe&&(Ne?te.offsetX<=we.offsetWidth-we.clientWidth:te.offsetX>we.clientWidth),vt=Ae&&te.offsetY>we.clientHeight;if(Ke||vt)return}const Ce=d.current.floatingContext?.nodeId,Be=w&&Ph(w.nodesRef.current,Ce).some(Je=>ll(te,Je.context?.elements.floating));if(ll(te,r.select("floatingElement"))||ll(te,r.select("domReferenceElement"))||Be)return;const Fe=w?Ph(w.nodesRef.current,Ce):[];if(Fe.length>0){let Je=!0;if(Fe.forEach(ke=>{ke.context?.open&&!ke.context.dataRef.current.__outsidePressBubbles&&(Je=!1)}),!Je)return}r.setOpen(!1,mn(i5,te)),L()}),ie=ot(te=>{ae()!=="sloppy"||te.pointerType==="touch"||!r.select("open")||!h||ll(te,r.select("floatingElement"))||ll(te,r.select("domReferenceElement"))||fe(te)}),N=ot(te=>{if(ae()!=="sloppy"||!r.select("open")||!h||ll(te,r.select("floatingElement"))||ll(te,r.select("domReferenceElement")))return;const Se=te.touches[0];Se&&(D.current={startTime:Date.now(),startX:Se.clientX,startY:Se.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}),I=ot(te=>{const Se=ro(te);function we(){N(te),Se?.removeEventListener(te.type,we)}Se?.addEventListener(te.type,we)}),U=ot(te=>{const Se=O.current;if(O.current=!1,$.clear(),te.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)return;const we=ro(te);function $e(){te.type==="pointerdown"?ie(te):fe(te,Se),we?.removeEventListener(te.type,$e)}we?.addEventListener(te.type,$e)}),P=ot(te=>{if(ae()!=="sloppy"||!D.current||ll(te,r.select("floatingElement"))||ll(te,r.select("domReferenceElement")))return;const Se=te.touches[0];if(!Se)return;const we=Math.abs(Se.clientX-D.current.startX),$e=Math.abs(Se.clientY-D.current.startY),Te=Math.sqrt(we*we+$e*$e);Te>5&&(D.current.dismissOnTouchEnd=!0),Te>10&&(fe(te),$.clear(),D.current=null)}),G=ot(te=>{const Se=ro(te);function we(){P(te),Se?.removeEventListener(te.type,we)}Se?.addEventListener(te.type,we)}),ee=ot(te=>{ae()!=="sloppy"||!D.current||ll(te,r.select("floatingElement"))||ll(te,r.select("domReferenceElement"))||(D.current.dismissOnTouchEnd&&fe(te),$.clear(),D.current=null)}),ue=ot(te=>{const Se=ro(te);function we(){ee(te),Se?.removeEventListener(te.type,we)}Se?.addEventListener(te.type,we)});j.useEffect(()=>{if(!i||!h)return;d.current.__escapeKeyBubbles=C,d.current.__outsidePressBubbles=M;const te=new af;function Se(Ge){r.setOpen(!1,mn(rf,Ge))}function we(){te.clear(),V.current=!0}function $e(){te.start(l2()?5:0,()=>{V.current=!1})}const Te=fa(s);Te.addEventListener("pointerdown",re,!0),m&&(Te.addEventListener("keydown",K),Te.addEventListener("compositionstart",we),Te.addEventListener("compositionend",$e)),x&&(Te.addEventListener("click",U,!0),Te.addEventListener("pointerdown",U,!0),Te.addEventListener("touchstart",I,!0),Te.addEventListener("touchmove",G,!0),Te.addEventListener("touchend",ue,!0),Te.addEventListener("mousedown",U,!0));let Pe=[];return _&&(ir(c)&&(Pe=Pc(c)),ir(s)&&(Pe=Pe.concat(Pc(s))),!ir(l)&&l&&l.contextElement&&(Pe=Pe.concat(Pc(l.contextElement)))),Pe=Pe.filter(Ge=>Ge!==Te.defaultView?.visualViewport),Pe.forEach(Ge=>{Ge.addEventListener("scroll",Se,{passive:!0})}),()=>{Te.removeEventListener("pointerdown",re,!0),m&&(Te.removeEventListener("keydown",K),Te.removeEventListener("compositionstart",we),Te.removeEventListener("compositionend",$e)),x&&(Te.removeEventListener("click",U,!0),Te.removeEventListener("pointerdown",U,!0),Te.removeEventListener("touchstart",I,!0),Te.removeEventListener("touchmove",G,!0),Te.removeEventListener("touchend",ue,!0),Te.removeEventListener("mousedown",U,!0)),Pe.forEach(Ge=>{Ge.removeEventListener("scroll",Se)}),te.clear(),O.current=!1}},[d,s,l,c,m,x,i,f,_,h,C,M,K,fe,U,ie,I,G,ue,re,r]),j.useEffect(L,[x,L]);const ve=j.useMemo(()=>({onKeyDown:K,...S&&{[w1e[b]]:te=>{r.setOpen(!1,mn(Vc,te.nativeEvent))},...b!=="intentional"&&{onClick(te){r.setOpen(!1,mn(Vc,te.nativeEvent))}}}}),[K,r,S,b]),Ee=ot(te=>{const Se=ro(te.nativeEvent);!zn(r.select("floatingElement"),Se)||te.button!==0||(O.current=!0)}),Oe=ot(te=>{!i||!h||te.button!==0||(O.current=!0)}),de=j.useMemo(()=>({onKeyDown:K,onPointerDown:Ee,onMouseDown:Ee,onMouseUp:Ee,onClickCapture:Y,onMouseDownCapture(te){Y(),Oe(te)},onPointerDownCapture(te){Y(),Oe(te)},onMouseUpCapture:Y,onTouchEndCapture:Y,onTouchMoveCapture:Y}),[K,Ee,Y,Oe]);return j.useMemo(()=>h?{reference:ve,floating:de,trigger:ve}:{},[h,ve,de])}var Pw=Symbol("NOT_FOUND");function x1e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _1e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function T1e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var ZD=e=>Array.isArray(e)?e:[e];function C1e(e){const t=Array.isArray(e[0])?e[0]:e;return T1e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function O1e(e,t){const r=[],{length:i}=e;for(let s=0;s<i;s++)r.push(e[s].apply(null,t));return r}function R1e(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Pw},put(r,i){t={key:r,value:i}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function A1e(e,t){let r=[];function i(f){const d=r.findIndex(h=>t(f,h.key));if(d>-1){const h=r[d];return d>0&&(r.splice(d,1),r.unshift(h)),h.value}return Pw}function s(f,d){i(f)===Pw&&(r.unshift({key:f,value:d}),r.length>e&&r.pop())}function l(){return r}function c(){r=[]}return{get:i,put:s,getEntries:l,clear:c}}var M1e=(e,t)=>e===t;function j1e(e){return function(r,i){if(r===null||i===null||r.length!==i.length)return!1;const{length:s}=r;for(let l=0;l<s;l++)if(!e(r[l],i[l]))return!1;return!0}}function k1e(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:i=M1e,maxSize:s=1,resultEqualityCheck:l}=r,c=j1e(i);let f=0;const d=s<=1?R1e(c):A1e(s,c);function h(){let m=d.get(arguments);if(m===Pw){if(m=e.apply(null,arguments),f++,l){const v=d.getEntries().find(S=>l(S.value,m));v&&(m=v.value,f!==0&&f--)}d.put(arguments,m)}return m}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var D1e=class{constructor(e){this.value=e}deref(){return this.value}},N1e=typeof WeakRef<"u"?WeakRef:D1e,z1e=0,XD=1;function TS(){return{s:z1e,v:void 0,o:null,p:null}}function NL(e,t={}){let r=TS();const{resultEqualityCheck:i}=t;let s,l=0;function c(){let f=r;const{length:d}=arguments;for(let g=0,v=d;g<v;g++){const S=arguments[g];if(typeof S=="function"||typeof S=="object"&&S!==null){let b=f.o;b===null&&(f.o=b=new WeakMap);const _=b.get(S);_===void 0?(f=TS(),b.set(S,f)):f=_}else{let b=f.p;b===null&&(f.p=b=new Map);const _=b.get(S);_===void 0?(f=TS(),b.set(S,f)):f=_}}const h=f;let m;if(f.s===XD)m=f.v;else if(m=e.apply(null,arguments),l++,i){const g=s?.deref?.()??s;g!=null&&i(g,m)&&(m=g,l!==0&&l--),s=typeof m=="object"&&m!==null||typeof m=="function"?new N1e(m):m}return h.s=XD,h.v=m,m}return c.clearCache=()=>{r=TS(),c.resetResultsCount()},c.resultsCount=()=>l,c.resetResultsCount=()=>{l=0},c}function zL(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let l=0,c=0,f,d={},h=s.pop();typeof h=="object"&&(d=h,h=s.pop()),x1e(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:S=NL,argsMemoizeOptions:b=[]}=m,_=ZD(v),E=ZD(b),R=C1e(s),w=g(function(){return l++,h.apply(null,arguments)},..._),T=S(function(){c++;const O=O1e(R,arguments);return f=w.apply(null,O),f},...E);return Object.assign(T,{resultFunc:h,memoizedResultFunc:w,dependencies:R,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>f,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:g,argsMemoize:S})};return Object.assign(i,{withTypes:()=>i}),i}var $1e=zL(NL),P1e=Object.assign((e,t=$1e)=>{_1e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(l=>e[l]);return t(i,(...l)=>l.reduce((c,f,d)=>(c[r[d]]=f,c),{}))},{withTypes:()=>P1e});zL({memoize:k1e,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ut=(e,t,r,i,s,l,...c)=>{if(c.length>0)throw new Error(Si(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var _T={exports:{}},TT={};var QD;function I1e(){if(QD)return TT;QD=1;var e=bm();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function f(g,v){var S=v(),b=i({inst:{value:S,getSnapshot:v}}),_=b[0].inst,E=b[1];return l(function(){_.value=S,_.getSnapshot=v,d(_)&&E({inst:_})},[g,S,v]),s(function(){return d(_)&&E({inst:_}),g(function(){d(_)&&E({inst:_})})},[g]),c(S),S}function d(g){var v=g.getSnapshot;g=g.value;try{var S=v();return!r(g,S)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return TT.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,TT}var WD;function $L(){return WD||(WD=1,_T.exports=I1e()),_T.exports}var L1e=$L(),CT={exports:{}},OT={};var JD;function U1e(){if(JD)return OT;JD=1;var e=bm(),t=$L();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var i=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,f=e.useMemo,d=e.useDebugValue;return OT.useSyncExternalStoreWithSelector=function(h,m,g,v,S){var b=l(null);if(b.current===null){var _={hasValue:!1,value:null};b.current=_}else _=b.current;b=f(function(){function R(C){if(!w){if(w=!0,T=C,C=v(C),S!==void 0&&_.hasValue){var M=_.value;if(S(M,C))return x=M}return x=C}if(M=x,i(T,C))return M;var D=v(C);return S!==void 0&&S(M,D)?(T=C,M):(T=C,x=D)}var w=!1,T,x,O=g===void 0?null:g;return[function(){return R(m())},O===null?void 0:function(){return R(O())}]},[m,g,v,S]);var E=s(h,b[0],b[1]);return c(function(){_.hasValue=!0,_.value=E},[E]),d(E),E},OT}var eN;function q1e(){return eN||(eN=1,CT.exports=U1e()),CT.exports}var V1e=q1e();const F1e=GR(19),B1e=F1e?H1e:G1e;function qt(e,t,r,i,s){return B1e(e,t,r,i,s)}function H1e(e,t,r,i,s){const l=j.useCallback(()=>t(e.getSnapshot(),r,i,s),[e,t,r,i,s]);return L1e.useSyncExternalStore(e.subscribe,l,l)}function G1e(e,t,r,i,s){return V1e.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,r,i,s))}class Xp{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const r=this.updateTick;for(const i of this.listeners){if(r!==this.updateTick)return;i(t)}}update(t){for(const r in t)if(!Object.is(this.state[r],t[r])){Xp.prototype.setState.call(this,{...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||Xp.prototype.setState.call(this,{...this.state,[t]:r})}notifyAll(){const t={...this.state};Xp.prototype.setState.call(this,t)}}class y5 extends Xp{constructor(t,r={},i){super(t),this.context=r,this.selectors=i}controlledValues=new Map;useSyncedValue(t,r){j.useDebugValue(t),ct(()=>{this.state[t]!==r&&this.set(t,r)},[t,r])}useSyncedValueWithCleanup(t,r){const i=this;ct(()=>(i.state[t]!==r&&i.set(t,r),()=>{i.set(t,void 0)}),[i,t,r])}useSyncedValues(t){const r=this,i=Object.values(t);ct(()=>{r.update(t)},[r,...i])}useControlledProp(t,r,i){j.useDebugValue(t);const s=this,l=r!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,l),!l&&!Object.is(this.state[t],i)&&super.setState({...this.state,[t]:i})),ct(()=>{l&&!Object.is(s.state[t],r)&&super.setState({...s.state,[t]:r})},[s,t,r,i,l])}set(t,r){this.controlledValues.get(t)!==!0&&super.set(t,r)}update(t){const r={...t};for(const i in r)if(Object.hasOwn(r,i)&&this.controlledValues.get(i)===!0){delete r[i];continue}super.update(r)}setState(t){const r={...t};for(const i in r)if(Object.hasOwn(r,i)&&this.controlledValues.get(i)===!0){delete r[i];continue}super.setState({...this.state,...r})}select=(t,r,i,s)=>{const l=this.selectors[t];return l(this.state,r,i,s)};useState=(t,r,i,s)=>{j.useDebugValue(t);const l=this.selectors[t];return qt(this,l,r,i,s)};useContextCallback(t,r){j.useDebugValue(t);const i=ot(r??Ko);this.context[t]=i}useStateSetter(t){const r=j.useRef(void 0);return r.current===void 0&&(r.current=i=>{this.set(t,i)}),r.current}observe(t,r){let i;typeof t=="function"?i=t:i=this.selectors[t];let s=i(this.state);return r(s,s,this),this.subscribe(l=>{const c=i(l);if(!Object.is(s,c)){const f=s;s=c,r(c,f,this)}})}}const K1e={open:ut(e=>e.open),domReferenceElement:ut(e=>e.domReferenceElement),referenceElement:ut(e=>e.positionReference??e.referenceElement),floatingElement:ut(e=>e.floatingElement),floatingId:ut(e=>e.floatingId)};class v5 extends y5{constructor(t){const{nested:r,noEmit:i,onOpenChange:s,triggerElements:l,...c}=t;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:yL(),nested:r,noEmit:i,triggerElements:l},K1e)}setOpen=(t,r)=>{if((!t||!this.state.open||tL(r.event))&&(this.context.dataRef.current.openEvent=t?r.event:void 0),!this.context.noEmit){const i={open:t,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)}this.context.onOpenChange?.(t,r)}}function R2(e,t=!1,r=!1){const[i,s]=j.useState(e&&t?"idle":void 0),[l,c]=j.useState(e);return e&&!l&&(c(!0),s("starting")),!e&&l&&i!=="ending"&&!r&&s("ending"),!e&&!l&&i==="ending"&&s(void 0),ct(()=>{if(!e&&l&&i!=="ending"&&r){const f=_l.request(()=>{s("ending")});return()=>{_l.cancel(f)}}},[e,l,i,r]),ct(()=>{if(!e||t)return;const f=_l.request(()=>{s(void 0)});return()=>{_l.cancel(f)}},[t,e]),ct(()=>{if(!e||!t)return;e&&l&&i!=="idle"&&s("starting");const f=_l.request(()=>{s("idle")});return()=>{_l.cancel(f)}},[t,e,l,s,i]),j.useMemo(()=>({mounted:l,setMounted:c,transitionStatus:i}),[l,i])}function PL(e,t=!1,r=!0){const i=C2();return ot((s,l=null)=>{i.cancel();function c(){gs.flushSync(s)}const f=rc(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let g=function(){const S=Eb.startingStyle;if(!d.hasAttribute(S)){i.request(v);return}const b=new MutationObserver(()=>{d.hasAttribute(S)||(b.disconnect(),v())});b.observe(d,{attributes:!0,attributeFilter:[S]}),l?.addEventListener("abort",()=>b.disconnect(),{once:!0})},v=function(){Promise.all(d.getAnimations().map(S=>S.finished)).then(()=>{l?.aborted||c()}).catch(()=>{const S=d.getAnimations();if(r){if(l?.aborted)return;c()}else S.length>0&&S.some(b=>b.pending||b.playState!=="finished")&&v()})};var h=g,m=v;if(t){g();return}i.request(v)}})}function cp(e){const{enabled:t=!0,open:r,ref:i,onComplete:s}=e,l=ot(s),c=PL(i,r,!1);j.useEffect(()=>{if(!t)return;const f=new AbortController;return c(l,f.signal),()=>{f.abort()}},[t,r,l,c])}function Y1e(e,t){const r=j.useRef(null),i=j.useRef(null);return j.useCallback(s=>{if(e!==void 0){if(r.current!==null){const l=r.current,c=i.current,f=t.context.triggerElements.getById(l);c&&f===c&&t.context.triggerElements.delete(l),r.current=null,i.current=null}s!==null&&(r.current=e,i.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function Z1e(e,t,r,i){const s=r.useState("isMountedByTrigger",e),l=Y1e(e,r),c=ot(f=>{if(l(f),!f||!r.select("open"))return;const d=r.select("activeTriggerId");if(d===e){r.update({activeTriggerElement:f,...i});return}d==null&&r.update({activeTriggerId:e,activeTriggerElement:f,...i})});return ct(()=>{s&&r.update({activeTriggerElement:t.current,...i})},[s,r,t,...Object.values(i)]),{registerTrigger:c,isMountedByThisTrigger:s}}function IL(e){const t=e.useState("open");ct(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const r=e.context.triggerElements.entries().next();if(!r.done){const[i,s]=r.value;e.update({activeTriggerId:i,activeTriggerElement:s})}}},[t,e])}function LL(e,t,r){const{mounted:i,setMounted:s,transitionStatus:l}=R2(e);t.useSyncedValues({mounted:i,transitionStatus:l});const c=ot(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return cp({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:l}}class A2{constructor(){this.elements=new Set,this.idMap=new Map}add(t,r){const i=this.idMap.get(t);i!==r&&(i!==void 0&&this.elements.delete(i),this.elements.add(r),this.idMap.set(t,r))}delete(t){const r=this.idMap.get(t);r&&(this.elements.delete(r),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const r of this.elements)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function X1e(){return new v5({open:!1,floatingElement:null,referenceElement:null,triggerElements:new A2,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function UL(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:X1e(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Da,inactiveTriggerProps:Da,popupProps:Da}}const qL={open:ut(e=>e.open),mounted:ut(e=>e.mounted),transitionStatus:ut(e=>e.transitionStatus),floatingRootContext:ut(e=>e.floatingRootContext),preventUnmountingOnClose:ut(e=>e.preventUnmountingOnClose),payload:ut(e=>e.payload),activeTriggerId:ut(e=>e.activeTriggerId),activeTriggerElement:ut(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ut((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ut((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ut((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ut((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ut(e=>e.popupProps),popupElement:ut(e=>e.popupElement),positionerElement:ut(e=>e.positionerElement)};function VL(e){const{open:t=!1,onOpenChange:r,elements:i={}}=e,s=Lm(),l=mf()!=null,c=oo(()=>new v5({open:t,onOpenChange:r,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:i.triggers??new A2,floatingId:s,nested:l,noEmit:e.noEmit||!1})).current;return ct(()=>{const f={open:t,floatingId:s};i.reference!==void 0&&(f.referenceElement=i.reference,f.domReferenceElement=ir(i.reference)?i.reference:null),i.floating!==void 0&&(f.floatingElement=i.floating),c.update(f)},[t,s,i.reference,i.floating,c]),c.context.onOpenChange=r,c.context.nested=l,c.context.noEmit=e.noEmit||!1,c}function Q1e(e={}){const{nodeId:t,externalTree:r}=e,i=VL(e),s=e.rootContext||i,l={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[c,f]=j.useState(null),d=j.useRef(null),h=up(r);ct(()=>{l.domReference&&(d.current=l.domReference)},[l.domReference]);const m=p1e({...e,elements:{...l,...c&&{reference:c}}}),g=j.useCallback(M=>{const D=ir(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;f(D),m.refs.setReference(D)},[m.refs]),[v,S]=j.useState(null),[b,_]=j.useState(null);s.useSyncedValue("referenceElement",v),s.useSyncedValue("domReferenceElement",ir(v)?v:null),s.useSyncedValue("floatingElement",b);const E=j.useCallback(M=>{(ir(M)||M===null)&&(d.current=M,S(M)),(ir(m.refs.reference.current)||m.refs.reference.current===null||M!==null&&!ir(M))&&m.refs.setReference(M)},[m.refs,S]),R=j.useCallback(M=>{_(M),m.refs.setFloating(M)},[m.refs]),w=j.useMemo(()=>({...m.refs,setReference:E,setFloating:R,setPositionReference:g,domReference:d}),[m.refs,E,R,g]),T=j.useMemo(()=>({...m.elements,domReference:l.domReference}),[m.elements,l.domReference]),x=s.useState("open"),O=s.useState("floatingId"),C=j.useMemo(()=>({...m,dataRef:s.context.dataRef,open:x,onOpenChange:s.setOpen,events:s.context.events,floatingId:O,refs:w,elements:T,nodeId:t,rootStore:s}),[m,w,T,t,s,x,O]);return ct(()=>{s.context.dataRef.current.floatingContext=C;const M=h?.nodesRef.current.find(D=>D.id===t);M&&(M.context=C)}),j.useMemo(()=>({...m,context:C,refs:w,elements:T,rootStore:s}),[m,w,T,C,s])}function FL(e){const{popupStore:t,noEmit:r=!1,treatPopupAsFloatingElement:i=!1,onOpenChange:s}=e,l=Lm(),c=mf()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(i?"popupElement":"positionerElement"),m=t.context.triggerElements,g=oo(()=>new v5({open:f,referenceElement:d,floatingElement:h,triggerElements:m,onOpenChange:s,floatingId:l,nested:c,noEmit:r})).current;return ct(()=>{const v={open:f,floatingId:l,referenceElement:d,floatingElement:h};ir(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,l,d,h,g]),g.context.onOpenChange=s,g.context.nested=c,g.context.noEmit=r,g}const _O=_b("safe-polygon"),W1e=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Q7}`;function J1e(e){return e?!!e.closest(W1e):!1}function BL(e){const t=j.useRef(void 0),r=j.useRef(!1),i=j.useRef(void 0),s=j.useRef(!0),l=j.useRef(!1),c=j.useRef(()=>{}),f=j.useRef(!1),d=to(),h=to(),m=j.useRef(void 0);return j.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:r,handlerRef:i,blockMouseMoveRef:s,performedPointerEventsMutationRef:l,unbindMouseMoveRef:c,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:m}),g.hoverInteractionState},[e,t,r,i,s,l,c,f,d,h,m])}const eSe=new Set(["click","mousedown"]);function tSe(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),{dataRef:c}=r.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:m,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:S,unbindMouseMoveRef:b,restTimeoutPendingRef:_,openChangeTimeout:E,handleCloseOptionsRef:R}=BL(r),w=up(h),T=mf(),x=ot(()=>g.current?!0:c.current.openEvent?eSe.has(c.current.openEvent.type):!1),O=ot(()=>{const q=c.current.openEvent?.type;return q?.includes("mouse")&&q!=="mousedown"}),C=j.useCallback((q,L=!0)=>{const V=nSe(d,m.current);V&&!v.current?E.start(V,()=>r.setOpen(!1,mn(Ho,q))):L&&(E.clear(),r.setOpen(!1,mn(Ho,q)))},[d,v,r,m,E]),M=ot(()=>{b.current(),v.current=void 0}),D=ot(()=>{if(S.current){const q=fa(s).body;q.style.pointerEvents="",q.removeAttribute(_O),S.current=!1}}),$=ot(q=>{const L=ro(q);if(!J1e(L)){g.current=!1;return}g.current=!0});ct(()=>{i||(m.current=void 0,_.current=!1,g.current=!1,M(),D())},[i,m,_,g,M,D]),j.useEffect(()=>()=>{M()},[M]),j.useEffect(()=>D,[D]),ct(()=>{if(f&&i&&R.current?.blockPointerEvents&&O()&&ir(l)&&s){S.current=!0;const q=fa(s).body;q.setAttribute(_O,"");const L=l,V=s,F=w?.nodesRef.current.find(re=>re.id===T)?.context?.elements.floating;return F&&(F.style.pointerEvents=""),q.style.pointerEvents="none",L.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{q.style.pointerEvents="",L.style.pointerEvents="",V.style.pointerEvents=""}}},[f,i,l,s,R,O,w,T,S]),j.useEffect(()=>{if(!f)return;function q(re){if(x()||!c.current.floatingContext||!r.select("open"))return;const ae=r.context.triggerElements;re.relatedTarget&&ae.hasElement(re.relatedTarget)||(D(),M(),x()||C(re))}function L(re){E.clear(),D(),v.current?.(re),M()}function V(re){x()||C(re,!1)}const F=s;return F&&(F.addEventListener("mouseleave",q),F.addEventListener("mouseenter",L),F.addEventListener("mouseleave",V),F.addEventListener("pointerdown",$,!0)),()=>{F&&(F.removeEventListener("mouseleave",q),F.removeEventListener("mouseenter",L),F.removeEventListener("mouseleave",V),F.removeEventListener("pointerdown",$,!0))}})}function nSe(e,t){return t&&!hm(t)?0:typeof e=="function"?e():e}function RT(e){return typeof e=="function"?e():e}const rSe={current:null};function aSe(e,t={}){const r="rootStore"in e?e.rootStore:e,{dataRef:i,events:s}=r.context,{enabled:l=!0,delay:c=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:m=!0,triggerElementRef:g=rSe,externalTree:v,isActiveTrigger:S=!0}=t,b=up(v),{pointerTypeRef:_,interactedInsideRef:E,handlerRef:R,blockMouseMoveRef:w,performedPointerEventsMutationRef:T,unbindMouseMoveRef:x,restTimeoutPendingRef:O,openChangeTimeout:C,restTimeout:M,handleCloseOptionsRef:D}=BL(r),$=ka(f),q=ka(c),L=ka(h);S&&(D.current=$.current?.__options);const V=ot(()=>E.current?!0:i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1),F=j.useCallback((B,Y=!0)=>{const fe=bT(q.current,"close",_.current);fe&&!R.current?C.start(fe,()=>r.setOpen(!1,mn(Ho,B))):Y&&(C.clear(),r.setOpen(!1,mn(Ho,B)))},[q,R,r,_,C]),re=ot(()=>{x.current(),R.current=void 0}),ae=ot(()=>{if(T.current){const B=fa(r.select("domReferenceElement")).body;B.style.pointerEvents="",B.removeAttribute(_O),T.current=!1}});j.useEffect(()=>{if(!l)return;function B(Y){Y.open||(C.clear(),M.clear(),w.current=!0,O.current=!1)}return s.on("openchange",B),()=>{s.off("openchange",B)}},[l,s,C,M,w,O]);const K=ot(B=>{if(V()||!i.current.floatingContext)return;const Y=r.context.triggerElements;if(B.relatedTarget&&Y.hasElement(B.relatedTarget))return;const fe=g.current;$.current?.({...i.current.floatingContext,tree:b,x:B.clientX,y:B.clientY,onClose(){ae(),re(),!V()&&fe===r.select("domReferenceElement")&&F(B)}})(B)});return j.useEffect(()=>{if(!l)return;const B=g.current??(S?r.select("domReferenceElement"):null);if(!ir(B))return;function Y(N){if(C.clear(),w.current=!1,d&&!hm(_.current)||RT(L.current)>0&&!bT(q.current,"open"))return;const I=bT(q.current,"open",_.current),U=r.select("domReferenceElement"),P=r.context.triggerElements,G=(P.hasElement(N.target)||P.hasMatchingElement(Ee=>zn(Ee,N.target)))&&(!U||!zn(U,N.target)),ee=N.currentTarget??null,ue=r.select("open"),ve=!ue||G;G&&ue?r.setOpen(!0,mn(Ho,N,ee)):I?C.start(I,()=>{ve&&r.setOpen(!0,mn(Ho,N,ee))}):ve&&r.setOpen(!0,mn(Ho,N,ee))}function fe(N){if(V()){ae();return}x.current();const I=r.select("domReferenceElement"),U=fa(I);M.clear(),O.current=!1;const P=r.context.triggerElements;if(N.relatedTarget&&P.hasElement(N.relatedTarget))return;if($.current&&i.current.floatingContext){r.select("open")||C.clear();const ee=g.current;R.current=$.current({...i.current.floatingContext,tree:b,x:N.clientX,y:N.clientY,onClose(){ae(),re(),!V()&&ee===r.select("domReferenceElement")&&F(N,!0)}});const ue=R.current;ue(N),U.addEventListener("mousemove",ue),x.current=()=>{U.removeEventListener("mousemove",ue)};return}(_.current!=="touch"||!zn(r.select("floatingElement"),N.relatedTarget))&&F(N)}function ie(N){K(N)}return r.select("open")&&B.addEventListener("mouseleave",ie),m&&B.addEventListener("mousemove",Y,{once:!0}),B.addEventListener("mouseenter",Y),B.addEventListener("mouseleave",fe),()=>{B.removeEventListener("mouseleave",ie),m&&B.removeEventListener("mousemove",Y),B.removeEventListener("mouseenter",Y),B.removeEventListener("mouseleave",fe)}},[re,ae,w,i,q,F,r,l,$,K,S,V,d,m,_,L,M,O,C,g,b,x,R]),j.useMemo(()=>{function B(Y){_.current=Y.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(Y){const{nativeEvent:fe}=Y,ie=Y.currentTarget,N=r.select("domReferenceElement"),I=r.context.triggerElements,U=r.select("open"),P=(I.hasElement(Y.target)||I.hasMatchingElement(ee=>zn(ee,Y.target)))&&(!N||!zn(N,Y.target));if(d&&!hm(_.current)||U&&!P||RT(L.current)===0||!P&&O.current&&Y.movementX**2+Y.movementY**2<2)return;M.clear();function G(){if(O.current=!1,V())return;const ee=r.select("open");!w.current&&(!ee||P)&&r.setOpen(!0,mn(Ho,fe,ie))}_.current==="touch"?gs.flushSync(()=>{G()}):P&&U?G():(O.current=!0,M.start(RT(L.current),G))}}},[w,V,d,r,_,L,M,O])}function M2(e=[]){const t=e.map(h=>h?.reference),r=e.map(h=>h?.floating),i=e.map(h=>h?.item),s=e.map(h=>h?.trigger),l=j.useCallback(h=>CS(h,e,"reference"),t),c=j.useCallback(h=>CS(h,e,"floating"),r),f=j.useCallback(h=>CS(h,e,"item"),i),d=j.useCallback(h=>CS(h,e,"trigger"),s);return j.useMemo(()=>({getReferenceProps:l,getFloatingProps:c,getItemProps:f,getTriggerProps:d}),[l,c,f,d])}function CS(e,t,r){const i=new Map,s=r==="item",l={};r==="floating"&&(l.tabIndex=-1,l[yO]="");for(const c in e)s&&e&&(c===Z7||c===X7)||(l[c]=e[c]);for(let c=0;c<t.length;c+=1){let f;const d=t[c]?.[r];typeof d=="function"?f=e?d(e):null:f=d,f&&tN(l,f,s,i)}return tN(l,e,s,i),l}function tN(e,t,r,i){for(const s in t){const l=t[s];r&&(s===Z7||s===X7)||(s.startsWith("on")?(i.has(s)||i.set(s,[]),typeof l=="function"&&(i.get(s)?.push(l),e[s]=(...c)=>i.get(s)?.map(f=>f(...c)).find(f=>f!==void 0))):e[s]=l)}}const iSe="Escape";function j2(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function OS(e,t){return j2(t,e===s5||e===o1,e===Fc||e===Bc)}function AT(e,t,r){return j2(t,e===o1,r?e===Fc:e===Bc)||e==="Enter"||e===" "||e===""}function oSe(e,t,r){return j2(t,r?e===Fc:e===Bc,e===o1)}function sSe(e,t,r,i){const s=r?e===Bc:e===Fc,l=e===s5;return t==="both"||t==="horizontal"&&i&&i>1?e===iSe:j2(t,s,l)}function lSe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),c=r.context.dataRef,{listRef:f,activeIndex:d,onNavigate:h=()=>{},enabled:m=!0,selectedIndex:g=null,allowEscape:v=!1,loopFocus:S=!1,nested:b=!1,rtl:_=!1,virtual:E=!1,focusItemOnOpen:R="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:T=!0,disabledIndices:x=void 0,orientation:O="vertical",parentOrientation:C,cols:M=1,scrollItemIntoView:D=!0,itemSizes:$,dense:q=!1,id:L,resetOnPointerLeave:V=!0,externalTree:F}=t,re=xb(s),ae=ka(re),K=mf(),B=up(F);ct(()=>{c.current.orientation=O},[c,O]);const Y=vO(l),fe=j.useRef(R),ie=j.useRef(g??-1),N=j.useRef(null),I=j.useRef(!0),U=ot(ke=>{h(ie.current===-1?null:ie.current,ke)}),P=j.useRef(U),G=j.useRef(!!s),ee=j.useRef(i),ue=j.useRef(!1),ve=j.useRef(!1),Ee=ka(x),Oe=ka(i),de=ka(D),te=ka(g),Se=ka(V),we=ot(()=>{function ke(Ae){E?B?.events.emit("virtualfocus",Ae):ZS(Ae,{sync:ue.current,preventScroll:!0})}const Ue=f.current[ie.current],Xe=ve.current;Ue&&ke(Ue),(ue.current?Ae=>Ae():requestAnimationFrame)(()=>{const Ae=f.current[ie.current]||Ue;if(!Ae)return;Ue||ke(Ae);const xe=de.current;xe&&Te&&(Xe||!I.current)&&Ae.scrollIntoView?.(typeof xe=="boolean"?{block:"nearest",inline:"nearest"}:xe)})});ct(()=>{m&&(i&&s?(ie.current=g??-1,fe.current&&g!=null&&(ve.current=!0,U())):G.current&&(ie.current=-1,P.current()))},[m,i,s,g,U]),ct(()=>{if(m){if(!i){ue.current=!1;return}if(s)if(d==null){if(ue.current=!1,te.current!=null)return;if(G.current&&(ie.current=-1,we()),(!ee.current||!G.current)&&fe.current&&(N.current!=null||fe.current===!0&&N.current==null)){let ke=0;const Ue=()=>{f.current[0]==null?(ke<2&&(ke?requestAnimationFrame:queueMicrotask)(Ue),ke+=1):(ie.current=N.current==null||AT(N.current,O,_)||b?YS(f):wO(f),N.current=null,U())};Ue()}}else Gp(f,d)||(ie.current=d,we(),ve.current=!1)}},[m,i,s,d,te,b,f,O,_,U,we,Ee]),ct(()=>{if(!m||s||!B||E||!G.current)return;const ke=B.nodesRef.current,Ue=ke.find(Ae=>Ae.id===K)?.context?.elements.floating,Xe=ic(fa(s)),Mt=ke.some(Ae=>Ae.context&&zn(Ae.context.elements.floating,Xe));Ue&&!Mt&&I.current&&Ue.focus({preventScroll:!0})},[m,s,B,K,E]),ct(()=>{P.current=U,ee.current=i,G.current=!!s}),ct(()=>{i||(N.current=null,fe.current=R)},[i,R]);const $e=d!=null,Te=j.useMemo(()=>{function ke(Xe){if(!Oe.current)return;const Mt=f.current.indexOf(Xe.currentTarget);Mt!==-1&&ie.current!==Mt&&(ie.current=Mt,U(Xe))}return{onFocus(Xe){ue.current=!0,ke(Xe)},onClick:({currentTarget:Xe})=>Xe.focus({preventScroll:!0}),onMouseMove(Xe){ue.current=!0,ve.current=!1,w&&ke(Xe)},onPointerLeave(Xe){if(!Oe.current||!I.current||Xe.pointerType==="touch")return;ue.current=!0;const Mt=Xe.relatedTarget;!w||f.current.includes(Mt)||Se.current&&(ie.current=-1,U(Xe),E||ae.current?.focus({preventScroll:!0}))}}},[Oe,ae,w,f,U,Se,E]),Pe=j.useCallback(()=>C??B?.nodesRef.current.find(ke=>ke.id===K)?.context?.dataRef?.current.orientation,[K,B,C]),Ge=ot(ke=>{if(I.current=!1,ue.current=!0,ke.which===229||!Oe.current&&ke.currentTarget===ae.current)return;if(b&&sSe(ke.key,O,_,M)){OS(ke.key,Pe())||Ti(ke),r.setOpen(!1,mn(yT,ke.nativeEvent)),Gr(l)&&(E?B?.events.emit("virtualfocus",l):l.focus());return}const Ue=ie.current,Xe=YS(f,x),Mt=wO(f,x);if(Y||(ke.key==="Home"&&(Ti(ke),ie.current=Xe,U(ke)),ke.key==="End"&&(Ti(ke),ie.current=Mt,U(ke))),M>1){const Ae=$||Array.from({length:f.current.length},()=>({width:1,height:1})),xe=aL(Ae,M,q),Ne=xe.findIndex(Xt=>Xt!=null&&!Hc(f,Xt,x)),Ke=xe.reduce((Xt,Vt,wt)=>Vt!=null&&!Hc(f,Vt,x)?wt:Xt,-1),vt=xe[rL({current:xe.map(Xt=>Xt!=null?f.current[Xt]:null)},{event:ke,orientation:O,loopFocus:S,rtl:_,cols:M,disabledIndices:oL([...(typeof x!="function"?x:null)||f.current.map((Xt,Vt)=>Hc(f,Vt,x)?Vt:void 0),void 0],xe),minIndex:Ne,maxIndex:Ke,prevIndex:iL(ie.current>Mt?Xe:ie.current,Ae,xe,M,ke.key===o1?"bl":ke.key===(_?Fc:Bc)?"tr":"tl"),stopEvent:!0})];if(vt!=null&&(ie.current=vt,U(ke)),O==="both")return}if(OS(ke.key,O)){if(Ti(ke),i&&!E&&ic(ke.currentTarget.ownerDocument)===ke.currentTarget){ie.current=AT(ke.key,O,_)?Xe:Mt,U(ke);return}AT(ke.key,O,_)?S?Ue>=Mt?v&&Ue!==f.current.length?ie.current=-1:(ue.current=!1,ie.current=Xe):ie.current=di(f,{startingIndex:Ue,disabledIndices:x}):ie.current=Math.min(Mt,di(f,{startingIndex:Ue,disabledIndices:x})):S?Ue<=Xe?v&&Ue!==-1?ie.current=f.current.length:(ue.current=!1,ie.current=Mt):ie.current=di(f,{startingIndex:Ue,decrement:!0,disabledIndices:x}):ie.current=Math.max(Xe,di(f,{startingIndex:Ue,decrement:!0,disabledIndices:x})),Gp(f,ie.current)&&(ie.current=-1),U(ke)}}),Ce=j.useMemo(()=>E&&i&&$e&&{"aria-activedescendant":`${L}-${d}`},[E,i,$e,L,d]),Be=j.useMemo(()=>({"aria-orientation":O==="both"?void 0:O,...Y?{}:Ce,onKeyDown(ke){if(ke.key==="Tab"&&ke.shiftKey&&i&&!E){const Ue=ro(ke.nativeEvent);if(Ue&&!zn(ae.current,Ue))return;Ti(ke),r.setOpen(!1,mn(Yh,ke.nativeEvent)),Gr(l)&&l.focus();return}Ge(ke)},onPointerMove(){I.current=!0}}),[Ce,Ge,ae,O,Y,r,i,E,l]),Fe=j.useMemo(()=>{function ke(Xe){R==="auto"&&J7(Xe.nativeEvent)&&(fe.current=!E)}function Ue(Xe){fe.current=R,R==="auto"&&eL(Xe.nativeEvent)&&(fe.current=!0)}return{onKeyDown(Xe){const Mt=r.select("open");I.current=!1;const Ae=Xe.key.startsWith("Arrow"),xe=oSe(Xe.key,Pe(),_),Ne=OS(Xe.key,O),Ke=(b?xe:Ne)||Xe.key==="Enter"||Xe.key.trim()==="";if(E&&Mt)return Ge(Xe);if(!(!Mt&&!T&&Ae)){if(Ke){const vt=OS(Xe.key,Pe());N.current=b&&vt?null:Xe.key}if(b){xe&&(Ti(Xe),Mt?(ie.current=YS(f,Ee.current),U(Xe)):r.setOpen(!0,mn(yT,Xe.nativeEvent,Xe.currentTarget)));return}Ne&&(te.current!=null&&(ie.current=te.current),Ti(Xe),!Mt&&T?r.setOpen(!0,mn(yT,Xe.nativeEvent,Xe.currentTarget)):Ge(Xe),Mt&&U(Xe))}},onFocus(Xe){r.select("open")&&!E&&(ie.current=-1,U(Xe))},onPointerDown:Ue,onPointerEnter:Ue,onMouseDown:ke,onClick:ke}},[Ge,Ee,R,f,b,U,r,T,O,Pe,_,te,E]),Je=j.useMemo(()=>({...Ce,...Fe}),[Ce,Fe]);return j.useMemo(()=>m?{reference:Je,floating:Be,item:Te,trigger:Fe}:{},[m,Je,Be,Fe,Te])}const uSe=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function HL(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingId"),l=r.useState("domReferenceElement"),c=r.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=Lm(),m=l?.id||h,g=j.useMemo(()=>xb(c)?.id||s,[c,s]),v=uSe.get(d)??d,b=mf()!=null,_=j.useMemo(()=>v==="tooltip"||d==="label"?Da:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&b&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,b,d]),E=j.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:i?g:void 0}:{..._,"aria-expanded":i?"true":"false","aria-controls":i?g:void 0,...v==="menu"&&{id:m}},[v,g,i,m,d,_]),R=j.useMemo(()=>{const T={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?T:{...T,...v==="menu"&&{"aria-labelledby":m}}},[v,g,m,d]),w=j.useCallback(({active:T,selected:x})=>{const O={role:"option",...T&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...O,"aria-selected":x}}return{}},[g,d]);return j.useMemo(()=>f?{reference:E,floating:R,item:w,trigger:_}:{},[f,E,R,_,w])}function cSe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.context.dataRef,{listRef:l,activeIndex:c,onMatch:f,onTypingChange:d,enabled:h=!0,findMatch:m=null,resetMs:g=750,ignoreKeys:v=om,selectedIndex:S=null}=t,b=to(),_=j.useRef(""),E=j.useRef(S??c??-1),R=j.useRef(null);ct(()=>{i&&(b.clear(),R.current=null,_.current="")},[i,b]),ct(()=>{i&&_.current===""&&(E.current=S??c??-1)},[i,S,c]);const w=ot(C=>{C?s.current.typing||(s.current.typing=C,d?.(C)):s.current.typing&&(s.current.typing=C,d?.(C))}),T=ot(C=>{function M(V,F,re){const ae=m?m(F,re):F.find(K=>K?.toLocaleLowerCase().indexOf(re.toLocaleLowerCase())===0);return ae?V.indexOf(ae):-1}const D=l.current;if(_.current.length>0&&_.current[0]!==" "&&(M(D,D,_.current)===-1?w(!1):C.key===" "&&Ti(C)),D==null||v.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;i&&C.key!==" "&&(Ti(C),w(!0)),D.every(V=>V?V[0]?.toLocaleLowerCase()!==V[1]?.toLocaleLowerCase():!0)&&_.current===C.key&&(_.current="",E.current=R.current),_.current+=C.key,b.start(g,()=>{_.current="",E.current=R.current,w(!1)});const q=E.current,L=M(D,[...D.slice((q||0)+1),...D.slice(0,(q||0)+1)],_.current);L!==-1?(f?.(L),R.current=L):C.key!==" "&&(_.current="",w(!1))}),x=j.useMemo(()=>({onKeyDown:T}),[T]),O=j.useMemo(()=>({onKeyDown:T,onKeyUp(C){C.key===" "&&w(!1)}}),[T,w]);return j.useMemo(()=>h?{reference:x,floating:O}:{},[h,x,O])}function nN(e,t){const[r,i]=e;let s=!1;const l=t.length;for(let c=0,f=l-1;c<l;f=c++){const[d,h]=t[c]||[0,0],[m,g]=t[f]||[0,0];h>=i!=g>=i&&r<=(m-d)*(i-h)/(g-h)+d&&(s=!s)}return s}function fSe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function dSe(e={}){const{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:i=!0}=e,s=new af;let l=!1,c=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const S=performance.now(),b=S-d;if(c===null||f===null||b===0)return c=g,f=v,d=S,null;const _=g-c,E=v-f,w=Math.sqrt(_*_+E*E)/b;return c=g,f=v,d=S,w}const m=({x:g,y:v,placement:S,elements:b,onClose:_,nodeId:E,tree:R})=>function(T){function x(){s.clear(),_()}if(s.clear(),!b.domReference||!b.floating||S==null||g==null||v==null)return;const{clientX:O,clientY:C}=T,M=[O,C],D=ro(T),$=T.type==="mouseleave",q=zn(b.floating,D),L=zn(b.domReference,D),V=b.domReference.getBoundingClientRect(),F=b.floating.getBoundingClientRect(),re=S.split("-")[0],ae=g>F.right-F.width/2,K=v>F.bottom-F.height/2,B=fSe(M,V),Y=F.width>V.width,fe=F.height>V.height,ie=(Y?V:F).left,N=(Y?V:F).right,I=(fe?V:F).top,U=(fe?V:F).bottom;if(q&&(l=!0,!$))return;if(L&&(l=!1),L&&!$){l=!0;return}if($&&ir(T.relatedTarget)&&zn(b.floating,T.relatedTarget)||R&&Ph(R.nodesRef.current,E).some(({context:ee})=>ee?.open))return;if(re==="top"&&v>=V.bottom-1||re==="bottom"&&v<=V.top+1||re==="left"&&g>=V.right-1||re==="right"&&g<=V.left+1)return x();let P=[];switch(re){case"top":P=[[ie,V.top+1],[ie,F.bottom-1],[N,F.bottom-1],[N,V.top+1]];break;case"bottom":P=[[ie,F.top+1],[ie,V.bottom-1],[N,V.bottom-1],[N,F.top+1]];break;case"left":P=[[F.right-1,U],[F.right-1,I],[V.left+1,I],[V.left+1,U]];break;case"right":P=[[V.right-1,U],[V.right-1,I],[F.left+1,I],[F.left+1,U]];break}function G([ee,ue]){switch(re){case"top":{const ve=[Y?ee+t/2:ae?ee+t*4:ee-t*4,ue+t+1],Ee=[Y?ee-t/2:ae?ee+t*4:ee-t*4,ue+t+1],Oe=[[F.left,ae||Y?F.bottom-t:F.top],[F.right,ae?Y?F.bottom-t:F.top:F.bottom-t]];return[ve,Ee,...Oe]}case"bottom":{const ve=[Y?ee+t/2:ae?ee+t*4:ee-t*4,ue-t],Ee=[Y?ee-t/2:ae?ee+t*4:ee-t*4,ue-t],Oe=[[F.left,ae||Y?F.top+t:F.bottom],[F.right,ae?Y?F.top+t:F.bottom:F.top+t]];return[ve,Ee,...Oe]}case"left":{const ve=[ee+t+1,fe?ue+t/2:K?ue+t*4:ue-t*4],Ee=[ee+t+1,fe?ue-t/2:K?ue+t*4:ue-t*4];return[...[[K||fe?F.right-t:F.left,F.top],[K?fe?F.right-t:F.left:F.right-t,F.bottom]],ve,Ee]}case"right":{const ve=[ee-t,fe?ue+t/2:K?ue+t*4:ue-t*4],Ee=[ee-t,fe?ue-t/2:K?ue+t*4:ue-t*4],Oe=[[K||fe?F.left+t:F.right,F.top],[K?fe?F.left+t:F.right:F.left+t,F.bottom]];return[ve,Ee,...Oe]}default:return[]}}if(!nN([O,C],P)){if(l&&!B)return x();if(!$&&i){const ee=h(T.clientX,T.clientY);if(ee!==null&&ee<.1)return x()}nN([O,C],G([g,v]))?!l&&i&&s.start(40,x):x()}};return m.__options={blockPointerEvents:r},m}let hSe=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),pSe=(function(e){return e[e.open=kh.open]="open",e[e.closed=kh.closed]="closed",e[e.startingStyle=kh.startingStyle]="startingStyle",e[e.endingStyle=kh.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const GL=j.createContext(void 0);function mSe(){const e=j.useContext(GL);if(e===void 0)throw new Error(Si(26));return e}const Qp="ArrowUp",Dh="ArrowDown",Cb="ArrowLeft",Wp="ArrowRight",l1="Home",u1="End",KL=new Set([Cb,Wp]),gSe=new Set([Cb,Wp,l1,u1]),YL=new Set([Qp,Dh]),ySe=new Set([Qp,Dh,l1,u1]),ZL=new Set([...KL,...YL]),vSe=new Set([...ZL,l1,u1]),b5=new Set([Qp,Dh,Cb,Wp,l1,u1]),bSe="Shift",SSe="Control",wSe="Alt",ESe="Meta",xSe=new Set([bSe,SSe,wSe,ESe]);function _Se(e){return Gr(e)&&e.tagName==="INPUT"}function rN(e){return!!(_Se(e)&&e.selectionStart!=null||Gr(e)&&e.tagName==="TEXTAREA")}function aN(e,t,r,i){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,l=e.scrollTop;const c=e.clientWidth<e.scrollWidth,f=e.clientHeight<e.scrollHeight;if(c&&i!=="vertical"){const d=iN(e,t,"left"),h=RS(e),m=RS(t);r==="ltr"&&(d+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?s=d+t.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:d-m.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(s=d-m.scrollMarginLeft-h.scrollPaddingLeft)),r==="rtl"&&(d-m.scrollMarginRight<e.scrollLeft+h.scrollPaddingLeft?s=d-m.scrollMarginLeft-h.scrollPaddingLeft:d+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(s=d+t.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(f&&i!=="horizontal"){const d=iN(e,t,"top"),h=RS(e),m=RS(t);d-m.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?l=d-m.scrollMarginTop-h.scrollPaddingTop:d+t.offsetHeight+m.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(l=d+t.offsetHeight+m.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:s,top:l,behavior:"auto"})}function iN(e,t,r){const i=r==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[i],t.offsetParent!==e);)t=t.offsetParent;return s}function RS(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const TSe={...Im,...i1,nestedDialogOpen(e){return e?{[pSe.nestedDialogOpen]:""}:null}},CSe=j.forwardRef(function(t,r){const{className:i,finalFocus:s,initialFocus:l,render:c,...f}=t,{store:d}=Pm(),h=d.useState("descriptionElementId"),m=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),S=d.useState("modal"),b=d.useState("mounted"),_=d.useState("nested"),E=d.useState("nestedOpenDialogCount"),R=d.useState("open"),w=d.useState("openMethod"),T=d.useState("titleElementId"),x=d.useState("transitionStatus"),O=d.useState("role");mSe(),cp({open:R,ref:d.context.popupRef,onComplete(){R&&d.context.onOpenChangeComplete?.(!0)}});function C(L){return L==="touch"?d.context.popupRef.current:!0}const M=l===void 0?C:l,D=E>0,$=j.useMemo(()=>({open:R,nested:_,transitionStatus:x,nestedDialogOpen:D}),[R,_,x,D]),q=mr("div",t,{state:$,props:[v,{"aria-labelledby":T??void 0,"aria-describedby":h??void 0,role:O,tabIndex:-1,hidden:!b,onKeyDown(L){b5.has(L.key)&&L.stopPropagation()},style:{[hSe.nestedDialogs]:E}},f],ref:[r,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:TSe});return k.jsx(p5,{context:g,openInteractionType:w,disabled:!b,closeOnFocusOut:!m,initialFocus:M,returnFocus:s,modal:S!==!1,restoreFocus:"popup",children:q})});function S5(e){return GR(19)?e:e?"true":void 0}const w5=j.forwardRef(function(t,r){const{cutout:i,...s}=t;let l;if(i){const c=i?.getBoundingClientRect();l=`polygon(
141
+ 0% 0%,
142
+ 100% 0%,
143
+ 100% 100%,
144
+ 0% 100%,
145
+ 0% 0%,
146
+ ${c.left}px ${c.top}px,
147
+ ${c.left}px ${c.bottom}px,
148
+ ${c.right}px ${c.bottom}px,
149
+ ${c.right}px ${c.top}px,
150
+ ${c.left}px ${c.top}px
151
+ )`}return k.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})}),OSe=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=Pm(),c=l.useState("mounted"),f=l.useState("modal"),d=l.useState("open");return c||i?k.jsx(GL.Provider,{value:i,children:k.jsxs(d5,{ref:r,...s,children:[c&&f===!0&&k.jsx(w5,{ref:l.context.internalBackdropRef,inert:S5(!d)}),t.children]})}):null});let oN={},sN={},lN="";function RSe(e){if(typeof document>"u")return!1;const t=ys(e);return ha(t).innerWidth-t.documentElement.clientWidth>0}function ASe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=ys(e).documentElement,s={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY};i.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return Object.assign(i.style,s),l===c}function MSe(e){const t=ys(e),r=t.documentElement,i=t.body,s=rp(r)?r:i,l=s.style.overflow;return s.style.overflow="hidden",()=>{s.style.overflow=l}}function jSe(e){const t=ys(e),r=t.documentElement,i=t.body,s=ha(r);let l=0,c=0,f=!1;const d=_l.create();if(K7&&(s.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=s.getComputedStyle(r),S=s.getComputedStyle(i),E=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=r.scrollTop,c=r.scrollLeft,oN={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},lN=r.style.scrollBehavior,sN={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const R=r.scrollHeight>r.clientHeight,w=r.scrollWidth>r.clientWidth,T=v.overflowY==="scroll"||S.overflowY==="scroll",x=v.overflowX==="scroll"||S.overflowX==="scroll",O=Math.max(0,s.innerWidth-i.clientWidth),C=Math.max(0,s.innerHeight-i.clientHeight),M=parseFloat(S.marginTop)+parseFloat(S.marginBottom),D=parseFloat(S.marginLeft)+parseFloat(S.marginRight),$=rp(r)?r:i;if(f=ASe(e),f){r.style.scrollbarGutter=E,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(R||T)&&(r.style.overflowY="scroll"),(w||x)&&(r.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:M||C?`calc(100dvh - ${M+C}px)`:"100dvh",width:D||O?`calc(100vw - ${D+O}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=c,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function m(){Object.assign(r.style,oN),Object.assign(i.style,sN),f||(r.scrollTop=l,r.scrollLeft=c,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=lN)}function g(){m(),d.request(h)}return h(),s.addEventListener("resize",g),()=>{d.cancel(),m(),typeof s.removeEventListener=="function"&&s.removeEventListener("resize",g)}}class kSe{lockCount=0;restore=null;timeoutLock=af.create();timeoutUnlock=af.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const i=ys(t).documentElement,s=ha(i).getComputedStyle(i).overflowY;if(s==="hidden"||s==="clip"){this.restore=Ko;return}const l=Y7||!RSe(t);this.restore=l?MSe(t):jSe(t)}}const DSe=new kSe;function E5(e=!0,t=null){ct(()=>{if(e)return DSe.acquire(t)},[e,t])}function NSe(e){const t=j.useRef(""),r=j.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:j.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s&&e(s,s.pointerType),e(s,t.current),t.current=""},[e]),onPointerDown:r}}function x5(e){const[t,r]=j.useState(null),i=ot((f,d)=>{e||r(d||(Y7?"touch":""))}),s=j.useCallback(()=>{r(null)},[]),{onClick:l,onPointerDown:c}=NSe(i);return j.useMemo(()=>({openMethod:t,reset:s,triggerProps:{onClick:l,onPointerDown:c}}),[t,s,l,c])}function zSe(e){const{store:t,parentContext:r,actionsRef:i}=e,s=t.useState("open"),l=t.useState("disablePointerDismissal"),c=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:m}=x5(s);IL(t);const{forceUnmount:g}=LL(s,t,()=>{m()}),v=ot(q=>{const L=mn(q);return L.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},L}),S=j.useCallback(()=>{t.setOpen(!1,v(B7))},[t,v]);j.useImperativeHandle(i,()=>({unmount:g,close:S}),[g,S]);const b=FL({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[_,E]=j.useState(0),R=_===0,w=HL(b),T=g5(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(q){if("button"in q&&q.button!==0||"touches"in q&&q.touches.length!==1)return!1;const L=ro(q);if(R&&!l){const V=L;return c&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===V||t.context.backdropRef.current===V||zn(V,f)&&!V?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:R});E5(s&&c===!0,f);const{getReferenceProps:x,getFloatingProps:O,getTriggerProps:C}=M2([w,T]);t.useContextCallback("onNestedDialogOpen",q=>{E(q+1)}),t.useContextCallback("onNestedDialogClose",()=>{E(0)}),j.useEffect(()=>(r?.onNestedDialogOpen&&s&&r.onNestedDialogOpen(_),r?.onNestedDialogClose&&!s&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&s&&r.onNestedDialogClose()}),[s,r,_]);const M=j.useMemo(()=>x(h),[x,h]),D=j.useMemo(()=>C(h),[C,h]),$=j.useMemo(()=>O(),[O]);t.useSyncedValues({openMethod:d,activeTriggerProps:M,inactiveTriggerProps:D,popupProps:$,floatingRootContext:b,nestedOpenDialogCount:_})}const $Se={...qL,modal:ut(e=>e.modal),nested:ut(e=>e.nested),nestedOpenDialogCount:ut(e=>e.nestedOpenDialogCount),disablePointerDismissal:ut(e=>e.disablePointerDismissal),openMethod:ut(e=>e.openMethod),descriptionElementId:ut(e=>e.descriptionElementId),titleElementId:ut(e=>e.titleElementId),viewportElement:ut(e=>e.viewportElement),role:ut(e=>e.role)};class PSe extends y5{constructor(t){super(ISe(t),{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),triggerElements:new A2,onOpenChange:void 0,onOpenChangeComplete:void 0},$Se)}setOpen=(t,r)=>{if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,r),r.isCanceled)return;const i={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",i);const s={open:t},l=r.trigger?.id??null;(l||t)&&(s.activeTriggerId=l,s.activeTriggerElement=r.trigger??null),this.update(s)}}function ISe(e={}){return{...UL(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function LSe(e){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:c=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:m,defaultTriggerId:g=null}=e,v=Pm(!0),S=!!v,b=oo(()=>h?.store??new PSe({open:r??i,activeTriggerId:m!==void 0?m:g,modal:f,disablePointerDismissal:c,nested:S})).current;b.useControlledProp("open",r,i),b.useControlledProp("activeTriggerId",m,g),b.useSyncedValues({disablePointerDismissal:c,nested:S,modal:f}),b.useContextCallback("onOpenChange",s),b.useContextCallback("onOpenChangeComplete",l);const _=b.useState("payload");zSe({store:b,actionsRef:d,parentContext:v?.store.context});const E=j.useMemo(()=>({store:b}),[b]);return k.jsx(U7.Provider,{value:E,children:typeof t=="function"?t({payload:_}):t})}const USe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,...c}=t,{store:f}=Pm(),d=Um(l);return f.useSyncedValueWithCleanup("titleElementId",d),mr("h2",t,{ref:r,props:[{id:d},c]})});function qSe({...e}){return k.jsx(LSe,{"data-slot":"dialog",...e})}function VSe({...e}){return k.jsx(OSe,{"data-slot":"dialog-portal",...e})}function FSe({className:e,...t}){return k.jsx(Mve,{"data-slot":"dialog-overlay",className:en("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function BSe({className:e,children:t,showCloseButton:r=!0,...i}){return k.jsxs(VSe,{children:[k.jsx(FSe,{}),k.jsxs(CSe,{"data-slot":"dialog-content",className:en("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...i,children:[t,r&&k.jsxs(Nve,{"data-slot":"dialog-close",render:k.jsx(Xc,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[k.jsx(kre,{}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function HSe({className:e,...t}){return k.jsx(USe,{"data-slot":"dialog-title",className:en("text-sm font-medium",e),...t})}const GSe=()=>{const e=ff(),[t,r]=j.useState(!1);return e._meta&&Object.keys(e._meta).length>0?k.jsxs(k.Fragment,{children:[k.jsxs(Xc,{variant:"ghost",size:"default",onClick:()=>r(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[k.jsx(vre,{className:"h-4 w-4"}),"Metadata"]}),k.jsx(qSe,{open:t,onOpenChange:r,children:k.jsxs(BSe,{className:"sm:max-w-2xl",children:[k.jsx(HSe,{children:"Tool Metadata"}),k.jsx("div",{className:"text-xs",children:k.jsx(_2,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},KSe={"ui:submitButtonOptions":{norender:!0}},YSe=({schema:e,formData:t,setFormData:r,ref:i})=>!e||!e.properties||Object.keys(e.properties).length===0?k.jsx("div",{className:"flex items-center justify-center h-full",children:k.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):k.jsx(tve,{children:k.jsx(nve,{children:k.jsx(eve,{ref:i,schema:e??{},validator:wpe,uiSchema:KSe,formData:t,onChange:l=>r(l.formData),showErrorList:!1,templates:{FieldTemplate:l=>{const{id:c,classNames:f,style:d,label:h,required:m,errors:g,children:v}=l;return k.jsxs("div",{className:en("flex flex-col gap-2",f),style:d,children:[k.jsxs("label",{htmlFor:c,className:"text-sm text-foreground",children:[h,m&&k.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),k.jsxs("div",{className:"flex flex-col gap-2",children:[v,g]})]})},FieldErrorTemplate:l=>l.errors&&l.errors.length>0?k.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:k.jsx("span",{children:l.errors.join(", ")})}):null}})})}),ZSe=()=>{const e=j.useRef(null),t=ff(),{setToolData:r}=xm(),s=_m(t.name)?.input??{},l=c=>{r(t.name,{input:c??{}})};return k.jsxs("div",{className:en("flex flex-col h-full overflow-hidden border-r border-border"),children:[k.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[k.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(GSe,{}),k.jsx(vve,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:s})]})]}),k.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:k.jsx(YSe,{schema:t.inputSchema,formData:s,setFormData:l,ref:e},t.name)})]})},XSe=vc("rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none",vertical:"flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function QSe({className:e,orientation:t,...r}){return k.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:en(XSe({orientation:t}),e),...r})}function WSe({className:e,...t}){return k.jsx("label",{"data-slot":"label",className:en("gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function JSe({className:e,...t}){return k.jsx("fieldset",{"data-slot":"field-set",className:en("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const ewe=vc("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Tc({className:e,orientation:t="vertical",...r}){return k.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:en(ewe({orientation:t}),e),...r})}function Cc({className:e,...t}){return k.jsx(WSe,{"data-slot":"field-label",className:en("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}let uN=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const twe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},_5={valid(e){return e===null?null:e?{[uN.valid]:""}:{[uN.invalid]:""}}},nwe=j.createContext({invalid:void 0,name:void 0,validityData:{state:twe,errors:[],error:"",value:"",initialValue:null},setValidityData:Ko,disabled:void 0,touched:!1,setTouched:Ko,dirty:!1,setDirty:Ko,filled:!1,setFilled:Ko,focused:!1,setFocused:Ko,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Da)=>e,getInputValidationProps:(e=Da)=>e,inputRef:{current:null},commit:async()=>{}}});function Xh(e=!0){const t=j.useContext(nwe);if(t.setValidityData===Ko&&!e)throw new Error(Si(28));return t}const rwe=j.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Ko,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function T5(){return j.useContext(rwe)}const awe=j.createContext({controlId:void 0,setControlId:Ko,labelId:void 0,setLabelId:Ko,messageIds:[],setMessageIds:Ko,getDescriptionProps:e=>e});function k2(){return j.useContext(awe)}function iwe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Ob({controlled:e,default:t,name:r,state:i="value"}){const{current:s}=j.useRef(e!==void 0),[l,c]=j.useState(t),f=s?e:l,d=j.useCallback(h=>{s||c(h)},[]);return[f,d]}function D2(e={}){const{id:t,implicit:r=!1,controlRef:i}=e,{controlId:s,setControlId:l}=k2(),c=Um(t);return ct(()=>{if(!(!r&&!t||l===Ko)){if(r){const f=i?.current;ir(f)&&f.closest("label")!=null?l(t??null):l(s??c)}else t&&l(t);return()=>{t&&l(void 0)}}},[t,i,s,l,r,c]),s??c}function C5(e){const{enabled:t=!0,value:r,id:i,name:s,controlRef:l,commit:c}=e,{formRef:f}=T5(),{invalid:d,markedDirtyRef:h,validityData:m,setValidityData:g}=Xh(),v=ot(e.getValue);ct(()=>{if(!t)return;let S=r;S===void 0&&(S=v()),m.initialValue===null&&S!==null&&g(b=>({...b,initialValue:S}))},[t,g,r,m.initialValue,v]),ct(()=>{!t||!i||f.current.fields.set(i,{getValue:v,name:s,controlRef:l,validityData:iwe(m,d),validate(S=!0){let b=r;b===void 0&&(b=v()),h.current=!0,S?gs.flushSync(()=>c(b)):c(b)}})},[c,l,t,f,v,i,d,h,s,m,r]),ct(()=>{const S=f.current.fields;return()=>{i&&S.delete(i)}},[f,i])}const owe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,name:c,value:f,disabled:d=!1,onValueChange:h,defaultValue:m,...g}=t,{state:v,name:S,disabled:b}=Xh(),_=b||d,E=S??c,R=j.useMemo(()=>({...v,disabled:_}),[v,_]),{setTouched:w,setDirty:T,validityData:x,setFocused:O,setFilled:C,validationMode:M,validation:D}=Xh(),{labelId:$}=k2(),q=D2({id:l});ct(()=>{const K=f!=null;D.inputRef.current?.value||K&&f!==""?C(!0):K&&f===""&&C(!1)},[D.inputRef,C,f]);const[L,V]=Ob({controlled:f,default:m,name:"FieldControl",state:"value"}),F=f!==void 0,re=ot((K,B)=>{h?.(K,B),!B.isCanceled&&V(K)});return C5({id:q,name:E,commit:D.commit,value:L,getValue:()=>D.inputRef.current?.value,controlRef:D.inputRef}),mr("input",t,{ref:r,state:R,props:[{id:q,disabled:_,name:E,ref:D.inputRef,"aria-labelledby":$,...F?{value:L}:{defaultValue:m},onChange(K){const B=K.currentTarget.value;re(B,mn(rf,K.nativeEvent)),T(B!==x.initialValue),C(B!=="")},onFocus(){O(!0)},onBlur(K){w(!0),O(!1),M==="onBlur"&&D.commit(K.currentTarget.value)},onKeyDown(K){K.currentTarget.tagName==="INPUT"&&K.key==="Enter"&&(w(!0),D.commit(K.currentTarget.value))}},D.getInputValidationProps(),g],stateAttributesMapping:_5})}),swe=j.forwardRef(function(t,r){return k.jsx(owe,{ref:r,...t})});function MT({className:e,type:t,...r}){return k.jsx(swe,{type:t,"data-slot":"input",className:en("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...r})}function lwe(e){const t=j.useRef(!0);t.current&&(t.current=!1,e())}const XL=j.createContext(null),QL=j.createContext(null);function ql(){const e=j.useContext(XL);if(e===null)throw new Error(Si(60));return e}function WL(){const e=j.useContext(QL);if(e===null)throw new Error(Si(61));return e}const uwe=(e,t)=>Object.is(e,t);function ym(e,t,r){return e==null||t==null?Object.is(e,t):r(e,t)}function jT(e,t,r){return!e||e.length===0?!1:e.some(i=>i===void 0?!1:ym(i,t,r))}function TO(e,t,r){return!e||e.length===0?-1:e.findIndex(i=>i===void 0?!1:ym(i,t,r))}function cwe(e,t,r){return e.filter(i=>!ym(i,t,r))}function CO(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function JL(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function fwe(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(JL(e)){for(const t of e)for(const r of t.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function dwe(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return CO(e)}function Op(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?CO(e.value):CO(e)}function eU(e,t,r){function i(){return dwe(e,r)}if(r&&e!=null)return r(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??i();if(Array.isArray(t)){const s=JL(t)?t.flatMap(l=>l.items):t;if(e==null||typeof e!="object"){const l=s.find(c=>c.value===e);return l&&l.label!=null?l.label:i()}if("value"in e){const l=s.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return i()}function hwe(e,t,r){return e.reduce((i,s,l)=>(l>0&&i.push(", "),i.push(k.jsx(j.Fragment,{children:eU(s,t,r)},l)),i),[])}const Lt={id:ut(e=>e.id),modal:ut(e=>e.modal),multiple:ut(e=>e.multiple),items:ut(e=>e.items),itemToStringLabel:ut(e=>e.itemToStringLabel),itemToStringValue:ut(e=>e.itemToStringValue),isItemEqualToValue:ut(e=>e.isItemEqualToValue),value:ut(e=>e.value),hasSelectedValue:ut(e=>{const{value:t,multiple:r,itemToStringValue:i}=e;return t==null?!1:r&&Array.isArray(t)?t.length>0:Op(t,i)!==""}),hasNullItemLabel:ut((e,t)=>t?fwe(e.items):!1),open:ut(e=>e.open),mounted:ut(e=>e.mounted),forceMount:ut(e=>e.forceMount),transitionStatus:ut(e=>e.transitionStatus),openMethod:ut(e=>e.openMethod),activeIndex:ut(e=>e.activeIndex),selectedIndex:ut(e=>e.selectedIndex),isActive:ut((e,t)=>e.activeIndex===t),isSelected:ut((e,t,r)=>{const i=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(l=>ym(l,r,i)):e.selectedIndex===t&&e.selectedIndex!==null?!0:ym(s,r,i)}),isSelectedByFocus:ut((e,t)=>e.selectedIndex===t),popupProps:ut(e=>e.popupProps),triggerProps:ut(e=>e.triggerProps),triggerElement:ut(e=>e.triggerElement),positionerElement:ut(e=>e.positionerElement),listElement:ut(e=>e.listElement),scrollUpArrowVisible:ut(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:ut(e=>e.scrollDownArrowVisible),hasScrollArrows:ut(e=>e.hasScrollArrows)};function tU(e,t){const r=j.useRef(e),i=ot(t);ct(()=>{r.current!==e&&i(r.current)},[e,i]),ct(()=>{r.current=e},[e])}function pwe(e){const{id:t,value:r,defaultValue:i=null,onValueChange:s,open:l,defaultOpen:c=!1,onOpenChange:f,name:d,disabled:h=!1,readOnly:m=!1,required:g=!1,modal:v=!0,actionsRef:S,inputRef:b,onOpenChangeComplete:_,items:E,multiple:R=!1,itemToStringLabel:w,itemToStringValue:T,isItemEqualToValue:x=uwe,highlightItemOnHover:O=!0,children:C}=e,{clearErrors:M}=T5(),{setDirty:D,setTouched:$,setFocused:q,shouldValidateOnChange:L,validityData:V,setFilled:F,name:re,disabled:ae,validation:K,validationMode:B}=Xh(),Y=D2({id:t}),fe=ae||h,ie=re??d,[N,I]=Ob({controlled:r,default:R?i??om:i,name:"Select",state:"value"}),[U,P]=Ob({controlled:l,default:c,name:"Select",state:"open"}),G=j.useRef([]),ee=j.useRef([]),ue=j.useRef(null),ve=j.useRef(null),Ee=j.useRef(0),Oe=j.useRef(null),de=j.useRef([]),te=j.useRef(!1),Se=j.useRef(!1),we=j.useRef(null),$e=j.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Te=j.useRef(!1),{mounted:Pe,setMounted:Ge,transitionStatus:Ce}=R2(U),{openMethod:Be,triggerProps:Fe,reset:Je}=x5(U),ke=oo(()=>new Xp({id:Y,modal:v,multiple:R,itemToStringLabel:w,itemToStringValue:T,isItemEqualToValue:x,value:N,open:U,mounted:Pe,transitionStatus:Ce,items:E,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ue=qt(ke,Lt.activeIndex),Xe=qt(ke,Lt.selectedIndex),Mt=qt(ke,Lt.triggerElement),Ae=qt(ke,Lt.positionerElement),xe=j.useMemo(()=>R&&Array.isArray(N)&&N.length===0?"":Op(N,T),[R,N,T]),Ne=j.useMemo(()=>R&&Array.isArray(N)?N.map(ft=>Op(ft,T)):Op(N,T),[R,N,T]),Ke=ka(ke.state.triggerElement);C5({id:Y,commit:K.commit,value:N,controlRef:Ke,name:ie,getValue:()=>Ne});const vt=j.useRef(N);ct(()=>{N!==vt.current&&ke.set("forceMount",!0)},[ke,N]),ct(()=>{F(R?Array.isArray(N)&&N.length>0:N!=null)},[R,N,F]),ct(function(){if(U)return;const tn=de.current;if(R){const on=Array.isArray(N)?N:[];if(on.length===0){ke.set("selectedIndex",null);return}const Cn=on[on.length-1],Ft=TO(tn,Cn,x);ke.set("selectedIndex",Ft===-1?null:Ft);return}const Fn=TO(tn,N,x);ke.set("selectedIndex",Fn===-1?null:Fn)},[R,U,N,de,x,ke]),tU(N,()=>{M(ie),D(N!==V.initialValue),L()?K.commit(N):K.commit(N,!0)});const Xt=ot((ft,tn)=>{if(f?.(ft,tn),!tn.isCanceled&&(P(ft),!ft&&(tn.reason===Yh||tn.reason===i5)&&($(!0),q(!1),B==="onBlur"&&K.commit(N)),!ft&&ke.state.activeIndex!==null)){const Fn=G.current[ke.state.activeIndex];queueMicrotask(()=>{Fn?.setAttribute("tabindex","-1")})}}),Vt=ot(()=>{Ge(!1),ke.set("activeIndex",null),Je(),_?.(!1)});cp({enabled:!S,open:U,ref:ue,onComplete(){U||Vt()}}),j.useImperativeHandle(S,()=>({unmount:Vt}),[Vt]);const wt=ot((ft,tn)=>{s?.(ft,tn),!tn.isCanceled&&I(ft)}),Ht=ot(()=>{const ft=ke.state.listElement||ue.current;if(!ft)return;const tn=ft.scrollTop,Fn=ft.scrollTop+ft.clientHeight,on=tn>1,Cn=Fn<ft.scrollHeight-1;ke.state.scrollUpArrowVisible!==on&&ke.set("scrollUpArrowVisible",on),ke.state.scrollDownArrowVisible!==Cn&&ke.set("scrollDownArrowVisible",Cn)}),Rt=VL({open:U,onOpenChange:Xt,elements:{reference:Mt,floating:Ae}}),Qt=TL(Rt,{enabled:!m&&!fe,event:"mousedown"}),_n=g5(Rt,{bubbles:!1}),Gt=lSe(Rt,{enabled:!m&&!fe,listRef:G,activeIndex:Ue,selectedIndex:Xe,disabledIndices:om,onNavigate(ft){ft===null&&!U||ke.set("activeIndex",ft)},focusItemOnHover:!1}),Tn=cSe(Rt,{enabled:!m&&!fe&&(U||!R),listRef:ee,activeIndex:Ue,selectedIndex:Xe,onMatch(ft){U?ke.set("activeIndex",ft):wt(de.current[ft],mn("none"))},onTypingChange(ft){te.current=ft}}),{getReferenceProps:En,getFloatingProps:Pn,getItemProps:Dt}=M2([Qt,_n,Gt,Tn]),xn=j.useMemo(()=>Yb(En(),Fe,Y?{id:Y}:Da),[En,Fe,Y]);lwe(()=>{ke.update({popupProps:Pn(),triggerProps:xn})}),ct(()=>{ke.update({id:Y,modal:v,multiple:R,value:N,open:U,mounted:Pe,transitionStatus:Ce,popupProps:Pn(),triggerProps:xn,items:E,itemToStringLabel:w,itemToStringValue:T,isItemEqualToValue:x,openMethod:Be})},[ke,Y,v,R,N,U,Pe,Ce,Pn,xn,E,w,T,x,Be]);const Kt=j.useMemo(()=>({store:ke,name:ie,required:g,disabled:fe,readOnly:m,multiple:R,itemToStringLabel:w,itemToStringValue:T,highlightItemOnHover:O,setValue:wt,setOpen:Xt,listRef:G,popupRef:ue,scrollHandlerRef:ve,handleScrollArrowVisibility:Ht,scrollArrowsMountedCountRef:Ee,getItemProps:Dt,events:Rt.context.events,valueRef:Oe,valuesRef:de,labelsRef:ee,typingRef:te,selectionRef:$e,selectedItemTextRef:we,validation:K,onOpenChangeComplete:_,keyboardActiveRef:Se,alignItemWithTriggerActiveRef:Te,initialValueRef:vt}),[ke,ie,g,fe,m,R,w,T,O,wt,Xt,Dt,Rt.context.events,K,_,Ht]),sr=cc(b,K.inputRef),Sr=R&&Array.isArray(N)&&N.length>0,qr=j.useMemo(()=>!R||!Array.isArray(N)||!ie?null:N.map(ft=>{const tn=Op(ft,T);return k.jsx("input",{type:"hidden",name:ie,value:tn},tn)}),[R,N,ie,T]);return k.jsx(XL.Provider,{value:Kt,children:k.jsxs(QL.Provider,{value:Rt,children:[C,k.jsx("input",{...K.getInputValidationProps({onFocus(){ke.state.triggerElement?.focus({focusVisible:!0})},onChange(ft){if(ft.nativeEvent.defaultPrevented)return;const tn=ft.target.value,Fn=mn(rf,ft.nativeEvent);function on(){if(R)return;const Cn=de.current.find(Ft=>Op(Ft,T).toLowerCase()===tn.toLowerCase());Cn!=null&&(D(Cn!==V.initialValue),wt(Cn,Fn),L()&&K.commit(Cn))}ke.set("forceMount",!0),queueMicrotask(on)}}),name:R?void 0:ie,value:xe,disabled:fe,required:g&&!Sr,readOnly:m,ref:sr,style:ie?wL:T2,tabIndex:-1,"aria-hidden":!0}),qr]})})}function mwe(e){const t=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),i=window.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=parseFloat(i.width)||0,d=parseFloat(i.height)||0,h=Math.max(t.width,l,f),m=Math.max(t.height,c,d),g=h-t.width,v=m-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-v/2,bottom:t.bottom+v/2}}const AS=2,gwe=400,cN=200,ywe={...V7,..._5,value:()=>null},vwe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,disabled:c=!1,nativeButton:f=!0,...d}=t,{setTouched:h,setFocused:m,validationMode:g,state:v,disabled:S}=Xh(),{labelId:b}=k2(),{store:_,setOpen:E,selectionRef:R,validation:w,readOnly:T,required:x,alignItemWithTriggerActiveRef:O,disabled:C,keyboardActiveRef:M}=ql(),D=S||C||c,$=qt(_,Lt.open),q=qt(_,Lt.value),L=qt(_,Lt.triggerProps),V=qt(_,Lt.positionerElement),F=qt(_,Lt.listElement),re=qt(_,Lt.id),ae=qt(_,Lt.hasSelectedValue),K=!ae&&$,B=qt(_,Lt.hasNullItemLabel,K),Y=l??re;D2({id:Y});const fe=ka(V),ie=j.useRef(null),{getButtonProps:N,buttonRef:I}=ap({disabled:D,native:f}),U=ot(te=>{_.set("triggerElement",te)}),P=cc(r,ie,I,U),G=to(),ee=to(),ue=to(),ve=to();j.useEffect(()=>{if($)return!(ae||B)?ue.start(gwe,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}):ve.start(cN,()=>{R.current.allowUnselectedMouseUp=!0,ue.start(cN,()=>{R.current.allowSelectedMouseUp=!0})}),()=>{ue.clear(),ve.clear()};R.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ee.clear()},[$,ae,B,R,ee,ue,ve]);const Ee=j.useMemo(()=>F?.id??xb(V)?.id,[F,V]),Oe=Yb(L,{id:Y,role:"combobox","aria-expanded":$?"true":"false","aria-haspopup":"listbox","aria-controls":$?Ee:void 0,"aria-labelledby":b,"aria-readonly":T||void 0,"aria-required":x||void 0,tabIndex:D?-1:0,ref:P,onFocus(te){m(!0),$&&O.current&&E(!1,mn(rf,te.nativeEvent)),G.start(0,()=>{_.set("forceMount",!0)})},onBlur(te){zn(V,te.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&w.commit(q))},onPointerMove(){M.current=!1},onKeyDown(){M.current=!0},onMouseDown(te){if($)return;const Se=ys(te.currentTarget);function we($e){if(!ie.current)return;const Te=$e.target;if(zn(ie.current,Te)||zn(fe.current,Te)||Te===ie.current)return;const Pe=mwe(ie.current);$e.clientX>=Pe.left-AS&&$e.clientX<=Pe.right+AS&&$e.clientY>=Pe.top-AS&&$e.clientY<=Pe.bottom+AS||E(!1,mn(kve,$e))}ee.start(0,()=>{Se.addEventListener("mouseup",we,{once:!0})})}},w.getValidationProps,d,N);Oe.role="combobox";const de=j.useMemo(()=>({...v,open:$,disabled:D,value:q,readOnly:T,placeholder:!ae}),[v,$,D,q,T,ae]);return mr("button",t,{ref:[r,ie],state:de,stateAttributesMapping:ywe,props:Oe})}),bwe={value:()=>null},Swe=j.forwardRef(function(t,r){const{className:i,render:s,children:l,placeholder:c,...f}=t,{store:d,valueRef:h}=ql(),m=qt(d,Lt.value),g=qt(d,Lt.items),v=qt(d,Lt.itemToStringLabel),S=qt(d,Lt.hasSelectedValue),b=!S&&c!=null&&l==null,_=qt(d,Lt.hasNullItemLabel,b),E=j.useMemo(()=>({value:m,placeholder:!S}),[m,S]);let R=null;return typeof l=="function"?R=l(m):l!=null?R=l:!S&&c!=null&&!_?R=c:Array.isArray(m)?R=hwe(m,g,v):R=eU(m,g,v),mr("span",t,{state:E,ref:[r,h],props:[{children:R},f],stateAttributesMapping:bwe})}),wwe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:c}=ql(),f=qt(c,Lt.open),d=j.useMemo(()=>({open:f}),[f]);return mr("span",t,{state:d,ref:r,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:q7})}),Ewe=j.createContext(void 0),xwe=j.forwardRef(function(t,r){const{store:i}=ql(),s=qt(i,Lt.mounted),l=qt(i,Lt.forceMount);return s||l?k.jsx(Ewe.Provider,{value:!0,children:k.jsx(d5,{ref:r,...t})}):null}),nU=j.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function _we(){return j.useContext(nU)}function O5(e){const{children:t,elementsRef:r,labelsRef:i,onMapChange:s}=e,l=ot(s),c=j.useRef(0),f=oo(Cwe).current,d=oo(Twe).current,[h,m]=j.useState(0),g=j.useRef(h),v=ot((R,w)=>{d.set(R,w??null),g.current+=1,m(g.current)}),S=ot(R=>{d.delete(R),g.current+=1,m(g.current)}),b=j.useMemo(()=>{const R=new Map;return Array.from(d.keys()).filter(T=>T.isConnected).sort(Owe).forEach((T,x)=>{const O=d.get(T)??{};R.set(T,{...O,index:x})}),R},[d,h]);ct(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const R=new MutationObserver(w=>{const T=new Set,x=O=>T.has(O)?T.delete(O):T.add(O);w.forEach(O=>{O.removedNodes.forEach(x),O.addedNodes.forEach(x)}),T.size===0&&(g.current+=1,m(g.current))});return b.forEach((w,T)=>{T.parentElement&&R.observe(T.parentElement,{childList:!0})}),()=>{R.disconnect()}},[b]),ct(()=>{g.current===h&&(r.current.length!==b.size&&(r.current.length=b.size),i&&i.current.length!==b.size&&(i.current.length=b.size),c.current=b.size),l(b)},[l,b,r,i,h]),ct(()=>()=>{r.current=[]},[r]),ct(()=>()=>{i&&(i.current=[])},[i]);const _=ot(R=>(f.add(R),()=>{f.delete(R)}));ct(()=>{f.forEach(R=>R(b))},[f,b]);const E=j.useMemo(()=>({register:v,unregister:S,subscribeMapChange:_,elementsRef:r,labelsRef:i,nextIndexRef:c}),[v,S,_,r,i,c]);return k.jsx(nU.Provider,{value:E,children:t})}function Twe(){return new Map}function Cwe(){return new Set}function Owe(e,t){const r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Rwe=j.createContext(void 0);function R5(){return j.useContext(Rwe)?.direction??"ltr"}const Awe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:s,rects:l,platform:c,elements:f,middlewareData:d}=t,{element:h,padding:m=0,offsetParent:g="real"}=hc(e,t)||{};if(h==null)return{};const v=nL(m),S={x:r,y:i},b=c5(s),_=u5(b),E=await c.getDimensions(h),R=b==="y",w=R?"top":"left",T=R?"bottom":"right",x=R?"clientHeight":"clientWidth",O=l.reference[_]+l.reference[b]-S[b]-l.floating[_],C=S[b]-l.reference[b],M=g==="real"?await c.getOffsetParent?.(h):f.floating;let D=f.floating[x]||l.floating[_];(!D||!await c.isElement?.(M))&&(D=f.floating[x]||l.floating[_]);const $=O/2-C/2,q=D/2-E[_]/2-1,L=Math.min(v[w],q),V=Math.min(v[T],q),F=L,re=D-E[_]-V,ae=D/2-E[_]/2+$,K=bO(F,ae,re),B=!d.arrow&&pf(s)!=null&&ae!==K&&l.reference[_]/2-(ae<F?L:V)-E[_]/2<0,Y=B?ae<F?ae-F:ae-re:0;return{[b]:S[b]+Y,data:{[b]:K,centerOffset:ae-K-Y,...B&&{alignmentOffset:Y}},reset:B}}}),Mwe=(e,t)=>({...Awe(e),options:[e,t]}),jwe={name:"hide",async fn(e){const{width:t,height:r,x:i,y:s}=e.rects.reference,l=t===0&&r===0&&i===0&&s===0;return{data:{referenceHidden:(await S1e().fn(e)).data?.referenceHidden||l}}}},QS={sideX:"left",sideY:"top"},kwe={name:"adaptiveOrigin",async fn(e){const{x:t,y:r,rects:{floating:i},elements:{floating:s},platform:l,strategy:c,placement:f}=e,d=ha(s),h=d.getComputedStyle(s);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:r,data:QS};const g=await l.getOffsetParent?.(s);let v={width:0,height:0};if(c==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const w=ys(s);v={width:w.documentElement.clientWidth,height:w.documentElement.clientHeight}}else await l.isElement?.(g)&&(v=await l.getDimensions(g));const S=io(f);let b=t,_=r;S==="left"&&(b=v.width-(t+i.width)),S==="top"&&(_=v.height-(r+i.height));const E=S==="left"?"right":QS.sideX,R=S==="top"?"bottom":QS.sideY;return{x:b,y:_,data:{sideX:E,sideY:R}}}};function rU(e,t,r){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?r?"inline-start":"inline-end":"right",bottom:"bottom",left:i?r?"inline-end":"inline-start":"left"}[t]}function fN(e,t,r){const{rects:i,placement:s}=e;return{side:rU(t,io(s),r),align:pf(s)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function aU(e){const{anchor:t,positionMethod:r="absolute",side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:S,mounted:b,collisionAvoidance:_,shiftCrossAxis:E=!1,nodeId:R,adaptiveOrigin:w,lazyFlip:T=!1,externalTree:x}=e,[O,C]=j.useState(null);!b&&O!==null&&C(null);const M=_.side||"flip",D=_.align||"flip",$=_.fallbackAxisSide||"end",q=typeof t=="function"?t:void 0,L=ot(q),V=q?L:t,F=ka(t),ae=R5()==="rtl",K=O||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ae?"left":"right","inline-start":ae?"right":"left"}[i],B=l==="center"?K:`${K}-${l}`;let Y=d;const fe=1,ie=i==="bottom"?fe:0,N=i==="top"?fe:0,I=i==="right"?fe:0,U=i==="left"?fe:0;typeof Y=="number"?Y={top:Y+ie,right:Y+U,bottom:Y+N,left:Y+I}:Y&&(Y={top:(Y.top||0)+ie,right:(Y.right||0)+U,bottom:(Y.bottom||0)+N,left:(Y.left||0)+I});const P={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:Y},G=j.useRef(null),ee=ka(s),ue=ka(c),Oe=[m1e(Qt=>{const _n=fN(Qt,i,ae),Gt=typeof ee.current=="function"?ee.current(_n):ee.current,Tn=typeof ue.current=="function"?ue.current(_n):ue.current;return{mainAxis:Gt,crossAxis:Tn,alignmentAxis:Tn}},[typeof s!="function"?s:0,typeof c!="function"?c:0,ae,i])],de=D==="none"&&M!=="shift",te=!de&&(h||E||M==="shift"),Se=M==="none"?null:v1e({...P,padding:{top:Y.top+fe,right:Y.right+fe,bottom:Y.bottom+fe,left:Y.left+fe},mainAxis:!E&&M==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:$}),we=de?null:g1e(Qt=>{const _n=ys(Qt.elements.floating).documentElement;return{...P,rootBoundary:E?{x:0,y:0,width:_n.clientWidth,height:_n.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:te,limiter:h||E?void 0:y1e(Gt=>{if(!G.current)return{};const{width:Tn,height:En}=G.current.getBoundingClientRect(),Pn=cs(io(Gt.placement)),Dt=Pn==="y"?Tn:En,xn=Pn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:Dt/2+xn/2}})}},[P,h,E,Y,D]);M==="shift"||D==="shift"||l==="center"?Oe.push(we,Se):Oe.push(Se,we),Oe.push(b1e({...P,apply({elements:{floating:Qt},rects:{reference:_n},availableWidth:Gt,availableHeight:Tn}){Object.entries({"--available-width":`${Gt}px`,"--available-height":`${Tn}px`,"--anchor-width":`${_n.width}px`,"--anchor-height":`${_n.height}px`}).forEach(([En,Pn])=>{Qt.style.setProperty(En,Pn)})}}),Mwe(()=>({element:G.current||document.createElement("div"),padding:m,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(Qt){const{elements:_n,middlewareData:Gt,placement:Tn,rects:En,y:Pn}=Qt,Dt=io(Tn),xn=cs(Dt),Kt=G.current,sr=Gt.arrow?.x||0,Sr=Gt.arrow?.y||0,qr=Kt?.clientWidth||0,ft=Kt?.clientHeight||0,tn=sr+qr/2,Fn=Sr+ft/2,on=Math.abs(Gt.shift?.y||0),Cn=En.reference.height/2,Ft=typeof s=="function"?s(fN(Qt,i,ae)):s,Vr=on>Ft,Pr={top:`${tn}px calc(100% + ${Ft}px)`,bottom:`${tn}px ${-Ft}px`,left:`calc(100% + ${Ft}px) ${Fn}px`,right:`${-Ft}px ${Fn}px`}[Dt],$a=`${tn}px ${En.reference.y+Cn-Pn}px`;return _n.floating.style.setProperty("--transform-origin",te&&xn==="y"&&Vr?$a:Pr),{}}},jwe,w),ct(()=>{!b&&S&&S.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,S]);const $e=j.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:Te,elements:Pe,x:Ge,y:Ce,middlewareData:Be,update:Fe,placement:Je,context:ke,isPositioned:Ue,floatingStyles:Xe}=Q1e({rootContext:S,placement:B,middleware:Oe,strategy:r,whileElementsMounted:v?void 0:(...Qt)=>KD(...Qt,$e),nodeId:R,externalTree:x}),{sideX:Mt,sideY:Ae}=Be.adaptiveOrigin||QS,xe=Ue?r:"fixed",Ne=j.useMemo(()=>w?{position:xe,[Mt]:Ge,[Ae]:Ce}:{position:xe,...Xe},[w,xe,Mt,Ge,Ae,Ce,Xe]),Ke=j.useRef(null);ct(()=>{if(!b)return;const Qt=F.current,_n=typeof Qt=="function"?Qt():Qt,Tn=(dN(_n)?_n.current:_n)||null||null;Tn!==Ke.current&&(Te.setPositionReference(Tn),Ke.current=Tn)},[b,Te,V,F]),j.useEffect(()=>{if(!b)return;const Qt=F.current;typeof Qt!="function"&&dN(Qt)&&Qt.current!==Ke.current&&(Te.setPositionReference(Qt.current),Ke.current=Qt.current)},[b,Te,V,F]),j.useEffect(()=>{if(v&&b&&Pe.domReference&&Pe.floating)return KD(Pe.domReference,Pe.floating,Fe,$e)},[v,b,Pe,Fe,$e]);const vt=io(Je),Xt=rU(i,vt,ae),Vt=pf(Je)||"center",wt=!!Be.hide?.referenceHidden;ct(()=>{T&&b&&Ue&&C(vt)},[T,b,Ue,vt]);const Ht=j.useMemo(()=>({position:"absolute",top:Be.arrow?.y,left:Be.arrow?.x}),[Be.arrow]),Rt=Be.arrow?.centerOffset!==0;return j.useMemo(()=>({positionerStyles:Ne,arrowStyles:Ht,arrowRef:G,arrowUncentered:Rt,side:Xt,align:Vt,physicalSide:vt,anchorHidden:wt,refs:Te,context:ke,isPositioned:Ue,update:Fe}),[Ne,Ht,G,Rt,Xt,Vt,vt,wt,Te,ke,Ue,Fe])}function dN(e){return e!=null&&"current"in e}const iU=j.createContext(void 0);function A5(){const e=j.useContext(iU);if(!e)throw new Error(Si(59));return e}function Iw(e,t){e&&Object.assign(e.style,t)}const oU={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Dwe={position:"fixed"},Nwe=j.forwardRef(function(t,r){const{anchor:i,positionMethod:s="absolute",className:l,render:c,side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v,arrowPadding:S=5,sticky:b=!1,disableAnchorTracking:_,alignItemWithTrigger:E=!0,collisionAvoidance:R=lae,...w}=t,{store:T,listRef:x,labelsRef:O,alignItemWithTriggerActiveRef:C,selectedItemTextRef:M,valuesRef:D,initialValueRef:$,popupRef:q,setValue:L}=ql(),V=WL(),F=qt(T,Lt.open),re=qt(T,Lt.mounted),ae=qt(T,Lt.modal),K=qt(T,Lt.value),B=qt(T,Lt.openMethod),Y=qt(T,Lt.positionerElement),fe=qt(T,Lt.triggerElement),ie=qt(T,Lt.isItemEqualToValue),N=j.useRef(null),I=j.useRef(null),[U,P]=j.useState(E),G=re&&U&&B!=="touch";!re&&U!==E&&P(E),ct(()=>{re||(Lt.scrollUpArrowVisible(T.state)&&T.set("scrollUpArrowVisible",!1),Lt.scrollDownArrowVisible(T.state)&&T.set("scrollDownArrowVisible",!1))},[T,re]),j.useImperativeHandle(C,()=>G),E5((G||ae)&&F&&B!=="touch",fe);const ee=aU({anchor:i,floatingRootContext:V,positionMethod:s,mounted:re,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:S,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:_??G,collisionAvoidance:R,keepMounted:!0}),ue=G?"none":ee.side,ve=G?Dwe:ee.positionerStyles,Ee=j.useMemo(()=>{const Te={};return F||(Te.pointerEvents="none"),{role:"presentation",hidden:!re,style:{...ve,...Te}}},[F,re,ve]),Oe=j.useMemo(()=>({open:F,side:ue,align:ee.align,anchorHidden:ee.anchorHidden}),[F,ue,ee.align,ee.anchorHidden]),de=ot(Te=>{T.set("positionerElement",Te)}),te=mr("div",t,{ref:[r,de],state:Oe,stateAttributesMapping:Im,props:[Ee,w]}),Se=j.useRef(0),we=ot(Te=>{if(Te.size===0&&Se.current===0||D.current.length===0)return;const Pe=Se.current;if(Se.current=Te.size,Te.size===Pe)return;const Ge=mn(rf);if(Pe!==0&&!T.state.multiple&&K!==null&&TO(D.current,K,ie)===-1){const Be=$.current,Je=Be!=null&&jT(D.current,Be,ie)?Be:null;L(Je,Ge),Je===null&&(T.set("selectedIndex",null),M.current=null)}if(Pe!==0&&T.state.multiple&&Array.isArray(K)){const Ce=K.filter(Be=>jT(D.current,Be,ie));(Ce.length!==K.length||Ce.some(Be=>!jT(K,Be,ie)))&&(L(Ce,Ge),Ce.length===0&&(T.set("selectedIndex",null),M.current=null))}if(F&&G){T.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ce={height:""};Iw(Y,Ce),Iw(q.current,Ce)}}),$e=j.useMemo(()=>({...ee,side:ue,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:P,scrollUpArrowRef:N,scrollDownArrowRef:I}),[ee,ue,G,P]);return k.jsx(O5,{elementsRef:x,labelsRef:O,onMapChange:we,children:k.jsxs(iU.Provider,{value:$e,children:[re&&ae&&k.jsx(w5,{inert:S5(!F),cutout:fe}),te]})})});function sU(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const MS="base-ui-disable-scrollbar",OO={className:MS,getElement(e){return k.jsx("style",{nonce:e,href:MS,precedence:"base-ui:low",children:`.${MS}{scrollbar-width:none}.${MS}::-webkit-scrollbar{display:none}`})}},zwe=j.createContext(void 0);function lU(e){return j.useContext(zwe)}function M5(e){return e==="starting"?sae:Da}function $we(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const Pwe=j.createContext(void 0),Iwe={disableStyleElements:!1};function Lwe(){return j.useContext(Pwe)??Iwe}const Uwe={...Im,...i1},qwe=j.forwardRef(function(t,r){const{render:i,className:s,...l}=t,{store:c,popupRef:f,onOpenChangeComplete:d,setOpen:h,valueRef:m,selectedItemTextRef:g,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:_,highlightItemOnHover:E}=ql(),{side:R,align:w,alignItemWithTriggerActive:T,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:O,scrollUpArrowRef:C}=A5(),M=lU()!=null,D=WL(),{nonce:$,disableStyleElements:q}=Lwe(),L=to(),V=qt(c,Lt.id),F=qt(c,Lt.open),re=qt(c,Lt.mounted),ae=qt(c,Lt.popupProps),K=qt(c,Lt.transitionStatus),B=qt(c,Lt.triggerElement),Y=qt(c,Lt.positionerElement),fe=qt(c,Lt.listElement),ie=j.useRef(0),N=j.useRef(!1),I=j.useRef(0),U=j.useRef(!1),P=j.useRef({}),G=C2(),ee=ot(Oe=>{if(!Y||!f.current||!U.current)return;if(N.current||!T){b();return}const de=Y.style.top==="0px",te=Y.style.bottom==="0px",Se=Y.getBoundingClientRect().height,we=ys(Y),$e=getComputedStyle(Y),Te=parseFloat($e.marginTop),Pe=parseFloat($e.marginBottom),Ge=hN(getComputedStyle(f.current)),Ce=we.documentElement.clientHeight-Te-Pe,Be=Oe.scrollTop,Fe=Oe.scrollHeight,Je=Oe.clientHeight,ke=Fe-Je;let Ue=0,Xe=null,Mt=!1;if(de){const Ae=ke-Be,xe=Se+Ae,Ne=Math.min(xe,Ce);Ue=Ne,Ne!==Ce?Xe=ke:Mt=!0}else if(te){const Ae=Be-0,xe=Se+Ae,Ne=Math.min(xe,Ce),Ke=xe-Ce;Ue=Ne,Ne!==Ce?Xe=0:(Mt=!0,Be<ke&&(Xe=Be-(Ae-Ke)))}Ue!==0&&(Y.style.height=`${Ue}px`),Xe!=null&&(Oe.scrollTop=Xe),(Mt||Ue>=Ge)&&(N.current=!0),b()});j.useImperativeHandle(_,()=>ee,[ee]),cp({open:F,ref:f,onComplete(){F&&d?.(!0)}});const ue=j.useMemo(()=>({open:F,transitionStatus:K,side:R,align:w}),[F,K,R,w]);ct(()=>{!Y||!f.current||Object.keys(P.current).length||(P.current={top:Y.style.top||"0",left:Y.style.left||"0",right:Y.style.right,height:Y.style.height,bottom:Y.style.bottom,minHeight:Y.style.minHeight,maxHeight:Y.style.maxHeight,marginTop:Y.style.marginTop,marginBottom:Y.style.marginBottom})},[f,Y]),ct(()=>{F||T||(U.current=!1,N.current=!1,ie.current=0,I.current=0,Iw(Y,P.current))},[F,T,Y,f]),ct(()=>{const Oe=f.current;if(!(!F||!B||!Y||!Oe||c.state.transitionStatus==="ending")){if(!T){U.current=!0,G.request(b),Oe.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const de=Fwe(Oe);Oe.style.removeProperty("--transform-origin");try{const te=getComputedStyle(Y),Se=getComputedStyle(Oe),we=ys(B),$e=ha(Y),Te=B.getBoundingClientRect(),Pe=Y.getBoundingClientRect(),Ge=Te.left,Ce=Te.height,Be=fe||Oe,Fe=Be.scrollHeight,Je=parseFloat(Se.borderBottomWidth),ke=parseFloat(te.marginTop)||10,Ue=parseFloat(te.marginBottom)||10,Xe=parseFloat(te.minHeight)||100,Mt=hN(Se),Ae=5,xe=5,Ne=20,Ke=we.documentElement.clientHeight-ke-Ue,vt=we.documentElement.clientWidth,Xt=Ke-Te.bottom+Ce,Vt=g.current,wt=m.current;let Ht,Rt=0,Qt=0;if(Vt&&wt){const ft=wt.getBoundingClientRect();Ht=Vt.getBoundingClientRect();const tn=ft.left-Ge,Fn=Ht.left-Pe.left,on=ft.top-Te.top+ft.height/2,Cn=Ht.top-Pe.top+Ht.height/2;Rt=tn-Fn,Qt=Cn-on}const _n=Xt+Qt+Ue+Je;let Gt=Math.min(Ke,_n);const Tn=Ke-ke-Ue,En=_n-Gt,Pn=Math.max(Ae,Ge+Rt),Dt=vt-xe,xn=Math.max(0,Pn+Pe.width-Dt);Y.style.left=`${Pn-xn}px`,Y.style.height=`${Gt}px`,Y.style.maxHeight="auto",Y.style.marginTop=`${ke}px`,Y.style.marginBottom=`${Ue}px`,Oe.style.height="100%";const Kt=Be.scrollHeight-Be.clientHeight,sr=En>=Kt;sr&&(Gt=Math.min(Ke,Pe.height)-(En-Kt));const Sr=Te.top<Ne||Te.bottom>Ke-Ne||Gt<Math.min(Fe,Xe),qr=($e.visualViewport?.scale??1)!==1&&K7;if(Sr||qr){U.current=!0,Iw(Y,P.current),gs.flushSync(()=>x(!1));return}if(sr){const ft=Math.max(0,Ke-_n);Y.style.top=Pe.height>=Tn?"0":`${ft}px`,Y.style.height=`${Gt}px`,Be.scrollTop=Be.scrollHeight-Be.clientHeight,ie.current=Math.max(Xe,Gt)}else Y.style.bottom="0",ie.current=Math.max(Xe,Gt),Be.scrollTop=En;if(Ht){const ft=Pe.top,tn=Pe.height,Fn=Ht.top+Ht.height/2,on=tn>0?(Fn-ft)/tn*100:50,Cn=$we(on,0,100);Oe.style.setProperty("--transform-origin",`50% ${Cn}%`)}(ie.current===Ke||Gt>=Mt)&&(N.current=!0),b(),setTimeout(()=>{U.current=!0})}finally{de()}})}},[c,F,Y,B,m,g,f,b,T,x,G,O,C,fe]),j.useEffect(()=>{if(!T||!Y||!F)return;const Oe=ha(Y);function de(te){h(!1,mn(Dve,te))}return Oe.addEventListener("resize",de),()=>{Oe.removeEventListener("resize",de)}},[h,T,Y,F]);const ve={...fe?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${V}-list`},onKeyDown(Oe){v.current=!0,M&&b5.has(Oe.key)&&Oe.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(Oe){if(!E||sU(Oe)||Oe.pointerType==="touch")return;const de=Oe.currentTarget;L.start(0,()=>{c.set("activeIndex",null),de.focus({preventScroll:!0})})},onScroll(Oe){fe||_.current?.(Oe.currentTarget)},...T&&{style:fe?{height:"100%"}:oU}},Ee=mr("div",t,{ref:[r,f],state:ue,stateAttributesMapping:Uwe,props:[ae,ve,M5(K),{className:!fe&&T?OO.className:void 0},l]});return k.jsxs(j.Fragment,{children:[!q&&OO.getElement($),k.jsx(p5,{context:D,modal:!1,disabled:!re,restoreFocus:!0,children:Ee})]})});function hN(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}const pN={transform:"none",scale:"1",translate:"0 0"};function Vwe(e,t,r){r?e.setProperty(t,r):e.removeProperty(t)}function Fwe(e){const{style:t}=e,r={},i=Object.keys(pN);for(const s of i)r[s]=t.getPropertyValue(s),t.setProperty(s,pN[s]);return()=>{for(const s of i)Vwe(t,s,r[s])}}const Bwe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:c,scrollHandlerRef:f}=ql(),{alignItemWithTriggerActive:d}=A5(),h=qt(c,Lt.hasScrollArrows),m=qt(c,Lt.openMethod),g=qt(c,Lt.multiple),S={id:`${qt(c,Lt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(_){f.current?.(_.currentTarget)},...d&&{style:oU},className:h&&m!=="touch"?OO.className:void 0},b=ot(_=>{c.set("listElement",_)});return mr("div",t,{ref:[r,b],props:[S,l]})});let uU=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function j5(e={}){const{label:t,metadata:r,textRef:i,indexGuessBehavior:s,index:l}=e,{register:c,unregister:f,subscribeMapChange:d,elementsRef:h,labelsRef:m,nextIndexRef:g}=_we(),v=j.useRef(-1),[S,b]=j.useState(l??(s===uU.GuessFromOrder?()=>{if(v.current===-1){const R=g.current;g.current+=1,v.current=R}return v.current}:-1)),_=j.useRef(null),E=j.useCallback(R=>{if(_.current=R,S!==-1&&R!==null&&(h.current[S]=R,m)){const w=t!==void 0;m.current[S]=w?t:i?.current?.textContent??R.textContent}},[S,h,m,t,i]);return ct(()=>{if(l!=null)return;const R=_.current;if(R)return c(R,r),()=>{f(R)}},[l,c,f,r]),ct(()=>{if(l==null)return d(R=>{const w=_.current?R.get(_.current)?.index:null;w!=null&&b(w)})},[l,d,b]),j.useMemo(()=>({ref:E,index:S}),[S,E])}const cU=j.createContext(void 0);function k5(){const e=j.useContext(cU);if(!e)throw new Error(Si(57));return e}const Hwe=j.memo(j.forwardRef(function(t,r){const{render:i,className:s,value:l=null,label:c,disabled:f=!1,nativeButton:d=!1,...h}=t,m=j.useRef(null),g=j5({label:c,textRef:m,indexGuessBehavior:uU.GuessFromOrder}),{store:v,getItemProps:S,setOpen:b,setValue:_,selectionRef:E,typingRef:R,valuesRef:w,keyboardActiveRef:T,multiple:x,highlightItemOnHover:O}=ql(),C=to(),M=qt(v,Lt.isActive,g.index),D=qt(v,Lt.isSelected,g.index,l),$=qt(v,Lt.isSelectedByFocus,g.index),q=qt(v,Lt.isItemEqualToValue),L=g.index,V=L!==-1,F=j.useRef(null),re=ka(L);ct(()=>{if(!V)return;const ee=w.current;return ee[L]=l,()=>{delete ee[L]}},[V,L,l,w]),ct(()=>{if(!V)return;const ee=v.state.value;let ue=ee;x&&Array.isArray(ee)&&ee.length>0&&(ue=ee[ee.length-1]),ue!==void 0&&ym(ue,l,q)&&v.set("selectedIndex",L)},[V,L,x,q,v,l]);const ae=j.useMemo(()=>({disabled:f,selected:D,highlighted:M}),[f,D,M]),K=S({active:M,selected:D});K.onFocus=void 0,K.id=void 0;const B=j.useRef(null),Y=j.useRef("mouse"),fe=j.useRef(!1),{getButtonProps:ie,buttonRef:N}=ap({disabled:f,focusableWhenDisabled:!0,native:d});function I(ee){const ue=v.state.value;if(x){const ve=Array.isArray(ue)?ue:[],Ee=D?cwe(ve,l,q):[...ve,l];_(Ee,mn(gT,ee))}else _(l,mn(gT,ee)),b(!1,mn(gT,ee))}const U={role:"option","aria-selected":D,tabIndex:M?0:-1,onFocus(){v.set("activeIndex",L)},onMouseEnter(){!T.current&&v.state.selectedIndex===null&&v.set("activeIndex",L)},onMouseMove(){O&&v.set("activeIndex",L)},onMouseLeave(ee){!O||T.current||sU(ee)||C.start(0,()=>{v.state.activeIndex===L&&v.set("activeIndex",null)})},onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(ee){B.current=ee.key,v.set("activeIndex",L)},onClick(ee){fe.current=!1,!(ee.type==="keydown"&&B.current===null)&&(f||B.current===" "&&R.current||Y.current!=="touch"&&!M||(B.current=null,I(ee.nativeEvent)))},onPointerEnter(ee){Y.current=ee.pointerType},onPointerDown(ee){Y.current=ee.pointerType,fe.current=!0},onMouseUp(ee){if(f)return;if(fe.current){fe.current=!1;return}const ue=!E.current.allowSelectedMouseUp&&D,ve=!E.current.allowUnselectedMouseUp&&!D;ue||ve||Y.current!=="touch"&&!M||I(ee.nativeEvent)}},P=mr("div",t,{ref:[N,r,g.ref,F],state:ae,props:[K,U,h,ie]}),G=j.useMemo(()=>({selected:D,indexRef:re,textRef:m,selectedByFocus:$,hasRegistered:V}),[D,re,m,$,V]);return k.jsx(cU.Provider,{value:G,children:P})})),Gwe=j.forwardRef(function(t,r){const i=t.keepMounted??!1,{selected:s}=k5();return i||s?k.jsx(Kwe,{...t,ref:r}):null}),Kwe=j.memo(j.forwardRef((e,t)=>{const{render:r,className:i,keepMounted:s,...l}=e,{selected:c}=k5(),f=j.useRef(null),{transitionStatus:d,setMounted:h}=R2(c),m=j.useMemo(()=>({selected:c,transitionStatus:d}),[c,d]),g=mr("span",e,{ref:[t,f],state:m,props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:i1});return cp({open:c,ref:f,onComplete(){c||h(!1)}}),g})),Ywe=j.memo(j.forwardRef(function(t,r){const{indexRef:i,textRef:s,selectedByFocus:l,hasRegistered:c}=k5(),{selectedItemTextRef:f}=ql(),{className:d,render:h,...m}=t,g=j.useCallback(S=>{if(!S||!c)return;const b=f.current===null||!f.current.isConnected;(l||b&&i.current===0)&&(f.current=S)},[f,i,l,c]);return mr("div",t,{ref:[g,r,s],props:m})})),fU=j.forwardRef(function(t,r){const{render:i,className:s,direction:l,keepMounted:c=!1,...f}=t,{store:d,popupRef:h,listRef:m,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:v}=ql(),{side:S,scrollDownArrowRef:b,scrollUpArrowRef:_}=A5(),E=l==="up"?Lt.scrollUpArrowVisible:Lt.scrollDownArrowVisible,R=qt(d,E),w=qt(d,Lt.openMethod),T=R&&w!=="touch",x=to(),O=l==="up"?_:b,{transitionStatus:C,setMounted:M}=R2(T);ct(()=>(v.current+=1,d.state.hasScrollArrows||d.set("hasScrollArrows",!0),()=>{v.current=Math.max(0,v.current-1),v.current===0&&d.state.hasScrollArrows&&d.set("hasScrollArrows",!1)}),[d,v]),cp({open:T,ref:O,onComplete(){T||M(!1)}});const D=j.useMemo(()=>({direction:l,visible:T,side:S,transitionStatus:C}),[l,T,S,C]),q=mr("div",t,{ref:[r,O],state:D,props:[{"aria-hidden":!0,children:l==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||x.isStarted())return;d.set("activeIndex",null);function F(){const re=d.state.listElement??h.current;if(!re)return;d.set("activeIndex",null),g();const ae=re.scrollTop===0,K=Math.round(re.scrollTop+re.clientHeight)>=re.scrollHeight;if(m.current.length===0&&(l==="up"?d.set("scrollUpArrowVisible",!ae):d.set("scrollDownArrowVisible",!K)),l==="up"&&ae||l==="down"&&K){x.clear();return}if((d.state.listElement||h.current)&&m.current&&m.current.length>0){const Y=m.current,fe=O.current?.offsetHeight||0;if(l==="up"){let ie=0;const N=re.scrollTop+fe;for(let U=0;U<Y.length;U+=1){const P=Y[U];if(P&&P.offsetTop>=N){ie=U;break}}const I=Math.max(0,ie-1);if(I<ie){const U=Y[I];U&&(re.scrollTop=Math.max(0,U.offsetTop-fe))}else re.scrollTop=0}else{let ie=Y.length-1;const N=re.scrollTop+re.clientHeight-fe;for(let U=0;U<Y.length;U+=1){const P=Y[U];if(P&&P.offsetTop+P.offsetHeight>N){ie=Math.max(0,U-1);break}}const I=Math.min(Y.length-1,ie+1);if(I>ie){const U=Y[I];U&&(re.scrollTop=U.offsetTop+U.offsetHeight-re.clientHeight+fe)}else re.scrollTop=re.scrollHeight-re.clientHeight}}x.start(40,F)}x.start(40,F)},onMouseLeave(){x.clear()}},f]});return T||c?q:null}),Zwe=j.forwardRef(function(t,r){return k.jsx(fU,{...t,ref:r,direction:"down"})}),Xwe=j.forwardRef(function(t,r){return k.jsx(fU,{...t,ref:r,direction:"up"})}),Qwe=j.createContext(void 0),Wwe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,[c,f]=j.useState(),d=j.useMemo(()=>({labelId:c,setLabelId:f}),[c,f]),h=mr("div",t,{ref:r,props:[{role:"group","aria-labelledby":c},l]});return k.jsx(Qwe.Provider,{value:d,children:h})}),mN=pwe;function gN({className:e,...t}){return k.jsx(Wwe,{"data-slot":"select-group",className:en("scroll-my-1",e),...t})}function yN({className:e,...t}){return k.jsx(Swe,{"data-slot":"select-value",className:en("flex flex-1 text-left",e),...t})}function vN({className:e,size:t="default",children:r,...i}){return k.jsxs(vwe,{"data-slot":"select-trigger","data-size":t,className:en("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...i,children:[r,k.jsx(wwe,{render:k.jsx(B9,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function bN({className:e,children:t,side:r="bottom",sideOffset:i=4,align:s="center",alignOffset:l=0,alignItemWithTrigger:c=!0,...f}){return k.jsx(xwe,{children:k.jsx(Nwe,{side:r,sideOffset:i,align:s,alignOffset:l,alignItemWithTrigger:c,className:"isolate z-50",children:k.jsxs(qwe,{"data-slot":"select-content",className:en("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...f,children:[k.jsx(Jwe,{}),k.jsx(Bwe,{children:t}),k.jsx(e2e,{})]})})})}function xp({className:e,children:t,...r}){return k.jsxs(Hwe,{"data-slot":"select-item",className:en("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[k.jsx(Ywe,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),k.jsx(Gwe,{render:k.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:k.jsx(FR,{className:"pointer-events-none"})})]})}function Jwe({className:e,...t}){return k.jsx(Xwe,{"data-slot":"select-scroll-up-button",className:en("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full",e),...t,children:k.jsx(cre,{})})}function e2e({className:e,...t}){return k.jsx(Zwe,{"data-slot":"select-scroll-down-button",className:en("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full",e),...t,children:k.jsx(B9,{})})}const dU=j.createContext(void 0);function t2e(){const e=j.useContext(dU);if(e===void 0)throw new Error(Si(63));return e}let SN=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const hU={..._5,checked(e){return e?{[SN.checked]:""}:{[SN.unchecked]:""}}},n2e=j.forwardRef(function(t,r){const{checked:i,className:s,defaultChecked:l,id:c,inputRef:f,name:d,nativeButton:h=!1,onCheckedChange:m,readOnly:g=!1,required:v=!1,disabled:S=!1,render:b,uncheckedValue:_,value:E,...R}=t,{clearErrors:w}=T5(),{state:T,setTouched:x,setDirty:O,validityData:C,setFilled:M,setFocused:D,shouldValidateOnChange:$,validationMode:q,disabled:L,name:V,validation:F}=Xh(),{labelId:re}=k2(),ae=L||S,K=V??d,B=ot(m),Y=j.useRef(null),fe=cc(Y,f,F.inputRef),ie=j.useRef(null),N=Um(),I=D2({id:c,implicit:!1,controlRef:ie}),U=h?void 0:I,[P,G]=Ob({controlled:i,default:!!l,name:"Switch",state:"checked"});C5({id:N,commit:F.commit,value:P,controlRef:ie,name:K,getValue:()=>P}),ct(()=>{Y.current&&M(Y.current.checked)},[Y,M]),tU(P,()=>{w(K),O(P!==C.initialValue),M(P),$()?F.commit(P):F.commit(P,!0)});const{getButtonProps:ee,buttonRef:ue}=ap({disabled:ae,native:h}),ve={id:h?I:N,role:"switch","aria-checked":P,"aria-readonly":g||void 0,"aria-required":v||void 0,"aria-labelledby":re,onFocus(){ae||D(!0)},onBlur(){const te=Y.current;!te||ae||(x(!0),D(!1),q==="onBlur"&&F.commit(te.checked))},onClick(te){g||ae||(te.preventDefault(),Y?.current?.click())}},Ee=j.useMemo(()=>Yb({checked:P,disabled:ae,id:U,name:K,required:v,style:K?wL:T2,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:fe,onChange(te){if(te.nativeEvent.defaultPrevented)return;const Se=te.target.checked,we=mn(rf,te.nativeEvent);B?.(Se,we),!we.isCanceled&&G(Se)},onFocus(){ie.current?.focus()}},F.getInputValidationProps,E!==void 0?{value:E}:Da),[P,ae,fe,U,K,B,v,G,F,E]),Oe=j.useMemo(()=>({...T,checked:P,disabled:ae,readOnly:g,required:v}),[T,P,ae,g,v]),de=mr("span",t,{state:Oe,ref:[r,ie,ue],props:[ve,F.getValidationProps,R,ee],stateAttributesMapping:hU});return k.jsxs(dU.Provider,{value:Oe,children:[de,!P&&K&&_!==void 0&&k.jsx("input",{type:"hidden",name:K,value:_}),k.jsx("input",{...Ee})]})}),r2e=j.forwardRef(function(t,r){const{render:i,className:s,...l}=t,{state:c}=Xh(),f=t2e(),d={...c,...f};return mr("span",t,{state:d,ref:r,stateAttributesMapping:hU,props:l})});function wN({className:e,size:t="default",...r}){return k.jsx(n2e,{"data-slot":"switch","data-size":t,className:en("cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:k.jsx(r2e,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}const pU=j.createContext(void 0);function D5(){const e=j.useContext(pU);if(e===void 0)throw new Error(Si(64));return e}let a2e=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const N5={tabActivationDirection:e=>({[a2e.activationDirection]:e})},i2e=j.forwardRef(function(t,r){const{className:i,defaultValue:s=0,onValueChange:l,orientation:c="horizontal",render:f,value:d,...h}=t,m=R5(),g=Object.hasOwn(t,"defaultValue"),v=j.useRef([]),[S,b]=j.useState(()=>new Map),[_,E]=Ob({controlled:d,default:s,name:"Tabs",state:"value"}),R=d!==void 0,[w,T]=j.useState(()=>new Map),[x,O]=j.useState("none"),C=ot((B,Y)=>{l?.(B,Y),!Y.isCanceled&&(E(B),O(Y.activationDirection))}),M=ot((B,Y)=>{b(fe=>{if(fe.get(B)===Y)return fe;const ie=new Map(fe);return ie.set(B,Y),ie})}),D=ot((B,Y)=>{b(fe=>{if(!fe.has(B)||fe.get(B)!==Y)return fe;const ie=new Map(fe);return ie.delete(B),ie})}),$=j.useCallback(B=>S.get(B),[S]),q=j.useCallback(B=>{for(const Y of w.values())if(B===Y?.value)return Y?.id},[w]),L=j.useCallback(B=>{if(B===void 0)return null;for(const[Y,fe]of w.entries())if(fe!=null&&B===(fe.value??fe.index))return Y;return null},[w]),V=j.useMemo(()=>({direction:m,getTabElementBySelectedValue:L,getTabIdByPanelValue:q,getTabPanelIdByValue:$,onValueChange:C,orientation:c,registerMountedTabPanel:M,setTabMap:T,unregisterMountedTabPanel:D,tabActivationDirection:x,value:_}),[m,L,q,$,C,c,M,T,D,x,_]),F=j.useMemo(()=>{for(const B of w.values())if(B!=null&&B.value===_)return B},[w,_]),re=j.useMemo(()=>{for(const B of w.values())if(B!=null&&!B.disabled)return B.value},[w]);ct(()=>{if(R||w.size===0)return;const B=F?.disabled,Y=F==null&&_!==null;if(g&&B&&_===s||!B&&!Y)return;const ie=re??null;_!==ie&&(E(ie),O("none"))},[s,re,g,R,F,O,E,w,_]);const K=mr("div",t,{state:{orientation:c,tabActivationDirection:x},ref:r,props:h,stateAttributesMapping:N5});return k.jsx(pU.Provider,{value:V,children:k.jsx(O5,{elementsRef:v,children:K})})}),mU="data-composite-item-active";function o2e(e={}){const{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:i}=Z9(),{ref:s,index:l}=j5(e),c=r===l,f=j.useRef(null),d=cc(s,f);return{compositeProps:j.useMemo(()=>({tabIndex:c?0:-1,onFocus(){i(l)},onMouseMove(){const m=f.current;if(!t||!m)return;const g=m.hasAttribute("disabled")||m.ariaDisabled==="true";!c&&!g&&m.focus()}}),[c,i,l,t]),compositeRef:d,index:l}}const gU=j.createContext(void 0);function s2e(){const e=j.useContext(gU);if(e===void 0)throw new Error(Si(65));return e}const l2e=j.forwardRef(function(t,r){const{className:i,disabled:s=!1,render:l,value:c,id:f,nativeButton:d=!0,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:v}=D5(),{activateOnFocus:S,highlightedTabIndex:b,onTabActivation:_,setHighlightedTabIndex:E,tabsListElement:R}=s2e(),w=Um(f),T=j.useMemo(()=>({disabled:s,id:w,value:c}),[s,w,c]),{compositeProps:x,compositeRef:O,index:C}=o2e({metadata:T}),M=c===m,D=j.useRef(!1);ct(()=>{if(D.current){D.current=!1;return}if(!(M&&C>-1&&b!==C))return;const fe=R;if(fe!=null){const ie=ic(ys(fe));if(ie&&zn(fe,ie))return}s||E(C)},[M,C,b,E,s,R]);const{getButtonProps:$,buttonRef:q}=ap({disabled:s,native:d,focusableWhenDisabled:!0}),L=g(c),V=j.useRef(!1),F=j.useRef(!1);function re(fe){M||s||_(c,mn(rf,fe.nativeEvent,void 0,{activationDirection:"none"}))}function ae(fe){M||(C>-1&&!s&&E(C),!s&&S&&(!V.current||V.current&&F.current)&&_(c,mn(rf,fe.nativeEvent,void 0,{activationDirection:"none"})))}function K(fe){if(M||s)return;V.current=!0;function ie(){V.current=!1,F.current=!1}(!fe.button||fe.button===0)&&(F.current=!0,ys(fe.currentTarget).addEventListener("pointerup",ie,{once:!0}))}const B=j.useMemo(()=>({disabled:s,active:M,orientation:v}),[s,M,v]);return mr("button",t,{state:B,ref:[r,q,O],props:[x,{role:"tab","aria-controls":L,"aria-selected":M,id:w,onClick:re,onFocus:ae,onPointerDown:K,[mU]:M?"":void 0,onKeyDownCapture(){D.current=!0}},h,$]})});let u2e=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const c2e=j.forwardRef(function(t,r){const{className:i,value:s,render:l,keepMounted:c=!1,...f}=t,{value:d,getTabIdByPanelValue:h,orientation:m,tabActivationDirection:g,registerMountedTabPanel:v,unregisterMountedTabPanel:S}=D5(),b=Um(),_=j.useMemo(()=>({id:b,value:s}),[b,s]),{ref:E,index:R}=j5({metadata:_}),w=s!==d,T=h(s),x=j.useMemo(()=>({hidden:w,orientation:m,tabActivationDirection:g}),[w,m,g]),O=mr("div",t,{state:x,ref:[r,E],props:[{"aria-labelledby":T,hidden:w,id:b??void 0,role:"tabpanel",tabIndex:w?-1:0,[u2e.index]:R},f],stateAttributesMapping:N5});return ct(()=>{if(!(w&&!c)&&b!=null)return v(s,b),()=>{S(s,b)}},[w,c,s,b,v,S]),!w||c?O:null});function f2e(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const d2e=[];function h2e(e){const{itemSizes:t,cols:r=1,loopFocus:i=!0,dense:s=!1,orientation:l="both",direction:c,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:v,modifierKeys:S=d2e}=e,[b,_]=j.useState(0),E=r>1,R=j.useRef(null),w=cc(R,h),T=j.useRef([]),x=j.useRef(!1),O=f??b,C=ot(($,q=!1)=>{if((d??_)($),q){const L=T.current[$];aN(R.current,L,c,l)}}),M=ot($=>{if($.size===0||x.current)return;x.current=!0;const q=Array.from($.keys()),L=q.find(F=>F?.hasAttribute(mU))??null,V=L?q.indexOf(L):-1;V!==-1&&C(V),aN(R.current,L,c,l)}),D=j.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:w,onFocus($){!R.current||!rN($.target)||$.target.setSelectionRange(0,$.target.value.length??0)},onKeyDown($){const q=m?vSe:ZL;if(!q.has($.key)||p2e($,S)||!R.current)return;const V=c==="rtl",F=V?Cb:Wp,re={horizontal:F,vertical:Dh,both:F}[l],ae=V?Wp:Cb,K={horizontal:ae,vertical:Qp,both:ae}[l];if(rN($.target)&&!f2e($.target)){const U=$.target.selectionStart,P=$.target.selectionEnd,G=$.target.value??"";if(U==null||$.shiftKey||U!==P||$.key!==K&&U<G.length||$.key!==re&&U>0)return}let B=O;const Y=YS(T,v),fe=wO(T,v);if(E){const U=t||Array.from({length:T.current.length},()=>({width:1,height:1})),P=aL(U,r,s),G=P.findIndex(ue=>ue!=null&&!Hc(T,ue,v)),ee=P.reduce((ue,ve,Ee)=>ve!=null&&!Hc(T,ve,v)?Ee:ue,-1);B=P[rL({current:P.map(ue=>ue?T.current[ue]:null)},{event:$,orientation:l,loopFocus:i,cols:r,disabledIndices:oL([...v||T.current.map((ue,ve)=>Hc(T,ve)?ve:void 0),void 0],P),minIndex:G,maxIndex:ee,prevIndex:iL(O>fe?Y:O,U,P,r,$.key===Dh?"bl":$.key===Wp?"tr":"tl"),rtl:V})]}const ie={horizontal:[F],vertical:[Dh],both:[F,Dh]}[l],N={horizontal:[ae],vertical:[Qp],both:[ae,Qp]}[l],I=E?q:{horizontal:m?gSe:KL,vertical:m?ySe:YL,both:q}[l];m&&($.key===l1?B=Y:$.key===u1&&(B=fe)),B===O&&(ie.includes($.key)||N.includes($.key))&&(i&&B===fe&&ie.includes($.key)?B=Y:i&&B===Y&&N.includes($.key)?B=fe:B=di(T,{startingIndex:B,decrement:N.includes($.key),disabledIndices:v})),B!==O&&!Gp(T,B)&&(g&&$.stopPropagation(),I.has($.key)&&$.preventDefault(),C(B,!0),queueMicrotask(()=>{T.current[B]?.focus()}))}}),[r,s,c,v,T,m,O,E,t,i,w,S,C,l,g]);return j.useMemo(()=>({props:D,highlightedIndex:O,onHighlightedIndexChange:C,elementsRef:T,disabledIndices:v,onMapChange:M,relayKeyboardEvent:D.onKeyDown}),[D,O,C,T,v,M])}function p2e(e,t){for(const r of xSe.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}function m2e(e){const{render:t,className:r,refs:i=om,props:s=om,state:l=Da,stateAttributesMapping:c,highlightedIndex:f,onHighlightedIndexChange:d,orientation:h,dense:m,itemSizes:g,loopFocus:v,cols:S,enableHomeAndEndKeys:b,onMapChange:_,stopEventPropagation:E=!0,rootRef:R,disabledIndices:w,modifierKeys:T,highlightItemOnHover:x=!1,tag:O="div",...C}=e,M=R5(),{props:D,highlightedIndex:$,onHighlightedIndexChange:q,elementsRef:L,onMapChange:V,relayKeyboardEvent:F}=h2e({itemSizes:g,cols:S,loopFocus:v,dense:m,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:R,stopEventPropagation:E,enableHomeAndEndKeys:b,direction:M,disabledIndices:w,modifierKeys:T}),re=mr(O,e,{state:l,ref:i,props:[D,...s,C],stateAttributesMapping:c}),ae=j.useMemo(()=>({highlightedIndex:$,onHighlightedIndexChange:q,highlightItemOnHover:x,relayKeyboardEvent:F}),[$,q,x,F]);return k.jsx(Y9.Provider,{value:ae,children:k.jsx(O5,{elementsRef:L,onMapChange:K=>{_?.(K),V(K)},children:re})})}const g2e=j.forwardRef(function(t,r){const{activateOnFocus:i=!1,className:s,loopFocus:l=!0,render:c,...f}=t,{getTabElementBySelectedValue:d,onValueChange:h,orientation:m,value:g,setTabMap:v,tabActivationDirection:S}=D5(),[b,_]=j.useState(0),[E,R]=j.useState(null),w=y2e(g,m,E,d),T=ot((M,D)=>{if(M!==g){const $=w(M);D.activationDirection=$,h(M,D)}}),x=j.useMemo(()=>({orientation:m,tabActivationDirection:S}),[m,S]),O={"aria-orientation":m==="vertical"?"vertical":void 0,role:"tablist"},C=j.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:b,onTabActivation:T,setHighlightedTabIndex:_,tabsListElement:E,value:g}),[i,b,T,_,E,g]);return k.jsx(gU.Provider,{value:C,children:k.jsx(m2e,{render:c,className:s,state:x,refs:[r,R],props:[O,f],stateAttributesMapping:N5,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:l,orientation:m,onHighlightedIndexChange:_,onMapChange:v,disabledIndices:om})})});function EN(e,t){const{left:r,top:i}=e.getBoundingClientRect(),{left:s,top:l}=t.getBoundingClientRect(),c=r-s,f=i-l;return{left:c,top:f}}function y2e(e,t,r,i){const[s,l]=j.useState(null);return ct(()=>{if(e==null||r==null){l(null);return}const c=i(e);if(c==null){l(null);return}const{left:f,top:d}=EN(c,r);l(t==="horizontal"?f:d)},[t,i,r,e]),j.useCallback(c=>{if(c===e)return"none";if(c==null)return l(null),"none";if(c!=null&&r!=null){const f=i(c);if(f!=null){const{left:d,top:h}=EN(f,r);if(s==null)return l(t==="horizontal"?d:h),"none";if(t==="horizontal"){if(d<s)return l(d),"left";if(d>s)return l(d),"right"}else{if(h<s)return l(h),"up";if(h>s)return l(h),"down"}}}return"none"},[i,t,s,r,e])}function v2e({className:e,orientation:t="horizontal",...r}){return k.jsx(i2e,{"data-slot":"tabs","data-orientation":t,className:en("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...r})}const b2e=vc("rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function S2e({className:e,variant:t="default",...r}){return k.jsx(g2e,{"data-slot":"tabs-list","data-variant":t,className:en(b2e({variant:t}),e),...r})}function kT({className:e,...t}){return k.jsx(l2e,{"data-slot":"tabs-trigger",className:en("gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function DT({className:e,...t}){return k.jsx(c2e,{"data-slot":"tabs-content",className:en("text-xs/relaxed flex-1 outline-none",e),...t})}function w2e({className:e,...t}){return k.jsx("div",{"data-slot":"input-group",role:"group",className:en("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const E2e=vc("text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function x2e({className:e,align:t="inline-start",...r}){return k.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:en(E2e({align:t}),e),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}function _2e({className:e,...t}){return k.jsx(es,{"data-slot":"command",className:en("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function T2e({className:e,...t}){return k.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:k.jsxs(w2e,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[k.jsx(es.Input,{"data-slot":"command-input",className:en("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),k.jsx(x2e,{children:k.jsx(Cre,{className:"size-4 shrink-0 opacity-50"})})]})})}function C2e({className:e,...t}){return k.jsx(es.List,{"data-slot":"command-list",className:en("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function O2e({className:e,...t}){return k.jsx(es.Empty,{"data-slot":"command-empty",className:en("py-6 text-center text-xs",e),...t})}function R2e({className:e,...t}){return k.jsx(es.Group,{"data-slot":"command-group",className:en("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs",e),...t})}function A2e({className:e,children:t,...r}){return k.jsxs(es.Item,{"data-slot":"command-item",className:en("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[t,k.jsx(FR,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const yU=j.createContext(void 0);function c1(e){const t=j.useContext(yU);if(t===void 0&&!e)throw new Error(Si(47));return t}function M2e(){return{...UL(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const j2e={...qL,disabled:ut(e=>e.disabled),instantType:ut(e=>e.instantType),openMethod:ut(e=>e.openMethod),openChangeReason:ut(e=>e.openChangeReason),modal:ut(e=>e.modal),stickIfOpen:ut(e=>e.stickIfOpen),titleElementId:ut(e=>e.titleElementId),descriptionElementId:ut(e=>e.descriptionElementId),openOnHover:ut(e=>e.openOnHover),closeDelay:ut(e=>e.closeDelay),hasViewport:ut(e=>e.hasViewport)};class z5 extends y5{constructor(t){const r={...M2e(),...t};r.open&&t?.mounted===void 0&&(r.mounted=!0),super(r,{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:j.createRef(),beforeContentFocusGuardRef:j.createRef(),stickIfOpenTimeout:new af,triggerElements:new A2},j2e)}setOpen=(t,r)=>{const i=r.reason===Ho,s=r.reason===Vc&&r.event.detail===0,l=!t&&(r.reason===F7||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,r),r.isCanceled)return;const c={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};this.state.floatingRootContext.context.events?.emit("openchange",c);const d=()=>{const h={open:t,openChangeReason:r.reason},m=r.trigger?.id??null;(m||t)&&(h.activeTriggerId=m,h.activeTriggerElement=r.trigger??null),this.update(h)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(oae,()=>{this.set("stickIfOpen",!1)}),gs.flushSync(d)):d(),s||l?this.set("instantType",s?"click":"dismiss"):r.reason===Yh?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,r){const i=oo(()=>new z5(r)).current,s=t??i;return o5(i.disposeEffect),s}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function xN({props:e}){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,modal:c=!1,handle:f,triggerId:d,defaultTriggerId:h=null}=e,m=z5.useStore(f?.store,{open:r??i,modal:c,activeTriggerId:d!==void 0?d:h});m.useControlledProp("open",r,i),m.useControlledProp("activeTriggerId",d,h);const g=m.useState("open"),v=m.useState("positionerElement"),S=m.useState("payload"),b=m.useState("openChangeReason");m.useContextCallback("onOpenChange",s),m.useContextCallback("onOpenChangeComplete",l);const{openMethod:_,triggerProps:E,reset:R}=x5(g);IL(m);const{forceUnmount:w}=LL(g,m,()=>{m.update({stickIfOpen:!0,openChangeReason:null}),R()});E5(g&&c===!0&&b!==Ho&&_!=="touch",v),j.useEffect(()=>{g||m.context.stickIfOpenTimeout.clear()},[m,g]);const T=j.useCallback(ae=>{const K=mn(ae);return K.preventUnmountOnClose=()=>{m.set("preventUnmountingOnClose",!0)},K},[m]),x=j.useCallback(()=>{m.setOpen(!1,T(B7))},[m,T]);j.useImperativeHandle(e.actionsRef,()=>({unmount:w,close:x}),[w,x]);const O=FL({popupStore:m,onOpenChange:m.setOpen}),C=g5(O,{outsidePressEvent:{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),M=HL(O),{getReferenceProps:D,getFloatingProps:$,getTriggerProps:q}=M2([C,M]),L=j.useMemo(()=>D(E),[D,E]),V=j.useMemo(()=>q(E),[q,E]),F=j.useMemo(()=>$(),[$]);m.useSyncedValues({modal:c,openMethod:_,activeTriggerProps:L,inactiveTriggerProps:V,popupProps:F,floatingRootContext:O,nested:mf()!=null});const re=j.useMemo(()=>({store:m}),[m]);return k.jsx(yU.Provider,{value:re,children:typeof t=="function"?t({payload:S}):t})}function k2e(e){return c1(!0)?k.jsx(xN,{props:e}):k.jsx(_be,{children:k.jsx(xN,{props:e})})}const D2e=300,N2e=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:c=!0,handle:f,payload:d,openOnHover:h=!1,delay:m=D2e,closeDelay:g=0,id:v,...S}=t,b=c1(!0),_=f?.store??b?.store;if(!_)throw new Error(Si(74));const E=Um(v),R=_.useState("isTriggerActive",E),w=_.useState("floatingRootContext"),T=_.useState("isOpenedByTrigger",E),x=j.useRef(null),{registerTrigger:O,isMountedByThisTrigger:C}=Z1e(E,x,_,{payload:d,disabled:l,openOnHover:h,closeDelay:g}),M=_.useState("openChangeReason"),D=_.useState("stickIfOpen"),$=_.useState("openMethod"),q=aSe(w,{enabled:w!=null&&h&&($!=="touch"||M!==Vc),mouseOnly:!0,move:!1,handleClose:dSe(),restMs:m,delay:{close:g},triggerElementRef:x,isActiveTrigger:R}),L=TL(w,{enabled:w!=null,stickIfOpen:D}),V=M2([L]),F=_.useState("triggerProps",C),re=j.useMemo(()=>({disabled:l,open:T}),[l,T]),{getButtonProps:ae,buttonRef:K}=ap({disabled:l,native:c}),B=j.useMemo(()=>({open(I){return I&&M===Vc?V7.open(I):q7.open(I)}}),[M]),Y=mr("button",t,{state:re,ref:[K,r,O,x],props:[V.getReferenceProps(),q,F,{[W9]:"",id:E},S,ae],stateAttributesMapping:B}),fe=j.useRef(null),ie=ot(I=>{gs.flushSync(()=>{_.setOpen(!1,mn(Yh,I.nativeEvent,I.currentTarget))}),bbe(fe.current)?.focus()}),N=ot(I=>{const U=_.select("positionerElement");if(U&&Kp(I,U))_.context.beforeContentFocusGuardRef.current?.focus();else{gs.flushSync(()=>{_.setOpen(!1,mn(Yh,I.nativeEvent,I.currentTarget))});let P=vbe(_.context.triggerFocusTargetRef.current||x.current);for(;P!==null&&zn(U,P);){const G=P;if(P=f5(P),P===G)break}P?.focus()}});return R?k.jsxs(j.Fragment,{children:[k.jsx(gm,{ref:fe,onFocus:ie}),k.jsx(j.Fragment,{children:Y},E),k.jsx(gm,{ref:_.context.triggerFocusTargetRef,onFocus:N})]}):k.jsx(j.Fragment,{children:Y},E)}),vU=j.createContext(void 0);function z2e(){const e=j.useContext(vU);if(e===void 0)throw new Error(Si(45));return e}const $2e=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=c1();return l.useState("mounted")||i?k.jsx(vU.Provider,{value:i,children:k.jsx(d5,{ref:r,...s,renderGuards:!1})}):null}),bU=j.createContext(void 0);function P2e(){const e=j.useContext(bU);if(!e)throw new Error(Si(46));return e}const I2e=j.forwardRef(function(t,r){const{render:i,className:s,anchor:l,positionMethod:c="absolute",side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:S=5,sticky:b=!1,disableAnchorTracking:_=!1,collisionAvoidance:E=uae,...R}=t,{store:w}=c1(),T=z2e(),x=Ebe(),O=w.useState("floatingRootContext"),C=w.useState("mounted"),M=w.useState("open"),D=w.useState("openChangeReason"),$=w.useState("activeTriggerElement"),q=w.useState("modal"),L=w.useState("positionerElement"),V=w.useState("instantType"),F=w.useState("transitionStatus"),re=w.useState("hasViewport"),ae=j.useRef(null),K=PL(L,!1,!1),B=aU({anchor:l,floatingRootContext:O,positionMethod:c,mounted:C,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:S,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:_,keepMounted:T,nodeId:x,collisionAvoidance:E,adaptiveOrigin:re?kwe:void 0}),Y=j.useMemo(()=>{const P={};return M||(P.pointerEvents="none"),{role:"presentation",hidden:!C,style:{...B.positionerStyles,...P}}},[M,C,B.positionerStyles]),fe=j.useMemo(()=>({props:Y,...B}),[Y,B]),ie=O?.select("domReferenceElement");ct(()=>{const P=ie,G=ae.current;if(P&&(ae.current=P),G&&P&&P!==G){w.set("instantType",void 0);const ee=new AbortController;return K(()=>{w.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[ie,K,w]);const N=j.useMemo(()=>({open:M,side:fe.side,align:fe.align,anchorHidden:fe.anchorHidden,instant:V}),[M,fe.side,fe.align,fe.anchorHidden,V]),I=j.useCallback(P=>{w.set("positionerElement",P)},[w]),U=mr("div",t,{state:N,props:[fe.props,M5(F),R],ref:[r,I],stateAttributesMapping:Im});return k.jsxs(bU.Provider,{value:fe,children:[C&&q===!0&&D!==Ho&&k.jsx(w5,{ref:w.context.internalBackdropRef,inert:S5(!M),cutout:$}),k.jsx(xbe,{id:x,children:U})]})}),L2e={...Im,...i1},U2e=j.forwardRef(function(t,r){const{className:i,render:s,initialFocus:l,finalFocus:c,...f}=t,{store:d}=c1(),h=P2e(),m=lU()!=null,g=d.useState("open"),v=d.useState("openMethod"),S=d.useState("instantType"),b=d.useState("transitionStatus"),_=d.useState("popupProps"),E=d.useState("titleElementId"),R=d.useState("descriptionElementId"),w=d.useState("modal"),T=d.useState("mounted"),x=d.useState("openChangeReason"),O=d.useState("activeTriggerElement"),C=d.useState("floatingRootContext");cp({open:g,ref:d.context.popupRef,onComplete(){g&&d.context.onOpenChangeComplete?.(!0)}});const M=d.useState("disabled"),D=d.useState("openOnHover"),$=d.useState("closeDelay");tSe(C,{enabled:D&&!M,closeDelay:$});function q(ae){return ae==="touch"?d.context.popupRef.current:!0}const L=l===void 0?q:l,V=j.useMemo(()=>({open:g,side:h.side,align:h.align,instant:S,transitionStatus:b}),[g,h.side,h.align,S,b]),F=j.useCallback(ae=>{d.set("popupElement",ae)},[d]),re=mr("div",t,{state:V,ref:[r,d.context.popupRef,F],props:[_,{"aria-labelledby":E,"aria-describedby":R,onKeyDown(ae){m&&b5.has(ae.key)&&ae.stopPropagation()}},M5(b),f],stateAttributesMapping:L2e});return k.jsx(p5,{context:C,openInteractionType:v,modal:w==="trap-focus",disabled:!T||x===Ho,initialFocus:L,returnFocus:c,restoreFocus:"popup",previousFocusableElement:Gr(O)?O:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:re})});function q2e({...e}){return k.jsx(k2e,{"data-slot":"popover",...e})}function V2e({...e}){return k.jsx(N2e,{"data-slot":"popover-trigger",...e})}function F2e({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...l}){return k.jsx($2e,{children:k.jsx(I2e,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:k.jsx(U2e,{"data-slot":"popover-content",className:en("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",e),...l})})})}const _N=[{value:"en-US",label:"English (US)"},{value:"es-ES",label:"español (España)"},{value:"fr-FR",label:"français (France)"},{value:"de-DE",label:"Deutsch"},{value:"it-IT",label:"italiano"},{value:"am-ET",label:"አማርኛ"},{value:"ar",label:"العربية"},{value:"bg-BG",label:"български"},{value:"bn-BD",label:"বাংলা"},{value:"bs-BA",label:"bosanski"},{value:"ca-ES",label:"català"},{value:"cs-CZ",label:"čeština"},{value:"da-DK",label:"dansk"},{value:"el-GR",label:"Ελληνικά"},{value:"es-419",label:"español (Latinoamérica)"},{value:"et-EE",label:"eesti"},{value:"fi-FI",label:"suomi"},{value:"fr-CA",label:"français (Canada)"},{value:"gu-IN",label:"ગુજરાતી"},{value:"hi-IN",label:"हिन्दी"},{value:"hr-HR",label:"hrvatski"},{value:"hu-HU",label:"magyar"},{value:"hy-AM",label:"հայերեն"},{value:"id-ID",label:"Indonesia"},{value:"is-IS",label:"íslenska"},{value:"ja-JP",label:"日本語"},{value:"ka-GE",label:"ქართული"},{value:"kk-KZ",label:"қазақ тілі"},{value:"kn-IN",label:"ಕನ್ನಡ"},{value:"ko-KR",label:"한국어"},{value:"lt-LT",label:"lietuvių"},{value:"lv-LV",label:"latviešu"},{value:"mk-MK",label:"македонски"},{value:"ml-IN",label:"മലയാളം"},{value:"mn-MN",label:"монгол"},{value:"mr-IN",label:"मराठी"},{value:"ms-MY",label:"Bahasa Melayu"},{value:"my-MM",label:"မြန်မာ"},{value:"nb-NO",label:"norsk bokmål"},{value:"nl-NL",label:"Nederlands"},{value:"pa-IN",label:"ਪੰਜਾਬੀ"},{value:"pl-PL",label:"polski"},{value:"pt-BR",label:"português (Brasil)"},{value:"pt-PT",label:"português (Portugal)"},{value:"ro-RO",label:"română"},{value:"ru-RU",label:"русский"},{value:"sk-SK",label:"slovenčina"},{value:"sl-SI",label:"slovenščina"},{value:"so-SO",label:"Soomaali"},{value:"sq-AL",label:"shqip"},{value:"sr-RS",label:"српски"},{value:"sv-SE",label:"svenska"},{value:"sw-KE",label:"Kiswahili"},{value:"ta-IN",label:"தமிழ்"},{value:"te-IN",label:"తెలుగు"},{value:"th-TH",label:"ไทย"},{value:"tl-PH",label:"Tagalog"},{value:"tr-TR",label:"Türkçe"},{value:"uk-UA",label:"українська"},{value:"ur-PK",label:"اردو"},{value:"vi-VN",label:"Tiếng Việt"},{value:"zh-Hans",label:"简体中文"},{value:"zh-Hant-HK",label:"繁體中文(香港)"},{value:"zh-Hant-TW",label:"繁體中文(台灣)"}],B2e=({value:e,onValueChange:t})=>{const[r,i]=j.useState(!1),s=_N.find(l=>l.value===e);return k.jsxs(q2e,{open:r,onOpenChange:i,children:[k.jsx(V2e,{children:k.jsxs(Xc,{variant:"outline",role:"combobox","aria-expanded":r,className:"w-full justify-between",children:[s?k.jsxs("span",{children:[s.value,k.jsxs("span",{className:"text-muted-foreground",children:[" ","- ",s.label]})]}):"Select locale...",k.jsx(dre,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),k.jsx(F2e,{className:"w-full p-0",children:k.jsxs(_2e,{children:[k.jsx(T2e,{placeholder:"Search locale..."}),k.jsxs(C2e,{children:[k.jsx(O2e,{children:"No locale found."}),k.jsx(R2e,{children:_N.map(l=>k.jsxs(A2e,{value:l.value,onSelect:c=>{t(c===e?"":c),i(!1)},children:[k.jsxs("span",{children:[l.label," ",k.jsxs("span",{className:"text-muted-foreground",children:["(",l.value,")"]})]}),k.jsx(FR,{className:en("ml-auto h-4 w-4",e===l.value?"opacity-100":"opacity-0")})]},l.value))})]})]})})]})};function H2e({resourceUri:e}){const{data:t}=V9(e);return t?k.jsx("div",{className:"text-xs",children:k.jsx(_2,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:4,collapseStringsAfterLength:80})}):null}const G2e=()=>{const e=ff(),{openaiRef:t,openaiObject:r,openInAppUrl:i}=_m(e.name),{setToolData:s}=xm(),l=e._meta?.["openai/outputTemplate"],c=(f,d)=>{const h=t?.current?.contentWindow?.openai;h&&r&&(h[f]=d,s(e.name,{openaiObject:{...r,[f]:d}}))};return r?k.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:k.jsxs(v2e,{defaultValue:"widget-state",className:"gap-0",children:[k.jsxs(S2e,{className:"border-b border-border w-full",children:[k.jsx(kT,{value:"properties",children:"Properties"}),k.jsx(kT,{value:"widget-state",children:"Widget State"}),l&&k.jsx(kT,{value:"resource",children:"Resource"})]}),k.jsx(DT,{value:"properties",className:"p-4",children:k.jsxs(JSe,{children:[k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Display Mode"}),k.jsxs(mN,{value:r.displayMode,onValueChange:f=>c("displayMode",f),"aria-label":"Select framework",items:[{label:"Inline",value:"inline"},{label:"Fullscreen",value:"fullscreen"},{label:"Pip",value:"pip"},{label:"Modal",value:"modal"}],name:"displayMode",required:!0,children:[k.jsx(vN,{children:k.jsx(yN,{})}),k.jsx(bN,{children:k.jsxs(gN,{children:[k.jsx(xp,{value:"inline",children:"Inline"}),k.jsx(xp,{value:"fullscreen",children:"Fullscreen"}),k.jsx(xp,{value:"pip",children:"Pip"}),k.jsx(xp,{value:"modal",children:"Modal"})]})})]})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Theme"}),k.jsxs(QSe,{children:[k.jsx(Xc,{variant:r.theme==="light"?"default":"outline",onClick:()=>c("theme","light"),children:k.jsx(Rre,{})}),k.jsx(Xc,{variant:r.theme==="dark"?"default":"outline",onClick:()=>c("theme","dark"),children:k.jsx(Ere,{})})]})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Locale"}),k.jsx(B2e,{value:r.locale,onValueChange:f=>c("locale",f)})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Max Height"}),k.jsx(MT,{type:"number",value:r.maxHeight!==void 0?String(r.maxHeight):"",onChange:f=>{const d=f.target.value.trim();c("maxHeight",d===""?void 0:Number(d))}})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Safe Area Insets"}),k.jsx("div",{className:"grid grid-cols-2 gap-4",children:["top","bottom","left","right"].map(f=>{const d=f.charAt(0).toUpperCase()+f.slice(1);return k.jsxs("div",{children:[k.jsx("label",{htmlFor:`safeArea-${f}`,className:"text-xs text-muted-foreground block mb-1",children:d}),k.jsx(MT,{id:`safeArea-${f}`,type:"number",value:r.safeArea?.insets?.[f]!==void 0?String(r.safeArea.insets[f]):"0",onChange:h=>{const m=h.target.value.trim();c("safeArea",{...r.safeArea,insets:{...r.safeArea?.insets,[f]:m===""?0:Number(m)}})}})]},f)})})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Device Type"}),k.jsxs(mN,{value:r.userAgent?.device?.type??"desktop",onValueChange:f=>c("userAgent",{...r.userAgent,device:{...r.userAgent?.device,type:f}}),"aria-label":"Select device type",items:[{label:"Mobile",value:"mobile"},{label:"Desktop",value:"desktop"}],name:"deviceType",required:!0,children:[k.jsx(vN,{children:k.jsx(yN,{})}),k.jsx(bN,{children:k.jsxs(gN,{children:[k.jsx(xp,{value:"mobile",children:"Mobile"}),k.jsx(xp,{value:"desktop",children:"Desktop"})]})})]})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Capabilities"}),k.jsxs("div",{className:"flex gap-8",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("label",{htmlFor:"hover",className:"text-xs text-muted-foreground cursor-pointer",children:"Hover"}),k.jsx(wN,{id:"hover",checked:r.userAgent?.capabilities?.hover??!1,onCheckedChange:f=>c("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,hover:f}})})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("label",{htmlFor:"touch",className:"text-xs text-muted-foreground cursor-pointer",children:"Touch"}),k.jsx(wN,{id:"touch",checked:r.userAgent?.capabilities?.touch??!1,onCheckedChange:f=>c("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,touch:f}})})]})]})]}),k.jsxs(Tc,{children:[k.jsx(Cc,{children:"Open in App URL"}),k.jsx(MT,{type:"text",value:i??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),k.jsx(DT,{value:"widget-state",className:"p-4",children:k.jsx(_2,{src:r.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),l&&k.jsx(DT,{value:"resource",className:"p-4",children:k.jsx(j.Suspense,{fallback:k.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading resource..."}),children:k.jsx(H2e,{resourceUri:l})})})]})}):null};function TN(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function K2e(e,t=60){const r=JSON.stringify(e);return r.length>t?`${r.slice(0,t)}…`:r}function Y2e({log:e}){const[t,r]=j.useState(!1),i=Object.keys(e.args).length>0,s=i?K2e(e.args):null;return k.jsxs(k.Fragment,{children:[i?k.jsxs("button",{type:"button",onClick:()=>r(!t),className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left",children:[k.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:TN(e.timestamp)}),k.jsx("span",{className:en("font-semibold shrink-0 min-w-[120px]",e.type==="response"?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400"),children:e.command}),k.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),k.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:s})]}):k.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50",children:[k.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:TN(e.timestamp)}),k.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&i&&k.jsx("div",{className:"px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50",children:k.jsx("pre",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(e.args,null,2)})})]})}function Z2e(){const e=ff(),{setToolData:t}=xm(),{openaiLogs:r}=_m(e.name),i=j.useRef(null),s=()=>{t(e.name,{openaiLogs:[]})};return j.useEffect(()=>{const l=i.current;l&&(l.scrollTop=l.scrollHeight)},[]),k.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[k.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[k.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"OpenAI API Logs"}),k.jsx("div",{className:"flex items-center gap-2",children:r.length>0&&k.jsxs(Xc,{variant:"ghost",size:"sm",onClick:s,children:[k.jsx(Mre,{className:"w-3 h-3"}),"Clear"]})})]}),k.jsx("div",{ref:i,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:r.map(l=>k.jsx(Y2e,{log:l},l.id))})]})}const X2e=vc("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function Q2e({className:e,variant:t,...r}){return k.jsx("div",{className:en(X2e({variant:t}),e),"data-slot":"alert",role:"alert",...r})}function W2e({className:e,...t}){return k.jsx("div",{className:en("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function J2e({className:e,...t}){return k.jsx("div",{className:en("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const eEe=()=>{const e=ff(),t=_m(e.name);if(!t)return null;const r=()=>{const i=[];return t.response.content.forEach(s=>{s.type==="text"&&i.push(s.text)}),i.join(`
152
+ `)};return k.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:k.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?k.jsxs(Q2e,{variant:"error",children:[k.jsx(pre,{}),k.jsx(W2e,{children:"Error"}),k.jsx(J2e,{children:r()})]}):k.jsx("div",{className:"text-xs",children:k.jsx(_2,{src:t.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:3,collapseStringsAfterLength:80})}):null})})},SU="openai:set_globals";class tEe extends CustomEvent{type=SU}var NT={exports:{}},Jt={};var CN;function nEe(){if(CN)return Jt;CN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function S(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function R(N,I,U){this.props=N,this.context=I,this.refs=E,this.updater=U||b}R.prototype.isReactComponent={},R.prototype.setState=function(N,I){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,I,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function w(){}w.prototype=R.prototype;function T(N,I,U){this.props=N,this.context=I,this.refs=E,this.updater=U||b}var x=T.prototype=new w;x.constructor=T,_(x,R.prototype),x.isPureReactComponent=!0;var O=Array.isArray;function C(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function $(N,I,U){var P=U.ref;return{$$typeof:e,type:N,key:I,ref:P!==void 0?P:null,props:U}}function q(N,I){return $(N.type,I,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function V(N){var I={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(U){return I[U]})}var F=/\/+/g;function re(N,I){return typeof N=="object"&&N!==null&&N.key!=null?V(""+N.key):I.toString(36)}function ae(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(C,C):(N.status="pending",N.then(function(I){N.status==="pending"&&(N.status="fulfilled",N.value=I)},function(I){N.status==="pending"&&(N.status="rejected",N.reason=I)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function K(N,I,U,P,G){var ee=typeof N;(ee==="undefined"||ee==="boolean")&&(N=null);var ue=!1;if(N===null)ue=!0;else switch(ee){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(N.$$typeof){case e:case t:ue=!0;break;case m:return ue=N._init,K(ue(N._payload),I,U,P,G)}}if(ue)return G=G(N),ue=P===""?"."+re(N,0):P,O(G)?(U="",ue!=null&&(U=ue.replace(F,"$&/")+"/"),K(G,I,U,"",function(Oe){return Oe})):G!=null&&(L(G)&&(G=q(G,U+(G.key==null||N&&N.key===G.key?"":(""+G.key).replace(F,"$&/")+"/")+ue)),I.push(G)),1;ue=0;var ve=P===""?".":P+":";if(O(N))for(var Ee=0;Ee<N.length;Ee++)P=N[Ee],ee=ve+re(P,Ee),ue+=K(P,I,U,ee,G);else if(Ee=S(N),typeof Ee=="function")for(N=Ee.call(N),Ee=0;!(P=N.next()).done;)P=P.value,ee=ve+re(P,Ee++),ue+=K(P,I,U,ee,G);else if(ee==="object"){if(typeof N.then=="function")return K(ae(N),I,U,P,G);throw I=String(N),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ue}function B(N,I,U){if(N==null)return N;var P=[],G=0;return K(N,P,"","",function(ee){return I.call(U,ee,G++)}),P}function Y(N){if(N._status===-1){var I=N._result;I=I(),I.then(function(U){(N._status===0||N._status===-1)&&(N._status=1,N._result=U)},function(U){(N._status===0||N._status===-1)&&(N._status=2,N._result=U)}),N._status===-1&&(N._status=0,N._result=I)}if(N._status===1)return N._result.default;throw N._result}var fe=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ie={map:B,forEach:function(N,I,U){B(N,function(){I.apply(this,arguments)},U)},count:function(N){var I=0;return B(N,function(){I++}),I},toArray:function(N){return B(N,function(I){return I})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Jt.Activity=g,Jt.Children=ie,Jt.Component=R,Jt.Fragment=r,Jt.Profiler=s,Jt.PureComponent=T,Jt.StrictMode=i,Jt.Suspense=d,Jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Jt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return M.H.useMemoCache(N)}},Jt.cache=function(N){return function(){return N.apply(null,arguments)}},Jt.cacheSignal=function(){return null},Jt.cloneElement=function(N,I,U){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=_({},N.props),G=N.key;if(I!=null)for(ee in I.key!==void 0&&(G=""+I.key),I)!D.call(I,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&I.ref===void 0||(P[ee]=I[ee]);var ee=arguments.length-2;if(ee===1)P.children=U;else if(1<ee){for(var ue=Array(ee),ve=0;ve<ee;ve++)ue[ve]=arguments[ve+2];P.children=ue}return $(N.type,G,P)},Jt.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},Jt.createElement=function(N,I,U){var P,G={},ee=null;if(I!=null)for(P in I.key!==void 0&&(ee=""+I.key),I)D.call(I,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(G[P]=I[P]);var ue=arguments.length-2;if(ue===1)G.children=U;else if(1<ue){for(var ve=Array(ue),Ee=0;Ee<ue;Ee++)ve[Ee]=arguments[Ee+2];G.children=ve}if(N&&N.defaultProps)for(P in ue=N.defaultProps,ue)G[P]===void 0&&(G[P]=ue[P]);return $(N,ee,G)},Jt.createRef=function(){return{current:null}},Jt.forwardRef=function(N){return{$$typeof:f,render:N}},Jt.isValidElement=L,Jt.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Y}},Jt.memo=function(N,I){return{$$typeof:h,type:N,compare:I===void 0?null:I}},Jt.startTransition=function(N){var I=M.T,U={};M.T=U;try{var P=N(),G=M.S;G!==null&&G(U,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(C,fe)}catch(ee){fe(ee)}finally{I!==null&&U.types!==null&&(I.types=U.types),M.T=I}},Jt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Jt.use=function(N){return M.H.use(N)},Jt.useActionState=function(N,I,U){return M.H.useActionState(N,I,U)},Jt.useCallback=function(N,I){return M.H.useCallback(N,I)},Jt.useContext=function(N){return M.H.useContext(N)},Jt.useDebugValue=function(){},Jt.useDeferredValue=function(N,I){return M.H.useDeferredValue(N,I)},Jt.useEffect=function(N,I){return M.H.useEffect(N,I)},Jt.useEffectEvent=function(N){return M.H.useEffectEvent(N)},Jt.useId=function(){return M.H.useId()},Jt.useImperativeHandle=function(N,I,U){return M.H.useImperativeHandle(N,I,U)},Jt.useInsertionEffect=function(N,I){return M.H.useInsertionEffect(N,I)},Jt.useLayoutEffect=function(N,I){return M.H.useLayoutEffect(N,I)},Jt.useMemo=function(N,I){return M.H.useMemo(N,I)},Jt.useOptimistic=function(N,I){return M.H.useOptimistic(N,I)},Jt.useReducer=function(N,I,U){return M.H.useReducer(N,I,U)},Jt.useRef=function(N){return M.H.useRef(N)},Jt.useState=function(N){return M.H.useState(N)},Jt.useSyncExternalStore=function(N,I,U){return M.H.useSyncExternalStore(N,I,U)},Jt.useTransition=function(){return M.H.useTransition()},Jt.version="19.2.3",Jt}var ON;function $5(){return ON||(ON=1,NT.exports=nEe()),NT.exports}var rEe=$5(),RN;(function(e){e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(RN||(RN={}));class aEe{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class wU{constructor(t){this.generateIdentifier=t,this.kv=new aEe}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class iEe extends wU{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function oEe(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function sEe(e,t){const r=oEe(e);if("find"in r)return r.find(t);const i=r;for(let s=0;s<i.length;s++){const l=i[s];if(t(l))return l}}function vm(e,t){Object.entries(e).forEach(([r,i])=>t(i,r))}function WS(e,t){return e.indexOf(t)!==-1}function AN(e,t){for(let r=0;r<e.length;r++){const i=e[r];if(t(i))return i}}class lEe{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return sEe(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const uEe=e=>Object.prototype.toString.call(e).slice(8,-1),EU=e=>typeof e>"u",cEe=e=>e===null,Rb=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,RO=e=>Rb(e)&&Object.keys(e).length===0,of=e=>Array.isArray(e),fEe=e=>typeof e=="string",dEe=e=>typeof e=="number"&&!isNaN(e),hEe=e=>typeof e=="boolean",pEe=e=>e instanceof RegExp,Ab=e=>e instanceof Map,Mb=e=>e instanceof Set,xU=e=>uEe(e)==="Symbol",mEe=e=>e instanceof Date&&!isNaN(e.valueOf()),_U=e=>e instanceof Error,MN=e=>typeof e=="number"&&isNaN(e),gEe=e=>hEe(e)||cEe(e)||EU(e)||dEe(e)||fEe(e)||xU(e),yEe=e=>typeof e=="bigint",vEe=e=>e===1/0||e===-1/0,bEe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),SEe=e=>e instanceof URL,AO=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),zT=e=>e.map(String).map(AO).join("."),tb=(e,t)=>{const r=[];let i="";for(let l=0;l<e.length;l++){let c=e.charAt(l);if(!t&&c==="\\"){const h=e.charAt(l+1);if(h==="\\"){i+="\\",l++;continue}else if(h!==".")throw Error("invalid path")}if(c==="\\"&&e.charAt(l+1)==="."){i+=".",l++;continue}if(c==="."){r.push(i),i="";continue}i+=c}const s=i;return r.push(s),r};function bl(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const TU=[bl(EU,"undefined",()=>null,()=>{}),bl(yEe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),bl(mEe,"Date",e=>e.toISOString(),e=>new Date(e)),bl(_U,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(i=>{r[i]=e[i]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(i=>{r[i]=e[i]}),r}),bl(pEe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),bl(Mb,"set",e=>[...e.values()],e=>new Set(e)),bl(Ab,"map",e=>[...e.entries()],e=>new Map(e)),bl(e=>MN(e)||vEe(e),"number",e=>MN(e)?"NaN":e>0?"Infinity":"-Infinity",Number),bl(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),bl(SEe,"URL",e=>e.toString(),e=>new URL(e))];function N2(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const CU=N2((e,t)=>xU(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const i=r.symbolRegistry.getValue(t[1]);if(!i)throw new Error("Trying to deserialize unknown symbol");return i}),wEe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),OU=N2(bEe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=wEe[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function RU(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const AU=N2(RU,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};const i={};return r.forEach(s=>{i[s]=e[s]}),i},(e,t,r)=>{const i=r.classRegistry.getValue(t[1]);if(!i)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(i.prototype),e)}),MU=N2((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const i=r.customTransformerRegistry.findByName(t[1]);if(!i)throw new Error("Trying to deserialize unknown custom value");return i.deserialize(e)}),EEe=[AU,CU,MU,OU],jN=(e,t)=>{const r=AN(EEe,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const i=AN(TU,s=>s.isApplicable(e,t));if(i)return{value:i.transform(e,t),type:i.annotation}},jU={};TU.forEach(e=>{jU[e.annotation]=e});const xEe=(e,t,r)=>{if(of(t))switch(t[0]){case"symbol":return CU.untransform(e,t,r);case"class":return AU.untransform(e,t,r);case"custom":return MU.untransform(e,t,r);case"typed-array":return OU.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const i=jU[t];if(!i)throw new Error("Unknown transformation: "+t);return i.untransform(e,r)}},Up=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function kU(e){if(WS(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(WS(e,"prototype"))throw new Error("prototype is not allowed as a property");if(WS(e,"constructor"))throw new Error("constructor is not allowed as a property")}const _Ee=(e,t)=>{kU(t);for(let r=0;r<t.length;r++){const i=t[r];if(Mb(e))e=Up(e,+i);else if(Ab(e)){const s=+i,l=+t[++r]==0?"key":"value",c=Up(e,s);switch(l){case"key":e=c;break;case"value":e=e.get(c);break}}else e=e[i]}return e},MO=(e,t,r)=>{if(kU(t),t.length===0)return r(e);let i=e;for(let l=0;l<t.length-1;l++){const c=t[l];if(of(i)){const f=+c;i=i[f]}else if(Rb(i))i=i[c];else if(Mb(i)){const f=+c;i=Up(i,f)}else if(Ab(i)){if(l===t.length-2)break;const d=+c,h=+t[++l]==0?"key":"value",m=Up(i,d);switch(h){case"key":i=m;break;case"value":i=i.get(m);break}}}const s=t[t.length-1];if(of(i)?i[+s]=r(i[+s]):Rb(i)&&(i[s]=r(i[s])),Mb(i)){const l=Up(i,+s),c=r(l);l!==c&&(i.delete(l),i.add(c))}if(Ab(i)){const l=+t[t.length-2],c=Up(i,l);switch(+s==0?"key":"value"){case"key":{const d=r(c);i.set(d,i.get(c)),d!==c&&i.delete(c);break}case"value":{i.set(c,r(i.get(c)));break}}}return e},DU=e=>e<1;function jO(e,t,r,i=[]){if(!e)return;const s=DU(r);if(!of(e)){vm(e,(f,d)=>jO(f,t,r,[...i,...tb(d,s)]));return}const[l,c]=e;c&&vm(c,(f,d)=>{jO(f,t,r,[...i,...tb(d,s)])}),t(l,i)}function TEe(e,t,r,i){return jO(t,(s,l)=>{e=MO(e,l,c=>xEe(c,s,i))},r),e}function CEe(e,t,r){const i=DU(r);function s(l,c){const f=_Ee(e,tb(c,i));l.map(d=>tb(d,i)).forEach(d=>{e=MO(e,d,()=>f)})}if(of(t)){const[l,c]=t;l.forEach(f=>{e=MO(e,tb(f,i),()=>e)}),c&&vm(c,s)}else vm(t,s);return e}const OEe=(e,t)=>Rb(e)||of(e)||Ab(e)||Mb(e)||_U(e)||RU(e,t);function REe(e,t,r){const i=r.get(e);i?i.push(t):r.set(e,[t])}function AEe(e,t){const r={};let i;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(f=>f.map(String)).sort((f,d)=>f.length-d.length));const[l,...c]=s;l.length===0?i=c.map(zT):r[zT(l)]=c.map(zT)}),i?RO(r)?[i]:[i,r]:RO(r)?void 0:r}const NU=(e,t,r,i,s=[],l=[],c=new Map)=>{const f=gEe(e);if(!f){REe(e,s,t);const S=c.get(e);if(S)return i?{transformedValue:null}:S}if(!OEe(e,r)){const S=jN(e,r),b=S?{transformedValue:S.value,annotations:[S.type]}:{transformedValue:e};return f||c.set(e,b),b}if(WS(l,e))return{transformedValue:null};const d=jN(e,r),h=d?.value??e,m=of(h)?[]:{},g={};vm(h,(S,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")throw new Error(`Detected property ${b}. This is a prototype pollution risk, please remove it from your object.`);const _=NU(S,t,r,i,[...s,b],[...l,e],c);m[b]=_.transformedValue,of(_.annotations)?g[AO(b)]=_.annotations:Rb(_.annotations)&&vm(_.annotations,(E,R)=>{g[AO(b)+"."+R]=E})});const v=RO(g)?{transformedValue:m,annotations:d?[d.type]:void 0}:{transformedValue:m,annotations:d?[d.type,g]:g};return f||c.set(e,v),v};function zU(e){return Object.prototype.toString.call(e).slice(8,-1)}function kN(e){return zU(e)==="Array"}function MEe(e){if(zU(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function jEe(e,t,r,i,s){const l={}.propertyIsEnumerable.call(i,t)?"enumerable":"nonenumerable";l==="enumerable"&&(e[t]=r),s&&l==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function kO(e,t={}){if(kN(e))return e.map(s=>kO(s,t));if(!MEe(e))return e;const r=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...r,...i].reduce((s,l)=>{if(l==="__proto__"||kN(t.props)&&!t.props.includes(l))return s;const c=e[l],f=kO(c,t);return jEe(s,l,f,e,t.nonenumerable),s},{})}class br{constructor({dedupe:t=!1}={}){this.classRegistry=new iEe,this.symbolRegistry=new wU(r=>r.description??""),this.customTransformerRegistry=new lEe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,i=NU(t,r,this,this.dedupe),s={json:i.transformedValue};i.annotations&&(s.meta={...s.meta,values:i.annotations});const l=AEe(r,this.dedupe);return l&&(s.meta={...s.meta,referentialEqualities:l}),s.meta&&(s.meta.v=1),s}deserialize(t,r){const{json:i,meta:s}=t;let l=r?.inPlace?i:kO(i);return s?.values&&(l=TEe(l,s.values,s.v??0,this)),s?.referentialEqualities&&(l=CEe(l,s.referentialEqualities,s.v??0)),l}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register({name:r,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}br.defaultInstance=new br;br.serialize=br.defaultInstance.serialize.bind(br.defaultInstance);br.deserialize=br.defaultInstance.deserialize.bind(br.defaultInstance);br.stringify=br.defaultInstance.stringify.bind(br.defaultInstance);br.parse=br.defaultInstance.parse.bind(br.defaultInstance);br.registerClass=br.defaultInstance.registerClass.bind(br.defaultInstance);br.registerSymbol=br.defaultInstance.registerSymbol.bind(br.defaultInstance);br.registerCustom=br.defaultInstance.registerCustom.bind(br.defaultInstance);br.allowErrorProps=br.defaultInstance.allowErrorProps.bind(br.defaultInstance);var $T={exports:{}},kv={};var DN;function kEe(){if(DN)return kv;DN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return kv.Fragment=t,kv.jsx=r,kv.jsxs=r,kv}var NN;function DEe(){return NN||(NN=1,$T.exports=kEe()),$T.exports}DEe();rEe.createContext(null);var PT={exports:{}},Dv={},IT={exports:{}},_i={};var zN;function NEe(){if(zN)return _i;zN=1;var e=$5();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_i.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(d,h,null,m)},_i.flushSync=function(d){var h=c.T,m=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=m,i.d.f()}},_i.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},_i.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},_i.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:S}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_i.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},_i.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_i.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},_i.requestFormReset=function(d){i.d.r(d)},_i.unstable_batchedUpdates=function(d,h){return d(h)},_i.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},_i.useFormStatus=function(){return c.H.useHostTransitionStatus()},_i.version="19.2.3",_i}var $N;function zEe(){if($N)return IT.exports;$N=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),IT.exports=NEe(),IT.exports}var PN;function $Ee(){if(PN)return Dv;PN=1;var e=LN(),t=$5(),r=zEe();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(l(n)!==n)throw Error(i(188))}function h(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===u)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=y;else{for(var A=!1,z=p.child;z;){if(z===o){A=!0,o=p,u=y;break}if(z===u){A=!0,u=p,o=y;break}z=z.sibling}if(!A){for(z=y.child;z;){if(z===o){A=!0,o=y,u=p;break}if(z===u){A=!0,u=y,o=p;break}z=z.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function m(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=m(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),T=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var F=Symbol.for("react.client.reference");function re(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===F?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case C:return"SuspenseList";case $:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case T:return n.displayName||"Context";case w:return(n._context.displayName||"Context")+".Consumer";case x:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return a=n.displayName||null,a!==null?a:re(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return re(n(a))}catch{}}return null}var ae=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},fe=[],ie=-1;function N(n){return{current:n}}function I(n){0>ie||(n.current=fe[ie],fe[ie]=null,ie--)}function U(n,a){ie++,fe[ie]=n.current,n.current=a}var P=N(null),G=N(null),ee=N(null),ue=N(null);function ve(n,a){switch(U(ee,a),U(G,n),U(P,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?F0(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=F0(a),n=B0(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(P),U(P,n)}function Ee(){I(P),I(G),I(ee)}function Oe(n){n.memoizedState!==null&&U(ue,n);var a=P.current,o=B0(a,n.type);a!==o&&(U(G,n),U(P,o))}function de(n){G.current===n&&(I(P),I(G)),ue.current===n&&(I(ue),nl._currentValue=Y)}var te,Se;function we(n){if(te===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",Se=-1<o.stack.indexOf(`
153
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
154
+ `+te+n+Se}var $e=!1;function Te(n,a){if(!n||$e)return"";$e=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ce){var le=ce}Reflect.construct(n,[],me)}else{try{me.call()}catch(ce){le=ce}n.call(me.prototype)}}else{try{throw Error()}catch(ce){le=ce}(me=n())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),A=y[0],z=y[1];if(A&&z){var H=A.split(`
155
+ `),se=z.split(`
156
+ `);for(p=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(u===H.length||p===se.length)for(u=H.length-1,p=se.length-1;1<=u&&0<=p&&H[u]!==se[p];)p--;for(;1<=u&&0<=p;u--,p--)if(H[u]!==se[p]){if(u!==1||p!==1)do if(u--,p--,0>p||H[u]!==se[p]){var he=`
157
+ `+H[u].replace(" at new "," at ");return n.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",n.displayName)),he}while(1<=u&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?we(o):""}function Pe(n,a){switch(n.tag){case 26:case 27:case 5:return we(n.type);case 16:return we("Lazy");case 13:return n.child!==a&&a!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Te(n.type,!1);case 11:return Te(n.type.render,!1);case 1:return Te(n.type,!0);case 31:return we("Activity");default:return""}}function Ge(n){try{var a="",o=null;do a+=Pe(n,o),o=n,n=n.return;while(n);return a}catch(u){return`
158
+ Error generating stack: `+u.message+`
159
+ `+u.stack}}var Ce=Object.prototype.hasOwnProperty,Be=e.unstable_scheduleCallback,Fe=e.unstable_cancelCallback,Je=e.unstable_shouldYield,ke=e.unstable_requestPaint,Ue=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Mt=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,vt=e.log,Xt=e.unstable_setDisableYieldValue,Vt=null,wt=null;function Ht(n){if(typeof vt=="function"&&Xt(n),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(Vt,n)}catch{}}var Rt=Math.clz32?Math.clz32:Gt,Qt=Math.log,_n=Math.LN2;function Gt(n){return n>>>=0,n===0?32:31-(Qt(n)/_n|0)|0}var Tn=256,En=262144,Pn=4194304;function Dt(n){var a=n&42;if(a!==0)return a;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function xn(n,a,o){var u=n.pendingLanes;if(u===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var z=u&134217727;return z!==0?(u=z&~y,u!==0?p=Dt(u):(A&=z,A!==0?p=Dt(A):o||(o=z&~n,o!==0&&(p=Dt(o))))):(z=u&~y,z!==0?p=Dt(z):A!==0?p=Dt(A):o||(o=u&~n,o!==0&&(p=Dt(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function Kt(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function sr(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32: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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sr(){var n=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),n}function qr(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function ft(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function tn(n,a,o,u,p,y){var A=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var z=n.entanglements,H=n.expirationTimes,se=n.hiddenUpdates;for(o=A&~o;0<o;){var he=31-Rt(o),me=1<<he;z[he]=0,H[he]=-1;var le=se[he];if(le!==null)for(se[he]=null,he=0;he<le.length;he++){var ce=le[he];ce!==null&&(ce.lane&=-536870913)}o&=~me}u!==0&&Fn(n,u,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function Fn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-Rt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function on(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var u=31-Rt(o),p=1<<u;p&a|n[u]&a&&(n[u]|=a),o&=~p}}function Cn(n,a){var o=a&-a;return o=(o&42)!==0?1:Ft(o),(o&(n.suspendedLanes|a))!==0?0:o}function Ft(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Vr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Pr(){var n=B.p;return n!==0?n:(n=window.event,n===void 0?32:hv(n.type))}function $a(n,a){var o=B.p;try{return B.p=n,a()}finally{B.p=o}}var tr=Math.random().toString(36).slice(2),$t="__reactFiber$"+tr,sn="__reactProps$"+tr,Ir="__reactContainer$"+tr,Ua="__reactEvents$"+tr,ts="__reactListeners$"+tr,gf="__reactHandles$"+tr,gl="__reactResources$"+tr,co="__reactMarker$"+tr;function Vl(n){delete n[$t],delete n[sn],delete n[Ua],delete n[ts],delete n[gf]}function Oi(n){var a=n[$t];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Ir]||o[$t]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Q0(n);n!==null;){if(o=n[$t])return o;n=Q0(n)}return a}n=o,o=n.parentNode}return null}function Ri(n){if(n=n[$t]||n[Ir]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function fo(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Ai(n){var a=n[gl];return a||(a=n[gl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function yn(n){n[co]=!0}var bc=new Set,Fl={};function qa(n,a){wi(n,a),wi(n+"Capture",a)}function wi(n,a){for(Fl[n]=a,n=0;n<a.length;n++)bc.add(a[n])}var Fm=RegExp("^[: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]*$"),Bl={},Pa={};function fp(n){return Ce.call(Pa,n)?!0:Ce.call(Bl,n)?!1:Fm.test(n)?Pa[n]=!0:(Bl[n]=!0,!1)}function ws(n,a,o){if(fp(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function ns(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function Wr(n,a,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+u)}}function nr(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Sc(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Bm(n,a,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){o=""+A,y.call(this,A)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function yl(n){if(!n._valueTracker){var a=Sc(n)?"checked":"value";n._valueTracker=Bm(n,a,""+n[a])}}function yf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return n&&(u=Sc(n)?n.checked?"true":"false":n.value),n=u,n!==o?(a.setValue(n),!0):!1}function ho(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Hm=/[\n"\\]/g;function Bn(n){return n.replace(Hm,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Hl(n,a,o,u,p,y,A,z){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),a!=null?A==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+nr(a)):n.value!==""+nr(a)&&(n.value=""+nr(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?Gl(n,A,nr(a)):o!=null?Gl(n,A,nr(o)):u!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?n.name=""+nr(z):n.removeAttribute("name")}function vf(n,a,o,u,p,y,A,z){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){yl(n);return}o=o!=null?""+nr(o):"",a=a!=null?""+nr(a):o,z||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=z?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),yl(n)}function Gl(n,a,o){a==="number"&&ho(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Mi(n,a,o,u){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&u&&(n[o].defaultSelected=!0)}else{for(o=""+nr(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function vl(n,a,o){if(a!=null&&(a=""+nr(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+nr(o):""}function bf(n,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=nr(a),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),yl(n)}function ne(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Z=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function X(n,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,o):typeof o!="number"||o===0||Z.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function W(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&X(n,p,u)}else for(var y in a)a.hasOwnProperty(y)&&X(n,y,a[y])}function ge(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Re=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_e=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ye(n){return _e.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Me(){}var Ie=null;function Ye(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var He=null,lt=null;function We(n){var a=Ri(n);if(a&&(n=a.stateNode)){var o=n[sn]||null;e:switch(n=a.stateNode,a.type){case"input":if(Hl(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Bn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==n&&u.form===n.form){var p=u[sn]||null;if(!p)throw Error(i(90));Hl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===n.form&&yf(u)}break e;case"textarea":vl(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Mi(n,!!o.multiple,a,!1)}}}var Bt=!1;function hn(n,a,o){if(Bt)return n(a,o);Bt=!0;try{var u=n(a);return u}finally{if(Bt=!1,(He!==null||lt!==null)&&(Mu(),He&&(a=He,n=lt,lt=He=null,We(a),n)))for(a=0;a<n.length;a++)We(n[a])}}function bt(n,a){var o=n.stateNode;if(o===null)return null;var u=o[sn]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wr=!1;if(jt)try{var An={};Object.defineProperty(An,"passive",{get:function(){wr=!0}}),window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch{wr=!1}var rr=null,Jr=null,ji=null;function rs(){if(ji)return ji;var n,a=Jr,o=a.length,u,p="value"in rr?rr.value:rr.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(u=1;u<=A&&a[o-u]===p[y-u];u++);return ji=p.slice(n,1<u?1-u:void 0)}function Ei(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function la(){return!0}function wc(){return!1}function Ln(n){function a(o,u,p,y,A){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var z in n)n.hasOwnProperty(z)&&(o=n[z],this[z]=o?o(y):y[z]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?la:wc,this.isPropagationStopped=wc,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=la)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),a}var Ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=Ln(Ia),Di=g({},Ia,{view:0,detail:0}),Sf=Ln(Di),Es,Kl,no,Yl=g({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ef,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==no&&(no&&n.type==="mousemove"?(Es=n.screenX-no.screenX,Kl=n.screenY-no.screenY):Kl=Es=0,no=n),Es)},movementY:function(n){return"movementY"in n?n.movementY:Kl}}),Gm=Ln(Yl),z2=g({},Yl,{dataTransfer:0}),$2=Ln(z2),P2=g({},Di,{relatedTarget:0}),wf=Ln(P2),I2=g({},Ia,{animationName:0,elapsedTime:0,pseudoElement:0}),L2=Ln(I2),U2=g({},Ia,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),q2=Ln(U2),V2=g({},Ia,{data:0}),Km=Ln(V2),F2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},B2={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"},H2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G2(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=H2[n])?!!a[n]:!1}function Ef(){return G2}var K2=g({},Di,{key:function(n){if(n.key){var a=F2[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ei(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?B2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ef,charCode:function(n){return n.type==="keypress"?Ei(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ei(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Y2=Ln(K2),Z2=g({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ym=Ln(Z2),X2=g({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ef}),Q2=Ln(X2),W2=g({},Ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),J2=Ln(W2),eE=g({},Yl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),tE=Ln(eE),nE=g({},Ia,{newState:0,oldState:0}),rE=Ln(nE),aE=[9,13,27,32],xf=jt&&"CompositionEvent"in window,xs=null;jt&&"documentMode"in document&&(xs=document.documentMode);var iE=jt&&"TextEvent"in window&&!xs,Zm=jt&&(!xf||xs&&8<xs&&11>=xs),Xm=" ",Qm=!1;function Wm(n,a){switch(n){case"keyup":return aE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jm(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var po=!1;function oE(n,a){switch(n){case"compositionend":return Jm(a);case"keypress":return a.which!==32?null:(Qm=!0,Xm);case"textInput":return n=a.data,n===Xm&&Qm?null:n;default:return null}}function sE(n,a){if(po)return n==="compositionend"||!xf&&Wm(n,a)?(n=rs(),ji=Jr=rr=null,po=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Zm&&a.locale!=="ko"?null:a.data;default:return null}}var lE={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 eg(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!lE[n.type]:a==="textarea"}function tg(n,a,o,u){He?lt?lt.push(u):lt=[u]:He=u,a=Pu(a,"onChange"),0<a.length&&(o=new ki("onChange","change",null,o,u),n.push({event:o,listeners:a}))}var _s=null,Ts=null;function uE(n){P0(n,0)}function Zl(n){var a=fo(n);if(yf(a))return n}function ng(n,a){if(n==="change")return a}var rg=!1;if(jt){var _f;if(jt){var Tf="oninput"in document;if(!Tf){var ag=document.createElement("div");ag.setAttribute("oninput","return;"),Tf=typeof ag.oninput=="function"}_f=Tf}else _f=!1;rg=_f&&(!document.documentMode||9<document.documentMode)}function ig(){_s&&(_s.detachEvent("onpropertychange",og),Ts=_s=null)}function og(n){if(n.propertyName==="value"&&Zl(Ts)){var a=[];tg(a,Ts,n,Ye(n)),hn(uE,a)}}function cE(n,a,o){n==="focusin"?(ig(),_s=a,Ts=o,_s.attachEvent("onpropertychange",og)):n==="focusout"&&ig()}function fE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Zl(Ts)}function dE(n,a){if(n==="click")return Zl(a)}function hE(n,a){if(n==="input"||n==="change")return Zl(a)}function pE(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var lr=typeof Object.is=="function"?Object.is:pE;function Cs(n,a){if(lr(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!Ce.call(a,p)||!lr(n[p],a[p]))return!1}return!0}function sg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function lg(n,a){var o=sg(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=a&&u>=a)return{node:o,offset:a-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=sg(o)}}function ug(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?ug(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function cg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=ho(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=ho(n.document)}return a}function Cf(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var mE=jt&&"documentMode"in document&&11>=document.documentMode,mo=null,Of=null,Os=null,Rf=!1;function fg(n,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Rf||mo==null||mo!==ho(u)||(u=mo,"selectionStart"in u&&Cf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Os&&Cs(Os,u)||(Os=u,u=Pu(Of,"onSelect"),0<u.length&&(a=new ki("onSelect","select",null,a,o),n.push({event:a,listeners:u}),a.target=mo)))}function Ni(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var go={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},Af={},dg={};jt&&(dg=document.createElement("div").style,"AnimationEvent"in window||(delete go.animationend.animation,delete go.animationiteration.animation,delete go.animationstart.animation),"TransitionEvent"in window||delete go.transitionend.transition);function zi(n){if(Af[n])return Af[n];if(!go[n])return n;var a=go[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in dg)return Af[n]=a[o];return n}var hg=zi("animationend"),pg=zi("animationiteration"),mg=zi("animationstart"),gE=zi("transitionrun"),yE=zi("transitionstart"),vE=zi("transitioncancel"),gg=zi("transitionend"),yg=new Map,Mf="abort auxClick beforeToggle 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(" ");Mf.push("scrollEnd");function Fr(n,a){yg.set(n,a),qa(a,[n])}var Xl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Er=[],yo=0,jf=0;function Ql(){for(var n=yo,a=jf=yo=0;a<n;){var o=Er[a];Er[a++]=null;var u=Er[a];Er[a++]=null;var p=Er[a];Er[a++]=null;var y=Er[a];if(Er[a++]=null,u!==null&&p!==null){var A=u.pending;A===null?p.next=p:(p.next=A.next,A.next=p),u.pending=p}y!==0&&vg(o,p,y)}}function Wl(n,a,o,u){Er[yo++]=n,Er[yo++]=a,Er[yo++]=o,Er[yo++]=u,jf|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function kf(n,a,o,u){return Wl(n,a,o,u),Jl(n)}function $i(n,a){return Wl(n,null,null,a),Jl(n)}function vg(n,a,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&a!==null&&(p=31-Rt(o),n=y.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function Jl(n){if(50<Zs)throw Zs=0,qd=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var vo={};function bE(n,a,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(n,a,o,u){return new bE(n,a,o,u)}function Df(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pa(n,a){var o=n.alternate;return o===null?(o=ur(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function bg(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function eu(n,a,o,u,p,y){var A=0;if(u=n,typeof n=="function")Df(n)&&(A=1);else if(typeof n=="string")A=_x(n,o,P.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case $:return n=ur(31,o,a,p),n.elementType=$,n.lanes=y,n;case _:return Pi(o.children,p,y,a);case E:A=8,p|=24;break;case R:return n=ur(12,o,a,p|2),n.elementType=R,n.lanes=y,n;case O:return n=ur(13,o,a,p),n.elementType=O,n.lanes=y,n;case C:return n=ur(19,o,a,p),n.elementType=C,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:A=10;break e;case w:A=9;break e;case x:A=11;break e;case M:A=14;break e;case D:A=16,u=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=ur(A,o,a,p),a.elementType=n,a.type=u,a.lanes=y,a}function Pi(n,a,o,u){return n=ur(7,n,u,a),n.lanes=o,n}function Nf(n,a,o){return n=ur(6,n,null,a),n.lanes=o,n}function Sg(n){var a=ur(18,null,null,0);return a.stateNode=n,a}function zf(n,a,o){return a=ur(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var wg=new WeakMap;function xr(n,a){if(typeof n=="object"&&n!==null){var o=wg.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Ge(a)},wg.set(n,a),a)}return{value:n,source:a,stack:Ge(a)}}var bo=[],So=0,tu=null,Rs=0,_r=[],Tr=0,Va=null,na=1,ra="";function ma(n,a){bo[So++]=Rs,bo[So++]=tu,tu=n,Rs=a}function Eg(n,a,o){_r[Tr++]=na,_r[Tr++]=ra,_r[Tr++]=Va,Va=n;var u=na;n=ra;var p=32-Rt(u)-1;u&=~(1<<p),o+=1;var y=32-Rt(a)+p;if(30<y){var A=p-p%5;y=(u&(1<<A)-1).toString(32),u>>=A,p-=A,na=1<<32-Rt(a)+p|o<<p|u,ra=y+n}else na=1<<y|o<<p|u,ra=n}function $f(n){n.return!==null&&(ma(n,1),Eg(n,1,0))}function Pf(n){for(;n===tu;)tu=bo[--So],bo[So]=null,Rs=bo[--So],bo[So]=null;for(;n===Va;)Va=_r[--Tr],_r[Tr]=null,ra=_r[--Tr],_r[Tr]=null,na=_r[--Tr],_r[Tr]=null}function xg(n,a){_r[Tr++]=na,_r[Tr++]=ra,_r[Tr++]=Va,na=a.id,ra=a.overflow,Va=n}var jn=null,Nt=null,st=!1,Fa=null,Cr=!1,If=Error(i(519));function Ba(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw As(xr(a,n)),If}function _g(n){var a=n.stateNode,o=n.type,u=n.memoizedProps;switch(a[$t]=n,a[sn]=u,o){case"dialog":nt("cancel",a),nt("close",a);break;case"iframe":case"object":case"embed":nt("load",a);break;case"video":case"audio":for(o=0;o<Qs.length;o++)nt(Qs[o],a);break;case"source":nt("error",a);break;case"img":case"image":case"link":nt("error",a),nt("load",a);break;case"details":nt("toggle",a);break;case"input":nt("invalid",a),vf(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":nt("invalid",a);break;case"textarea":nt("invalid",a),bf(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||q0(a.textContent,o)?(u.popover!=null&&(nt("beforetoggle",a),nt("toggle",a)),u.onScroll!=null&&nt("scroll",a),u.onScrollEnd!=null&&nt("scrollend",a),u.onClick!=null&&(a.onclick=Me),a=!0):a=!1,a||Ba(n,!0)}function Tg(n){for(jn=n.return;jn;)switch(jn.tag){case 5:case 31:case 13:Cr=!1;return;case 27:case 3:Cr=!0;return;default:jn=jn.return}}function wo(n){if(n!==jn)return!1;if(!st)return Tg(n),st=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||nh(n.type,n.memoizedProps)),o=!o),o&&Nt&&Ba(n),Tg(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=X0(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=X0(n)}else a===27?(a=Nt,ai(n.type)?(n=sh,sh=null,Nt=n):Nt=a):Nt=jn?Rr(n.stateNode.nextSibling):null;return!0}function Ii(){Nt=jn=null,st=!1}function Lf(){var n=Fa;return n!==null&&(Wn===null?Wn=n:Wn.push.apply(Wn,n),Fa=null),n}function As(n){Fa===null?Fa=[n]:Fa.push(n)}var Uf=N(null),Li=null,ga=null;function Ha(n,a,o){U(Uf,a._currentValue),a._currentValue=o}function ya(n){n._currentValue=Uf.current,I(Uf)}function qf(n,a,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===o)break;n=n.return}}function Vf(n,a,o,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var A=p.child;y=y.firstContext;e:for(;y!==null;){var z=y;y=p;for(var H=0;H<a.length;H++)if(z.context===a[H]){y.lanes|=o,z=y.alternate,z!==null&&(z.lanes|=o),qf(y.return,o,n),u||(A=null);break e}y=z.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(i(341));A.lanes|=o,y=A.alternate,y!==null&&(y.lanes|=o),qf(A,o,n),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===n){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function Eo(n,a,o,u){n=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var z=p.type;lr(p.pendingProps.value,A.value)||(n!==null?n.push(z):n=[z])}}else if(p===ue.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(nl):n=[nl])}p=p.return}n!==null&&Vf(a,n,o,u),a.flags|=262144}function nu(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ui(n){Li=n,ga=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kn(n){return Cg(Li,n)}function ru(n,a){return Li===null&&Ui(n),Cg(n,a)}function Cg(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ga===null){if(n===null)throw Error(i(308));ga=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ga=ga.next=a;return o}var SE=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},wE=e.unstable_scheduleCallback,EE=e.unstable_NormalPriority,ln={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new SE,data:new Map,refCount:0}}function Ms(n){n.refCount--,n.refCount===0&&wE(EE,function(){n.controller.abort()})}var js=null,Bf=0,xo=0,_o=null;function xE(n,a){if(js===null){var o=js=[];Bf=0,xo=Kd(),_o={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Bf++,a.then(Og,Og),a}function Og(){if(--Bf===0&&js!==null){_o!==null&&(_o.status="fulfilled");var n=js;js=null,xo=0,_o=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function _E(n,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Rg=K.S;K.S=function(n,a){f0=Ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&xE(n,a),Rg!==null&&Rg(n,a)};var qi=N(null);function Hf(){var n=qi.current;return n!==null?n:At.pooledCache}function au(n,a){a===null?U(qi,qi.current):U(qi,a.pool)}function Ag(){var n=Hf();return n===null?null:{parent:ln._currentValue,pool:n}}var To=Error(i(460)),Gf=Error(i(474)),iu=Error(i(542)),ou={then:function(){}};function Mg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function jg(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Me,Me),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Dg(n),n;default:if(typeof a.status=="string")a.then(Me,Me);else{if(n=At,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Dg(n),n}throw Fi=a,To}}function Vi(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Fi=o,To):o}}var Fi=null;function kg(){if(Fi===null)throw Error(i(459));var n=Fi;return Fi=null,n}function Dg(n){if(n===To||n===iu)throw Error(i(483))}var Co=null,ks=0;function su(n){var a=ks;return ks+=1,Co===null&&(Co=[]),jg(Co,n,a)}function Ds(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function lu(n,a){throw a.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function Ng(n){function a(J,Q){if(n){var oe=J.deletions;oe===null?(J.deletions=[Q],J.flags|=16):oe.push(Q)}}function o(J,Q){if(!n)return null;for(;Q!==null;)a(J,Q),Q=Q.sibling;return null}function u(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function p(J,Q){return J=pa(J,Q),J.index=0,J.sibling=null,J}function y(J,Q,oe){return J.index=oe,n?(oe=J.alternate,oe!==null?(oe=oe.index,oe<Q?(J.flags|=67108866,Q):oe):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function A(J){return n&&J.alternate===null&&(J.flags|=67108866),J}function z(J,Q,oe,pe){return Q===null||Q.tag!==6?(Q=Nf(oe,J.mode,pe),Q.return=J,Q):(Q=p(Q,oe),Q.return=J,Q)}function H(J,Q,oe,pe){var Le=oe.type;return Le===_?he(J,Q,oe.props.children,pe,oe.key):Q!==null&&(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type)?(Q=p(Q,oe.props),Ds(Q,oe),Q.return=J,Q):(Q=eu(oe.type,oe.key,oe.props,null,J.mode,pe),Ds(Q,oe),Q.return=J,Q)}function se(J,Q,oe,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==oe.containerInfo||Q.stateNode.implementation!==oe.implementation?(Q=zf(oe,J.mode,pe),Q.return=J,Q):(Q=p(Q,oe.children||[]),Q.return=J,Q)}function he(J,Q,oe,pe,Le){return Q===null||Q.tag!==7?(Q=Pi(oe,J.mode,pe,Le),Q.return=J,Q):(Q=p(Q,oe),Q.return=J,Q)}function me(J,Q,oe){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Nf(""+Q,J.mode,oe),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case S:return oe=eu(Q.type,Q.key,Q.props,null,J.mode,oe),Ds(oe,Q),oe.return=J,oe;case b:return Q=zf(Q,J.mode,oe),Q.return=J,Q;case D:return Q=Vi(Q),me(J,Q,oe)}if(ae(Q)||V(Q))return Q=Pi(Q,J.mode,oe,null),Q.return=J,Q;if(typeof Q.then=="function")return me(J,su(Q),oe);if(Q.$$typeof===T)return me(J,ru(J,Q),oe);lu(J,Q)}return null}function le(J,Q,oe,pe){var Le=Q!==null?Q.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Le!==null?null:z(J,Q,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return oe.key===Le?H(J,Q,oe,pe):null;case b:return oe.key===Le?se(J,Q,oe,pe):null;case D:return oe=Vi(oe),le(J,Q,oe,pe)}if(ae(oe)||V(oe))return Le!==null?null:he(J,Q,oe,pe,null);if(typeof oe.then=="function")return le(J,Q,su(oe),pe);if(oe.$$typeof===T)return le(J,Q,ru(J,oe),pe);lu(J,oe)}return null}function ce(J,Q,oe,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(oe)||null,z(Q,J,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:return J=J.get(pe.key===null?oe:pe.key)||null,H(Q,J,pe,Le);case b:return J=J.get(pe.key===null?oe:pe.key)||null,se(Q,J,pe,Le);case D:return pe=Vi(pe),ce(J,Q,oe,pe,Le)}if(ae(pe)||V(pe))return J=J.get(oe)||null,he(Q,J,pe,Le,null);if(typeof pe.then=="function")return ce(J,Q,oe,su(pe),Le);if(pe.$$typeof===T)return ce(J,Q,oe,ru(Q,pe),Le);lu(Q,pe)}return null}function je(J,Q,oe,pe){for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null;ze!==null&&Qe<oe.length;Qe++){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ht=le(J,ze,oe[Qe],pe);if(ht===null){ze===null&&(ze=it);break}n&&ze&&ht.alternate===null&&a(J,ze),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht,ze=it}if(Qe===oe.length)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;Qe<oe.length;Qe++)ze=me(J,oe[Qe],pe),ze!==null&&(Q=y(ze,Q,Qe),dt===null?Le=ze:dt.sibling=ze,dt=ze);return st&&ma(J,Qe),Le}for(ze=u(ze);Qe<oe.length;Qe++)it=ce(ze,J,Qe,oe[Qe],pe),it!==null&&(n&&it.alternate!==null&&ze.delete(it.key===null?Qe:it.key),Q=y(it,Q,Qe),dt===null?Le=it:dt.sibling=it,dt=it);return n&&ze.forEach(function(ui){return a(J,ui)}),st&&ma(J,Qe),Le}function qe(J,Q,oe,pe){if(oe==null)throw Error(i(151));for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null,ht=oe.next();ze!==null&&!ht.done;Qe++,ht=oe.next()){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ui=le(J,ze,ht.value,pe);if(ui===null){ze===null&&(ze=it);break}n&&ze&&ui.alternate===null&&a(J,ze),Q=y(ui,Q,Qe),dt===null?Le=ui:dt.sibling=ui,dt=ui,ze=it}if(ht.done)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;!ht.done;Qe++,ht=oe.next())ht=me(J,ht.value,pe),ht!==null&&(Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return st&&ma(J,Qe),Le}for(ze=u(ze);!ht.done;Qe++,ht=oe.next())ht=ce(ze,J,Qe,ht.value,pe),ht!==null&&(n&&ht.alternate!==null&&ze.delete(ht.key===null?Qe:ht.key),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return n&&ze.forEach(function(zx){return a(J,zx)}),st&&ma(J,Qe),Le}function Ot(J,Q,oe,pe){if(typeof oe=="object"&&oe!==null&&oe.type===_&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:e:{for(var Le=oe.key;Q!==null;){if(Q.key===Le){if(Le=oe.type,Le===_){if(Q.tag===7){o(J,Q.sibling),pe=p(Q,oe.props.children),pe.return=J,J=pe;break e}}else if(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type){o(J,Q.sibling),pe=p(Q,oe.props),Ds(pe,oe),pe.return=J,J=pe;break e}o(J,Q);break}else a(J,Q);Q=Q.sibling}oe.type===_?(pe=Pi(oe.props.children,J.mode,pe,oe.key),pe.return=J,J=pe):(pe=eu(oe.type,oe.key,oe.props,null,J.mode,pe),Ds(pe,oe),pe.return=J,J=pe)}return A(J);case b:e:{for(Le=oe.key;Q!==null;){if(Q.key===Le)if(Q.tag===4&&Q.stateNode.containerInfo===oe.containerInfo&&Q.stateNode.implementation===oe.implementation){o(J,Q.sibling),pe=p(Q,oe.children||[]),pe.return=J,J=pe;break e}else{o(J,Q);break}else a(J,Q);Q=Q.sibling}pe=zf(oe,J.mode,pe),pe.return=J,J=pe}return A(J);case D:return oe=Vi(oe),Ot(J,Q,oe,pe)}if(ae(oe))return je(J,Q,oe,pe);if(V(oe)){if(Le=V(oe),typeof Le!="function")throw Error(i(150));return oe=Le.call(oe),qe(J,Q,oe,pe)}if(typeof oe.then=="function")return Ot(J,Q,su(oe),pe);if(oe.$$typeof===T)return Ot(J,Q,ru(J,oe),pe);lu(J,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,Q!==null&&Q.tag===6?(o(J,Q.sibling),pe=p(Q,oe),pe.return=J,J=pe):(o(J,Q),pe=Nf(oe,J.mode,pe),pe.return=J,J=pe),A(J)):o(J,Q)}return function(J,Q,oe,pe){try{ks=0;var Le=Ot(J,Q,oe,pe);return Co=null,Le}catch(ze){if(ze===To||ze===iu)throw ze;var dt=ur(29,ze,null,J.mode);return dt.lanes=pe,dt.return=J,dt}}}var Bi=Ng(!0),zg=Ng(!1),Ga=!1;function Kf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yf(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ka(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ya(n,a,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(yt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=Jl(n),vg(n,null,o),a}return Wl(n,u,a,o),Jl(n)}function Ns(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}function Zf(n,a){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var A={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=A:y=y.next=A,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Xf=!1;function zs(){if(Xf){var n=_o;if(n!==null)throw n}}function $s(n,a,o,u){Xf=!1;var p=n.updateQueue;Ga=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var H=z,se=H.next;H.next=null,A===null?y=se:A.next=se,A=H;var he=n.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==A&&(z===null?he.firstBaseUpdate=se:z.next=se,he.lastBaseUpdate=H))}if(y!==null){var me=p.baseState;A=0,he=se=H=null,z=y;do{var le=z.lane&-536870913,ce=le!==z.lane;if(ce?(at&le)===le:(u&le)===le){le!==0&&le===xo&&(Xf=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var je=n,qe=z;le=a;var Ot=o;switch(qe.tag){case 1:if(je=qe.payload,typeof je=="function"){me=je.call(Ot,me,le);break e}me=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=qe.payload,le=typeof je=="function"?je.call(Ot,me,le):je,le==null)break e;me=g({},me,le);break e;case 2:Ga=!0}}le=z.callback,le!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(se=he=ce,H=me):he=he.next=ce,A|=le;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;ce=z,z=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);he===null&&(H=me),p.baseState=H,p.firstBaseUpdate=se,p.lastBaseUpdate=he,y===null&&(p.shared.lanes=0),Ja|=A,n.lanes=A,n.memoizedState=me}}function $g(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function Pg(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)$g(o[n],a)}var Oo=N(null),uu=N(0);function Ig(n,a){n=Ca,U(uu,n),U(Oo,a),Ca=n|a.baseLanes}function Qf(){U(uu,Ca),U(Oo,Oo.current)}function Wf(){Ca=uu.current,I(Oo),I(uu)}var cr=N(null),Or=null;function Za(n){var a=n.alternate;U(nn,nn.current&1),U(cr,n),Or===null&&(a===null||Oo.current!==null||a.memoizedState!==null)&&(Or=n)}function Jf(n){U(nn,nn.current),U(cr,n),Or===null&&(Or=n)}function Lg(n){n.tag===22?(U(nn,nn.current),U(cr,n),Or===null&&(Or=n)):Xa()}function Xa(){U(nn,nn.current),U(cr,cr.current)}function fr(n){I(cr),Or===n&&(Or=null),I(nn)}var nn=N(0);function cu(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||ih(o)||oh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var va=0,Ze=null,Tt=null,un=null,fu=!1,Ro=!1,Hi=!1,du=0,Ps=0,Ao=null,TE=0;function Yt(){throw Error(i(321))}function ed(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!lr(n[o],a[o]))return!1;return!0}function td(n,a,o,u,p,y){return va=y,Ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?Ey:gd,Hi=!1,y=o(u,p),Hi=!1,Ro&&(y=qg(a,o,u,p)),Ug(n),y}function Ug(n){K.H=Us;var a=Tt!==null&&Tt.next!==null;if(va=0,un=Tt=Ze=null,fu=!1,Ps=0,Ao=null,a)throw Error(i(300));n===null||cn||(n=n.dependencies,n!==null&&nu(n)&&(cn=!0))}function qg(n,a,o,u){Ze=n;var p=0;do{if(Ro&&(Ao=null),Ps=0,Ro=!1,25<=p)throw Error(i(301));if(p+=1,un=Tt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}K.H=xy,y=a(o,u)}while(Ro);return y}function CE(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?Is(a):a,n=n.useState()[0],(Tt!==null?Tt.memoizedState:null)!==n&&(Ze.flags|=1024),a}function nd(){var n=du!==0;return du=0,n}function rd(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function ad(n){if(fu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}fu=!1}va=0,un=Tt=Ze=null,Ro=!1,Ps=du=0,Ao=null}function Vn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Ze.memoizedState=un=n:un=un.next=n,un}function rn(){if(Tt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=Tt.next;var a=un===null?Ze.memoizedState:un.next;if(a!==null)un=a,Tt=n;else{if(n===null)throw Ze.alternate===null?Error(i(467)):Error(i(310));Tt=n,n={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},un===null?Ze.memoizedState=un=n:un=un.next=n}return un}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Is(n){var a=Ps;return Ps+=1,Ao===null&&(Ao=[]),n=jg(Ao,n,a),a=Ze,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?Ey:gd),n}function pu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Is(n);if(n.$$typeof===T)return kn(n)}throw Error(i(438,String(n)))}function id(n){var a=null,o=Ze.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=hu(),Ze.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),u=0;u<n;u++)o[u]=q;return a.index++,o}function ba(n,a){return typeof a=="function"?a(n):a}function mu(n){var a=rn();return od(a,Tt,n)}function od(n,a,o){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=n.baseQueue,y=u.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,u.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var z=A=null,H=null,se=a,he=!1;do{var me=se.lane&-536870913;if(me!==se.lane?(at&me)===me:(va&me)===me){var le=se.revertLane;if(le===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),me===xo&&(he=!0);else if((va&le)===le){se=se.next,le===xo&&(he=!0);continue}else me={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},H===null?(z=H=me,A=y):H=H.next=me,Ze.lanes|=le,Ja|=le;me=se.action,Hi&&o(y,me),y=se.hasEagerState?se.eagerState:o(y,me)}else le={lane:me,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},H===null?(z=H=le,A=y):H=H.next=le,Ze.lanes|=me,Ja|=me;se=se.next}while(se!==null&&se!==a);if(H===null?A=y:H.next=z,!lr(y,n.memoizedState)&&(cn=!0,he&&(o=_o,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=H,u.lastRenderedState=y}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function sd(n){var a=rn(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var A=p=p.next;do y=n(y,A.action),A=A.next;while(A!==p);lr(y,a.memoizedState)||(cn=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function Vg(n,a,o){var u=Ze,p=rn(),y=st;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!lr((Tt||p).memoizedState,o);if(A&&(p.memoizedState=o,cn=!0),p=p.queue,cd(Hg.bind(null,u,p,n),[n]),p.getSnapshot!==a||A||un!==null&&un.memoizedState.tag&1){if(u.flags|=2048,Mo(9,{destroy:void 0},Bg.bind(null,u,p,o,a),null),At===null)throw Error(i(349));y||(va&127)!==0||Fg(u,a,o)}return o}function Fg(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Ze.updateQueue,a===null?(a=hu(),Ze.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Bg(n,a,o,u){a.value=o,a.getSnapshot=u,Gg(a)&&Kg(n)}function Hg(n,a,o){return o(function(){Gg(a)&&Kg(n)})}function Gg(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!lr(n,o)}catch{return!0}}function Kg(n){var a=$i(n,2);a!==null&&Jn(a,n,2)}function ld(n){var a=Vn();if(typeof n=="function"){var o=n;if(n=o(),Hi){Ht(!0);try{o()}finally{Ht(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},a}function Yg(n,a,o,u){return n.baseState=o,od(n,Tt,typeof u=="function"?u:ba)}function OE(n,a,o,u,p){if(vu(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};K.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,Zg(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Zg(n,a){var o=a.action,u=a.payload,p=n.state;if(a.isTransition){var y=K.T,A={};K.T=A;try{var z=o(p,u),H=K.S;H!==null&&H(A,z),Xg(n,a,z)}catch(se){ud(n,a,se)}finally{y!==null&&A.types!==null&&(y.types=A.types),K.T=y}}else try{y=o(p,u),Xg(n,a,y)}catch(se){ud(n,a,se)}}function Xg(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Qg(n,a,u)},function(u){return ud(n,a,u)}):Qg(n,a,o)}function Qg(n,a,o){a.status="fulfilled",a.value=o,Wg(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Zg(n,o)))}function ud(n,a,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Wg(a),a=a.next;while(a!==u)}n.action=null}function Wg(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Jg(n,a){return a}function ey(n,a){if(st){var o=At.formState;if(o!==null){e:{var u=Ze;if(st){if(Nt){t:{for(var p=Nt,y=Cr;p.nodeType!==8;){if(!y){p=null;break t}if(p=Rr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Nt=Rr(p.nextSibling),u=p.data==="F!";break e}}Ba(u)}u=!1}u&&(a=o[0])}}return o=Vn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jg,lastRenderedState:a},o.queue=u,o=by.bind(null,Ze,u),u.dispatch=o,u=ld(!1),y=md.bind(null,Ze,!1,u.queue),u=Vn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,o=OE.bind(null,Ze,p,y,o),p.dispatch=o,u.memoizedState=n,[a,o,!1]}function ty(n){var a=rn();return ny(a,Tt,n)}function ny(n,a,o){if(a=od(n,a,Jg)[0],n=mu(ba)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Is(a)}catch(A){throw A===To?iu:A}else u=a;a=rn();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Ze.flags|=2048,Mo(9,{destroy:void 0},RE.bind(null,p,o),null)),[u,y,n]}function RE(n,a){n.action=a}function ry(n){var a=rn(),o=Tt;if(o!==null)return ny(a,o,n);rn(),a=a.memoizedState,o=rn();var u=o.queue.dispatch;return o.memoizedState=n,[a,u,!1]}function Mo(n,a,o,u){return n={tag:n,create:o,deps:u,inst:a,next:null},a=Ze.updateQueue,a===null&&(a=hu(),Ze.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,a.lastEffect=n),n}function ay(){return rn().memoizedState}function gu(n,a,o,u){var p=Vn();Ze.flags|=n,p.memoizedState=Mo(1|a,{destroy:void 0},o,u===void 0?null:u)}function yu(n,a,o,u){var p=rn();u=u===void 0?null:u;var y=p.memoizedState.inst;Tt!==null&&u!==null&&ed(u,Tt.memoizedState.deps)?p.memoizedState=Mo(a,y,o,u):(Ze.flags|=n,p.memoizedState=Mo(1|a,y,o,u))}function iy(n,a){gu(8390656,8,n,a)}function cd(n,a){yu(2048,8,n,a)}function AE(n){Ze.flags|=4;var a=Ze.updateQueue;if(a===null)a=hu(),Ze.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function oy(n){var a=rn().memoizedState;return AE({ref:a,nextImpl:n}),function(){if((yt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function sy(n,a){return yu(4,2,n,a)}function ly(n,a){return yu(4,4,n,a)}function uy(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function cy(n,a,o){o=o!=null?o.concat([n]):null,yu(4,4,uy.bind(null,a,n),o)}function fd(){}function fy(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&ed(a,u[1])?u[0]:(o.memoizedState=[n,a],n)}function dy(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&ed(a,u[1]))return u[0];if(u=n(),Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u}function dd(n,a,o){return o===void 0||(va&1073741824)!==0&&(at&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=h0(),Ze.lanes|=n,Ja|=n,o)}function hy(n,a,o,u){return lr(o,a)?o:Oo.current!==null?(n=dd(n,o,u),lr(n,a)||(cn=!0),n):(va&42)===0||(va&1073741824)!==0&&(at&261930)===0?(cn=!0,n.memoizedState=o):(n=h0(),Ze.lanes|=n,Ja|=n,a)}function py(n,a,o,u,p){var y=B.p;B.p=y!==0&&8>y?y:8;var A=K.T,z={};K.T=z,md(n,!1,a,o);try{var H=p(),se=K.S;if(se!==null&&se(z,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var he=_E(H,u);Ls(n,a,he,pr(n))}else Ls(n,a,u,pr(n))}catch(me){Ls(n,a,{then:function(){},status:"rejected",reason:me},pr())}finally{B.p=y,A!==null&&z.types!==null&&(A.types=z.types),K.T=A}}function ME(){}function hd(n,a,o,u){if(n.tag!==5)throw Error(i(476));var p=my(n).queue;py(n,p,a,Y,o===null?ME:function(){return gy(n),o(u)})}function my(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:Y},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function gy(n){var a=my(n);a.next===null&&(a=n.alternate.memoizedState),Ls(n,a.next.queue,{},pr())}function pd(){return kn(nl)}function yy(){return rn().memoizedState}function vy(){return rn().memoizedState}function jE(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=pr();n=Ka(o);var u=Ya(a,n,o);u!==null&&(Jn(u,a,o),Ns(u,a,o)),a={cache:Ff()},n.payload=a;return}a=a.return}}function kE(n,a,o){var u=pr();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},vu(n)?Sy(a,o):(o=kf(n,a,o,u),o!==null&&(Jn(o,n,u),wy(o,a,u)))}function by(n,a,o){var u=pr();Ls(n,a,o,u)}function Ls(n,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(vu(n))Sy(a,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var A=a.lastRenderedState,z=y(A,o);if(p.hasEagerState=!0,p.eagerState=z,lr(z,A))return Wl(n,a,p,0),At===null&&Ql(),!1}catch{}if(o=kf(n,a,p,u),o!==null)return Jn(o,n,u),wy(o,a,u),!0}return!1}function md(n,a,o,u){if(u={lane:2,revertLane:Kd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},vu(n)){if(a)throw Error(i(479))}else a=kf(n,o,u,2),a!==null&&Jn(a,n,2)}function vu(n){var a=n.alternate;return n===Ze||a!==null&&a===Ze}function Sy(n,a){Ro=fu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function wy(n,a,o){if((o&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}var Us={readContext:kn,use:pu,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};Us.useEffectEvent=Yt;var Ey={readContext:kn,use:pu,useCallback:function(n,a){return Vn().memoizedState=[n,a===void 0?null:a],n},useContext:kn,useEffect:iy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,gu(4194308,4,uy.bind(null,a,n),o)},useLayoutEffect:function(n,a){return gu(4194308,4,n,a)},useInsertionEffect:function(n,a){gu(4,2,n,a)},useMemo:function(n,a){var o=Vn();a=a===void 0?null:a;var u=n();if(Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u},useReducer:function(n,a,o){var u=Vn();if(o!==void 0){var p=o(a);if(Hi){Ht(!0);try{o(a)}finally{Ht(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=kE.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var a=Vn();return n={current:n},a.memoizedState=n},useState:function(n){n=ld(n);var a=n.queue,o=by.bind(null,Ze,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:fd,useDeferredValue:function(n,a){var o=Vn();return dd(o,n,a)},useTransition:function(){var n=ld(!1);return n=py.bind(null,Ze,n.queue,!0,!1),Vn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var u=Ze,p=Vn();if(st){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),At===null)throw Error(i(349));(at&127)!==0||Fg(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,iy(Hg.bind(null,u,y,n),[n]),u.flags|=2048,Mo(9,{destroy:void 0},Bg.bind(null,u,y,o,a),null),o},useId:function(){var n=Vn(),a=At.identifierPrefix;if(st){var o=ra,u=na;o=(u&~(1<<32-Rt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=du++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=TE++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:pd,useFormState:ey,useActionState:ey,useOptimistic:function(n){var a=Vn();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=md.bind(null,Ze,!0,o),o.dispatch=a,[n,a]},useMemoCache:id,useCacheRefresh:function(){return Vn().memoizedState=jE.bind(null,Ze)},useEffectEvent:function(n){var a=Vn(),o={impl:n};return a.memoizedState=o,function(){if((yt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},gd={readContext:kn,use:pu,useCallback:fy,useContext:kn,useEffect:cd,useImperativeHandle:cy,useInsertionEffect:sy,useLayoutEffect:ly,useMemo:dy,useReducer:mu,useRef:ay,useState:function(){return mu(ba)},useDebugValue:fd,useDeferredValue:function(n,a){var o=rn();return hy(o,Tt.memoizedState,n,a)},useTransition:function(){var n=mu(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Is(n),a]},useSyncExternalStore:Vg,useId:yy,useHostTransitionStatus:pd,useFormState:ty,useActionState:ty,useOptimistic:function(n,a){var o=rn();return Yg(o,Tt,n,a)},useMemoCache:id,useCacheRefresh:vy};gd.useEffectEvent=oy;var xy={readContext:kn,use:pu,useCallback:fy,useContext:kn,useEffect:cd,useImperativeHandle:cy,useInsertionEffect:sy,useLayoutEffect:ly,useMemo:dy,useReducer:sd,useRef:ay,useState:function(){return sd(ba)},useDebugValue:fd,useDeferredValue:function(n,a){var o=rn();return Tt===null?dd(o,n,a):hy(o,Tt.memoizedState,n,a)},useTransition:function(){var n=sd(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Is(n),a]},useSyncExternalStore:Vg,useId:yy,useHostTransitionStatus:pd,useFormState:ry,useActionState:ry,useOptimistic:function(n,a){var o=rn();return Tt!==null?Yg(o,Tt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:id,useCacheRefresh:vy};xy.useEffectEvent=oy;function yd(n,a,o,u){a=n.memoizedState,o=o(u,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var vd={enqueueSetState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ns(a,n,u))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ns(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=pr(),u=Ka(o);u.tag=2,a!=null&&(u.callback=a),a=Ya(n,u,o),a!==null&&(Jn(a,n,o),Ns(a,n,o))}};function _y(n,a,o,u,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,A):a.prototype&&a.prototype.isPureReactComponent?!Cs(o,u)||!Cs(p,y):!0}function Ty(n,a,o,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==n&&vd.enqueueReplaceState(a,a.state,null)}function Gi(n,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function Cy(n){Xl(n)}function Oy(n){console.error(n)}function Ry(n){Xl(n)}function bu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function Ay(n,a,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function bd(n,a,o){return o=Ka(o),o.tag=3,o.payload={element:null},o.callback=function(){bu(n,a)},o}function My(n){return n=Ka(n),n.tag=3,n}function jy(n,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;n.payload=function(){return p(y)},n.callback=function(){Ay(a,o,u)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){Ay(a,o,u),typeof p!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var z=u.stack;this.componentDidCatch(u.value,{componentStack:z!==null?z:""})})}function DE(n,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&Eo(a,o,p,!0),o=cr.current,o!==null){switch(o.tag){case 31:case 13:return Or===null?ju():o.alternate===null&&Zt===0&&(Zt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===ou?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Bd(n,u,p)),!1;case 22:return o.flags|=65536,u===ou?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Bd(n,u,p)),!1}throw Error(i(435,o.tag))}return Bd(n,u,p),ju(),!1}if(st)return a=cr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==If&&(n=Error(i(422),{cause:u}),As(xr(n,o)))):(u!==If&&(a=Error(i(423),{cause:u}),As(xr(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=xr(u,o),p=bd(n.stateNode,u,p),Zf(n,p),Zt!==4&&(Zt=2)),!1;var y=Error(i(520),{cause:u});if(y=xr(y,o),Ys===null?Ys=[y]:Ys.push(y),Zt!==4&&(Zt=2),a===null)return!0;u=xr(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=bd(o.stateNode,u,n),Zf(o,n),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ei===null||!ei.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=My(p),jy(p,n,o,u),Zf(o,p),!1}o=o.return}while(o!==null);return!1}var Sd=Error(i(461)),cn=!1;function Dn(n,a,o,u){a.child=n===null?zg(a,null,o,u):Bi(a,n.child,o,u)}function ky(n,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var A={};for(var z in u)z!=="ref"&&(A[z]=u[z])}else A=u;return Ui(a),u=td(n,a,o,A,y,p),z=nd(),n!==null&&!cn?(rd(n,a,p),Sa(n,a,p)):(st&&z&&$f(a),a.flags|=1,Dn(n,a,u,p),a.child)}function Dy(n,a,o,u,p){if(n===null){var y=o.type;return typeof y=="function"&&!Df(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,Ny(n,a,y,u,p)):(n=eu(o.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!Rd(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:Cs,o(A,u)&&n.ref===a.ref)return Sa(n,a,p)}return a.flags|=1,n=pa(y,u),n.ref=a.ref,n.return=a,a.child=n}function Ny(n,a,o,u,p){if(n!==null){var y=n.memoizedProps;if(Cs(y,u)&&n.ref===a.ref)if(cn=!1,a.pendingProps=u=y,Rd(n,p))(n.flags&131072)!==0&&(cn=!0);else return a.lanes=n.lanes,Sa(n,a,p)}return wd(n,a,o,u,p)}function zy(n,a,o,u){var p=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return $y(n,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&au(a,y!==null?y.cachePool:null),y!==null?Ig(a,y):Qf(),Lg(a);else return u=a.lanes=536870912,$y(n,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(au(a,y.cachePool),Ig(a,y),Xa(),a.memoizedState=null):(n!==null&&au(a,null),Qf(),Xa());return Dn(n,a,p,o),a.child}function qs(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function $y(n,a,o,u,p){var y=Hf();return y=y===null?null:{parent:ln._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&au(a,null),Qf(),Lg(a),n!==null&&Eo(n,a,u,!0),a.childLanes=p,null}function Su(n,a){return a=Eu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function Py(n,a,o){return Bi(a,n.child,null,o),n=Su(a,a.pendingProps),n.flags|=2,fr(a),a.memoizedState=null,n}function NE(n,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(st){if(u.mode==="hidden")return n=Su(a,u),a.lanes=536870912,qs(null,n);if(Jf(a),(n=Nt)?(n=Z0(n,Cr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Sg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return a.lanes=536870912,null}return Su(a,u)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(Jf(a),p)if(a.flags&256)a.flags&=-257,a=Py(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(cn||Eo(n,a,o,!1),p=(o&n.childLanes)!==0,cn||p){if(u=At,u!==null&&(A=Cn(u,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,$i(n,A),Jn(u,n,A),Sd;ju(),a=Py(n,a,o)}else n=y.treeContext,Nt=Rr(A.nextSibling),jn=a,st=!0,Fa=null,Cr=!1,n!==null&&xg(a,n),a=Su(a,u),a.flags|=4096;return a}return n=pa(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function wu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function wd(n,a,o,u,p){return Ui(a),o=td(n,a,o,u,void 0,p),u=nd(),n!==null&&!cn?(rd(n,a,p),Sa(n,a,p)):(st&&u&&$f(a),a.flags|=1,Dn(n,a,o,p),a.child)}function Iy(n,a,o,u,p,y){return Ui(a),a.updateQueue=null,o=qg(a,u,o,p),Ug(n),u=nd(),n!==null&&!cn?(rd(n,a,y),Sa(n,a,y)):(st&&u&&$f(a),a.flags|=1,Dn(n,a,o,y),a.child)}function Ly(n,a,o,u,p){if(Ui(a),a.stateNode===null){var y=vo,A=o.contextType;typeof A=="object"&&A!==null&&(y=kn(A)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=vd,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},Kf(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?kn(A):vo,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(yd(a,o,A,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&vd.enqueueReplaceState(y,y.state,null),$s(a,u,y,p),zs(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var z=a.memoizedProps,H=Gi(o,z);y.props=H;var se=y.context,he=o.contextType;A=vo,typeof he=="object"&&he!==null&&(A=kn(he));var me=o.getDerivedStateFromProps;he=typeof me=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,he||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||se!==A)&&Ty(a,y,u,A),Ga=!1;var le=a.memoizedState;y.state=le,$s(a,u,y,p),zs(),se=a.memoizedState,z||le!==se||Ga?(typeof me=="function"&&(yd(a,o,me,u),se=a.memoizedState),(H=Ga||_y(a,o,H,u,le,se,A))?(he||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=se),y.props=u,y.state=se,y.context=A,u=H):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,Yf(n,a),A=a.memoizedProps,he=Gi(o,A),y.props=he,me=a.pendingProps,le=y.context,se=o.contextType,H=vo,typeof se=="object"&&se!==null&&(H=kn(se)),z=o.getDerivedStateFromProps,(se=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==me||le!==H)&&Ty(a,y,u,H),Ga=!1,le=a.memoizedState,y.state=le,$s(a,u,y,p),zs();var ce=a.memoizedState;A!==me||le!==ce||Ga||n!==null&&n.dependencies!==null&&nu(n.dependencies)?(typeof z=="function"&&(yd(a,o,z,u),ce=a.memoizedState),(he=Ga||_y(a,o,he,u,le,ce,H)||n!==null&&n.dependencies!==null&&nu(n.dependencies))?(se||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ce,H),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ce,H)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ce),y.props=u,y.state=ce,y.context=H,u=he):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,wu(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Bi(a,n.child,null,p),a.child=Bi(a,null,o,p)):Dn(n,a,o,p),a.memoizedState=y.state,n=a.child):n=Sa(n,a,p),n}function Uy(n,a,o,u){return Ii(),a.flags|=256,Dn(n,a,o,u),a.child}var Ed={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(n){return{baseLanes:n,cachePool:Ag()}}function _d(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=hr),n}function qy(n,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(nn.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(st){if(p?Za(a):Xa(),(n=Nt)?(n=Z0(n,Cr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Sg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return oh(n)?a.lanes=32:a.lanes=536870912,null}var z=u.children;return u=u.fallback,p?(Xa(),p=a.mode,z=Eu({mode:"hidden",children:z},p),u=Pi(u,p,o,null),z.return=a,u.return=a,z.sibling=u,a.child=z,u=a.child,u.memoizedState=xd(o),u.childLanes=_d(n,A,o),a.memoizedState=Ed,qs(null,u)):(Za(a),Td(a,z))}var H=n.memoizedState;if(H!==null&&(z=H.dehydrated,z!==null)){if(y)a.flags&256?(Za(a),a.flags&=-257,a=Cd(n,a,o)):a.memoizedState!==null?(Xa(),a.child=n.child,a.flags|=128,a=null):(Xa(),z=u.fallback,p=a.mode,u=Eu({mode:"visible",children:u.children},p),z=Pi(z,p,o,null),z.flags|=2,u.return=a,z.return=a,u.sibling=z,a.child=u,Bi(a,n.child,null,o),u=a.child,u.memoizedState=xd(o),u.childLanes=_d(n,A,o),a.memoizedState=Ed,a=qs(null,u));else if(Za(a),oh(z)){if(A=z.nextSibling&&z.nextSibling.dataset,A)var se=A.dgst;A=se,u=Error(i(419)),u.stack="",u.digest=A,As({value:u,source:null,stack:null}),a=Cd(n,a,o)}else if(cn||Eo(n,a,o,!1),A=(o&n.childLanes)!==0,cn||A){if(A=At,A!==null&&(u=Cn(A,o),u!==0&&u!==H.retryLane))throw H.retryLane=u,$i(n,u),Jn(A,n,u),Sd;ih(z)||ju(),a=Cd(n,a,o)}else ih(z)?(a.flags|=192,a.child=n.child,a=null):(n=H.treeContext,Nt=Rr(z.nextSibling),jn=a,st=!0,Fa=null,Cr=!1,n!==null&&xg(a,n),a=Td(a,u.children),a.flags|=4096);return a}return p?(Xa(),z=u.fallback,p=a.mode,H=n.child,se=H.sibling,u=pa(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,se!==null?z=pa(se,z):(z=Pi(z,p,o,null),z.flags|=2),z.return=a,u.return=a,u.sibling=z,a.child=u,qs(null,u),u=a.child,z=n.child.memoizedState,z===null?z=xd(o):(p=z.cachePool,p!==null?(H=ln._currentValue,p=p.parent!==H?{parent:H,pool:H}:p):p=Ag(),z={baseLanes:z.baseLanes|o,cachePool:p}),u.memoizedState=z,u.childLanes=_d(n,A,o),a.memoizedState=Ed,qs(n.child,u)):(Za(a),o=n.child,n=o.sibling,o=pa(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,n!==null&&(A=a.deletions,A===null?(a.deletions=[n],a.flags|=16):A.push(n)),a.child=o,a.memoizedState=null,o)}function Td(n,a){return a=Eu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Eu(n,a){return n=ur(22,n,null,a),n.lanes=0,n}function Cd(n,a,o){return Bi(a,n.child,null,o),n=Td(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function Vy(n,a,o){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),qf(n.return,a,o)}function Od(n,a,o,u,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function Fy(n,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var A=nn.current,z=(A&2)!==0;if(z?(A=A&1|2,a.flags|=128):A&=1,U(nn,A),Dn(n,a,u,o),u=st?Rs:0,!z&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Vy(n,o,a);else if(n.tag===19)Vy(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&cu(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Od(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&cu(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Od(a,!0,o,null,y,u);break;case"together":Od(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Sa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),Ja|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(Eo(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=pa(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=pa(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function Rd(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&nu(n)))}function zE(n,a,o){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),Ha(a,ln,n.memoizedState.cache),Ii();break;case 27:case 5:Oe(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:Ha(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Jf(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Za(a),a.flags|=128,null):(o&a.child.childLanes)!==0?qy(n,a,o):(Za(a),n=Sa(n,a,o),n!==null?n.sibling:null);Za(a);break;case 19:var p=(n.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(Eo(n,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return Fy(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),U(nn,nn.current),u)break;return null;case 22:return a.lanes=0,zy(n,a,o,a.pendingProps);case 24:Ha(a,ln,n.memoizedState.cache)}return Sa(n,a,o)}function By(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)cn=!0;else{if(!Rd(n,o)&&(a.flags&128)===0)return cn=!1,zE(n,a,o);cn=(n.flags&131072)!==0}else cn=!1,st&&(a.flags&1048576)!==0&&Eg(a,Rs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Vi(a.elementType),a.type=n,typeof n=="function")Df(n)?(u=Gi(n,u),a.tag=1,a=Ly(null,a,n,u,o)):(a.tag=0,a=wd(null,a,n,u,o));else{if(n!=null){var p=n.$$typeof;if(p===x){a.tag=11,a=ky(null,a,n,u,o);break e}else if(p===M){a.tag=14,a=Dy(null,a,n,u,o);break e}}throw a=re(n)||n,Error(i(306,a,""))}}return a;case 0:return wd(n,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Gi(u,a.pendingProps),Ly(n,a,u,p,o);case 3:e:{if(ve(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,Yf(n,a),$s(a,u,null,o);var A=a.memoizedState;if(u=A.cache,Ha(a,ln,u),u!==y.cache&&Vf(a,[ln],o,!0),zs(),u=A.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=Uy(n,a,u,o);break e}else if(u!==p){p=xr(Error(i(424)),a),As(p),a=Uy(n,a,u,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Nt=Rr(n.firstChild),jn=a,st=!0,Fa=null,Cr=!0,o=zg(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ii(),u===p){a=Sa(n,a,o);break e}Dn(n,a,u,o)}a=a.child}return a;case 26:return wu(n,a),n===null?(o=tv(a.type,null,a.pendingProps,null))?a.memoizedState=o:st||(o=a.type,n=a.pendingProps,u=Iu(ee.current).createElement(o),u[$t]=a,u[sn]=n,Nn(u,o,n),yn(u),a.stateNode=u):a.memoizedState=tv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Oe(a),n===null&&st&&(u=a.stateNode=W0(a.type,a.pendingProps,ee.current),jn=a,Cr=!0,p=Nt,ai(a.type)?(sh=p,Nt=Rr(u.firstChild)):Nt=p),Dn(n,a,a.pendingProps.children,o),wu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&st&&((p=u=Nt)&&(u=fx(u,a.type,a.pendingProps,Cr),u!==null?(a.stateNode=u,jn=a,Nt=Rr(u.firstChild),Cr=!1,p=!0):p=!1),p||Ba(a)),Oe(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,u=y.children,nh(p,y)?u=null:A!==null&&nh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=td(n,a,CE,null,null,o),nl._currentValue=p),wu(n,a),Dn(n,a,u,o),a.child;case 6:return n===null&&st&&((n=o=Nt)&&(o=dx(o,a.pendingProps,Cr),o!==null?(a.stateNode=o,jn=a,Nt=null,n=!0):n=!1),n||Ba(a)),null;case 13:return qy(n,a,o);case 4:return ve(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Bi(a,null,u,o):Dn(n,a,u,o),a.child;case 11:return ky(n,a,a.type,a.pendingProps,o);case 7:return Dn(n,a,a.pendingProps,o),a.child;case 8:return Dn(n,a,a.pendingProps.children,o),a.child;case 12:return Dn(n,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,Ha(a,a.type,u.value),Dn(n,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ui(a),p=kn(p),u=u(p),a.flags|=1,Dn(n,a,u,o),a.child;case 14:return Dy(n,a,a.type,a.pendingProps,o);case 15:return Ny(n,a,a.type,a.pendingProps,o);case 19:return Fy(n,a,o);case 31:return NE(n,a,o);case 22:return zy(n,a,o,a.pendingProps);case 24:return Ui(a),u=kn(ln),n===null?(p=Hf(),p===null&&(p=At,y=Ff(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},Kf(a),Ha(a,ln,p)):((n.lanes&o)!==0&&(Yf(n,a),$s(a,null,null,o),zs()),p=n.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ha(a,ln,u)):(u=y.cache,Ha(a,ln,u),u!==p.cache&&Vf(a,[ln],o,!0))),Dn(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function wa(n){n.flags|=4}function Ad(n,a,o,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(y0())n.flags|=8192;else throw Fi=ou,Gf}else n.flags&=-16777217}function Hy(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ov(a))if(y0())n.flags|=8192;else throw Fi=ou,Gf}function xu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Sr():536870912,n.lanes|=a,No|=a)}function Vs(n,a){if(!st)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function zt(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=o,a}function $E(n,a,o){var u=a.pendingProps;switch(Pf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(a),null;case 1:return zt(a),null;case 3:return o=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ya(ln),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wo(a)?wa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Lf())),zt(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(wa(a),y!==null?(zt(a),Hy(a,y)):(zt(a),Ad(a,p,null,u,o))):y?y!==n.memoizedState?(wa(a),zt(a),Hy(a,y)):(zt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&wa(a),zt(a),Ad(a,p,n,u,o)),null;case 27:if(de(a),o=ee.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}n=P.current,wo(a)?_g(a):(n=W0(p,u,o),a.stateNode=n,wa(a))}return zt(a),null;case 5:if(de(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}if(y=P.current,wo(a))_g(a);else{var A=Iu(ee.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?A.createElement(p,{is:u.is}):A.createElement(p)}}y[$t]=a,y[sn]=u;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=y;e:switch(Nn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&wa(a)}}return zt(a),Ad(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=ee.current,wo(a)){if(n=a.stateNode,o=a.memoizedProps,u=null,p=jn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[$t]=a,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||q0(n.nodeValue,o)),n||Ba(a,!0)}else n=Iu(n).createTextNode(u),n[$t]=a,a.stateNode=n}return zt(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(u=wo(a),o!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),n=!1}else o=Lf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(fr(a),a):(fr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return zt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=wo(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),p=!1}else p=Lf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(fr(a),a):(fr(a),null)}return fr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),xu(a,a.updateQueue),zt(a),null);case 4:return Ee(),n===null&&Qd(a.stateNode.containerInfo),zt(a),null;case 10:return ya(a.type),zt(a),null;case 19:if(I(nn),u=a.memoizedState,u===null)return zt(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)Vs(u,!1);else{if(Zt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=cu(n),y!==null){for(a.flags|=128,Vs(u,!1),n=y.updateQueue,a.updateQueue=n,xu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)bg(o,n),o=o.sibling;return U(nn,nn.current&1|2),st&&ma(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&Ue()>Ru&&(a.flags|=128,p=!0,Vs(u,!1),a.lanes=4194304)}else{if(!p)if(n=cu(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,xu(a,n),Vs(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!st)return zt(a),null}else 2*Ue()-u.renderingStartTime>Ru&&o!==536870912&&(a.flags|=128,p=!0,Vs(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ue(),n.sibling=null,o=nn.current,U(nn,p?o&1|2:o&1),st&&ma(a,u.treeForkCount),n):(zt(a),null);case 22:case 23:return fr(a),Wf(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(zt(a),a.subtreeFlags&6&&(a.flags|=8192)):zt(a),o=a.updateQueue,o!==null&&xu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),n!==null&&I(qi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ya(ln),zt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function PE(n,a){switch(Pf(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ya(ln),Ee(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return de(a),null;case 31:if(a.memoizedState!==null){if(fr(a),a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(fr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return I(nn),null;case 4:return Ee(),null;case 10:return ya(a.type),null;case 22:case 23:return fr(a),Wf(),n!==null&&I(qi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ya(ln),null;case 25:return null;default:return null}}function Gy(n,a){switch(Pf(a),a.tag){case 3:ya(ln),Ee();break;case 26:case 27:case 5:de(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&fr(a);break;case 13:fr(a);break;case 19:I(nn);break;case 10:ya(a.type);break;case 22:case 23:fr(a),Wf(),n!==null&&I(qi);break;case 24:ya(ln)}}function Fs(n,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&n)===n){u=void 0;var y=o.create,A=o.inst;u=y(),A.destroy=u}o=o.next}while(o!==p)}}catch(z){xt(a,a.return,z)}}function Qa(n,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&n)===n){var A=u.inst,z=A.destroy;if(z!==void 0){A.destroy=void 0,p=a;var H=o,se=z;try{se()}catch(he){xt(p,H,he)}}}u=u.next}while(u!==y)}}catch(he){xt(a,a.return,he)}}function Ky(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{Pg(a,o)}catch(u){xt(n,n.return,u)}}}function Yy(n,a,o){o.props=Gi(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){xt(n,a,u)}}function Bs(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(p){xt(n,a,p)}}function aa(n,a){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){xt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){xt(n,a,p)}else o.current=null}function Zy(n){var a=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){xt(n,n.return,p)}}function Md(n,a,o){try{var u=n.stateNode;ix(u,n.type,o,a),u[sn]=a}catch(p){xt(n,n.return,p)}}function Xy(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ai(n.type)||n.tag===4}function jd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Xy(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ai(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function kd(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Me));else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(kd(n,a,o),n=n.sibling;n!==null;)kd(n,a,o),n=n.sibling}function _u(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(_u(n,a,o),n=n.sibling;n!==null;)_u(n,a,o),n=n.sibling}function Qy(n){var a=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Nn(a,u,o),a[$t]=n,a[sn]=o}catch(y){xt(n,n.return,y)}}var Ea=!1,fn=!1,Dd=!1,Wy=typeof WeakSet=="function"?WeakSet:Set,On=null;function IE(n,a){if(n=n.containerInfo,eh=Hu,n=cg(n),Cf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,z=-1,H=-1,se=0,he=0,me=n,le=null;t:for(;;){for(var ce;me!==o||p!==0&&me.nodeType!==3||(z=A+p),me!==y||u!==0&&me.nodeType!==3||(H=A+u),me.nodeType===3&&(A+=me.nodeValue.length),(ce=me.firstChild)!==null;)le=me,me=ce;for(;;){if(me===n)break t;if(le===o&&++se===p&&(z=A),le===y&&++he===u&&(H=A),(ce=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ce}o=z===-1||H===-1?null:{start:z,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(th={focusedElem:n,selectionRange:o},Hu=!1,On=a;On!==null;)if(a=On,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,On=n;else for(;On!==null;){switch(a=On,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var je=Gi(o.type,p);n=u.getSnapshotBeforeUpdate(je,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(qe){xt(o,o.return,qe)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)ah(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,On=n;break}On=a.return}}function Jy(n,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_a(n,o),u&4&&Fs(5,o);break;case 1:if(_a(n,o),u&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){xt(o,o.return,A)}else{var p=Gi(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){xt(o,o.return,A)}}u&64&&Ky(o),u&512&&Bs(o,o.return);break;case 3:if(_a(n,o),u&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Pg(n,a)}catch(A){xt(o,o.return,A)}}break;case 27:a===null&&u&4&&Qy(o);case 26:case 5:_a(n,o),a===null&&u&4&&Zy(o),u&512&&Bs(o,o.return);break;case 12:_a(n,o);break;case 31:_a(n,o),u&4&&n0(n,o);break;case 13:_a(n,o),u&4&&r0(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=KE.bind(null,o),hx(n,o))));break;case 22:if(u=o.memoizedState!==null||Ea,!u){a=a!==null&&a.memoizedState!==null||fn,p=Ea;var y=fn;Ea=u,(fn=a)&&!y?Ta(n,o,(o.subtreeFlags&8772)!==0):_a(n,o),Ea=p,fn=y}break;case 30:break;default:_a(n,o)}}function e0(n){var a=n.alternate;a!==null&&(n.alternate=null,e0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Vl(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pt=null,Zn=!1;function xa(n,a,o){for(o=o.child;o!==null;)t0(n,a,o),o=o.sibling}function t0(n,a,o){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Vt,o)}catch{}switch(o.tag){case 26:fn||aa(o,a),xa(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:fn||aa(o,a);var u=Pt,p=Zn;ai(o.type)&&(Pt=o.stateNode,Zn=!1),xa(n,a,o),Js(o.stateNode),Pt=u,Zn=p;break;case 5:fn||aa(o,a);case 6:if(u=Pt,p=Zn,Pt=null,xa(n,a,o),Pt=u,Zn=p,Pt!==null)if(Zn)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(o.stateNode)}catch(y){xt(o,a,y)}else try{Pt.removeChild(o.stateNode)}catch(y){xt(o,a,y)}break;case 18:Pt!==null&&(Zn?(n=Pt,K0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Vo(n)):K0(Pt,o.stateNode));break;case 4:u=Pt,p=Zn,Pt=o.stateNode.containerInfo,Zn=!0,xa(n,a,o),Pt=u,Zn=p;break;case 0:case 11:case 14:case 15:Qa(2,o,a),fn||Qa(4,o,a),xa(n,a,o);break;case 1:fn||(aa(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Yy(o,a,u)),xa(n,a,o);break;case 21:xa(n,a,o);break;case 22:fn=(u=fn)||o.memoizedState!==null,xa(n,a,o),fn=u;break;default:xa(n,a,o)}}function n0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Vo(n)}catch(o){xt(a,a.return,o)}}}function r0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Vo(n)}catch(o){xt(a,a.return,o)}}function LE(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Wy),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Wy),a;default:throw Error(i(435,n.tag))}}function Tu(n,a){var o=LE(n);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=YE.bind(null,n,u);u.then(p,p)}})}function Xn(n,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=n,A=a,z=A;e:for(;z!==null;){switch(z.tag){case 27:if(ai(z.type)){Pt=z.stateNode,Zn=!1;break e}break;case 5:Pt=z.stateNode,Zn=!1;break e;case 3:case 4:Pt=z.stateNode.containerInfo,Zn=!0;break e}z=z.return}if(Pt===null)throw Error(i(160));t0(y,A,p),Pt=null,Zn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)a0(a,n),a=a.sibling}var Br=null;function a0(n,a){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Xn(a,n),Qn(n),u&4&&(Qa(3,n,n.return),Fs(3,n),Qa(5,n,n.return));break;case 1:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&64&&Ea&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Br;if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[co]||y[$t]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),Nn(y,u,o),y[$t]=n,yn(y),u=y;break e;case"link":var A=av("link","href",p).get(u+(o.href||""));if(A){for(var z=0;z<A.length;z++)if(y=A[z],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;case"meta":if(A=av("meta","content",p).get(u+(o.content||""))){for(z=0;z<A.length;z++)if(y=A[z],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;default:throw Error(i(468,u))}y[$t]=n,yn(y),u=y}n.stateNode=u}else iv(p,n.type,n.stateNode);else n.stateNode=rv(p,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?iv(p,n.type,n.stateNode):rv(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Md(n,n.memoizedProps,o.memoizedProps)}break;case 27:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),o!==null&&u&4&&Md(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),n.flags&32){p=n.stateNode;try{ne(p,"")}catch(je){xt(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,Md(n,p,o!==null?o.memoizedProps:p)),u&1024&&(Dd=!0);break;case 6:if(Xn(a,n),Qn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(je){xt(n,n.return,je)}}break;case 3:if(qu=null,p=Br,Br=Lu(a.containerInfo),Xn(a,n),Br=p,Qn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Vo(a.containerInfo)}catch(je){xt(n,n.return,je)}Dd&&(Dd=!1,i0(n));break;case 4:u=Br,Br=Lu(n.stateNode.containerInfo),Xn(a,n),Qn(n),Br=u;break;case 12:Xn(a,n),Qn(n);break;case 31:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Tu(n,u)));break;case 13:Xn(a,n),Qn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ou=Ue()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Tu(n,u)));break;case 22:p=n.memoizedState!==null;var H=o!==null&&o.memoizedState!==null,se=Ea,he=fn;if(Ea=se||p,fn=he||H,Xn(a,n),fn=he,Ea=se,Qn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||H||Ea||fn||Ki(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){H=o=a;try{if(y=H.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{z=H.stateNode;var me=H.memoizedProps.style,le=me!=null&&me.hasOwnProperty("display")?me.display:null;z.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(je){xt(H,H.return,je)}}}else if(a.tag===6){if(o===null){H=a;try{H.stateNode.nodeValue=p?"":H.memoizedProps}catch(je){xt(H,H.return,je)}}}else if(a.tag===18){if(o===null){H=a;try{var ce=H.stateNode;p?Y0(ce,!0):Y0(H.stateNode,!1)}catch(je){xt(H,H.return,je)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Tu(n,o))));break;case 19:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Tu(n,u)));break;case 30:break;case 21:break;default:Xn(a,n),Qn(n)}}function Qn(n){var a=n.flags;if(a&2){try{for(var o,u=n.return;u!==null;){if(Xy(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=jd(n);_u(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(ne(A,""),o.flags&=-33);var z=jd(n);_u(n,z,A);break;case 3:case 4:var H=o.stateNode.containerInfo,se=jd(n);kd(n,se,H);break;default:throw Error(i(161))}}catch(he){xt(n,n.return,he)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function i0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;i0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function _a(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Jy(n,a.alternate,a),a=a.sibling}function Ki(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Qa(4,a,a.return),Ki(a);break;case 1:aa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Yy(a,a.return,o),Ki(a);break;case 27:Js(a.stateNode);case 26:case 5:aa(a,a.return),Ki(a);break;case 22:a.memoizedState===null&&Ki(a);break;case 30:Ki(a);break;default:Ki(a)}n=n.sibling}}function Ta(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(p,y,o),Fs(4,y);break;case 1:if(Ta(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(se){xt(u,u.return,se)}if(u=y,p=u.updateQueue,p!==null){var z=u.stateNode;try{var H=p.shared.hiddenCallbacks;if(H!==null)for(p.shared.hiddenCallbacks=null,p=0;p<H.length;p++)$g(H[p],z)}catch(se){xt(u,u.return,se)}}o&&A&64&&Ky(y),Bs(y,y.return);break;case 27:Qy(y);case 26:case 5:Ta(p,y,o),o&&u===null&&A&4&&Zy(y),Bs(y,y.return);break;case 12:Ta(p,y,o);break;case 31:Ta(p,y,o),o&&A&4&&n0(p,y);break;case 13:Ta(p,y,o),o&&A&4&&r0(p,y);break;case 22:y.memoizedState===null&&Ta(p,y,o),Bs(y,y.return);break;case 30:break;default:Ta(p,y,o)}a=a.sibling}}function Nd(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Ms(o))}function zd(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Ms(n))}function Hr(n,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)o0(n,a,o,u),a=a.sibling}function o0(n,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Hr(n,a,o,u),p&2048&&Fs(9,a);break;case 1:Hr(n,a,o,u);break;case 3:Hr(n,a,o,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Ms(n)));break;case 12:if(p&2048){Hr(n,a,o,u),n=a.stateNode;try{var y=a.memoizedProps,A=y.id,z=y.onPostCommit;typeof z=="function"&&z(A,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(H){xt(a,a.return,H)}}else Hr(n,a,o,u);break;case 31:Hr(n,a,o,u);break;case 13:Hr(n,a,o,u);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?Hr(n,a,o,u):Hs(n,a):y._visibility&2?Hr(n,a,o,u):(y._visibility|=2,jo(n,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Nd(A,a);break;case 24:Hr(n,a,o,u),p&2048&&zd(a.alternate,a);break;default:Hr(n,a,o,u)}}function jo(n,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,z=o,H=u,se=A.flags;switch(A.tag){case 0:case 11:case 15:jo(y,A,z,H,p),Fs(8,A);break;case 23:break;case 22:var he=A.stateNode;A.memoizedState!==null?he._visibility&2?jo(y,A,z,H,p):Hs(y,A):(he._visibility|=2,jo(y,A,z,H,p)),p&&se&2048&&Nd(A.alternate,A);break;case 24:jo(y,A,z,H,p),p&&se&2048&&zd(A.alternate,A);break;default:jo(y,A,z,H,p)}a=a.sibling}}function Hs(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,u=a,p=u.flags;switch(u.tag){case 22:Hs(o,u),p&2048&&Nd(u.alternate,u);break;case 24:Hs(o,u),p&2048&&zd(u.alternate,u);break;default:Hs(o,u)}a=a.sibling}}var Gs=8192;function ko(n,a,o){if(n.subtreeFlags&Gs)for(n=n.child;n!==null;)s0(n,a,o),n=n.sibling}function s0(n,a,o){switch(n.tag){case 26:ko(n,a,o),n.flags&Gs&&n.memoizedState!==null&&Tx(o,Br,n.memoizedState,n.memoizedProps);break;case 5:ko(n,a,o);break;case 3:case 4:var u=Br;Br=Lu(n.stateNode.containerInfo),ko(n,a,o),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Gs,Gs=16777216,ko(n,a,o),Gs=u):ko(n,a,o));break;default:ko(n,a,o)}}function l0(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Ks(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,c0(u,n)}l0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)u0(n),n=n.sibling}function u0(n){switch(n.tag){case 0:case 11:case 15:Ks(n),n.flags&2048&&Qa(9,n,n.return);break;case 3:Ks(n);break;case 12:Ks(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Cu(n)):Ks(n);break;default:Ks(n)}}function Cu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,c0(u,n)}l0(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Qa(8,a,a.return),Cu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Cu(a));break;default:Cu(a)}n=n.sibling}}function c0(n,a){for(;On!==null;){var o=On;switch(o.tag){case 0:case 11:case 15:Qa(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ms(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,On=u;else e:for(o=n;On!==null;){u=On;var p=u.sibling,y=u.return;if(e0(u),u===o){On=null;break e}if(p!==null){p.return=y,On=p;break e}On=y}}}var UE={getCacheForType:function(n){var a=kn(ln),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return kn(ln).controller.signal}},qE=typeof WeakMap=="function"?WeakMap:Map,yt=0,At=null,tt=null,at=0,Et=0,dr=null,Wa=!1,Do=!1,$d=!1,Ca=0,Zt=0,Ja=0,Yi=0,Pd=0,hr=0,No=0,Ys=null,Wn=null,Id=!1,Ou=0,f0=0,Ru=1/0,Au=null,ei=null,vn=0,ti=null,zo=null,Oa=0,Ld=0,Ud=null,d0=null,Zs=0,qd=null;function pr(){return(yt&2)!==0&&at!==0?at&-at:K.T!==null?Kd():Pr()}function h0(){if(hr===0)if((at&536870912)===0||st){var n=En;En<<=1,(En&3932160)===0&&(En=262144),hr=n}else hr=536870912;return n=cr.current,n!==null&&(n.flags|=32),hr}function Jn(n,a,o){(n===At&&(Et===2||Et===9)||n.cancelPendingCommit!==null)&&($o(n,0),ni(n,at,hr,!1)),ft(n,o),((yt&2)===0||n!==At)&&(n===At&&((yt&2)===0&&(Yi|=o),Zt===4&&ni(n,at,hr,!1)),ia(n))}function p0(n,a,o){if((yt&6)!==0)throw Error(i(327));var u=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Kt(n,a),p=u?BE(n,a):Fd(n,a,!0),y=u;do{if(p===0){Do&&!u&&ni(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!VE(o)){p=Fd(n,a,!1),y=!1;continue}if(p===2){if(y=a,n.errorRecoveryDisabledLanes&y)var A=0;else A=n.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var z=n;p=Ys;var H=z.current.memoizedState.isDehydrated;if(H&&($o(z,A).flags|=256),A=Fd(z,A,!1),A!==2){if($d&&!H){z.errorRecoveryDisabledLanes|=y,Yi|=y,p=4;break e}y=Wn,Wn=p,y!==null&&(Wn===null?Wn=y:Wn.push.apply(Wn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){$o(n,0),ni(n,a,0,!0);break}e:{switch(u=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ni(u,a,hr,!Wa);break e;case 2:Wn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Ou+300-Ue(),10<p)){if(ni(u,a,hr,!Wa),xn(u,0,!0)!==0)break e;Oa=a,u.timeoutHandle=H0(m0.bind(null,u,o,Wn,Au,Id,a,hr,Yi,No,Wa,y,"Throttled",-0,0),p);break e}m0(u,o,Wn,Au,Id,a,hr,Yi,No,Wa,y,null,-0,0)}}break}while(!0);ia(n)}function m0(n,a,o,u,p,y,A,z,H,se,he,me,le,ce){if(n.timeoutHandle=-1,me=a.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Me},s0(a,y,me);var je=(y&62914560)===y?Ou-Ue():(y&4194048)===y?f0-Ue():0;if(je=Cx(me,je),je!==null){Oa=y,n.cancelPendingCommit=je(x0.bind(null,n,a,y,o,u,p,A,z,H,he,me,null,le,ce)),ni(n,y,A,!se);return}}x0(n,a,y,o,u,p,A,z,H)}function VE(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!lr(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ni(n,a,o,u){a&=~Pd,a&=~Yi,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var y=31-Rt(p),A=1<<y;u[y]=-1,p&=~A}o!==0&&Fn(n,o,a)}function Mu(){return(yt&6)===0?(Xs(0),!1):!0}function Vd(){if(tt!==null){if(Et===0)var n=tt.return;else n=tt,ga=Li=null,ad(n),Co=null,ks=0,n=tt;for(;n!==null;)Gy(n.alternate,n),n=n.return;tt=null}}function $o(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,lx(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Oa=0,Vd(),At=n,tt=o=pa(n.current,null),at=a,Et=0,dr=null,Wa=!1,Do=Kt(n,a),$d=!1,No=hr=Pd=Yi=Ja=Zt=0,Wn=Ys=null,Id=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-Rt(u),y=1<<p;a|=n[p],u&=~y}return Ca=a,Ql(),o}function g0(n,a){Ze=null,K.H=Us,a===To||a===iu?(a=kg(),Et=3):a===Gf?(a=kg(),Et=4):Et=a===Sd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,dr=a,tt===null&&(Zt=1,bu(n,xr(a,n.current)))}function y0(){var n=cr.current;return n===null?!0:(at&4194048)===at?Or===null:(at&62914560)===at||(at&536870912)!==0?n===Or:!1}function v0(){var n=K.H;return K.H=Us,n===null?Us:n}function b0(){var n=K.A;return K.A=UE,n}function ju(){Zt=4,Wa||(at&4194048)!==at&&cr.current!==null||(Do=!0),(Ja&134217727)===0&&(Yi&134217727)===0||At===null||ni(At,at,hr,!1)}function Fd(n,a,o){var u=yt;yt|=2;var p=v0(),y=b0();(At!==n||at!==a)&&(Au=null,$o(n,a)),a=!1;var A=Zt;e:do try{if(Et!==0&&tt!==null){var z=tt,H=dr;switch(Et){case 8:Vd(),A=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(a=!0);var se=Et;if(Et=0,dr=null,Po(n,z,H,se),o&&Do){A=0;break e}break;default:se=Et,Et=0,dr=null,Po(n,z,H,se)}}FE(),A=Zt;break}catch(he){g0(n,he)}while(!0);return a&&n.shellSuspendCounter++,ga=Li=null,yt=u,K.H=p,K.A=y,tt===null&&(At=null,at=0,Ql()),A}function FE(){for(;tt!==null;)S0(tt)}function BE(n,a){var o=yt;yt|=2;var u=v0(),p=b0();At!==n||at!==a?(Au=null,Ru=Ue()+500,$o(n,a)):Do=Kt(n,a);e:do try{if(Et!==0&&tt!==null){a=tt;var y=dr;t:switch(Et){case 1:Et=0,dr=null,Po(n,a,y,1);break;case 2:case 9:if(Mg(y)){Et=0,dr=null,w0(a);break}a=function(){Et!==2&&Et!==9||At!==n||(Et=7),ia(n)},y.then(a,a);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:Mg(y)?(Et=0,dr=null,w0(a)):(Et=0,dr=null,Po(n,a,y,7));break;case 5:var A=null;switch(tt.tag){case 26:A=tt.memoizedState;case 5:case 27:var z=tt;if(A?ov(A):z.stateNode.complete){Et=0,dr=null;var H=z.sibling;if(H!==null)tt=H;else{var se=z.return;se!==null?(tt=se,ku(se)):tt=null}break t}}Et=0,dr=null,Po(n,a,y,5);break;case 6:Et=0,dr=null,Po(n,a,y,6);break;case 8:Vd(),Zt=6;break e;default:throw Error(i(462))}}HE();break}catch(he){g0(n,he)}while(!0);return ga=Li=null,K.H=u,K.A=p,yt=o,tt!==null?0:(At=null,at=0,Ql(),Zt)}function HE(){for(;tt!==null&&!Je();)S0(tt)}function S0(n){var a=By(n.alternate,n,Ca);n.memoizedProps=n.pendingProps,a===null?ku(n):tt=a}function w0(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=Iy(o,a,a.pendingProps,a.type,void 0,at);break;case 11:a=Iy(o,a,a.pendingProps,a.type.render,a.ref,at);break;case 5:ad(a);default:Gy(o,a),a=tt=bg(a,Ca),a=By(o,a,Ca)}n.memoizedProps=n.pendingProps,a===null?ku(n):tt=a}function Po(n,a,o,u){ga=Li=null,ad(a),Co=null,ks=0;var p=a.return;try{if(DE(n,p,a,o,at)){Zt=1,bu(n,xr(o,n.current)),tt=null;return}}catch(y){if(p!==null)throw tt=p,y;Zt=1,bu(n,xr(o,n.current)),tt=null;return}a.flags&32768?(st||u===1?n=!0:Do||(at&536870912)!==0?n=!1:(Wa=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),E0(a,n)):ku(a)}function ku(n){var a=n;do{if((a.flags&32768)!==0){E0(a,Wa);return}n=a.return;var o=$E(a.alternate,a,Ca);if(o!==null){tt=o;return}if(a=a.sibling,a!==null){tt=a;return}tt=a=n}while(a!==null);Zt===0&&(Zt=5)}function E0(n,a){do{var o=PE(n.alternate,n);if(o!==null){o.flags&=32767,tt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){tt=n;return}tt=n=o}while(n!==null);Zt=6,tt=null}function x0(n,a,o,u,p,y,A,z,H){n.cancelPendingCommit=null;do Du();while(vn!==0);if((yt&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=jf,tn(n,o,y,A,z,H),n===At&&(tt=At=null,at=0),zo=a,ti=n,Oa=o,Ld=y,Ud=p,d0=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,ZE(xe,function(){return R0(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=B.p,B.p=2,A=yt,yt|=4;try{IE(n,a,o)}finally{yt=A,B.p=p,K.T=u}}vn=1,_0(),T0(),C0()}}function _0(){if(vn===1){vn=0;var n=ti,a=zo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{a0(a,n);var y=th,A=cg(n.containerInfo),z=y.focusedElem,H=y.selectionRange;if(A!==z&&z&&z.ownerDocument&&ug(z.ownerDocument.documentElement,z)){if(H!==null&&Cf(z)){var se=H.start,he=H.end;if(he===void 0&&(he=se),"selectionStart"in z)z.selectionStart=se,z.selectionEnd=Math.min(he,z.value.length);else{var me=z.ownerDocument||document,le=me&&me.defaultView||window;if(le.getSelection){var ce=le.getSelection(),je=z.textContent.length,qe=Math.min(H.start,je),Ot=H.end===void 0?qe:Math.min(H.end,je);!ce.extend&&qe>Ot&&(A=Ot,Ot=qe,qe=A);var J=lg(z,qe),Q=lg(z,Ot);if(J&&Q&&(ce.rangeCount!==1||ce.anchorNode!==J.node||ce.anchorOffset!==J.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var oe=me.createRange();oe.setStart(J.node,J.offset),ce.removeAllRanges(),qe>Ot?(ce.addRange(oe),ce.extend(Q.node,Q.offset)):(oe.setEnd(Q.node,Q.offset),ce.addRange(oe))}}}}for(me=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&me.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<me.length;z++){var pe=me[z];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Hu=!!eh,th=eh=null}finally{yt=p,B.p=u,K.T=o}}n.current=a,vn=2}}function T0(){if(vn===2){vn=0;var n=ti,a=zo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{Jy(n,a.alternate,a)}finally{yt=p,B.p=u,K.T=o}}vn=3}}function C0(){if(vn===4||vn===3){vn=0,ke();var n=ti,a=zo,o=Oa,u=d0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vn=5:(vn=0,zo=ti=null,O0(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ei=null),Vr(o),a=a.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(Vt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=B.p,B.p=2,K.T=null;try{for(var y=n.onRecoverableError,A=0;A<u.length;A++){var z=u[A];y(z.value,{componentStack:z.stack})}}finally{K.T=a,B.p=p}}(Oa&3)!==0&&Du(),ia(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===qd?Zs++:(Zs=0,qd=n):Zs=0,Xs(0)}}function O0(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,Ms(a)))}function Du(){return _0(),T0(),C0(),R0()}function R0(){if(vn!==5)return!1;var n=ti,a=Ld;Ld=0;var o=Vr(Oa),u=K.T,p=B.p;try{B.p=32>o?32:o,K.T=null,o=Ud,Ud=null;var y=ti,A=Oa;if(vn=0,zo=ti=null,Oa=0,(yt&6)!==0)throw Error(i(331));var z=yt;if(yt|=4,u0(y.current),o0(y,y.current,A,o),yt=z,Xs(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Vt,y)}catch{}return!0}finally{B.p=p,K.T=u,O0(n,a)}}function A0(n,a,o){a=xr(o,a),a=bd(n.stateNode,a,2),n=Ya(n,a,2),n!==null&&(ft(n,2),ia(n))}function xt(n,a,o){if(n.tag===3)A0(n,n,o);else for(;a!==null;){if(a.tag===3){A0(a,n,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ei===null||!ei.has(u))){n=xr(o,n),o=My(2),u=Ya(a,o,2),u!==null&&(jy(o,u,a,n),ft(u,2),ia(u));break}}a=a.return}}function Bd(n,a,o){var u=n.pingCache;if(u===null){u=n.pingCache=new qE;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||($d=!0,p.add(o),n=GE.bind(null,n,a,o),a.then(n,n))}function GE(n,a,o){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,At===n&&(at&o)===o&&(Zt===4||Zt===3&&(at&62914560)===at&&300>Ue()-Ou?(yt&2)===0&&$o(n,0):Pd|=o,No===at&&(No=0)),ia(n)}function M0(n,a){a===0&&(a=Sr()),n=$i(n,a),n!==null&&(ft(n,a),ia(n))}function KE(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),M0(n,o)}function YE(n,a){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),M0(n,o)}function ZE(n,a){return Be(n,a)}var Nu=null,Io=null,Hd=!1,zu=!1,Gd=!1,ri=0;function ia(n){n!==Io&&n.next===null&&(Io===null?Nu=Io=n:Io=Io.next=n),zu=!0,Hd||(Hd=!0,QE())}function Xs(n,a){if(!Gd&&zu){Gd=!0;do for(var o=!1,u=Nu;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var A=u.suspendedLanes,z=u.pingedLanes;y=(1<<31-Rt(42|n)+1)-1,y&=p&~(A&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,N0(u,y))}else y=at,y=xn(u,u===At?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||Kt(u,y)||(o=!0,N0(u,y));u=u.next}while(o);Gd=!1}}function XE(){j0()}function j0(){zu=Hd=!1;var n=0;ri!==0&&sx()&&(n=ri);for(var a=Ue(),o=null,u=Nu;u!==null;){var p=u.next,y=k0(u,a);y===0?(u.next=null,o===null?Nu=p:o.next=p,p===null&&(Io=o)):(o=u,(n!==0||(y&3)!==0)&&(zu=!0)),u=p}vn!==0&&vn!==5||Xs(n),ri!==0&&(ri=0)}function k0(n,a){for(var o=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Rt(y),z=1<<A,H=p[A];H===-1?((z&o)===0||(z&u)!==0)&&(p[A]=sr(z,a)):H<=a&&(n.expiredLanes|=z),y&=~z}if(a=At,o=at,o=xn(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===a&&(Et===2||Et===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Fe(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Kt(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(u!==null&&Fe(u),Vr(o)){case 2:case 8:o=Ae;break;case 32:o=xe;break;case 268435456:o=Ke;break;default:o=xe}return u=D0.bind(null,n),o=Be(o,u),n.callbackPriority=a,n.callbackNode=o,a}return u!==null&&u!==null&&Fe(u),n.callbackPriority=2,n.callbackNode=null,2}function D0(n,a){if(vn!==0&&vn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(Du()&&n.callbackNode!==o)return null;var u=at;return u=xn(n,n===At?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(p0(n,u,a),k0(n,Ue()),n.callbackNode!=null&&n.callbackNode===o?D0.bind(null,n):null)}function N0(n,a){if(Du())return null;p0(n,a,!0)}function QE(){ux(function(){(yt&6)!==0?Be(Mt,XE):j0()})}function Kd(){if(ri===0){var n=xo;n===0&&(n=Tn,Tn<<=1,(Tn&261888)===0&&(Tn=256)),ri=n}return ri}function z0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ye(""+n)}function $0(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function WE(n,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=z0((p[sn]||null).action),A=u.submitter;A&&(a=(a=A[sn]||null)?z0(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var z=new ki("action","action",null,u,p);n.push({event:z,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ri!==0){var H=A?$0(p,A):new FormData(p);hd(o,{pending:!0,data:H,method:p.method,action:y},null,H)}}else typeof y=="function"&&(z.preventDefault(),H=A?$0(p,A):new FormData(p),hd(o,{pending:!0,data:H,method:p.method,action:y},y,H))},currentTarget:p}]})}}for(var Yd=0;Yd<Mf.length;Yd++){var Zd=Mf[Yd],JE=Zd.toLowerCase(),ex=Zd[0].toUpperCase()+Zd.slice(1);Fr(JE,"on"+ex)}Fr(hg,"onAnimationEnd"),Fr(pg,"onAnimationIteration"),Fr(mg,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(gE,"onTransitionRun"),Fr(yE,"onTransitionStart"),Fr(vE,"onTransitionCancel"),Fr(gg,"onTransitionEnd"),wi("onMouseEnter",["mouseout","mouseover"]),wi("onMouseLeave",["mouseout","mouseover"]),wi("onPointerEnter",["pointerout","pointerover"]),wi("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qs="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(" "),tx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qs));function P0(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var A=u.length-1;0<=A;A--){var z=u[A],H=z.instance,se=z.currentTarget;if(z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=se;try{y(p)}catch(he){Xl(he)}p.currentTarget=null,y=H}else for(A=0;A<u.length;A++){if(z=u[A],H=z.instance,se=z.currentTarget,z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=se;try{y(p)}catch(he){Xl(he)}p.currentTarget=null,y=H}}}}function nt(n,a){var o=a[Ua];o===void 0&&(o=a[Ua]=new Set);var u=n+"__bubble";o.has(u)||(I0(a,n,2,!1),o.add(u))}function Xd(n,a,o){var u=0;a&&(u|=4),I0(o,n,u,a)}var $u="_reactListening"+Math.random().toString(36).slice(2);function Qd(n){if(!n[$u]){n[$u]=!0,bc.forEach(function(o){o!=="selectionchange"&&(tx.has(o)||Xd(o,!1,n),Xd(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[$u]||(a[$u]=!0,Xd("selectionchange",!1,a))}}function I0(n,a,o,u){switch(hv(a)){case 2:var p=Ax;break;case 8:p=Mx;break;default:p=dh}o=p.bind(null,a,o,n),p=void 0,!wr||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Wd(n,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var z=u.stateNode.containerInfo;if(z===p)break;if(A===4)for(A=u.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;z!==null;){if(A=Oi(z),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){u=y=A;continue e}z=z.parentNode}}u=u.return}hn(function(){var se=y,he=Ye(o),me=[];e:{var le=yg.get(n);if(le!==void 0){var ce=ki,je=n;switch(n){case"keypress":if(Ei(o)===0)break e;case"keydown":case"keyup":ce=Y2;break;case"focusin":je="focus",ce=wf;break;case"focusout":je="blur",ce=wf;break;case"beforeblur":case"afterblur":ce=wf;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Gm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=$2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=Q2;break;case hg:case pg:case mg:ce=L2;break;case gg:ce=J2;break;case"scroll":case"scrollend":ce=Sf;break;case"wheel":ce=tE;break;case"copy":case"cut":case"paste":ce=q2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Ym;break;case"toggle":case"beforetoggle":ce=rE}var qe=(a&4)!==0,Ot=!qe&&(n==="scroll"||n==="scrollend"),J=qe?le!==null?le+"Capture":null:le;qe=[];for(var Q=se,oe;Q!==null;){var pe=Q;if(oe=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||oe===null||J===null||(pe=bt(Q,J),pe!=null&&qe.push(Ws(Q,pe,oe))),Ot)break;Q=Q.return}0<qe.length&&(le=new ce(le,je,null,o,he),me.push({event:le,listeners:qe}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",le&&o!==Ie&&(je=o.relatedTarget||o.fromElement)&&(Oi(je)||je[Ir]))break e;if((ce||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(je=o.relatedTarget||o.toElement,ce=se,je=je?Oi(je):null,je!==null&&(Ot=l(je),qe=je.tag,je!==Ot||qe!==5&&qe!==27&&qe!==6)&&(je=null)):(ce=null,je=se),ce!==je)){if(qe=Gm,pe="onMouseLeave",J="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(qe=Ym,pe="onPointerLeave",J="onPointerEnter",Q="pointer"),Ot=ce==null?le:fo(ce),oe=je==null?le:fo(je),le=new qe(pe,Q+"leave",ce,o,he),le.target=Ot,le.relatedTarget=oe,pe=null,Oi(he)===se&&(qe=new qe(J,Q+"enter",je,o,he),qe.target=oe,qe.relatedTarget=Ot,pe=qe),Ot=pe,ce&&je)t:{for(qe=nx,J=ce,Q=je,oe=0,pe=J;pe;pe=qe(pe))oe++;pe=0;for(var Le=Q;Le;Le=qe(Le))pe++;for(;0<oe-pe;)J=qe(J),oe--;for(;0<pe-oe;)Q=qe(Q),pe--;for(;oe--;){if(J===Q||Q!==null&&J===Q.alternate){qe=J;break t}J=qe(J),Q=qe(Q)}qe=null}else qe=null;ce!==null&&L0(me,le,ce,qe,!1),je!==null&&Ot!==null&&L0(me,Ot,je,qe,!0)}}e:{if(le=se?fo(se):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var dt=ng;else if(eg(le))if(rg)dt=hE;else{dt=fE;var ze=cE}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&ge(se.elementType)&&(dt=ng):dt=dE;if(dt&&(dt=dt(n,se))){tg(me,dt,o,he);break e}ze&&ze(n,le,se),n==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Gl(le,"number",le.value)}switch(ze=se?fo(se):window,n){case"focusin":(eg(ze)||ze.contentEditable==="true")&&(mo=ze,Of=se,Os=null);break;case"focusout":Os=Of=mo=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,fg(me,o,he);break;case"selectionchange":if(mE)break;case"keydown":case"keyup":fg(me,o,he)}var Qe;if(xf)e:{switch(n){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else po?Wm(n,o)&&(it="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(it="onCompositionStart");it&&(Zm&&o.locale!=="ko"&&(po||it!=="onCompositionStart"?it==="onCompositionEnd"&&po&&(Qe=rs()):(rr=he,Jr="value"in rr?rr.value:rr.textContent,po=!0)),ze=Pu(se,it),0<ze.length&&(it=new Km(it,n,null,o,he),me.push({event:it,listeners:ze}),Qe?it.data=Qe:(Qe=Jm(o),Qe!==null&&(it.data=Qe)))),(Qe=iE?oE(n,o):sE(n,o))&&(it=Pu(se,"onBeforeInput"),0<it.length&&(ze=new Km("onBeforeInput","beforeinput",null,o,he),me.push({event:ze,listeners:it}),ze.data=Qe)),WE(me,n,se,o,he)}P0(me,a)})}function Ws(n,a,o){return{instance:n,listener:a,currentTarget:o}}function Pu(n,a){for(var o=a+"Capture",u=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=bt(n,o),p!=null&&u.unshift(Ws(n,p,y)),p=bt(n,a),p!=null&&u.push(Ws(n,p,y))),n.tag===3)return u;n=n.return}return[]}function nx(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function L0(n,a,o,u,p){for(var y=a._reactName,A=[];o!==null&&o!==u;){var z=o,H=z.alternate,se=z.stateNode;if(z=z.tag,H!==null&&H===u)break;z!==5&&z!==26&&z!==27||se===null||(H=se,p?(se=bt(o,y),se!=null&&A.unshift(Ws(o,se,H))):p||(se=bt(o,y),se!=null&&A.push(Ws(o,se,H)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var rx=/\r\n?/g,ax=/\u0000|\uFFFD/g;function U0(n){return(typeof n=="string"?n:""+n).replace(rx,`
160
+ `).replace(ax,"")}function q0(n,a){return a=U0(a),U0(n)===a}function Ct(n,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||ne(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&ne(n,""+u);break;case"className":ns(n,"class",u);break;case"tabIndex":ns(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ns(n,o,u);break;case"style":W(n,u,y);break;case"data":if(a!=="object"){ns(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(o==="formAction"?(a!=="input"&&Ct(n,a,"name",p.name,p,null),Ct(n,a,"formEncType",p.formEncType,p,null),Ct(n,a,"formMethod",p.formMethod,p,null),Ct(n,a,"formTarget",p.formTarget,p,null)):(Ct(n,a,"encType",p.encType,p,null),Ct(n,a,"method",p.method,p,null),Ct(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=Me);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=ye(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":nt("beforetoggle",n),nt("toggle",n),ws(n,"popover",u);break;case"xlinkActuate":Wr(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Wr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Wr(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Wr(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Wr(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Wr(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ws(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Re.get(o)||o,ws(n,o,u))}}function Jd(n,a,o,u,p,y){switch(o){case"style":W(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof u=="string"?ne(n,u):(typeof u=="number"||typeof u=="bigint")&&ne(n,""+u);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Me);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=n[sn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,u,p);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):ws(n,o,u)}}}function Nn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",n),nt("load",n);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,y,A,o,null)}}p&&Ct(n,a,"srcSet",o.srcSet,o,null),u&&Ct(n,a,"src",o.src,o,null);return;case"input":nt("invalid",n);var z=y=A=p=null,H=null,se=null;for(u in o)if(o.hasOwnProperty(u)){var he=o[u];if(he!=null)switch(u){case"name":p=he;break;case"type":A=he;break;case"checked":H=he;break;case"defaultChecked":se=he;break;case"value":y=he;break;case"defaultValue":z=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,a));break;default:Ct(n,a,u,he,o,null)}}vf(n,y,z,H,se,A,p,!1);return;case"select":nt("invalid",n),u=A=y=null;for(p in o)if(o.hasOwnProperty(p)&&(z=o[p],z!=null))switch(p){case"value":y=z;break;case"defaultValue":A=z;break;case"multiple":u=z;default:Ct(n,a,p,z,o,null)}a=y,o=A,n.multiple=!!u,a!=null?Mi(n,!!u,a,!1):o!=null&&Mi(n,!!u,o,!0);return;case"textarea":nt("invalid",n),y=p=u=null;for(A in o)if(o.hasOwnProperty(A)&&(z=o[A],z!=null))switch(A){case"value":u=z;break;case"defaultValue":p=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(91));break;default:Ct(n,a,A,z,o,null)}bf(n,u,p,y);return;case"option":for(H in o)o.hasOwnProperty(H)&&(u=o[H],u!=null)&&(H==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":Ct(n,a,H,u,o,null));return;case"dialog":nt("beforetoggle",n),nt("toggle",n),nt("cancel",n),nt("close",n);break;case"iframe":case"object":nt("load",n);break;case"video":case"audio":for(u=0;u<Qs.length;u++)nt(Qs[u],n);break;case"image":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"embed":case"source":case"link":nt("error",n),nt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in o)if(o.hasOwnProperty(se)&&(u=o[se],u!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,se,u,o,null)}return;default:if(ge(a)){for(he in o)o.hasOwnProperty(he)&&(u=o[he],u!==void 0&&Jd(n,a,he,u,o,void 0));return}}for(z in o)o.hasOwnProperty(z)&&(u=o[z],u!=null&&Ct(n,a,z,u,o,null))}function ix(n,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,A=null,z=null,H=null,se=null,he=null;for(ce in o){var me=o[ce];if(o.hasOwnProperty(ce)&&me!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":H=me;default:u.hasOwnProperty(ce)||Ct(n,a,ce,null,u,me)}}for(var le in u){var ce=u[le];if(me=o[le],u.hasOwnProperty(le)&&(ce!=null||me!=null))switch(le){case"type":y=ce;break;case"name":p=ce;break;case"checked":se=ce;break;case"defaultChecked":he=ce;break;case"value":A=ce;break;case"defaultValue":z=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==me&&Ct(n,a,le,ce,u,me)}}Hl(n,A,z,H,se,he,y,p);return;case"select":ce=A=z=le=null;for(y in o)if(H=o[y],o.hasOwnProperty(y)&&H!=null)switch(y){case"value":break;case"multiple":ce=H;default:u.hasOwnProperty(y)||Ct(n,a,y,null,u,H)}for(p in u)if(y=u[p],H=o[p],u.hasOwnProperty(p)&&(y!=null||H!=null))switch(p){case"value":le=y;break;case"defaultValue":z=y;break;case"multiple":A=y;default:y!==H&&Ct(n,a,p,y,u,H)}a=z,o=A,u=ce,le!=null?Mi(n,!!o,le,!1):!!u!=!!o&&(a!=null?Mi(n,!!o,a,!0):Mi(n,!!o,o?[]:"",!1));return;case"textarea":ce=le=null;for(z in o)if(p=o[z],o.hasOwnProperty(z)&&p!=null&&!u.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Ct(n,a,z,null,u,p)}for(A in u)if(p=u[A],y=o[A],u.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&Ct(n,a,A,p,u,y)}vl(n,le,ce);return;case"option":for(var je in o)le=o[je],o.hasOwnProperty(je)&&le!=null&&!u.hasOwnProperty(je)&&(je==="selected"?n.selected=!1:Ct(n,a,je,null,u,le));for(H in u)le=u[H],ce=o[H],u.hasOwnProperty(H)&&le!==ce&&(le!=null||ce!=null)&&(H==="selected"?n.selected=le&&typeof le!="function"&&typeof le!="symbol":Ct(n,a,H,le,u,ce));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var qe in o)le=o[qe],o.hasOwnProperty(qe)&&le!=null&&!u.hasOwnProperty(qe)&&Ct(n,a,qe,null,u,le);for(se in u)if(le=u[se],ce=o[se],u.hasOwnProperty(se)&&le!==ce&&(le!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:Ct(n,a,se,le,u,ce)}return;default:if(ge(a)){for(var Ot in o)le=o[Ot],o.hasOwnProperty(Ot)&&le!==void 0&&!u.hasOwnProperty(Ot)&&Jd(n,a,Ot,void 0,u,le);for(he in u)le=u[he],ce=o[he],!u.hasOwnProperty(he)||le===ce||le===void 0&&ce===void 0||Jd(n,a,he,le,u,ce);return}}for(var J in o)le=o[J],o.hasOwnProperty(J)&&le!=null&&!u.hasOwnProperty(J)&&Ct(n,a,J,null,u,le);for(me in u)le=u[me],ce=o[me],!u.hasOwnProperty(me)||le===ce||le==null&&ce==null||Ct(n,a,me,le,u,ce)}function V0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ox(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,A=p.initiatorType,z=p.duration;if(y&&z&&V0(A)){for(A=0,z=p.responseEnd,u+=1;u<o.length;u++){var H=o[u],se=H.startTime;if(se>z)break;var he=H.transferSize,me=H.initiatorType;he&&V0(me)&&(H=H.responseEnd,A+=he*(H<z?1:(z-se)/(H-se)))}if(--u,a+=8*(y+A)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var eh=null,th=null;function Iu(n){return n.nodeType===9?n:n.ownerDocument}function F0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function B0(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function nh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var rh=null;function sx(){var n=window.event;return n&&n.type==="popstate"?n===rh?!1:(rh=n,!0):(rh=null,!1)}var H0=typeof setTimeout=="function"?setTimeout:void 0,lx=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,ux=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(n){return G0.resolve(null).then(n).catch(cx)}:H0;function cx(n){setTimeout(function(){throw n})}function ai(n){return n==="head"}function K0(n,a){var o=a,u=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(p),Vo(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Js(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Js(o);for(var y=o.firstChild;y;){var A=y.nextSibling,z=y.nodeName;y[co]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=A}}else o==="body"&&Js(n.ownerDocument.body);o=p}while(o);Vo(a)}function Y0(n,a){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function ah(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":ah(o),Vl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function fx(n,a,o,u){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[co])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Rr(n.nextSibling),n===null)break}return null}function dx(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Rr(n.nextSibling),n===null))return null;return n}function Z0(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Rr(n.nextSibling),n===null))return null;return n}function ih(n){return n.data==="$?"||n.data==="$~"}function oh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function hx(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Rr(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var sh=null;function X0(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Rr(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Q0(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function W0(n,a,o){switch(a=Iu(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Js(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Vl(n)}var Ar=new Map,J0=new Set;function Lu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ra=B.d;B.d={f:px,r:mx,D:gx,C:yx,L:vx,m:bx,X:wx,S:Sx,M:Ex};function px(){var n=Ra.f(),a=Mu();return n||a}function mx(n){var a=Ri(n);a!==null&&a.tag===5&&a.type==="form"?gy(a):Ra.r(n)}var Lo=typeof document>"u"?null:document;function ev(n,a,o){var u=Lo;if(u&&typeof a=="string"&&a){var p=Bn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),J0.has(p)||(J0.add(p),n={rel:n,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function gx(n){Ra.D(n),ev("dns-prefetch",n,null)}function yx(n,a){Ra.C(n,a),ev("preconnect",n,a)}function vx(n,a,o){Ra.L(n,a,o);var u=Lo;if(u&&n&&a){var p='link[rel="preload"][as="'+Bn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Bn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Bn(o.imageSizes)+'"]')):p+='[href="'+Bn(n)+'"]';var y=p;switch(a){case"style":y=Uo(n);break;case"script":y=qo(n)}Ar.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Ar.set(y,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(el(y))||a==="script"&&u.querySelector(tl(y))||(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function bx(n,a){Ra.m(n,a);var o=Lo;if(o&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Bn(u)+'"][href="'+Bn(n)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=qo(n)}if(!Ar.has(y)&&(n=g({rel:"modulepreload",href:n},a),Ar.set(y,n),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(tl(y)))return}u=o.createElement("link"),Nn(u,"link",n),yn(u),o.head.appendChild(u)}}}function Sx(n,a,o){Ra.S(n,a,o);var u=Lo;if(u&&n){var p=Ai(u).hoistableStyles,y=Uo(n);a=a||"default";var A=p.get(y);if(!A){var z={loading:0,preload:null};if(A=u.querySelector(el(y)))z.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Ar.get(y))&&lh(n,o);var H=A=u.createElement("link");yn(H),Nn(H,"link",n),H._p=new Promise(function(se,he){H.onload=se,H.onerror=he}),H.addEventListener("load",function(){z.loading|=1}),H.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Uu(A,a,u)}A={type:"stylesheet",instance:A,count:1,state:z},p.set(y,A)}}}function wx(n,a){Ra.X(n,a);var o=Lo;if(o&&n){var u=Ai(o).hoistableScripts,p=qo(n),y=u.get(p);y||(y=o.querySelector(tl(p)),y||(n=g({src:n,async:!0},a),(a=Ar.get(p))&&uh(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Ex(n,a){Ra.M(n,a);var o=Lo;if(o&&n){var u=Ai(o).hoistableScripts,p=qo(n),y=u.get(p);y||(y=o.querySelector(tl(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=Ar.get(p))&&uh(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function tv(n,a,o,u){var p=(p=ee.current)?Lu(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Uo(o.href),o=Ai(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Uo(o.href);var y=Ai(p).hoistableStyles,A=y.get(n);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,A),(y=p.querySelector(el(n)))&&!y._p&&(A.instance=y,A.state.loading=5),Ar.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Ar.set(n,o),y||xx(p,n,o,A.state))),a&&u===null)throw Error(i(528,""));return A}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=qo(o),o=Ai(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Uo(n){return'href="'+Bn(n)+'"'}function el(n){return'link[rel="stylesheet"]['+n+"]"}function nv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function xx(n,a,o,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Nn(a,"link",o),yn(a),n.head.appendChild(a))}function qo(n){return'[src="'+Bn(n)+'"]'}function tl(n){return"script[async]"+n}function rv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Bn(o.href)+'"]');if(u)return a.instance=u,yn(u),u;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),yn(u),Nn(u,"style",p),Uu(u,o.precedence,n),a.instance=u;case"stylesheet":p=Uo(o.href);var y=n.querySelector(el(p));if(y)return a.state.loading|=4,a.instance=y,yn(y),y;u=nv(o),(p=Ar.get(p))&&lh(u,p),y=(n.ownerDocument||n).createElement("link"),yn(y);var A=y;return A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),a.state.loading|=4,Uu(y,o.precedence,n),a.instance=y;case"script":return y=qo(o.src),(p=n.querySelector(tl(y)))?(a.instance=p,yn(p),p):(u=o,(p=Ar.get(y))&&(u=g({},o),uh(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),yn(p),Nn(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Uu(u,o.precedence,n));return a.instance}function Uu(n,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,A=0;A<u.length;A++){var z=u[A];if(z.dataset.precedence===a)y=z;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function lh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function uh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var qu=null;function av(n,a,o){if(qu===null){var u=new Map,p=qu=new Map;p.set(o,u)}else p=qu,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[co]||y[$t]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var z=u.get(A);z?z.push(y):u.set(A,[y])}}return u}function iv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function _x(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function ov(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Tx(n,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Uo(u.href),y=a.querySelector(el(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Vu.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,yn(y);return}y=a.ownerDocument||a,u=nv(u),(p=Ar.get(p))&&lh(u,p),y=y.createElement("link"),yn(y);var A=y;A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Vu.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var ch=0;function Cx(n,a){return n.stylesheets&&n.count===0&&Bu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&Bu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&ch===0&&(ch=62500*ox());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Bu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>ch?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Fu=null;function Bu(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Fu=new Map,a.forEach(Ox,n),Fu=null,Vu.call(n))}function Ox(n,a){if(!(a.state.loading&4)){var o=Fu.get(n);if(o)var u=o.get(null);else{o=new Map,Fu.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var A=p[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(o.set(A.dataset.precedence,A),u=A)}u&&o.set(null,u)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||u,y===u&&o.set(null,p),o.set(A,p),this.count++,u=Vu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var nl={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Rx(n,a,o,u,p,y,A,z,H){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qr(0),this.hiddenUpdates=qr(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function sv(n,a,o,u,p,y,A,z,H,se,he,me){return n=new Rx(n,a,o,A,H,se,he,me,z),a=1,y===!0&&(a|=24),y=ur(3,null,null,a),n.current=y,y.stateNode=n,a=Ff(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},Kf(y),n}function lv(n){return n?(n=vo,n):vo}function uv(n,a,o,u,p,y){p=lv(p),u.context===null?u.context=p:u.pendingContext=p,u=Ka(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Ya(n,u,a),o!==null&&(Jn(o,n,a),Ns(o,n,a))}function cv(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function fh(n,a){cv(n,a),(n=n.alternate)&&cv(n,a)}function fv(n){if(n.tag===13||n.tag===31){var a=$i(n,67108864);a!==null&&Jn(a,n,67108864),fh(n,67108864)}}function dv(n){if(n.tag===13||n.tag===31){var a=pr();a=Ft(a);var o=$i(n,a);o!==null&&Jn(o,n,a),fh(n,a)}}var Hu=!0;function Ax(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=2,dh(n,a,o,u)}finally{B.p=y,K.T=p}}function Mx(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=8,dh(n,a,o,u)}finally{B.p=y,K.T=p}}function dh(n,a,o,u){if(Hu){var p=hh(u);if(p===null)Wd(n,a,u,Gu,o),pv(n,u);else if(kx(p,n,a,o,u))u.stopPropagation();else if(pv(n,u),a&4&&-1<jx.indexOf(n)){for(;p!==null;){var y=Ri(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Dt(y.pendingLanes);if(A!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;A;){var H=1<<31-Rt(A);z.entanglements[1]|=H,A&=~H}ia(y),(yt&6)===0&&(Ru=Ue()+500,Xs(0))}}break;case 31:case 13:z=$i(y,2),z!==null&&Jn(z,y,2),Mu(),fh(y,2)}if(y=hh(u),y===null&&Wd(n,a,u,Gu,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else Wd(n,a,u,null,o)}}function hh(n){return n=Ye(n),ph(n)}var Gu=null;function ph(n){if(Gu=null,n=Oi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=c(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Gu=n,null}function hv(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xe()){case Mt:return 2;case Ae:return 8;case xe:case Ne:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var mh=!1,ii=null,oi=null,si=null,rl=new Map,al=new Map,li=[],jx="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".split(" ");function pv(n,a){switch(n){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":rl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":al.delete(a.pointerId)}}function il(n,a,o,u,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=Ri(a),a!==null&&fv(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function kx(n,a,o,u,p){switch(a){case"focusin":return ii=il(ii,n,a,o,u,p),!0;case"dragenter":return oi=il(oi,n,a,o,u,p),!0;case"mouseover":return si=il(si,n,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return rl.set(y,il(rl.get(y)||null,n,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,al.set(y,il(al.get(y)||null,n,a,o,u,p)),!0}return!1}function mv(n){var a=Oi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){n.blockedOn=a,$a(n.priority,function(){dv(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,$a(n.priority,function(){dv(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Ku(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=hh(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);Ie=u,o.target.dispatchEvent(u),Ie=null}else return a=Ri(o),a!==null&&fv(a),n.blockedOn=o,!1;a.shift()}return!0}function gv(n,a,o){Ku(n)&&o.delete(a)}function Dx(){mh=!1,ii!==null&&Ku(ii)&&(ii=null),oi!==null&&Ku(oi)&&(oi=null),si!==null&&Ku(si)&&(si=null),rl.forEach(gv),al.forEach(gv)}function Yu(n,a){n.blockedOn===a&&(n.blockedOn=null,mh||(mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Dx)))}var Zu=null;function yv(n){Zu!==n&&(Zu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zu===n&&(Zu=null);for(var a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(ph(u||o)===null)continue;break}var y=Ri(o);y!==null&&(n.splice(a,3),a-=3,hd(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function Vo(n){function a(H){return Yu(H,n)}ii!==null&&Yu(ii,n),oi!==null&&Yu(oi,n),si!==null&&Yu(si,n),rl.forEach(a),al.forEach(a);for(var o=0;o<li.length;o++){var u=li[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<li.length&&(o=li[0],o.blockedOn===null);)mv(o),o.blockedOn===null&&li.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],A=p[sn]||null;if(typeof y=="function")A||yv(o);else if(A){var z=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[sn]||null)z=A.formAction;else if(ph(p)!==null)continue}else z=A.action;typeof z=="function"?o[u+1]=z:(o.splice(u,3),u-=3),yv(o)}}}function vv(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function gh(n){this._internalRoot=n}Xu.prototype.render=gh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=pr();uv(o,u,n,a,null,null)},Xu.prototype.unmount=gh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;uv(n.current,2,null,n,null,null),Mu(),a[Ir]=null}};function Xu(n){this._internalRoot=n}Xu.prototype.unstable_scheduleHydration=function(n){if(n){var a=Pr();n={blockedOn:null,target:n,priority:a};for(var o=0;o<li.length&&a!==0&&a<li[o].priority;o++);li.splice(o,0,n),o===0&&mv(n)}};var bv=t.version;if(bv!=="19.2.3")throw Error(i(527,bv,"19.2.3"));B.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=h(a),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var Nx={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qu.isDisabled&&Qu.supportsFiber)try{Vt=Qu.inject(Nx),wt=Qu}catch{}}return Dv.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,u="",p=Cy,y=Oy,A=Ry;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=sv(n,1,!1,null,null,o,u,null,p,y,A,vv),n[Ir]=a.current,Qd(n),new gh(a)},Dv.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var u=!1,p="",y=Cy,A=Oy,z=Ry,H=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(z=o.onRecoverableError),o.formState!==void 0&&(H=o.formState)),a=sv(n,1,!0,a,o??null,u,p,H,y,A,z,vv),a.context=lv(null),o=a.current,u=pr(),u=Ft(u),p=Ka(u),p.callback=null,Ya(o,p,u),o=u,a.current.lanes=o,ft(a,o),ia(a),n[Ir]=a.current,Qd(n),new Xu(a)},Dv.version="19.2.3",Dv}var IN;function PEe(){if(IN)return PT.exports;IN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),PT.exports=$Ee(),PT.exports}PEe();function IEe(e,t,r,i,s){return{callTool:async(c,f)=>{t("callTool",{name:c,args:f});const d=await i(c,f??{});return t("← callTool response",d,"response"),d},sendFollowUpMessage:async c=>{t("sendFollowUpMessage",c)},openExternal:c=>{t("openExternal",c)},requestDisplayMode:async c=>(t("requestDisplayMode",c),e.displayMode=c.mode,r("displayMode",c.mode),{mode:c.mode}),setWidgetState:async c=>{t("setWidgetState",c),e.widgetState=c,r("widgetState",c)},requestModal:async c=>{t("requestModal",c),e.displayMode="modal",e.view={mode:"modal"},r("displayMode","modal")},uploadFile:async c=>(t("uploadFile",{name:c.name,size:c.size}),{fileId:"123"}),getFileDownloadUrl:async c=>(t("getFileDownloadUrl",c),{downloadUrl:"https://example.com/file.pdf"}),setOpenInAppUrl:async c=>{t("setOpenInAppUrl",c),s(c.href)}}}function LEe(e,t){const r=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(i,s,l,c){const f=Reflect.set(i,s,l,c);if(r.includes(s)){const d=new tEe(SU,{detail:{globals:{[s]:l}}});t.dispatchEvent(d)}return f}})}function UEe(e,t,r,i,s,l){const c=Ub(t),f=LEe(c,e),d=IEe(f,r,i,s,l);mB(f,d),e.openai=f}function qEe(e){const t=new DOMParser().parseFromString(e,"text/html"),r=t.querySelector('script[type="module"]#dev-widget-entry');if(!r)throw new Error("dev-widget-entry script not found");const i=`
161
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
162
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
163
+ if ("openai" in window && window.openai != null) { resolve(); return; }
164
+ Object.defineProperty(window, "openai", {
165
+ configurable: true,
166
+ enumerable: true,
167
+ get() { return undefined; },
168
+ set(value) {
169
+ Object.defineProperty(window, "openai", {
170
+ configurable: true,
171
+ enumerable: true,
172
+ writable: true,
173
+ value,
174
+ });
175
+ resolve();
176
+ },
177
+ });
178
+ });
179
+ `;return r.textContent=`
180
+ ${i}
181
+ await waitForOpenAI();
182
+ ${r.textContent}
183
+ `,t.head.innerHTML+t.body.innerHTML}const VEe=()=>{const e=ff(),t=_m(e.name),{openaiObject:r}=t??{},{data:i}=V9(e._meta?.["openai/outputTemplate"]),{setToolData:s,pushOpenAiLog:l,updateOpenaiObject:c,setOpenInAppUrl:f}=xm(),d=j.useRef(null),h=j.useRef(null),m=j.useRef(!1),g=i.contents[0].text,v=j.useCallback(()=>{if(m.current)return;const S=d.current;if(!S||!S.contentWindow||!S.contentDocument)return;m.current=!0;const b=i.contents[0]._meta?.["openai/widgetDomain"];b&&typeof b=="string"&&f(e.name,b),UEe(S.contentWindow,r,(_,E,R="default")=>{l(e.name,{timestamp:Date.now(),command:_,args:E,type:R})},(_,E)=>{c(e.name,_,E)},(_,E)=>Om.callTool(_,E),_=>{f(e.name,_)}),S.contentDocument.open(),S.contentDocument.write(qEe(g)),S.contentDocument.close(),s(e.name,{openaiRef:d})},[r,l,s,c,f,e.name,g,i]);return j.useEffect(()=>{v()},[v]),k.jsx("div",{ref:h,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:k.jsx("iframe",{ref:d,src:"about:blank",onLoad:v,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin allow-forms",title:"html-preview"})})},FEe=()=>{const e=ff(),t=_m(e.name),{defaultLayout:r,onLayoutChange:i}=Nv({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:s,onLayoutChange:l}=Nv({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:c,onLayoutChange:f}=Nv({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:d,onLayoutChange:h}=Nv({id:"skybridge-devtools-main-section",storage:localStorage}),m=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return k.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:k.jsxs(Ap,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:d,onLayoutChange:h,children:[k.jsx(cl,{id:"top-section",minSize:"30",children:k.jsxs(Ap,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:r,onLayoutChange:i,children:[k.jsx(cl,{id:"input-column",minSize:"20",maxSize:"60",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(ZSe,{})})}),k.jsx(Mp,{className:"w-px bg-border"}),k.jsx(cl,{id:"output-column",minSize:"30",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(eEe,{})})})]})}),m&&k.jsxs(k.Fragment,{children:[k.jsx(Mp,{className:"h-px bg-border"}),k.jsx(cl,{id:"widget-section",minSize:"20",children:k.jsxs(Ap,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:c,onLayoutChange:f,children:[k.jsx(cl,{id:"widget-logs-panel",minSize:"30",children:k.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:k.jsxs(Ap,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:s,onLayoutChange:l,children:[k.jsx(cl,{id:"widget-panel",minSize:"20",maxSize:"80",children:k.jsx("div",{className:"h-full overflow-hidden",children:k.jsx(j.Suspense,{children:k.jsx(VEe,{})})})}),k.jsx(Mp,{className:"h-px bg-border"}),k.jsx(cl,{id:"logs-panel",minSize:"20",children:k.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:k.jsx(Z2e,{})})})]})})}),k.jsx(Mp,{className:"w-px bg-border"}),k.jsx(cl,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:k.jsx("div",{className:"overflow-auto",children:k.jsx(G2e,{})})})})]})})]})]})})};function BEe(){const e=q9(),[,t]=uR(),r=VR();return k.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:k.jsxs("aside",{className:"h-full flex flex-col",children:[k.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[k.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),k.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),k.jsx("div",{className:"flex-1 overflow-y-auto",children:k.jsx("div",{className:"p-2",children:e?.length===0?k.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools registered yet."}):k.jsx("div",{className:"space-y-1",children:e?.map(i=>{const s=i.name===r?.name;return k.jsxs("button",{type:"button",onClick:()=>t(i.name),className:en("w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",s&&"bg-accent text-accent-foreground"),children:[k.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[k.jsx("div",{className:en("font-semibold text-sm leading-tight truncate",s&&"text-accent-foreground"),children:i.name}),i.description&&k.jsx("div",{className:en("text-xs leading-snug text-muted-foreground","line-clamp-2",s&&"text-accent-foreground/80"),children:i.description})]}),s&&k.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},i.name)})})})})]})})}function HEe(){const e=VR(),{defaultLayout:t,onLayoutChange:r}=Nv({id:"skybridge-devtools-tools-list",storage:localStorage});return k.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[k.jsx(rie,{}),k.jsxs(Ap,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:r,children:[k.jsx(cl,{id:"tools-list",minSize:"15",maxSize:"40",children:k.jsx(BEe,{})}),k.jsx(Mp,{className:"w-px bg-border"}),k.jsx(cl,{id:"main-content",minSize:"30",children:k.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?k.jsx(FEe,{}):k.jsx(Pue,{})})})]})]})}const GEe=new mq;function KEe(){return k.jsx(gq,{client:GEe,children:k.jsx(Wq,{children:k.jsx(HEe,{})})})}HU.createRoot(document.getElementById("root")).render(k.jsx(j.StrictMode,{children:k.jsx(KEe,{})}))});export default YEe();