@skybridge/devtools 0.0.0-dev.fcccc51 → 0.0.0-dev.fd1d3d8

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,182 @@
1
+ var VV=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var N2e=VV((as,is)=>{function qV(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 u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).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 dS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ic(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c2={exports:{}},pb={};var E5;function FV(){if(E5)return pb;E5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var u=null;if(l!==void 0&&(u=""+l),s.key!==void 0&&(u=""+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:u,ref:s!==void 0?s:null,props:l}}return pb.Fragment=t,pb.jsx=r,pb.jsxs=r,pb}var x5;function BV(){return x5||(x5=1,c2.exports=FV()),c2.exports}var k=BV(),u2={exports:{}},It={};var _5;function HV(){if(_5)return It;_5=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"),u=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 x(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(){}},w=Object.assign,S={};function _(N,U,X){this.props=N,this.context=U,this.refs=S,this.updater=X||b}_.prototype.isReactComponent={},_.prototype.setState=function(N,U){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,U,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function E(){}E.prototype=_.prototype;function O(N,U,X){this.props=N,this.context=U,this.refs=S,this.updater=X||b}var T=O.prototype=new E;T.constructor=O,w(T,_.prototype),T.isPureReactComponent=!0;var C=Array.isArray;function R(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function I(N,U,X){var L=X.ref;return{$$typeof:e,type:N,key:U,ref:L!==void 0?L:null,props:X}}function B(N,U){return I(N.type,U,N.props)}function V(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function F(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(X){return U[X]})}var G=/\/+/g;function W(N,U){return typeof N=="object"&&N!==null&&N.key!=null?F(""+N.key):U.toString(36)}function te(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(R,R):(N.status="pending",N.then(function(U){N.status==="pending"&&(N.status="fulfilled",N.value=U)},function(U){N.status==="pending"&&(N.status="rejected",N.reason=U)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function H(N,U,X,L,Z){var ee=typeof N;(ee==="undefined"||ee==="boolean")&&(N=null);var de=!1;if(N===null)de=!0;else switch(ee){case"bigint":case"string":case"number":de=!0;break;case"object":switch(N.$$typeof){case e:case t:de=!0;break;case m:return de=N._init,H(de(N._payload),U,X,L,Z)}}if(de)return Z=Z(N),de=L===""?"."+W(N,0):L,C(Z)?(X="",de!=null&&(X=de.replace(G,"$&/")+"/"),H(Z,U,X,"",function(Ae){return Ae})):Z!=null&&(V(Z)&&(Z=B(Z,X+(Z.key==null||N&&N.key===Z.key?"":(""+Z.key).replace(G,"$&/")+"/")+de)),U.push(Z)),1;de=0;var ye=L===""?".":L+":";if(C(N))for(var Te=0;Te<N.length;Te++)L=N[Te],ee=ye+W(L,Te),de+=H(L,U,X,ee,Z);else if(Te=x(N),typeof Te=="function")for(N=Te.call(N),Te=0;!(L=N.next()).done;)L=L.value,ee=ye+W(L,Te++),de+=H(L,U,X,ee,Z);else if(ee==="object"){if(typeof N.then=="function")return H(te(N),U,X,L,Z);throw U=String(N),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return de}function J(N,U,X){if(N==null)return N;var L=[],Z=0;return H(N,L,"","",function(ee){return U.call(X,ee,Z++)}),L}function re(N){if(N._status===-1){var U=N._result;U=U(),U.then(function(X){(N._status===0||N._status===-1)&&(N._status=1,N._result=X)},function(X){(N._status===0||N._status===-1)&&(N._status=2,N._result=X)}),N._status===-1&&(N._status=0,N._result=U)}if(N._status===1)return N._result.default;throw N._result}var le=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=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(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ae={map:J,forEach:function(N,U,X){J(N,function(){U.apply(this,arguments)},X)},count:function(N){var U=0;return J(N,function(){U++}),U},toArray:function(N){return J(N,function(U){return U})||[]},only:function(N){if(!V(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return It.Activity=g,It.Children=ae,It.Component=_,It.Fragment=r,It.Profiler=s,It.PureComponent=O,It.StrictMode=i,It.Suspense=d,It.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,It.__COMPILER_RUNTIME={__proto__:null,c:function(N){return M.H.useMemoCache(N)}},It.cache=function(N){return function(){return N.apply(null,arguments)}},It.cacheSignal=function(){return null},It.cloneElement=function(N,U,X){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var L=w({},N.props),Z=N.key;if(U!=null)for(ee in U.key!==void 0&&(Z=""+U.key),U)!D.call(U,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&U.ref===void 0||(L[ee]=U[ee]);var ee=arguments.length-2;if(ee===1)L.children=X;else if(1<ee){for(var de=Array(ee),ye=0;ye<ee;ye++)de[ye]=arguments[ye+2];L.children=de}return I(N.type,Z,L)},It.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},It.createElement=function(N,U,X){var L,Z={},ee=null;if(U!=null)for(L in U.key!==void 0&&(ee=""+U.key),U)D.call(U,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(Z[L]=U[L]);var de=arguments.length-2;if(de===1)Z.children=X;else if(1<de){for(var ye=Array(de),Te=0;Te<de;Te++)ye[Te]=arguments[Te+2];Z.children=ye}if(N&&N.defaultProps)for(L in de=N.defaultProps,de)Z[L]===void 0&&(Z[L]=de[L]);return I(N,ee,Z)},It.createRef=function(){return{current:null}},It.forwardRef=function(N){return{$$typeof:f,render:N}},It.isValidElement=V,It.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:re}},It.memo=function(N,U){return{$$typeof:h,type:N,compare:U===void 0?null:U}},It.startTransition=function(N){var U=M.T,X={};M.T=X;try{var L=N(),Z=M.S;Z!==null&&Z(X,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(R,le)}catch(ee){le(ee)}finally{U!==null&&X.types!==null&&(U.types=X.types),M.T=U}},It.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},It.use=function(N){return M.H.use(N)},It.useActionState=function(N,U,X){return M.H.useActionState(N,U,X)},It.useCallback=function(N,U){return M.H.useCallback(N,U)},It.useContext=function(N){return M.H.useContext(N)},It.useDebugValue=function(){},It.useDeferredValue=function(N,U){return M.H.useDeferredValue(N,U)},It.useEffect=function(N,U){return M.H.useEffect(N,U)},It.useEffectEvent=function(N){return M.H.useEffectEvent(N)},It.useId=function(){return M.H.useId()},It.useImperativeHandle=function(N,U,X){return M.H.useImperativeHandle(N,U,X)},It.useInsertionEffect=function(N,U){return M.H.useInsertionEffect(N,U)},It.useLayoutEffect=function(N,U){return M.H.useLayoutEffect(N,U)},It.useMemo=function(N,U){return M.H.useMemo(N,U)},It.useOptimistic=function(N,U){return M.H.useOptimistic(N,U)},It.useReducer=function(N,U,X){return M.H.useReducer(N,U,X)},It.useRef=function(N){return M.H.useRef(N)},It.useState=function(N){return M.H.useState(N)},It.useSyncExternalStore=function(N,U,X){return M.H.useSyncExternalStore(N,U,X)},It.useTransition=function(){return M.H.useTransition()},It.version="19.2.4",It}var T5;function Cg(){return T5||(T5=1,u2.exports=HV()),u2.exports}var j=Cg();const Jo=ic(j),k1=qV({__proto__:null,default:Jo},[j]);var f2={exports:{}},mb={},d2={exports:{}},h2={};var C5;function GV(){return C5||(C5=1,(function(e){function t(H,J){var re=H.length;H.push(J);e:for(;0<re;){var le=re-1>>>1,ae=H[le];if(0<s(ae,J))H[le]=J,H[re]=ae,re=le;else break e}}function r(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var J=H[0],re=H.pop();if(re!==J){H[0]=re;e:for(var le=0,ae=H.length,N=ae>>>1;le<N;){var U=2*(le+1)-1,X=H[U],L=U+1,Z=H[L];if(0>s(X,re))L<ae&&0>s(Z,X)?(H[le]=Z,H[L]=re,le=L):(H[le]=X,H[U]=re,le=U);else if(L<ae&&0>s(Z,re))H[le]=Z,H[L]=re,le=L;else break e}}return J}function s(H,J){var re=H.sortIndex-J.sortIndex;return re!==0?re:H.id-J.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 u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],m=1,g=null,v=3,x=!1,b=!1,w=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function T(H){for(var J=r(h);J!==null;){if(J.callback===null)i(h);else if(J.startTime<=H)i(h),J.sortIndex=J.expirationTime,t(d,J);else break;J=r(h)}}function C(H){if(w=!1,T(H),!b)if(r(d)!==null)b=!0,R||(R=!0,F());else{var J=r(h);J!==null&&te(C,J.startTime-H)}}var R=!1,M=-1,D=5,I=-1;function B(){return S?!0:!(e.unstable_now()-I<D)}function V(){if(S=!1,R){var H=e.unstable_now();I=H;var J=!0;try{e:{b=!1,w&&(w=!1,E(M),M=-1),x=!0;var re=v;try{t:{for(T(H),g=r(d);g!==null&&!(g.expirationTime>H&&B());){var le=g.callback;if(typeof le=="function"){g.callback=null,v=g.priorityLevel;var ae=le(g.expirationTime<=H);if(H=e.unstable_now(),typeof ae=="function"){g.callback=ae,T(H),J=!0;break t}g===r(d)&&i(d),T(H)}else i(d);g=r(d)}if(g!==null)J=!0;else{var N=r(h);N!==null&&te(C,N.startTime-H),J=!1}}break e}finally{g=null,v=re,x=!1}J=void 0}}finally{J?F():R=!1}}}var F;if(typeof O=="function")F=function(){O(V)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,W=G.port2;G.port1.onmessage=V,F=function(){W.postMessage(null)}}else F=function(){_(V,0)};function te(H,J){M=_(function(){H(e.unstable_now())},J)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var J=3;break;default:J=v}var re=v;v=J;try{return H()}finally{v=re}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(H,J){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var re=v;v=H;try{return J()}finally{v=re}},e.unstable_scheduleCallback=function(H,J,re){var le=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?le+re:le):re=le,H){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=re+ae,H={id:m++,callback:J,priorityLevel:H,startTime:re,expirationTime:ae,sortIndex:-1},re>le?(H.sortIndex=re,t(h,H),r(d)===null&&H===r(h)&&(w?(E(M),M=-1):w=!0,te(C,re-le))):(H.sortIndex=ae,t(d,H),b||x||(b=!0,R||(R=!0,F()))),H},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(H){var J=v;return function(){var re=v;v=J;try{return H.apply(this,arguments)}finally{v=re}}}})(h2)),h2}var R5;function jz(){return R5||(R5=1,d2.exports=GV()),d2.exports}var p2={exports:{}},Mi={};var O5;function KV(){if(O5)return Mi;O5=1;var e=Cg();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 u=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 Mi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Mi.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)},Mi.flushSync=function(d){var h=u.T,m=i.p;try{if(u.T=null,i.p=2,d)return d()}finally{u.T=h,i.p=m,i.d.f()}},Mi.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))},Mi.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Mi.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,x=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:x}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Mi.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)},Mi.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})}},Mi.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)},Mi.requestFormReset=function(d){i.d.r(d)},Mi.unstable_batchedUpdates=function(d,h){return d(h)},Mi.useFormState=function(d,h,m){return u.H.useFormState(d,h,m)},Mi.useFormStatus=function(){return u.H.useHostTransitionStatus()},Mi.version="19.2.4",Mi}var A5;function kz(){if(A5)return p2.exports;A5=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(),p2.exports=KV(),p2.exports}var M5;function YV(){if(M5)return mb;M5=1;var e=jz(),t=Cg(),r=kz();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 u(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,c=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===c)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==c.return)o=p,c=y;else{for(var A=!1,z=p.child;z;){if(z===o){A=!0,o=p,c=y;break}if(z===c){A=!0,c=p,o=y;break}z=z.sibling}if(!A){for(z=y.child;z;){if(z===o){A=!0,o=y,c=p;break}if(z===c){A=!0,c=y,o=p;break}z=z.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==c)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"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function F(n){return n===null||typeof n!="object"?null:(n=V&&n[V]||n["@@iterator"],typeof n=="function"?n:null)}var G=Symbol.for("react.client.reference");function W(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===G?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList";case I:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case O:return n.displayName||"Context";case E:return(n._context.displayName||"Context")+".Consumer";case T: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:W(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return W(n(a))}catch{}}return null}var te=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},le=[],ae=-1;function N(n){return{current:n}}function U(n){0>ae||(n.current=le[ae],le[ae]=null,ae--)}function X(n,a){ae++,le[ae]=n.current,n.current=a}var L=N(null),Z=N(null),ee=N(null),de=N(null);function ye(n,a){switch(X(ee,a),X(Z,n),X(L,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Pv(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Pv(a),n=Iv(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}U(L),X(L,n)}function Te(){U(L),U(Z),U(ee)}function Ae(n){n.memoizedState!==null&&X(de,n);var a=L.current,o=Iv(a,n.type);a!==o&&(X(Z,n),X(L,o))}function ue(n){Z.current===n&&(U(L),U(Z)),de.current===n&&(U(de),pl._currentValue=re)}var be,Ee;function xe(n){if(be===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);be=a&&a[1]||"",Ee=-1<o.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+be+n+Ee}var Me=!1;function Ve(n,a){if(!n||Me)return"";Me=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ce){var se=ce}Reflect.construct(n,[],ge)}else{try{ge.call()}catch(ce){se=ce}n.call(ge.prototype)}}else{try{throw Error()}catch(ce){se=ce}(ge=n())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ce){if(ce&&se&&typeof ce.stack=="string")return[ce.stack,se.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),A=y[0],z=y[1];if(A&&z){var K=A.split(`
4
+ `),oe=z.split(`
5
+ `);for(p=c=0;c<K.length&&!K[c].includes("DetermineComponentFrameRoot");)c++;for(;p<oe.length&&!oe[p].includes("DetermineComponentFrameRoot");)p++;if(c===K.length||p===oe.length)for(c=K.length-1,p=oe.length-1;1<=c&&0<=p&&K[c]!==oe[p];)p--;for(;1<=c&&0<=p;c--,p--)if(K[c]!==oe[p]){if(c!==1||p!==1)do if(c--,p--,0>p||K[c]!==oe[p]){var he=`
6
+ `+K[c].replace(" at new "," at ");return n.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",n.displayName)),he}while(1<=c&&0<=p);break}}}finally{Me=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?xe(o):""}function Ie(n,a){switch(n.tag){case 26:case 27:case 5:return xe(n.type);case 16:return xe("Lazy");case 13:return n.child!==a&&a!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Ve(n.type,!1);case 11:return Ve(n.type.render,!1);case 1:return Ve(n.type,!0);case 31:return xe("Activity");default:return""}}function Be(n){try{var a="",o=null;do a+=Ie(n,o),o=n,n=n.return;while(n);return a}catch(c){return`
7
+ Error generating stack: `+c.message+`
8
+ `+c.stack}}var ke=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,Se=e.unstable_cancelCallback,ze=e.unstable_shouldYield,$e=e.unstable_requestPaint,Ze=e.unstable_now,hn=e.unstable_getCurrentPriorityLevel,vn=e.unstable_ImmediatePriority,bn=e.unstable_UserBlockingPriority,dn=e.unstable_NormalPriority,xt=e.unstable_LowPriority,jt=e.unstable_IdlePriority,pn=e.log,yr=e.unstable_setDisableYieldValue,vr=null,Gt=null;function An(n){if(typeof pn=="function"&&yr(n),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(vr,n)}catch{}}var Dt=Math.clz32?Math.clz32:ir,Kt=Math.log,Wn=Math.LN2;function ir(n){return n>>>=0,n===0?32:31-(Kt(n)/Wn|0)|0}var Pn=256,Rn=262144,Bn=4194304;function Mn(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 br(n,a,o){var c=n.pendingLanes;if(c===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var z=c&134217727;return z!==0?(c=z&~y,c!==0?p=Mn(c):(A&=z,A!==0?p=Mn(A):o||(o=z&~n,o!==0&&(p=Mn(o))))):(z=c&~y,z!==0?p=Mn(z):A!==0?p=Mn(A):o||(o=c&~n,o!==0&&(p=Mn(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 zr(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function wo(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 Ia(){var n=Bn;return Bn<<=1,(Bn&62914560)===0&&(Bn=4194304),n}function Gr(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function ea(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function qt(n,a,o,c,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,K=n.expirationTimes,oe=n.hiddenUpdates;for(o=A&~o;0<o;){var he=31-Dt(o),ge=1<<he;z[he]=0,K[he]=-1;var se=oe[he];if(se!==null)for(oe[he]=null,he=0;he<se.length;he++){var ce=se[he];ce!==null&&(ce.lane&=-536870913)}o&=~ge}c!==0&&mn(n,c,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function mn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var c=31-Dt(a);n.entangledLanes|=a,n.entanglements[c]=n.entanglements[c]|1073741824|o&261930}function $r(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var c=31-Dt(o),p=1<<c;p&a|n[c]&a&&(n[c]|=a),o&=~p}}function Kr(n,a){var o=a&-a;return o=(o&42)!==0?1:jn(o),(o&(n.suspendedLanes|a))!==0?0:o}function jn(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 Yr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Ml(){var n=J.p;return n!==0?n:(n=window.event,n===void 0?32:sb(n.type))}function jl(n,a){var o=J.p;try{return J.p=n,a()}finally{J.p=o}}var la=Math.random().toString(36).slice(2),gn="__reactFiber$"+la,Dn="__reactProps$"+la,La="__reactContainer$"+la,fc="__reactEvents$"+la,Yg="__reactListeners$"+la,Zg="__reactHandles$"+la,Gu="__reactResources$"+la,co="__reactMarker$"+la;function dc(n){delete n[gn],delete n[Dn],delete n[fc],delete n[Yg],delete n[Zg]}function zi(n){var a=n[gn];if(a)return a;for(var o=n.parentNode;o;){if(a=o[La]||o[gn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Hv(n);n!==null;){if(o=n[gn])return o;n=Hv(n)}return a}n=o,o=n.parentNode}return null}function $i(n){if(n=n[gn]||n[La]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function Eo(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Pi(n){var a=n[Gu];return a||(a=n[Gu]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function rn(n){n[co]=!0}var Ku=new Set,Yf={};function Ba(n,a){Ii(n,a),Ii(n+"Capture",a)}function Ii(n,a){for(Yf[n]=a,n=0;n<a.length;n++)Ku.add(a[n])}var Xg=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]*$"),Zf={},Xf={};function Qg(n){return ke.call(Xf,n)?!0:ke.call(Zf,n)?!1:Xg.test(n)?Xf[n]=!0:(Zf[n]=!0,!1)}function Os(n,a,o){if(Qg(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function As(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 Zr(n,a,o,c){if(c===null)n.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+c)}}function Jn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Yu(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Wg(n,a,o){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,y=c.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:c.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function hc(n){if(!n._valueTracker){var a=Yu(n)?"checked":"value";n._valueTracker=Wg(n,a,""+n[a])}}function Qf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return n&&(c=Yu(n)?n.checked?"true":"false":n.value),n=c,n!==o?(a.setValue(n),!0):!1}function Ms(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 sm=/[\n"\\]/g;function In(n){return n.replace(sm,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function kl(n,a,o,c,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=""+Jn(a)):n.value!==""+Jn(a)&&(n.value=""+Jn(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?pc(n,A,Jn(a)):o!=null?pc(n,A,Jn(o)):c!=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=""+Jn(z):n.removeAttribute("name")}function Wf(n,a,o,c,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)){hc(n);return}o=o!=null?""+Jn(o):"",a=a!=null?""+Jn(a):o,z||a===n.value||(n.value=a),n.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=z?n.checked:!!c,n.defaultChecked=!!c,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),hc(n)}function pc(n,a,o){a==="number"&&Ms(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Ci(n,a,o,c){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&&c&&(n[o].defaultSelected=!0)}else{for(o=""+Jn(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function mc(n,a,o){if(a!=null&&(a=""+Jn(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+Jn(o):""}function Jf(n,a,o,c){if(a==null){if(c!=null){if(o!=null)throw Error(i(92));if(te(c)){if(1<c.length)throw Error(i(93));c=c[0]}o=c}o==null&&(o=""),a=o}o=Jn(a),n.defaultValue=o,c=n.textContent,c===o&&c!==""&&c!==null&&(n.value=c),hc(n)}function Li(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Jg=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 ed(n,a,o){var c=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":c?n.setProperty(a,o):typeof o!="number"||o===0||Jg.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function td(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&o[p]!==c&&ed(n,p,c)}else for(var y in a)a.hasOwnProperty(y)&&ed(n,y,a[y])}function gc(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 ey=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"]]),ty=/^[\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 js(n){return ty.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ta(){}var yc=null;function vc(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ui=null,Vi=null;function Zu(n){var a=$i(n);if(a&&(n=a.stateNode)){var o=n[Dn]||null;e:switch(n=a.stateNode,a.type){case"input":if(kl(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="'+In(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var c=o[a];if(c!==n&&c.form===n.form){var p=c[Dn]||null;if(!p)throw Error(i(90));kl(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)c=o[a],c.form===n.form&&Qf(c)}break e;case"textarea":mc(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Ci(n,!!o.multiple,a,!1)}}}var Nl=!1;function nd(n,a,o){if(Nl)return n(a,o);Nl=!0;try{var c=n(a);return c}finally{if(Nl=!1,(Ui!==null||Vi!==null)&&(eu(),Ui&&(a=Ui,n=Vi,Vi=Ui=null,Zu(a),n)))for(a=0;a<n.length;a++)Zu(n[a])}}function qi(n,a){var o=n.stateNode;if(o===null)return null;var c=o[Dn]||null;if(c===null)return null;o=c[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":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dl=!1;if(Xr)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Dl=!1}var ca=null,bc=null,Ri=null;function rd(){if(Ri)return Ri;var n,a=bc,o=a.length,c,p="value"in ca?ca.value:ca.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(c=1;c<=A&&a[o-c]===p[y-c];c++);return Ri=p.slice(n,1<c?1-c:void 0)}function ks(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 Ns(){return!0}function ad(){return!1}function zn(n){function a(o,c,p,y,A){this._reactName=o,this._targetInst=p,this.type=c,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)?Ns:ad,this.isPropagationStopped=ad,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=Ns)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ns)},persist:function(){},isPersistent:Ns}),a}var Ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=zn(Ha),xo=g({},Ha,{view:0,detail:0}),Fe=zn(xo),Oi,zl,fo,fs=g({},xo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sc,button:0,buttons:0,relatedTarget:function(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!==fo&&(fo&&n.type==="mousemove"?(Oi=n.screenX-fo.screenX,zl=n.screenY-fo.screenY):zl=Oi=0,fo=n),Oi)},movementY:function(n){return"movementY"in n?n.movementY:zl}}),id=zn(fs),ny=g({},fs,{dataTransfer:0}),ho=zn(ny),od=g({},xo,{relatedTarget:0}),zs=zn(od),Ua=g({},Ha,{animationName:0,elapsedTime:0,pseudoElement:0}),lm=zn(Ua),cm=g({},Ha,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),um=zn(cm),fm=g({},Ha,{data:0}),sd=zn(fm),dm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hm={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"},pm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ld(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=pm[n])?!!a[n]:!1}function Sc(){return ld}var mm=g({},xo,{key:function(n){if(n.key){var a=dm[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=ks(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?hm[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sc,charCode:function(n){return n.type==="keypress"?ks(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ks(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),gm=zn(mm),ym=g({},fs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ua=zn(ym),vm=g({},xo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sc}),bm=zn(vm),ry=g({},Ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),ay=zn(ry),iy=g({},fs,{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}),cd=zn(iy),oy=g({},Ha,{newState:0,oldState:0}),sy=zn(oy),ly=[9,13,27,32],$l=Xr&&"CompositionEvent"in window,or=null;Xr&&"documentMode"in document&&(or=document.documentMode);var cy=Xr&&"TextEvent"in window&&!or,ud=Xr&&(!$l||or&&8<or&&11>=or),fd=" ",dd=!1;function hd(n,a){switch(n){case"keyup":return ly.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Fi=!1;function uy(n,a){switch(n){case"compositionend":return pd(a);case"keypress":return a.which!==32?null:(dd=!0,fd);case"textInput":return n=a.data,n===fd&&dd?null:n;default:return null}}function fy(n,a){if(Fi)return n==="compositionend"||!$l&&hd(n,a)?(n=rd(),Ri=bc=ca=null,Fi=!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 ud&&a.locale!=="ko"?null:a.data;default:return null}}var dy={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 md(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!dy[n.type]:a==="textarea"}function gd(n,a,o,c){Ui?Vi?Vi.push(c):Vi=[c]:Ui=c,a=su(a,"onChange"),0<a.length&&(o=new Ds("onChange","change",null,o,c),n.push({event:o,listeners:a}))}var _o=null,To=null;function hy(n){jv(n,0)}function $s(n){var a=Eo(n);if(Qf(a))return n}function yd(n,a){if(n==="change")return a}var vd=!1;if(Xr){var Pl;if(Xr){var Ps="oninput"in document;if(!Ps){var bd=document.createElement("div");bd.setAttribute("oninput","return;"),Ps=typeof bd.oninput=="function"}Pl=Ps}else Pl=!1;vd=Pl&&(!document.documentMode||9<document.documentMode)}function Xu(){_o&&(_o.detachEvent("onpropertychange",Sd),To=_o=null)}function Sd(n){if(n.propertyName==="value"&&$s(To)){var a=[];gd(a,To,n,vc(n)),nd(hy,a)}}function wd(n,a,o){n==="focusin"?(Xu(),_o=a,To=o,_o.attachEvent("onpropertychange",Sd)):n==="focusout"&&Xu()}function Ai(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return $s(To)}function Sm(n,a){if(n==="click")return $s(a)}function py(n,a){if(n==="input"||n==="change")return $s(a)}function wm(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Ln=typeof Object.is=="function"?Object.is:wm;function po(n,a){if(Ln(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),c=Object.keys(a);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!ke.call(a,p)||!Ln(n[p],a[p]))return!1}return!0}function Qu(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ed(n,a){var o=Qu(n);n=0;for(var c;o;){if(o.nodeType===3){if(c=n+o.textContent.length,n<=a&&c>=a)return{node:o,offset:a-n};n=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Qu(o)}}function Wu(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Wu(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function xd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Ms(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=Ms(n.document)}return a}function Is(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 my=Xr&&"documentMode"in document&&11>=document.documentMode,Va=null,wc=null,Co=null,Ec=!1;function _d(n,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ec||Va==null||Va!==Ms(c)||(c=Va,"selectionStart"in c&&Is(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Co&&po(Co,c)||(Co=c,c=su(wc,"onSelect"),0<c.length&&(a=new Ds("onSelect","select",null,a,o),n.push({event:a,listeners:c}),a.target=Va)))}function fa(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var Bi={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},P={},$={};Xr&&($=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function q(n){if(P[n])return P[n];if(!Bi[n])return n;var a=Bi[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in $)return P[n]=a[o];return n}var Y=q("animationend"),fe=q("animationiteration"),ve=q("animationstart"),_e=q("transitionrun"),pe=q("transitionstart"),Ce=q("transitioncancel"),Re=q("transitionend"),Ue=new Map,He="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(" ");He.push("scrollEnd");function Ye(n,a){Ue.set(n,a),Ba(a,[n])}var et=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)},ht=[],Ft=0,mt=0;function Nt(){for(var n=Ft,a=mt=Ft=0;a<n;){var o=ht[a];ht[a++]=null;var c=ht[a];ht[a++]=null;var p=ht[a];ht[a++]=null;var y=ht[a];if(ht[a++]=null,c!==null&&p!==null){var A=c.pending;A===null?p.next=p:(p.next=A.next,A.next=p),c.pending=p}y!==0&&da(o,p,y)}}function an(n,a,o,c){ht[Ft++]=n,ht[Ft++]=a,ht[Ft++]=o,ht[Ft++]=c,mt|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function zt(n,a,o,c){return an(n,a,o,c),Ga(n)}function Hn(n,a){return an(n,null,null,a),Ga(n)}function da(n,a,o){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,c=y.alternate,c!==null&&(c.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-Dt(o),n=y.hiddenUpdates,c=n[p],c===null?n[p]=[a]:c.push(a),a.lane=o|536870912),y):null}function Ga(n){if(50<sl)throw sl=0,Mh=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Qr={};function Ro(n,a,o,c){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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(n,a,o,c){return new Ro(n,a,o,c)}function Il(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Pr(n,a){var o=n.alternate;return o===null?(o=Yt(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 Ju(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 Hi(n,a,o,c,p,y){var A=0;if(c=n,typeof n=="function")Il(n)&&(A=1);else if(typeof n=="string")A=Q_(n,o,L.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case I:return n=Yt(31,o,a,p),n.elementType=I,n.lanes=y,n;case w:return ya(o.children,p,y,a);case S:A=8,p|=24;break;case _:return n=Yt(12,o,a,p|2),n.elementType=_,n.lanes=y,n;case C:return n=Yt(13,o,a,p),n.elementType=C,n.lanes=y,n;case R:return n=Yt(19,o,a,p),n.elementType=R,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:A=10;break e;case E:A=9;break e;case T:A=11;break e;case M:A=14;break e;case D:A=16,c=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),c=null}return a=Yt(A,o,a,p),a.elementType=n,a.type=c,a.lanes=y,a}function ya(n,a,o,c){return n=Yt(7,n,c,a),n.lanes=o,n}function Ls(n,a,o){return n=Yt(6,n,null,a),n.lanes=o,n}function xc(n){var a=Yt(18,null,null,0);return a.stateNode=n,a}function _c(n,a,o){return a=Yt(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var ef=new WeakMap;function Sr(n,a){if(typeof n=="object"&&n!==null){var o=ef.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Be(a)},ef.set(n,a),a)}return{value:n,source:a,stack:Be(a)}}var Oo=[],Ao=0,Tc=null,Us=0,wr=[],Er=0,Ka=null,na=1,ra="";function va(n,a){Oo[Ao++]=Us,Oo[Ao++]=Tc,Tc=n,Us=a}function gy(n,a,o){wr[Er++]=na,wr[Er++]=ra,wr[Er++]=Ka,Ka=n;var c=na;n=ra;var p=32-Dt(c)-1;c&=~(1<<p),o+=1;var y=32-Dt(a)+p;if(30<y){var A=p-p%5;y=(c&(1<<A)-1).toString(32),c>>=A,p-=A,na=1<<32-Dt(a)+p|o<<p|c,ra=y+n}else na=1<<y|o<<p|c,ra=n}function Td(n){n.return!==null&&(va(n,1),gy(n,1,0))}function Cd(n){for(;n===Tc;)Tc=Oo[--Ao],Oo[Ao]=null,Us=Oo[--Ao],Oo[Ao]=null;for(;n===Ka;)Ka=wr[--Er],wr[Er]=null,ra=wr[--Er],wr[Er]=null,na=wr[--Er],wr[Er]=null}function yy(n,a){wr[Er++]=na,wr[Er++]=ra,wr[Er++]=Ka,na=a.id,ra=a.overflow,Ka=n}var En=null,Tt=null,rt=!1,Ya=null,xr=!1,Rd=Error(i(519));function Za(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vs(Sr(a,n)),Rd}function vy(n){var a=n.stateNode,o=n.type,c=n.memoizedProps;switch(a[gn]=n,a[Dn]=c,o){case"dialog":We("cancel",a),We("close",a);break;case"iframe":case"object":case"embed":We("load",a);break;case"video":case"audio":for(o=0;o<cl.length;o++)We(cl[o],a);break;case"source":We("error",a);break;case"img":case"image":case"link":We("error",a),We("load",a);break;case"details":We("toggle",a);break;case"input":We("invalid",a),Wf(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":We("invalid",a);break;case"textarea":We("invalid",a),Jf(a,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||c.suppressHydrationWarning===!0||zv(a.textContent,o)?(c.popover!=null&&(We("beforetoggle",a),We("toggle",a)),c.onScroll!=null&&We("scroll",a),c.onScrollEnd!=null&&We("scrollend",a),c.onClick!=null&&(a.onclick=ta),a=!0):a=!1,a||Za(n,!0)}function by(n){for(En=n.return;En;)switch(En.tag){case 5:case 31:case 13:xr=!1;return;case 27:case 3:xr=!0;return;default:En=En.return}}function Mo(n){if(n!==En)return!1;if(!rt)return by(n),rt=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Hh(n.type,n.memoizedProps)),o=!o),o&&Tt&&Za(n),by(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else a===27?(a=Tt,ci(n.type)?(n=Xh,Xh=null,Tt=n):Tt=a):Tt=En?Tr(n.stateNode.nextSibling):null;return!0}function Gi(){Tt=En=null,rt=!1}function Od(){var n=Ya;return n!==null&&(Zn===null?Zn=n:Zn.push.apply(Zn,n),Ya=null),n}function Vs(n){Ya===null?Ya=[n]:Ya.push(n)}var Ad=N(null),Ki=null,ba=null;function Xa(n,a,o){X(Ad,a._currentValue),a._currentValue=o}function Sa(n){n._currentValue=Ad.current,U(Ad)}function Md(n,a,o){for(;n!==null;){var c=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),n===o)break;n=n.return}}function jd(n,a,o,c){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 K=0;K<a.length;K++)if(z.context===a[K]){y.lanes|=o,z=y.alternate,z!==null&&(z.lanes|=o),Md(y.return,o,n),c||(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),Md(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 jo(n,a,o,c){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;Ln(p.pendingProps.value,A.value)||(n!==null?n.push(z):n=[z])}}else if(p===de.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(pl):n=[pl])}p=p.return}n!==null&&jd(a,n,o,c),a.flags|=262144}function Cc(n){for(n=n.firstContext;n!==null;){if(!Ln(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Yi(n){Ki=n,ba=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function xn(n){return Sy(Ki,n)}function Rc(n,a){return Ki===null&&Yi(n),Sy(n,a)}function Sy(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ba===null){if(n===null)throw Error(i(308));ba=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ba=ba.next=a;return o}var Kx=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,c){n.push(c)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},Yx=e.unstable_scheduleCallback,Zx=e.unstable_NormalPriority,Xt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function kd(){return{controller:new Kx,data:new Map,refCount:0}}function qs(n){n.refCount--,n.refCount===0&&Yx(Zx,function(){n.controller.abort()})}var Fs=null,Nd=0,ko=0,No=null;function Xx(n,a){if(Fs===null){var o=Fs=[];Nd=0,ko=$h(),No={status:"pending",value:void 0,then:function(c){o.push(c)}}}return Nd++,a.then(wy,wy),a}function wy(){if(--Nd===0&&Fs!==null){No!==null&&(No.status="fulfilled");var n=Fs;Fs=null,ko=0,No=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Qx(n,a){var o=[],c={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),c}var Ey=H.S;H.S=function(n,a){iv=Ze(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Xx(n,a),Ey!==null&&Ey(n,a)};var Zi=N(null);function Dd(){var n=Zi.current;return n!==null?n:Et.pooledCache}function Oc(n,a){a===null?X(Zi,Zi.current):X(Zi,a.pool)}function xy(){var n=Dd();return n===null?null:{parent:Xt._currentValue,pool:n}}var Do=Error(i(460)),zd=Error(i(474)),Ac=Error(i(542)),Mc={then:function(){}};function _y(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ty(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(ta,ta),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Ry(n),n;default:if(typeof a.status=="string")a.then(ta,ta);else{if(n=Et,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Ry(n),n}throw Qi=a,Do}}function Xi(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Qi=o,Do):o}}var Qi=null;function Cy(){if(Qi===null)throw Error(i(459));var n=Qi;return Qi=null,n}function Ry(n){if(n===Do||n===Ac)throw Error(i(483))}var zo=null,Bs=0;function jc(n){var a=Bs;return Bs+=1,zo===null&&(zo=[]),Ty(zo,n,a)}function Hs(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function kc(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 Oy(n){function a(ne,Q){if(n){var ie=ne.deletions;ie===null?(ne.deletions=[Q],ne.flags|=16):ie.push(Q)}}function o(ne,Q){if(!n)return null;for(;Q!==null;)a(ne,Q),Q=Q.sibling;return null}function c(ne){for(var Q=new Map;ne!==null;)ne.key!==null?Q.set(ne.key,ne):Q.set(ne.index,ne),ne=ne.sibling;return Q}function p(ne,Q){return ne=Pr(ne,Q),ne.index=0,ne.sibling=null,ne}function y(ne,Q,ie){return ne.index=ie,n?(ie=ne.alternate,ie!==null?(ie=ie.index,ie<Q?(ne.flags|=67108866,Q):ie):(ne.flags|=67108866,Q)):(ne.flags|=1048576,Q)}function A(ne){return n&&ne.alternate===null&&(ne.flags|=67108866),ne}function z(ne,Q,ie,me){return Q===null||Q.tag!==6?(Q=Ls(ie,ne.mode,me),Q.return=ne,Q):(Q=p(Q,ie),Q.return=ne,Q)}function K(ne,Q,ie,me){var Pe=ie.type;return Pe===w?he(ne,Q,ie.props.children,me,ie.key):Q!==null&&(Q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Xi(Pe)===Q.type)?(Q=p(Q,ie.props),Hs(Q,ie),Q.return=ne,Q):(Q=Hi(ie.type,ie.key,ie.props,null,ne.mode,me),Hs(Q,ie),Q.return=ne,Q)}function oe(ne,Q,ie,me){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=_c(ie,ne.mode,me),Q.return=ne,Q):(Q=p(Q,ie.children||[]),Q.return=ne,Q)}function he(ne,Q,ie,me,Pe){return Q===null||Q.tag!==7?(Q=ya(ie,ne.mode,me,Pe),Q.return=ne,Q):(Q=p(Q,ie),Q.return=ne,Q)}function ge(ne,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Ls(""+Q,ne.mode,ie),Q.return=ne,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return ie=Hi(Q.type,Q.key,Q.props,null,ne.mode,ie),Hs(ie,Q),ie.return=ne,ie;case b:return Q=_c(Q,ne.mode,ie),Q.return=ne,Q;case D:return Q=Xi(Q),ge(ne,Q,ie)}if(te(Q)||F(Q))return Q=ya(Q,ne.mode,ie,null),Q.return=ne,Q;if(typeof Q.then=="function")return ge(ne,jc(Q),ie);if(Q.$$typeof===O)return ge(ne,Rc(ne,Q),ie);kc(ne,Q)}return null}function se(ne,Q,ie,me){var Pe=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Pe!==null?null:z(ne,Q,""+ie,me);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return ie.key===Pe?K(ne,Q,ie,me):null;case b:return ie.key===Pe?oe(ne,Q,ie,me):null;case D:return ie=Xi(ie),se(ne,Q,ie,me)}if(te(ie)||F(ie))return Pe!==null?null:he(ne,Q,ie,me,null);if(typeof ie.then=="function")return se(ne,Q,jc(ie),me);if(ie.$$typeof===O)return se(ne,Q,Rc(ne,ie),me);kc(ne,ie)}return null}function ce(ne,Q,ie,me,Pe){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ne=ne.get(ie)||null,z(Q,ne,""+me,Pe);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case x:return ne=ne.get(me.key===null?ie:me.key)||null,K(Q,ne,me,Pe);case b:return ne=ne.get(me.key===null?ie:me.key)||null,oe(Q,ne,me,Pe);case D:return me=Xi(me),ce(ne,Q,ie,me,Pe)}if(te(me)||F(me))return ne=ne.get(ie)||null,he(Q,ne,me,Pe,null);if(typeof me.then=="function")return ce(ne,Q,ie,jc(me),Pe);if(me.$$typeof===O)return ce(ne,Q,ie,Rc(Q,me),Pe);kc(Q,me)}return null}function Oe(ne,Q,ie,me){for(var Pe=null,st=null,De=Q,Ke=Q=0,nt=null;De!==null&&Ke<ie.length;Ke++){De.index>Ke?(nt=De,De=null):nt=De.sibling;var lt=se(ne,De,ie[Ke],me);if(lt===null){De===null&&(De=nt);break}n&&De&&lt.alternate===null&&a(ne,De),Q=y(lt,Q,Ke),st===null?Pe=lt:st.sibling=lt,st=lt,De=nt}if(Ke===ie.length)return o(ne,De),rt&&va(ne,Ke),Pe;if(De===null){for(;Ke<ie.length;Ke++)De=ge(ne,ie[Ke],me),De!==null&&(Q=y(De,Q,Ke),st===null?Pe=De:st.sibling=De,st=De);return rt&&va(ne,Ke),Pe}for(De=c(De);Ke<ie.length;Ke++)nt=ce(De,ne,Ke,ie[Ke],me),nt!==null&&(n&&nt.alternate!==null&&De.delete(nt.key===null?Ke:nt.key),Q=y(nt,Q,Ke),st===null?Pe=nt:st.sibling=nt,st=nt);return n&&De.forEach(function(pi){return a(ne,pi)}),rt&&va(ne,Ke),Pe}function Le(ne,Q,ie,me){if(ie==null)throw Error(i(151));for(var Pe=null,st=null,De=Q,Ke=Q=0,nt=null,lt=ie.next();De!==null&&!lt.done;Ke++,lt=ie.next()){De.index>Ke?(nt=De,De=null):nt=De.sibling;var pi=se(ne,De,lt.value,me);if(pi===null){De===null&&(De=nt);break}n&&De&&pi.alternate===null&&a(ne,De),Q=y(pi,Q,Ke),st===null?Pe=pi:st.sibling=pi,st=pi,De=nt}if(lt.done)return o(ne,De),rt&&va(ne,Ke),Pe;if(De===null){for(;!lt.done;Ke++,lt=ie.next())lt=ge(ne,lt.value,me),lt!==null&&(Q=y(lt,Q,Ke),st===null?Pe=lt:st.sibling=lt,st=lt);return rt&&va(ne,Ke),Pe}for(De=c(De);!lt.done;Ke++,lt=ie.next())lt=ce(De,ne,Ke,lt.value,me),lt!==null&&(n&&lt.alternate!==null&&De.delete(lt.key===null?Ke:lt.key),Q=y(lt,Q,Ke),st===null?Pe=lt:st.sibling=lt,st=lt);return n&&De.forEach(function(l2){return a(ne,l2)}),rt&&va(ne,Ke),Pe}function wt(ne,Q,ie,me){if(typeof ie=="object"&&ie!==null&&ie.type===w&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:e:{for(var Pe=ie.key;Q!==null;){if(Q.key===Pe){if(Pe=ie.type,Pe===w){if(Q.tag===7){o(ne,Q.sibling),me=p(Q,ie.props.children),me.return=ne,ne=me;break e}}else if(Q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Xi(Pe)===Q.type){o(ne,Q.sibling),me=p(Q,ie.props),Hs(me,ie),me.return=ne,ne=me;break e}o(ne,Q);break}else a(ne,Q);Q=Q.sibling}ie.type===w?(me=ya(ie.props.children,ne.mode,me,ie.key),me.return=ne,ne=me):(me=Hi(ie.type,ie.key,ie.props,null,ne.mode,me),Hs(me,ie),me.return=ne,ne=me)}return A(ne);case b:e:{for(Pe=ie.key;Q!==null;){if(Q.key===Pe)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){o(ne,Q.sibling),me=p(Q,ie.children||[]),me.return=ne,ne=me;break e}else{o(ne,Q);break}else a(ne,Q);Q=Q.sibling}me=_c(ie,ne.mode,me),me.return=ne,ne=me}return A(ne);case D:return ie=Xi(ie),wt(ne,Q,ie,me)}if(te(ie))return Oe(ne,Q,ie,me);if(F(ie)){if(Pe=F(ie),typeof Pe!="function")throw Error(i(150));return ie=Pe.call(ie),Le(ne,Q,ie,me)}if(typeof ie.then=="function")return wt(ne,Q,jc(ie),me);if(ie.$$typeof===O)return wt(ne,Q,Rc(ne,ie),me);kc(ne,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(o(ne,Q.sibling),me=p(Q,ie),me.return=ne,ne=me):(o(ne,Q),me=Ls(ie,ne.mode,me),me.return=ne,ne=me),A(ne)):o(ne,Q)}return function(ne,Q,ie,me){try{Bs=0;var Pe=wt(ne,Q,ie,me);return zo=null,Pe}catch(De){if(De===Do||De===Ac)throw De;var st=Yt(29,De,null,ne.mode);return st.lanes=me,st.return=ne,st}}}var Wi=Oy(!0),Ay=Oy(!1),Qa=!1;function $d(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pd(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 Wa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ja(n,a,o){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(ft&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=Ga(n),da(n,null,o),a}return an(n,c,a,o),Ga(n)}function Gs(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,$r(n,o)}}function Id(n,a){var o=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,o===c)){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:c.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Ld=!1;function Ks(){if(Ld){var n=No;if(n!==null)throw n}}function Ys(n,a,o,c){Ld=!1;var p=n.updateQueue;Qa=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var K=z,oe=K.next;K.next=null,A===null?y=oe:A.next=oe,A=K;var he=n.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==A&&(z===null?he.firstBaseUpdate=oe:z.next=oe,he.lastBaseUpdate=K))}if(y!==null){var ge=p.baseState;A=0,he=oe=K=null,z=y;do{var se=z.lane&-536870913,ce=se!==z.lane;if(ce?(tt&se)===se:(c&se)===se){se!==0&&se===ko&&(Ld=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Oe=n,Le=z;se=a;var wt=o;switch(Le.tag){case 1:if(Oe=Le.payload,typeof Oe=="function"){ge=Oe.call(wt,ge,se);break e}ge=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Le.payload,se=typeof Oe=="function"?Oe.call(wt,ge,se):Oe,se==null)break e;ge=g({},ge,se);break e;case 2:Qa=!0}}se=z.callback,se!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[se]:ce.push(se))}else ce={lane:se,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(oe=he=ce,K=ge):he=he.next=ce,A|=se;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&&(K=ge),p.baseState=K,p.firstBaseUpdate=oe,p.lastBaseUpdate=he,y===null&&(p.shared.lanes=0),ai|=A,n.lanes=A,n.memoizedState=ge}}function My(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function jy(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)My(o[n],a)}var $o=N(null),Nc=N(0);function ky(n,a){n=Aa,X(Nc,n),X($o,a),Aa=n|a.baseLanes}function Ud(){X(Nc,Aa),X($o,$o.current)}function Vd(){Aa=Nc.current,U($o),U(Nc)}var sr=N(null),_r=null;function ei(n){var a=n.alternate;X(Bt,Bt.current&1),X(sr,n),_r===null&&(a===null||$o.current!==null||a.memoizedState!==null)&&(_r=n)}function qd(n){X(Bt,Bt.current),X(sr,n),_r===null&&(_r=n)}function Ny(n){n.tag===22?(X(Bt,Bt.current),X(sr,n),_r===null&&(_r=n)):ti()}function ti(){X(Bt,Bt.current),X(sr,sr.current)}function lr(n){U(sr),_r===n&&(_r=null),U(Bt)}var Bt=N(0);function Dc(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Yh(o)||Zh(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 wa=0,Ge=null,bt=null,Qt=null,zc=!1,Po=!1,Ji=!1,$c=0,Zs=0,Io=null,Wx=0;function $t(){throw Error(i(321))}function Fd(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!Ln(n[o],a[o]))return!1;return!0}function Bd(n,a,o,c,p,y){return wa=y,Ge=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,H.H=n===null||n.memoizedState===null?g0:ih,Ji=!1,y=o(c,p),Ji=!1,Po&&(y=zy(a,o,c,p)),Dy(n),y}function Dy(n){H.H=Ws;var a=bt!==null&&bt.next!==null;if(wa=0,Qt=bt=Ge=null,zc=!1,Zs=0,Io=null,a)throw Error(i(300));n===null||Wt||(n=n.dependencies,n!==null&&Cc(n)&&(Wt=!0))}function zy(n,a,o,c){Ge=n;var p=0;do{if(Po&&(Io=null),Zs=0,Po=!1,25<=p)throw Error(i(301));if(p+=1,Qt=bt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}H.H=y0,y=a(o,c)}while(Po);return y}function Jx(){var n=H.H,a=n.useState()[0];return a=typeof a.then=="function"?Xs(a):a,n=n.useState()[0],(bt!==null?bt.memoizedState:null)!==n&&(Ge.flags|=1024),a}function Hd(){var n=$c!==0;return $c=0,n}function Gd(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function Kd(n){if(zc){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}zc=!1}wa=0,Qt=bt=Ge=null,Po=!1,Zs=$c=0,Io=null}function $n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Ge.memoizedState=Qt=n:Qt=Qt.next=n,Qt}function Ht(){if(bt===null){var n=Ge.alternate;n=n!==null?n.memoizedState:null}else n=bt.next;var a=Qt===null?Ge.memoizedState:Qt.next;if(a!==null)Qt=a,bt=n;else{if(n===null)throw Ge.alternate===null?Error(i(467)):Error(i(310));bt=n,n={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Qt===null?Ge.memoizedState=Qt=n:Qt=Qt.next=n}return Qt}function Pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(n){var a=Zs;return Zs+=1,Io===null&&(Io=[]),n=Ty(Io,n,a),a=Ge,(Qt===null?a.memoizedState:Qt.next)===null&&(a=a.alternate,H.H=a===null||a.memoizedState===null?g0:ih),n}function Ic(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Xs(n);if(n.$$typeof===O)return xn(n)}throw Error(i(438,String(n)))}function Yd(n){var a=null,o=Ge.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var c=Ge.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Pc(),Ge.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),c=0;c<n;c++)o[c]=B;return a.index++,o}function Ea(n,a){return typeof a=="function"?a(n):a}function Lc(n){var a=Ht();return Zd(a,bt,n)}function Zd(n,a,o){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=o;var p=n.baseQueue,y=c.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,c.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var z=A=null,K=null,oe=a,he=!1;do{var ge=oe.lane&-536870913;if(ge!==oe.lane?(tt&ge)===ge:(wa&ge)===ge){var se=oe.revertLane;if(se===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),ge===ko&&(he=!0);else if((wa&se)===se){oe=oe.next,se===ko&&(he=!0);continue}else ge={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},K===null?(z=K=ge,A=y):K=K.next=ge,Ge.lanes|=se,ai|=se;ge=oe.action,Ji&&o(y,ge),y=oe.hasEagerState?oe.eagerState:o(y,ge)}else se={lane:ge,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},K===null?(z=K=se,A=y):K=K.next=se,Ge.lanes|=ge,ai|=ge;oe=oe.next}while(oe!==null&&oe!==a);if(K===null?A=y:K.next=z,!Ln(y,n.memoizedState)&&(Wt=!0,he&&(o=No,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=K,c.lastRenderedState=y}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Xd(n){var a=Ht(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var c=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);Ln(y,a.memoizedState)||(Wt=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,c]}function $y(n,a,o){var c=Ge,p=Ht(),y=rt;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!Ln((bt||p).memoizedState,o);if(A&&(p.memoizedState=o,Wt=!0),p=p.queue,Jd(Ly.bind(null,c,p,n),[n]),p.getSnapshot!==a||A||Qt!==null&&Qt.memoizedState.tag&1){if(c.flags|=2048,Lo(9,{destroy:void 0},Iy.bind(null,c,p,o,a),null),Et===null)throw Error(i(349));y||(wa&127)!==0||Py(c,a,o)}return o}function Py(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Ge.updateQueue,a===null?(a=Pc(),Ge.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Iy(n,a,o,c){a.value=o,a.getSnapshot=c,Uy(a)&&Vy(n)}function Ly(n,a,o){return o(function(){Uy(a)&&Vy(n)})}function Uy(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!Ln(n,o)}catch{return!0}}function Vy(n){var a=Hn(n,2);a!==null&&Xn(a,n,2)}function Qd(n){var a=$n();if(typeof n=="function"){var o=n;if(n=o(),Ji){An(!0);try{o()}finally{An(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:n},a}function qy(n,a,o,c){return n.baseState=o,Zd(n,bt,typeof c=="function"?c:Ea)}function e_(n,a,o,c,p){if(qc(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)}};H.T!==null?o(!0):y.isTransition=!1,c(y),o=a.pending,o===null?(y.next=a.pending=y,Fy(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Fy(n,a){var o=a.action,c=a.payload,p=n.state;if(a.isTransition){var y=H.T,A={};H.T=A;try{var z=o(p,c),K=H.S;K!==null&&K(A,z),By(n,a,z)}catch(oe){Wd(n,a,oe)}finally{y!==null&&A.types!==null&&(y.types=A.types),H.T=y}}else try{y=o(p,c),By(n,a,y)}catch(oe){Wd(n,a,oe)}}function By(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){Hy(n,a,c)},function(c){return Wd(n,a,c)}):Hy(n,a,o)}function Hy(n,a,o){a.status="fulfilled",a.value=o,Gy(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Fy(n,o)))}function Wd(n,a,o){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,Gy(a),a=a.next;while(a!==c)}n.action=null}function Gy(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Ky(n,a){return a}function Yy(n,a){if(rt){var o=Et.formState;if(o!==null){e:{var c=Ge;if(rt){if(Tt){t:{for(var p=Tt,y=xr;p.nodeType!==8;){if(!y){p=null;break t}if(p=Tr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Tt=Tr(p.nextSibling),c=p.data==="F!";break e}}Za(c)}c=!1}c&&(a=o[0])}}return o=$n(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ky,lastRenderedState:a},o.queue=c,o=h0.bind(null,Ge,c),c.dispatch=o,c=Qd(!1),y=ah.bind(null,Ge,!1,c.queue),c=$n(),p={state:a,dispatch:null,action:n,pending:null},c.queue=p,o=e_.bind(null,Ge,p,y,o),p.dispatch=o,c.memoizedState=n,[a,o,!1]}function Zy(n){var a=Ht();return Xy(a,bt,n)}function Xy(n,a,o){if(a=Zd(n,a,Ky)[0],n=Lc(Ea)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Xs(a)}catch(A){throw A===Do?Ac:A}else c=a;a=Ht();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Ge.flags|=2048,Lo(9,{destroy:void 0},t_.bind(null,p,o),null)),[c,y,n]}function t_(n,a){n.action=a}function Qy(n){var a=Ht(),o=bt;if(o!==null)return Xy(a,o,n);Ht(),a=a.memoizedState,o=Ht();var c=o.queue.dispatch;return o.memoizedState=n,[a,c,!1]}function Lo(n,a,o,c){return n={tag:n,create:o,deps:c,inst:a,next:null},a=Ge.updateQueue,a===null&&(a=Pc(),Ge.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(c=o.next,o.next=n,n.next=c,a.lastEffect=n),n}function Wy(){return Ht().memoizedState}function Uc(n,a,o,c){var p=$n();Ge.flags|=n,p.memoizedState=Lo(1|a,{destroy:void 0},o,c===void 0?null:c)}function Vc(n,a,o,c){var p=Ht();c=c===void 0?null:c;var y=p.memoizedState.inst;bt!==null&&c!==null&&Fd(c,bt.memoizedState.deps)?p.memoizedState=Lo(a,y,o,c):(Ge.flags|=n,p.memoizedState=Lo(1|a,y,o,c))}function Jy(n,a){Uc(8390656,8,n,a)}function Jd(n,a){Vc(2048,8,n,a)}function n_(n){Ge.flags|=4;var a=Ge.updateQueue;if(a===null)a=Pc(),Ge.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function e0(n){var a=Ht().memoizedState;return n_({ref:a,nextImpl:n}),function(){if((ft&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function t0(n,a){return Vc(4,2,n,a)}function n0(n,a){return Vc(4,4,n,a)}function r0(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 a0(n,a,o){o=o!=null?o.concat([n]):null,Vc(4,4,r0.bind(null,a,n),o)}function eh(){}function i0(n,a){var o=Ht();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&Fd(a,c[1])?c[0]:(o.memoizedState=[n,a],n)}function o0(n,a){var o=Ht();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&Fd(a,c[1]))return c[0];if(c=n(),Ji){An(!0);try{n()}finally{An(!1)}}return o.memoizedState=[c,a],c}function th(n,a,o){return o===void 0||(wa&1073741824)!==0&&(tt&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=sv(),Ge.lanes|=n,ai|=n,o)}function s0(n,a,o,c){return Ln(o,a)?o:$o.current!==null?(n=th(n,o,c),Ln(n,a)||(Wt=!0),n):(wa&42)===0||(wa&1073741824)!==0&&(tt&261930)===0?(Wt=!0,n.memoizedState=o):(n=sv(),Ge.lanes|=n,ai|=n,a)}function l0(n,a,o,c,p){var y=J.p;J.p=y!==0&&8>y?y:8;var A=H.T,z={};H.T=z,ah(n,!1,a,o);try{var K=p(),oe=H.S;if(oe!==null&&oe(z,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var he=Qx(K,c);Qs(n,a,he,fr(n))}else Qs(n,a,c,fr(n))}catch(ge){Qs(n,a,{then:function(){},status:"rejected",reason:ge},fr())}finally{J.p=y,A!==null&&z.types!==null&&(A.types=z.types),H.T=A}}function r_(){}function nh(n,a,o,c){if(n.tag!==5)throw Error(i(476));var p=c0(n).queue;l0(n,p,a,re,o===null?r_:function(){return u0(n),o(c)})}function c0(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:re},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function u0(n){var a=c0(n);a.next===null&&(a=n.alternate.memoizedState),Qs(n,a.next.queue,{},fr())}function rh(){return xn(pl)}function f0(){return Ht().memoizedState}function d0(){return Ht().memoizedState}function a_(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=fr();n=Wa(o);var c=Ja(a,n,o);c!==null&&(Xn(c,a,o),Gs(c,a,o)),a={cache:kd()},n.payload=a;return}a=a.return}}function i_(n,a,o){var c=fr();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},qc(n)?p0(a,o):(o=zt(n,a,o,c),o!==null&&(Xn(o,n,c),m0(o,a,c)))}function h0(n,a,o){var c=fr();Qs(n,a,o,c)}function Qs(n,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(qc(n))p0(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,Ln(z,A))return an(n,a,p,0),Et===null&&Nt(),!1}catch{}if(o=zt(n,a,p,c),o!==null)return Xn(o,n,c),m0(o,a,c),!0}return!1}function ah(n,a,o,c){if(c={lane:2,revertLane:$h(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},qc(n)){if(a)throw Error(i(479))}else a=zt(n,o,c,2),a!==null&&Xn(a,n,2)}function qc(n){var a=n.alternate;return n===Ge||a!==null&&a===Ge}function p0(n,a){Po=zc=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function m0(n,a,o){if((o&4194048)!==0){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,$r(n,o)}}var Ws={readContext:xn,use:Ic,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t};Ws.useEffectEvent=$t;var g0={readContext:xn,use:Ic,useCallback:function(n,a){return $n().memoizedState=[n,a===void 0?null:a],n},useContext:xn,useEffect:Jy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,Uc(4194308,4,r0.bind(null,a,n),o)},useLayoutEffect:function(n,a){return Uc(4194308,4,n,a)},useInsertionEffect:function(n,a){Uc(4,2,n,a)},useMemo:function(n,a){var o=$n();a=a===void 0?null:a;var c=n();if(Ji){An(!0);try{n()}finally{An(!1)}}return o.memoizedState=[c,a],c},useReducer:function(n,a,o){var c=$n();if(o!==void 0){var p=o(a);if(Ji){An(!0);try{o(a)}finally{An(!1)}}}else p=a;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=i_.bind(null,Ge,n),[c.memoizedState,n]},useRef:function(n){var a=$n();return n={current:n},a.memoizedState=n},useState:function(n){n=Qd(n);var a=n.queue,o=h0.bind(null,Ge,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:eh,useDeferredValue:function(n,a){var o=$n();return th(o,n,a)},useTransition:function(){var n=Qd(!1);return n=l0.bind(null,Ge,n.queue,!0,!1),$n().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var c=Ge,p=$n();if(rt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),Et===null)throw Error(i(349));(tt&127)!==0||Py(c,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,Jy(Ly.bind(null,c,y,n),[n]),c.flags|=2048,Lo(9,{destroy:void 0},Iy.bind(null,c,y,o,a),null),o},useId:function(){var n=$n(),a=Et.identifierPrefix;if(rt){var o=ra,c=na;o=(c&~(1<<32-Dt(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=$c++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=Wx++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:rh,useFormState:Yy,useActionState:Yy,useOptimistic:function(n){var a=$n();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=ah.bind(null,Ge,!0,o),o.dispatch=a,[n,a]},useMemoCache:Yd,useCacheRefresh:function(){return $n().memoizedState=a_.bind(null,Ge)},useEffectEvent:function(n){var a=$n(),o={impl:n};return a.memoizedState=o,function(){if((ft&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},ih={readContext:xn,use:Ic,useCallback:i0,useContext:xn,useEffect:Jd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Lc,useRef:Wy,useState:function(){return Lc(Ea)},useDebugValue:eh,useDeferredValue:function(n,a){var o=Ht();return s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Lc(Ea)[0],a=Ht().memoizedState;return[typeof n=="boolean"?n:Xs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:rh,useFormState:Zy,useActionState:Zy,useOptimistic:function(n,a){var o=Ht();return qy(o,bt,n,a)},useMemoCache:Yd,useCacheRefresh:d0};ih.useEffectEvent=e0;var y0={readContext:xn,use:Ic,useCallback:i0,useContext:xn,useEffect:Jd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Xd,useRef:Wy,useState:function(){return Xd(Ea)},useDebugValue:eh,useDeferredValue:function(n,a){var o=Ht();return bt===null?th(o,n,a):s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Xd(Ea)[0],a=Ht().memoizedState;return[typeof n=="boolean"?n:Xs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:rh,useFormState:Qy,useActionState:Qy,useOptimistic:function(n,a){var o=Ht();return bt!==null?qy(o,bt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:Yd,useCacheRefresh:d0};y0.useEffectEvent=e0;function oh(n,a,o,c){a=n.memoizedState,o=o(c,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var sh={enqueueSetState:function(n,a,o){n=n._reactInternals;var c=fr(),p=Wa(c);p.payload=a,o!=null&&(p.callback=o),a=Ja(n,p,c),a!==null&&(Xn(a,n,c),Gs(a,n,c))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var c=fr(),p=Wa(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ja(n,p,c),a!==null&&(Xn(a,n,c),Gs(a,n,c))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=fr(),c=Wa(o);c.tag=2,a!=null&&(c.callback=a),a=Ja(n,c,o),a!==null&&(Xn(a,n,o),Gs(a,n,o))}};function v0(n,a,o,c,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,A):a.prototype&&a.prototype.isPureReactComponent?!po(o,c)||!po(p,y):!0}function b0(n,a,o,c){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,c),a.state!==n&&sh.enqueueReplaceState(a,a.state,null)}function eo(n,a){var o=a;if("ref"in a){o={};for(var c in a)c!=="ref"&&(o[c]=a[c])}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 S0(n){et(n)}function w0(n){console.error(n)}function E0(n){et(n)}function Fc(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function x0(n,a,o){try{var c=n.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function lh(n,a,o){return o=Wa(o),o.tag=3,o.payload={element:null},o.callback=function(){Fc(n,a)},o}function _0(n){return n=Wa(n),n.tag=3,n}function T0(n,a,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=c.value;n.payload=function(){return p(y)},n.callback=function(){x0(a,o,c)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){x0(a,o,c),typeof p!="function"&&(ii===null?ii=new Set([this]):ii.add(this));var z=c.stack;this.componentDidCatch(c.value,{componentStack:z!==null?z:""})})}function o_(n,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&jo(a,o,p,!0),o=sr.current,o!==null){switch(o.tag){case 31:case 13:return _r===null?tu():o.alternate===null&&Pt===0&&(Pt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===Mc?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),Nh(n,c,p)),!1;case 22:return o.flags|=65536,c===Mc?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([c]):o.add(c)),Nh(n,c,p)),!1}throw Error(i(435,o.tag))}return Nh(n,c,p),tu(),!1}if(rt)return a=sr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Rd&&(n=Error(i(422),{cause:c}),Vs(Sr(n,o)))):(c!==Rd&&(a=Error(i(423),{cause:c}),Vs(Sr(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=Sr(c,o),p=lh(n.stateNode,c,p),Id(n,p),Pt!==4&&(Pt=2)),!1;var y=Error(i(520),{cause:c});if(y=Sr(y,o),ol===null?ol=[y]:ol.push(y),Pt!==4&&(Pt=2),a===null)return!0;c=Sr(c,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=lh(o.stateNode,c,n),Id(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"&&(ii===null||!ii.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=_0(p),T0(p,n,o,c),Id(o,p),!1}o=o.return}while(o!==null);return!1}var ch=Error(i(461)),Wt=!1;function _n(n,a,o,c){a.child=n===null?Ay(a,null,o,c):Wi(a,n.child,o,c)}function C0(n,a,o,c,p){o=o.render;var y=a.ref;if("ref"in c){var A={};for(var z in c)z!=="ref"&&(A[z]=c[z])}else A=c;return Yi(a),c=Bd(n,a,o,A,y,p),z=Hd(),n!==null&&!Wt?(Gd(n,a,p),xa(n,a,p)):(rt&&z&&Td(a),a.flags|=1,_n(n,a,c,p),a.child)}function R0(n,a,o,c,p){if(n===null){var y=o.type;return typeof y=="function"&&!Il(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,O0(n,a,y,c,p)):(n=Hi(o.type,null,c,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!yh(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:po,o(A,c)&&n.ref===a.ref)return xa(n,a,p)}return a.flags|=1,n=Pr(y,c),n.ref=a.ref,n.return=a,a.child=n}function O0(n,a,o,c,p){if(n!==null){var y=n.memoizedProps;if(po(y,c)&&n.ref===a.ref)if(Wt=!1,a.pendingProps=c=y,yh(n,p))(n.flags&131072)!==0&&(Wt=!0);else return a.lanes=n.lanes,xa(n,a,p)}return uh(n,a,o,c,p)}function A0(n,a,o,c){var p=c.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(c=a.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~y}else c=0,a.child=null;return M0(n,a,y,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&Oc(a,y!==null?y.cachePool:null),y!==null?ky(a,y):Ud(),Ny(a);else return c=a.lanes=536870912,M0(n,a,y!==null?y.baseLanes|o:o,o,c)}else y!==null?(Oc(a,y.cachePool),ky(a,y),ti(),a.memoizedState=null):(n!==null&&Oc(a,null),Ud(),ti());return _n(n,a,p,o),a.child}function Js(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function M0(n,a,o,c,p){var y=Dd();return y=y===null?null:{parent:Xt._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&Oc(a,null),Ud(),Ny(a),n!==null&&jo(n,a,c,!0),a.childLanes=p,null}function Bc(n,a){return a=Gc({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function j0(n,a,o){return Wi(a,n.child,null,o),n=Bc(a,a.pendingProps),n.flags|=2,lr(a),a.memoizedState=null,n}function s_(n,a,o){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(rt){if(c.mode==="hidden")return n=Bc(a,c),a.lanes=536870912,Js(null,n);if(qd(a),(n=Tt)?(n=Fv(n,xr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ka!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=xc(n),o.return=a,a.child=o,En=a,Tt=null)):n=null,n===null)throw Za(a);return a.lanes=536870912,null}return Bc(a,c)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(qd(a),p)if(a.flags&256)a.flags&=-257,a=j0(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(Wt||jo(n,a,o,!1),p=(o&n.childLanes)!==0,Wt||p){if(c=Et,c!==null&&(A=Kr(c,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,Hn(n,A),Xn(c,n,A),ch;tu(),a=j0(n,a,o)}else n=y.treeContext,Tt=Tr(A.nextSibling),En=a,rt=!0,Ya=null,xr=!1,n!==null&&yy(a,n),a=Bc(a,c),a.flags|=4096;return a}return n=Pr(n.child,{mode:c.mode,children:c.children}),n.ref=a.ref,a.child=n,n.return=a,n}function Hc(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 uh(n,a,o,c,p){return Yi(a),o=Bd(n,a,o,c,void 0,p),c=Hd(),n!==null&&!Wt?(Gd(n,a,p),xa(n,a,p)):(rt&&c&&Td(a),a.flags|=1,_n(n,a,o,p),a.child)}function k0(n,a,o,c,p,y){return Yi(a),a.updateQueue=null,o=zy(a,c,o,p),Dy(n),c=Hd(),n!==null&&!Wt?(Gd(n,a,y),xa(n,a,y)):(rt&&c&&Td(a),a.flags|=1,_n(n,a,o,y),a.child)}function N0(n,a,o,c,p){if(Yi(a),a.stateNode===null){var y=Qr,A=o.contextType;typeof A=="object"&&A!==null&&(y=xn(A)),y=new o(c,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=sh,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=c,y.state=a.memoizedState,y.refs={},$d(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?xn(A):Qr,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(oh(a,o,A,c),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&&sh.enqueueReplaceState(y,y.state,null),Ys(a,c,y,p),Ks(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(n===null){y=a.stateNode;var z=a.memoizedProps,K=eo(o,z);y.props=K;var oe=y.context,he=o.contextType;A=Qr,typeof he=="object"&&he!==null&&(A=xn(he));var ge=o.getDerivedStateFromProps;he=typeof ge=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,he||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||oe!==A)&&b0(a,y,c,A),Qa=!1;var se=a.memoizedState;y.state=se,Ys(a,c,y,p),Ks(),oe=a.memoizedState,z||se!==oe||Qa?(typeof ge=="function"&&(oh(a,o,ge,c),oe=a.memoizedState),(K=Qa||v0(a,o,K,c,se,oe,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=c,a.memoizedState=oe),y.props=c,y.state=oe,y.context=A,c=K):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{y=a.stateNode,Pd(n,a),A=a.memoizedProps,he=eo(o,A),y.props=he,ge=a.pendingProps,se=y.context,oe=o.contextType,K=Qr,typeof oe=="object"&&oe!==null&&(K=xn(oe)),z=o.getDerivedStateFromProps,(oe=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==ge||se!==K)&&b0(a,y,c,K),Qa=!1,se=a.memoizedState,y.state=se,Ys(a,c,y,p),Ks();var ce=a.memoizedState;A!==ge||se!==ce||Qa||n!==null&&n.dependencies!==null&&Cc(n.dependencies)?(typeof z=="function"&&(oh(a,o,z,c),ce=a.memoizedState),(he=Qa||v0(a,o,he,c,se,ce,K)||n!==null&&n.dependencies!==null&&Cc(n.dependencies))?(oe||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,ce,K),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,ce,K)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=ce),y.props=c,y.state=ce,y.context=K,c=he):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=1024),c=!1)}return y=c,Hc(n,a),c=(a.flags&128)!==0,y||c?(y=a.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&c?(a.child=Wi(a,n.child,null,p),a.child=Wi(a,null,o,p)):_n(n,a,o,p),a.memoizedState=y.state,n=a.child):n=xa(n,a,p),n}function D0(n,a,o,c){return Gi(),a.flags|=256,_n(n,a,o,c),a.child}var fh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dh(n){return{baseLanes:n,cachePool:xy()}}function hh(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=ur),n}function z0(n,a,o){var c=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(Bt.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(rt){if(p?ei(a):ti(),(n=Tt)?(n=Fv(n,xr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ka!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=xc(n),o.return=a,a.child=o,En=a,Tt=null)):n=null,n===null)throw Za(a);return Zh(n)?a.lanes=32:a.lanes=536870912,null}var z=c.children;return c=c.fallback,p?(ti(),p=a.mode,z=Gc({mode:"hidden",children:z},p),c=ya(c,p,o,null),z.return=a,c.return=a,z.sibling=c,a.child=z,c=a.child,c.memoizedState=dh(o),c.childLanes=hh(n,A,o),a.memoizedState=fh,Js(null,c)):(ei(a),ph(a,z))}var K=n.memoizedState;if(K!==null&&(z=K.dehydrated,z!==null)){if(y)a.flags&256?(ei(a),a.flags&=-257,a=mh(n,a,o)):a.memoizedState!==null?(ti(),a.child=n.child,a.flags|=128,a=null):(ti(),z=c.fallback,p=a.mode,c=Gc({mode:"visible",children:c.children},p),z=ya(z,p,o,null),z.flags|=2,c.return=a,z.return=a,c.sibling=z,a.child=c,Wi(a,n.child,null,o),c=a.child,c.memoizedState=dh(o),c.childLanes=hh(n,A,o),a.memoizedState=fh,a=Js(null,c));else if(ei(a),Zh(z)){if(A=z.nextSibling&&z.nextSibling.dataset,A)var oe=A.dgst;A=oe,c=Error(i(419)),c.stack="",c.digest=A,Vs({value:c,source:null,stack:null}),a=mh(n,a,o)}else if(Wt||jo(n,a,o,!1),A=(o&n.childLanes)!==0,Wt||A){if(A=Et,A!==null&&(c=Kr(A,o),c!==0&&c!==K.retryLane))throw K.retryLane=c,Hn(n,c),Xn(A,n,c),ch;Yh(z)||tu(),a=mh(n,a,o)}else Yh(z)?(a.flags|=192,a.child=n.child,a=null):(n=K.treeContext,Tt=Tr(z.nextSibling),En=a,rt=!0,Ya=null,xr=!1,n!==null&&yy(a,n),a=ph(a,c.children),a.flags|=4096);return a}return p?(ti(),z=c.fallback,p=a.mode,K=n.child,oe=K.sibling,c=Pr(K,{mode:"hidden",children:c.children}),c.subtreeFlags=K.subtreeFlags&65011712,oe!==null?z=Pr(oe,z):(z=ya(z,p,o,null),z.flags|=2),z.return=a,c.return=a,c.sibling=z,a.child=c,Js(null,c),c=a.child,z=n.child.memoizedState,z===null?z=dh(o):(p=z.cachePool,p!==null?(K=Xt._currentValue,p=p.parent!==K?{parent:K,pool:K}:p):p=xy(),z={baseLanes:z.baseLanes|o,cachePool:p}),c.memoizedState=z,c.childLanes=hh(n,A,o),a.memoizedState=fh,Js(n.child,c)):(ei(a),o=n.child,n=o.sibling,o=Pr(o,{mode:"visible",children:c.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 ph(n,a){return a=Gc({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Gc(n,a){return n=Yt(22,n,null,a),n.lanes=0,n}function mh(n,a,o){return Wi(a,n.child,null,o),n=ph(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function $0(n,a,o){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a),Md(n.return,a,o)}function gh(n,a,o,c,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=c,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function P0(n,a,o){var c=a.pendingProps,p=c.revealOrder,y=c.tail;c=c.children;var A=Bt.current,z=(A&2)!==0;if(z?(A=A&1|2,a.flags|=128):A&=1,X(Bt,A),_n(n,a,c,o),c=rt?Us:0,!z&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&$0(n,o,a);else if(n.tag===19)$0(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&&Dc(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),gh(a,!1,p,o,y,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&Dc(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}gh(a,!0,o,null,y,c);break;case"together":gh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function xa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),ai|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(jo(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=Pr(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=Pr(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function yh(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Cc(n)))}function l_(n,a,o){switch(a.tag){case 3:ye(a,a.stateNode.containerInfo),Xa(a,Xt,n.memoizedState.cache),Gi();break;case 27:case 5:Ae(a);break;case 4:ye(a,a.stateNode.containerInfo);break;case 10:Xa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,qd(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ei(a),a.flags|=128,null):(o&a.child.childLanes)!==0?z0(n,a,o):(ei(a),n=xa(n,a,o),n!==null?n.sibling:null);ei(a);break;case 19:var p=(n.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(jo(n,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return P0(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),X(Bt,Bt.current),c)break;return null;case 22:return a.lanes=0,A0(n,a,o,a.pendingProps);case 24:Xa(a,Xt,n.memoizedState.cache)}return xa(n,a,o)}function I0(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Wt=!0;else{if(!yh(n,o)&&(a.flags&128)===0)return Wt=!1,l_(n,a,o);Wt=(n.flags&131072)!==0}else Wt=!1,rt&&(a.flags&1048576)!==0&&gy(a,Us,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(n=Xi(a.elementType),a.type=n,typeof n=="function")Il(n)?(c=eo(n,c),a.tag=1,a=N0(null,a,n,c,o)):(a.tag=0,a=uh(null,a,n,c,o));else{if(n!=null){var p=n.$$typeof;if(p===T){a.tag=11,a=C0(null,a,n,c,o);break e}else if(p===M){a.tag=14,a=R0(null,a,n,c,o);break e}}throw a=W(n)||n,Error(i(306,a,""))}}return a;case 0:return uh(n,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=eo(c,a.pendingProps),N0(n,a,c,p,o);case 3:e:{if(ye(a,a.stateNode.containerInfo),n===null)throw Error(i(387));c=a.pendingProps;var y=a.memoizedState;p=y.element,Pd(n,a),Ys(a,c,null,o);var A=a.memoizedState;if(c=A.cache,Xa(a,Xt,c),c!==y.cache&&jd(a,[Xt],o,!0),Ks(),c=A.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=D0(n,a,c,o);break e}else if(c!==p){p=Sr(Error(i(424)),a),Vs(p),a=D0(n,a,c,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Tt=Tr(n.firstChild),En=a,rt=!0,Ya=null,xr=!0,o=Ay(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Gi(),c===p){a=xa(n,a,o);break e}_n(n,a,c,o)}a=a.child}return a;case 26:return Hc(n,a),n===null?(o=Zv(a.type,null,a.pendingProps,null))?a.memoizedState=o:rt||(o=a.type,n=a.pendingProps,c=lu(ee.current).createElement(o),c[gn]=a,c[Dn]=n,Tn(c,o,n),rn(c),a.stateNode=c):a.memoizedState=Zv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Ae(a),n===null&&rt&&(c=a.stateNode=Gv(a.type,a.pendingProps,ee.current),En=a,xr=!0,p=Tt,ci(a.type)?(Xh=p,Tt=Tr(c.firstChild)):Tt=p),_n(n,a,a.pendingProps.children,o),Hc(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&rt&&((p=c=Tt)&&(c=I_(c,a.type,a.pendingProps,xr),c!==null?(a.stateNode=c,En=a,Tt=Tr(c.firstChild),xr=!1,p=!0):p=!1),p||Za(a)),Ae(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,c=y.children,Hh(p,y)?c=null:A!==null&&Hh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=Bd(n,a,Jx,null,null,o),pl._currentValue=p),Hc(n,a),_n(n,a,c,o),a.child;case 6:return n===null&&rt&&((n=o=Tt)&&(o=L_(o,a.pendingProps,xr),o!==null?(a.stateNode=o,En=a,Tt=null,n=!0):n=!1),n||Za(a)),null;case 13:return z0(n,a,o);case 4:return ye(a,a.stateNode.containerInfo),c=a.pendingProps,n===null?a.child=Wi(a,null,c,o):_n(n,a,c,o),a.child;case 11:return C0(n,a,a.type,a.pendingProps,o);case 7:return _n(n,a,a.pendingProps,o),a.child;case 8:return _n(n,a,a.pendingProps.children,o),a.child;case 12:return _n(n,a,a.pendingProps.children,o),a.child;case 10:return c=a.pendingProps,Xa(a,a.type,c.value),_n(n,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,Yi(a),p=xn(p),c=c(p),a.flags|=1,_n(n,a,c,o),a.child;case 14:return R0(n,a,a.type,a.pendingProps,o);case 15:return O0(n,a,a.type,a.pendingProps,o);case 19:return P0(n,a,o);case 31:return s_(n,a,o);case 22:return A0(n,a,o,a.pendingProps);case 24:return Yi(a),c=xn(Xt),n===null?(p=Dd(),p===null&&(p=Et,y=kd(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:c,cache:p},$d(a),Xa(a,Xt,p)):((n.lanes&o)!==0&&(Pd(n,a),Ys(a,null,null,o),Ks()),p=n.memoizedState,y=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Xa(a,Xt,c)):(c=y.cache,Xa(a,Xt,c),c!==p.cache&&jd(a,[Xt],o,!0))),_n(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function _a(n){n.flags|=4}function vh(n,a,o,c,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(fv())n.flags|=8192;else throw Qi=Mc,zd}else n.flags&=-16777217}function L0(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!eb(a))if(fv())n.flags|=8192;else throw Qi=Mc,zd}function Kc(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Ia():536870912,n.lanes|=a,Fo|=a)}function el(n,a){if(!rt)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 c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Ct(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,c=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=o,a}function c_(n,a,o){var c=a.pendingProps;switch(Cd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(a),null;case 1:return Ct(a),null;case 3:return o=a.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Sa(Xt),Te(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Mo(a)?_a(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Od())),Ct(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(_a(a),y!==null?(Ct(a),L0(a,y)):(Ct(a),vh(a,p,null,c,o))):y?y!==n.memoizedState?(_a(a),Ct(a),L0(a,y)):(Ct(a),a.flags&=-16777217):(n=n.memoizedProps,n!==c&&_a(a),Ct(a),vh(a,p,n,c,o)),null;case 27:if(ue(a),o=ee.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&_a(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}n=L.current,Mo(a)?vy(a):(n=Gv(p,c,o),a.stateNode=n,_a(a))}return Ct(a),null;case 5:if(ue(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&_a(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}if(y=L.current,Mo(a))vy(a);else{var A=lu(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 c.is=="string"?A.createElement("select",{is:c.is}):A.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?A.createElement(p,{is:c.is}):A.createElement(p)}}y[gn]=a,y[Dn]=c;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(Tn(y,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&_a(a)}}return Ct(a),vh(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==c&&_a(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(n=ee.current,Mo(a)){if(n=a.stateNode,o=a.memoizedProps,c=null,p=En,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[gn]=a,n=!!(n.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||zv(n.nodeValue,o)),n||Za(a,!0)}else n=lu(n).createTextNode(c),n[gn]=a,a.stateNode=n}return Ct(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(c=Mo(a),o!==null){if(n===null){if(!c)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[gn]=a}else Gi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),n=!1}else o=Od(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(lr(a),a):(lr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Ct(a),null;case 13:if(c=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Mo(a),c!==null&&c.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[gn]=a}else Gi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),p=!1}else p=Od(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(lr(a),a):(lr(a),null)}return lr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=c!==null,n=n!==null&&n.memoizedState!==null,o&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==p&&(c.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Kc(a,a.updateQueue),Ct(a),null);case 4:return Te(),n===null&&Uh(a.stateNode.containerInfo),Ct(a),null;case 10:return Sa(a.type),Ct(a),null;case 19:if(U(Bt),c=a.memoizedState,c===null)return Ct(a),null;if(p=(a.flags&128)!==0,y=c.rendering,y===null)if(p)el(c,!1);else{if(Pt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=Dc(n),y!==null){for(a.flags|=128,el(c,!1),n=y.updateQueue,a.updateQueue=n,Kc(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Ju(o,n),o=o.sibling;return X(Bt,Bt.current&1|2),rt&&va(a,c.treeForkCount),a.child}n=n.sibling}c.tail!==null&&Ze()>Wc&&(a.flags|=128,p=!0,el(c,!1),a.lanes=4194304)}else{if(!p)if(n=Dc(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Kc(a,n),el(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!rt)return Ct(a),null}else 2*Ze()-c.renderingStartTime>Wc&&o!==536870912&&(a.flags|=128,p=!0,el(c,!1),a.lanes=4194304);c.isBackwards?(y.sibling=a.child,a.child=y):(n=c.last,n!==null?n.sibling=y:a.child=y,c.last=y)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Ze(),n.sibling=null,o=Bt.current,X(Bt,p?o&1|2:o&1),rt&&va(a,c.treeForkCount),n):(Ct(a),null);case 22:case 23:return lr(a),Vd(),c=a.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(o&536870912)!==0&&(a.flags&128)===0&&(Ct(a),a.subtreeFlags&6&&(a.flags|=8192)):Ct(a),o=a.updateQueue,o!==null&&Kc(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048),n!==null&&U(Zi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Sa(Xt),Ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function u_(n,a){switch(Cd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return Sa(Xt),Te(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return ue(a),null;case 31:if(a.memoizedState!==null){if(lr(a),a.alternate===null)throw Error(i(340));Gi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(lr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Gi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return U(Bt),null;case 4:return Te(),null;case 10:return Sa(a.type),null;case 22:case 23:return lr(a),Vd(),n!==null&&U(Zi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return Sa(Xt),null;case 25:return null;default:return null}}function U0(n,a){switch(Cd(a),a.tag){case 3:Sa(Xt),Te();break;case 26:case 27:case 5:ue(a);break;case 4:Te();break;case 31:a.memoizedState!==null&&lr(a);break;case 13:lr(a);break;case 19:U(Bt);break;case 10:Sa(a.type);break;case 22:case 23:lr(a),Vd(),n!==null&&U(Zi);break;case 24:Sa(Xt)}}function tl(n,a){try{var o=a.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var p=c.next;o=p;do{if((o.tag&n)===n){c=void 0;var y=o.create,A=o.inst;c=y(),A.destroy=c}o=o.next}while(o!==p)}}catch(z){yt(a,a.return,z)}}function ni(n,a,o){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;do{if((c.tag&n)===n){var A=c.inst,z=A.destroy;if(z!==void 0){A.destroy=void 0,p=a;var K=o,oe=z;try{oe()}catch(he){yt(p,K,he)}}}c=c.next}while(c!==y)}}catch(he){yt(a,a.return,he)}}function V0(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{jy(a,o)}catch(c){yt(n,n.return,c)}}}function q0(n,a,o){o.props=eo(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(c){yt(n,a,c)}}function nl(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof o=="function"?n.refCleanup=o(c):o.current=c}}catch(p){yt(n,a,p)}}function aa(n,a){var o=n.ref,c=n.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){yt(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){yt(n,a,p)}else o.current=null}function F0(n){var a=n.type,o=n.memoizedProps,c=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break e;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(p){yt(n,n.return,p)}}function bh(n,a,o){try{var c=n.stateNode;k_(c,n.type,o,a),c[Dn]=a}catch(p){yt(n,n.return,p)}}function B0(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ci(n.type)||n.tag===4}function Sh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||B0(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&&ci(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 wh(n,a,o){var c=n.tag;if(c===5||c===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=ta));else if(c!==4&&(c===27&&ci(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(wh(n,a,o),n=n.sibling;n!==null;)wh(n,a,o),n=n.sibling}function Yc(n,a,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(c!==4&&(c===27&&ci(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Yc(n,a,o),n=n.sibling;n!==null;)Yc(n,a,o),n=n.sibling}function H0(n){var a=n.stateNode,o=n.memoizedProps;try{for(var c=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Tn(a,c,o),a[gn]=n,a[Dn]=o}catch(y){yt(n,n.return,y)}}var Ta=!1,Jt=!1,Eh=!1,G0=typeof WeakSet=="function"?WeakSet:Set,yn=null;function f_(n,a){if(n=n.containerInfo,Fh=mu,n=xd(n),Is(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,z=-1,K=-1,oe=0,he=0,ge=n,se=null;t:for(;;){for(var ce;ge!==o||p!==0&&ge.nodeType!==3||(z=A+p),ge!==y||c!==0&&ge.nodeType!==3||(K=A+c),ge.nodeType===3&&(A+=ge.nodeValue.length),(ce=ge.firstChild)!==null;)se=ge,ge=ce;for(;;){if(ge===n)break t;if(se===o&&++oe===p&&(z=A),se===y&&++he===c&&(K=A),(ce=ge.nextSibling)!==null)break;ge=se,se=ge.parentNode}ge=ce}o=z===-1||K===-1?null:{start:z,end:K}}else o=null}o=o||{start:0,end:0}}else o=null;for(Bh={focusedElem:n,selectionRange:o},mu=!1,yn=a;yn!==null;)if(a=yn,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,yn=n;else for(;yn!==null;){switch(a=yn,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,c=o.stateNode;try{var Oe=eo(o.type,p);n=c.getSnapshotBeforeUpdate(Oe,y),c.__reactInternalSnapshotBeforeUpdate=n}catch(Le){yt(o,o.return,Le)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)Kh(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Kh(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,yn=n;break}yn=a.return}}function K0(n,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:Ra(n,o),c&4&&tl(5,o);break;case 1:if(Ra(n,o),c&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){yt(o,o.return,A)}else{var p=eo(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){yt(o,o.return,A)}}c&64&&V0(o),c&512&&nl(o,o.return);break;case 3:if(Ra(n,o),c&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{jy(n,a)}catch(A){yt(o,o.return,A)}}break;case 27:a===null&&c&4&&H0(o);case 26:case 5:Ra(n,o),a===null&&c&4&&F0(o),c&512&&nl(o,o.return);break;case 12:Ra(n,o);break;case 31:Ra(n,o),c&4&&X0(n,o);break;case 13:Ra(n,o),c&4&&Q0(n,o),c&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=S_.bind(null,o),U_(n,o))));break;case 22:if(c=o.memoizedState!==null||Ta,!c){a=a!==null&&a.memoizedState!==null||Jt,p=Ta;var y=Jt;Ta=c,(Jt=a)&&!y?Oa(n,o,(o.subtreeFlags&8772)!==0):Ra(n,o),Ta=p,Jt=y}break;case 30:break;default:Ra(n,o)}}function Y0(n){var a=n.alternate;a!==null&&(n.alternate=null,Y0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&dc(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 Mt=null,Gn=!1;function Ca(n,a,o){for(o=o.child;o!==null;)Z0(n,a,o),o=o.sibling}function Z0(n,a,o){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(vr,o)}catch{}switch(o.tag){case 26:Jt||aa(o,a),Ca(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Jt||aa(o,a);var c=Mt,p=Gn;ci(o.type)&&(Mt=o.stateNode,Gn=!1),Ca(n,a,o),fl(o.stateNode),Mt=c,Gn=p;break;case 5:Jt||aa(o,a);case 6:if(c=Mt,p=Gn,Mt=null,Ca(n,a,o),Mt=c,Gn=p,Mt!==null)if(Gn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(o.stateNode)}catch(y){yt(o,a,y)}else try{Mt.removeChild(o.stateNode)}catch(y){yt(o,a,y)}break;case 18:Mt!==null&&(Gn?(n=Mt,Vv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Qo(n)):Vv(Mt,o.stateNode));break;case 4:c=Mt,p=Gn,Mt=o.stateNode.containerInfo,Gn=!0,Ca(n,a,o),Mt=c,Gn=p;break;case 0:case 11:case 14:case 15:ni(2,o,a),Jt||ni(4,o,a),Ca(n,a,o);break;case 1:Jt||(aa(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&q0(o,a,c)),Ca(n,a,o);break;case 21:Ca(n,a,o);break;case 22:Jt=(c=Jt)||o.memoizedState!==null,Ca(n,a,o),Jt=c;break;default:Ca(n,a,o)}}function X0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Qo(n)}catch(o){yt(a,a.return,o)}}}function Q0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Qo(n)}catch(o){yt(a,a.return,o)}}function d_(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new G0),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new G0),a;default:throw Error(i(435,n.tag))}}function Zc(n,a){var o=d_(n);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=w_.bind(null,n,c);c.then(p,p)}})}function Kn(n,a){var o=a.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c],y=n,A=a,z=A;e:for(;z!==null;){switch(z.tag){case 27:if(ci(z.type)){Mt=z.stateNode,Gn=!1;break e}break;case 5:Mt=z.stateNode,Gn=!1;break e;case 3:case 4:Mt=z.stateNode.containerInfo,Gn=!0;break e}z=z.return}if(Mt===null)throw Error(i(160));Z0(y,A,p),Mt=null,Gn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)W0(a,n),a=a.sibling}var Ir=null;function W0(n,a){var o=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Kn(a,n),Yn(n),c&4&&(ni(3,n,n.return),tl(3,n),ni(5,n,n.return));break;case 1:Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),c&64&&Ta&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var p=Ir;if(Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),c&4){var y=o!==null?o.memoizedState:null;if(c=n.memoizedState,o===null)if(c===null)if(n.stateNode===null){e:{c=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":y=p.getElementsByTagName("title")[0],(!y||y[co]||y[gn]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(c),p.head.insertBefore(y,p.querySelector("head > title"))),Tn(y,c,o),y[gn]=n,rn(y),c=y;break e;case"link":var A=Wv("link","href",p).get(c+(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(c),Tn(y,c,o),p.head.appendChild(y);break;case"meta":if(A=Wv("meta","content",p).get(c+(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(c),Tn(y,c,o),p.head.appendChild(y);break;default:throw Error(i(468,c))}y[gn]=n,rn(y),c=y}n.stateNode=c}else Jv(p,n.type,n.stateNode);else n.stateNode=Qv(p,c,n.memoizedProps);else y!==c?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,c===null?Jv(p,n.type,n.stateNode):Qv(p,c,n.memoizedProps)):c===null&&n.stateNode!==null&&bh(n,n.memoizedProps,o.memoizedProps)}break;case 27:Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),o!==null&&c&4&&bh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),n.flags&32){p=n.stateNode;try{Li(p,"")}catch(Oe){yt(n,n.return,Oe)}}c&4&&n.stateNode!=null&&(p=n.memoizedProps,bh(n,p,o!==null?o.memoizedProps:p)),c&1024&&(Eh=!0);break;case 6:if(Kn(a,n),Yn(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,o=n.stateNode;try{o.nodeValue=c}catch(Oe){yt(n,n.return,Oe)}}break;case 3:if(fu=null,p=Ir,Ir=cu(a.containerInfo),Kn(a,n),Ir=p,Yn(n),c&4&&o!==null&&o.memoizedState.isDehydrated)try{Qo(a.containerInfo)}catch(Oe){yt(n,n.return,Oe)}Eh&&(Eh=!1,J0(n));break;case 4:c=Ir,Ir=cu(n.stateNode.containerInfo),Kn(a,n),Yn(n),Ir=c;break;case 12:Kn(a,n),Yn(n);break;case 31:Kn(a,n),Yn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Zc(n,c)));break;case 13:Kn(a,n),Yn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Qc=Ze()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Zc(n,c)));break;case 22:p=n.memoizedState!==null;var K=o!==null&&o.memoizedState!==null,oe=Ta,he=Jt;if(Ta=oe||p,Jt=he||K,Kn(a,n),Jt=he,Ta=oe,Yn(n),c&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||K||Ta||Jt||to(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){K=o=a;try{if(y=K.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{z=K.stateNode;var ge=K.memoizedProps.style,se=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;z.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Oe){yt(K,K.return,Oe)}}}else if(a.tag===6){if(o===null){K=a;try{K.stateNode.nodeValue=p?"":K.memoizedProps}catch(Oe){yt(K,K.return,Oe)}}}else if(a.tag===18){if(o===null){K=a;try{var ce=K.stateNode;p?qv(ce,!0):qv(K.stateNode,!1)}catch(Oe){yt(K,K.return,Oe)}}}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}c&4&&(c=n.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,Zc(n,o))));break;case 19:Kn(a,n),Yn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Zc(n,c)));break;case 30:break;case 21:break;default:Kn(a,n),Yn(n)}}function Yn(n){var a=n.flags;if(a&2){try{for(var o,c=n.return;c!==null;){if(B0(c)){o=c;break}c=c.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=Sh(n);Yc(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(Li(A,""),o.flags&=-33);var z=Sh(n);Yc(n,z,A);break;case 3:case 4:var K=o.stateNode.containerInfo,oe=Sh(n);wh(n,oe,K);break;default:throw Error(i(161))}}catch(he){yt(n,n.return,he)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function J0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;J0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function Ra(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)K0(n,a.alternate,a),a=a.sibling}function to(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:ni(4,a,a.return),to(a);break;case 1:aa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&q0(a,a.return,o),to(a);break;case 27:fl(a.stateNode);case 26:case 5:aa(a,a.return),to(a);break;case 22:a.memoizedState===null&&to(a);break;case 30:to(a);break;default:to(a)}n=n.sibling}}function Oa(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Oa(p,y,o),tl(4,y);break;case 1:if(Oa(p,y,o),c=y,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(oe){yt(c,c.return,oe)}if(c=y,p=c.updateQueue,p!==null){var z=c.stateNode;try{var K=p.shared.hiddenCallbacks;if(K!==null)for(p.shared.hiddenCallbacks=null,p=0;p<K.length;p++)My(K[p],z)}catch(oe){yt(c,c.return,oe)}}o&&A&64&&V0(y),nl(y,y.return);break;case 27:H0(y);case 26:case 5:Oa(p,y,o),o&&c===null&&A&4&&F0(y),nl(y,y.return);break;case 12:Oa(p,y,o);break;case 31:Oa(p,y,o),o&&A&4&&X0(p,y);break;case 13:Oa(p,y,o),o&&A&4&&Q0(p,y);break;case 22:y.memoizedState===null&&Oa(p,y,o),nl(y,y.return);break;case 30:break;default:Oa(p,y,o)}a=a.sibling}}function xh(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&&qs(o))}function _h(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&qs(n))}function Lr(n,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ev(n,a,o,c),a=a.sibling}function ev(n,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Lr(n,a,o,c),p&2048&&tl(9,a);break;case 1:Lr(n,a,o,c);break;case 3:Lr(n,a,o,c),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&qs(n)));break;case 12:if(p&2048){Lr(n,a,o,c),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(K){yt(a,a.return,K)}}else Lr(n,a,o,c);break;case 31:Lr(n,a,o,c);break;case 13:Lr(n,a,o,c);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?Lr(n,a,o,c):rl(n,a):y._visibility&2?Lr(n,a,o,c):(y._visibility|=2,Uo(n,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&xh(A,a);break;case 24:Lr(n,a,o,c),p&2048&&_h(a.alternate,a);break;default:Lr(n,a,o,c)}}function Uo(n,a,o,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,z=o,K=c,oe=A.flags;switch(A.tag){case 0:case 11:case 15:Uo(y,A,z,K,p),tl(8,A);break;case 23:break;case 22:var he=A.stateNode;A.memoizedState!==null?he._visibility&2?Uo(y,A,z,K,p):rl(y,A):(he._visibility|=2,Uo(y,A,z,K,p)),p&&oe&2048&&xh(A.alternate,A);break;case 24:Uo(y,A,z,K,p),p&&oe&2048&&_h(A.alternate,A);break;default:Uo(y,A,z,K,p)}a=a.sibling}}function rl(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,c=a,p=c.flags;switch(c.tag){case 22:rl(o,c),p&2048&&xh(c.alternate,c);break;case 24:rl(o,c),p&2048&&_h(c.alternate,c);break;default:rl(o,c)}a=a.sibling}}var al=8192;function Vo(n,a,o){if(n.subtreeFlags&al)for(n=n.child;n!==null;)tv(n,a,o),n=n.sibling}function tv(n,a,o){switch(n.tag){case 26:Vo(n,a,o),n.flags&al&&n.memoizedState!==null&&W_(o,Ir,n.memoizedState,n.memoizedProps);break;case 5:Vo(n,a,o);break;case 3:case 4:var c=Ir;Ir=cu(n.stateNode.containerInfo),Vo(n,a,o),Ir=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=al,al=16777216,Vo(n,a,o),al=c):Vo(n,a,o));break;default:Vo(n,a,o)}}function nv(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 il(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];yn=c,av(c,n)}nv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)rv(n),n=n.sibling}function rv(n){switch(n.tag){case 0:case 11:case 15:il(n),n.flags&2048&&ni(9,n,n.return);break;case 3:il(n);break;case 12:il(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Xc(n)):il(n);break;default:il(n)}}function Xc(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];yn=c,av(c,n)}nv(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:ni(8,a,a.return),Xc(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Xc(a));break;default:Xc(a)}n=n.sibling}}function av(n,a){for(;yn!==null;){var o=yn;switch(o.tag){case 0:case 11:case 15:ni(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:qs(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,yn=c;else e:for(o=n;yn!==null;){c=yn;var p=c.sibling,y=c.return;if(Y0(c),c===o){yn=null;break e}if(p!==null){p.return=y,yn=p;break e}yn=y}}}var h_={getCacheForType:function(n){var a=xn(Xt),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return xn(Xt).controller.signal}},p_=typeof WeakMap=="function"?WeakMap:Map,ft=0,Et=null,Qe=null,tt=0,gt=0,cr=null,ri=!1,qo=!1,Th=!1,Aa=0,Pt=0,ai=0,no=0,Ch=0,ur=0,Fo=0,ol=null,Zn=null,Rh=!1,Qc=0,iv=0,Wc=1/0,Jc=null,ii=null,on=0,oi=null,Bo=null,Ma=0,Oh=0,Ah=null,ov=null,sl=0,Mh=null;function fr(){return(ft&2)!==0&&tt!==0?tt&-tt:H.T!==null?$h():Ml()}function sv(){if(ur===0)if((tt&536870912)===0||rt){var n=Rn;Rn<<=1,(Rn&3932160)===0&&(Rn=262144),ur=n}else ur=536870912;return n=sr.current,n!==null&&(n.flags|=32),ur}function Xn(n,a,o){(n===Et&&(gt===2||gt===9)||n.cancelPendingCommit!==null)&&(Ho(n,0),si(n,tt,ur,!1)),ea(n,o),((ft&2)===0||n!==Et)&&(n===Et&&((ft&2)===0&&(no|=o),Pt===4&&si(n,tt,ur,!1)),ia(n))}function lv(n,a,o){if((ft&6)!==0)throw Error(i(327));var c=!o&&(a&127)===0&&(a&n.expiredLanes)===0||zr(n,a),p=c?y_(n,a):kh(n,a,!0),y=c;do{if(p===0){qo&&!c&&si(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!m_(o)){p=kh(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=ol;var K=z.current.memoizedState.isDehydrated;if(K&&(Ho(z,A).flags|=256),A=kh(z,A,!1),A!==2){if(Th&&!K){z.errorRecoveryDisabledLanes|=y,no|=y,p=4;break e}y=Zn,Zn=p,y!==null&&(Zn===null?Zn=y:Zn.push.apply(Zn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){Ho(n,0),si(n,a,0,!0);break}e:{switch(c=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:si(c,a,ur,!ri);break e;case 2:Zn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Qc+300-Ze(),10<p)){if(si(c,a,ur,!ri),br(c,0,!0)!==0)break e;Ma=a,c.timeoutHandle=Lv(cv.bind(null,c,o,Zn,Jc,Rh,a,ur,no,Fo,ri,y,"Throttled",-0,0),p);break e}cv(c,o,Zn,Jc,Rh,a,ur,no,Fo,ri,y,null,-0,0)}}break}while(!0);ia(n)}function cv(n,a,o,c,p,y,A,z,K,oe,he,ge,se,ce){if(n.timeoutHandle=-1,ge=a.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ta},tv(a,y,ge);var Oe=(y&62914560)===y?Qc-Ze():(y&4194048)===y?iv-Ze():0;if(Oe=J_(ge,Oe),Oe!==null){Ma=y,n.cancelPendingCommit=Oe(yv.bind(null,n,a,y,o,c,p,A,z,K,he,ge,null,se,ce)),si(n,y,A,!oe);return}}yv(n,a,y,o,c,p,A,z,K)}function m_(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 c=0;c<o.length;c++){var p=o[c],y=p.getSnapshot;p=p.value;try{if(!Ln(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 si(n,a,o,c){a&=~Ch,a&=~no,n.suspendedLanes|=a,n.pingedLanes&=~a,c&&(n.warmLanes|=a),c=n.expirationTimes;for(var p=a;0<p;){var y=31-Dt(p),A=1<<y;c[y]=-1,p&=~A}o!==0&&mn(n,o,a)}function eu(){return(ft&6)===0?(ll(0),!1):!0}function jh(){if(Qe!==null){if(gt===0)var n=Qe.return;else n=Qe,ba=Ki=null,Kd(n),zo=null,Bs=0,n=Qe;for(;n!==null;)U0(n.alternate,n),n=n.return;Qe=null}}function Ho(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,z_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Ma=0,jh(),Et=n,Qe=o=Pr(n.current,null),tt=a,gt=0,cr=null,ri=!1,qo=zr(n,a),Th=!1,Fo=ur=Ch=no=ai=Pt=0,Zn=ol=null,Rh=!1,(a&8)!==0&&(a|=a&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=a;0<c;){var p=31-Dt(c),y=1<<p;a|=n[p],c&=~y}return Aa=a,Nt(),o}function uv(n,a){Ge=null,H.H=Ws,a===Do||a===Ac?(a=Cy(),gt=3):a===zd?(a=Cy(),gt=4):gt=a===ch?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,cr=a,Qe===null&&(Pt=1,Fc(n,Sr(a,n.current)))}function fv(){var n=sr.current;return n===null?!0:(tt&4194048)===tt?_r===null:(tt&62914560)===tt||(tt&536870912)!==0?n===_r:!1}function dv(){var n=H.H;return H.H=Ws,n===null?Ws:n}function hv(){var n=H.A;return H.A=h_,n}function tu(){Pt=4,ri||(tt&4194048)!==tt&&sr.current!==null||(qo=!0),(ai&134217727)===0&&(no&134217727)===0||Et===null||si(Et,tt,ur,!1)}function kh(n,a,o){var c=ft;ft|=2;var p=dv(),y=hv();(Et!==n||tt!==a)&&(Jc=null,Ho(n,a)),a=!1;var A=Pt;e:do try{if(gt!==0&&Qe!==null){var z=Qe,K=cr;switch(gt){case 8:jh(),A=6;break e;case 3:case 2:case 9:case 6:sr.current===null&&(a=!0);var oe=gt;if(gt=0,cr=null,Go(n,z,K,oe),o&&qo){A=0;break e}break;default:oe=gt,gt=0,cr=null,Go(n,z,K,oe)}}g_(),A=Pt;break}catch(he){uv(n,he)}while(!0);return a&&n.shellSuspendCounter++,ba=Ki=null,ft=c,H.H=p,H.A=y,Qe===null&&(Et=null,tt=0,Nt()),A}function g_(){for(;Qe!==null;)pv(Qe)}function y_(n,a){var o=ft;ft|=2;var c=dv(),p=hv();Et!==n||tt!==a?(Jc=null,Wc=Ze()+500,Ho(n,a)):qo=zr(n,a);e:do try{if(gt!==0&&Qe!==null){a=Qe;var y=cr;t:switch(gt){case 1:gt=0,cr=null,Go(n,a,y,1);break;case 2:case 9:if(_y(y)){gt=0,cr=null,mv(a);break}a=function(){gt!==2&&gt!==9||Et!==n||(gt=7),ia(n)},y.then(a,a);break e;case 3:gt=7;break e;case 4:gt=5;break e;case 7:_y(y)?(gt=0,cr=null,mv(a)):(gt=0,cr=null,Go(n,a,y,7));break;case 5:var A=null;switch(Qe.tag){case 26:A=Qe.memoizedState;case 5:case 27:var z=Qe;if(A?eb(A):z.stateNode.complete){gt=0,cr=null;var K=z.sibling;if(K!==null)Qe=K;else{var oe=z.return;oe!==null?(Qe=oe,nu(oe)):Qe=null}break t}}gt=0,cr=null,Go(n,a,y,5);break;case 6:gt=0,cr=null,Go(n,a,y,6);break;case 8:jh(),Pt=6;break e;default:throw Error(i(462))}}v_();break}catch(he){uv(n,he)}while(!0);return ba=Ki=null,H.H=c,H.A=p,ft=o,Qe!==null?0:(Et=null,tt=0,Nt(),Pt)}function v_(){for(;Qe!==null&&!ze();)pv(Qe)}function pv(n){var a=I0(n.alternate,n,Aa);n.memoizedProps=n.pendingProps,a===null?nu(n):Qe=a}function mv(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=k0(o,a,a.pendingProps,a.type,void 0,tt);break;case 11:a=k0(o,a,a.pendingProps,a.type.render,a.ref,tt);break;case 5:Kd(a);default:U0(o,a),a=Qe=Ju(a,Aa),a=I0(o,a,Aa)}n.memoizedProps=n.pendingProps,a===null?nu(n):Qe=a}function Go(n,a,o,c){ba=Ki=null,Kd(a),zo=null,Bs=0;var p=a.return;try{if(o_(n,p,a,o,tt)){Pt=1,Fc(n,Sr(o,n.current)),Qe=null;return}}catch(y){if(p!==null)throw Qe=p,y;Pt=1,Fc(n,Sr(o,n.current)),Qe=null;return}a.flags&32768?(rt||c===1?n=!0:qo||(tt&536870912)!==0?n=!1:(ri=n=!0,(c===2||c===9||c===3||c===6)&&(c=sr.current,c!==null&&c.tag===13&&(c.flags|=16384))),gv(a,n)):nu(a)}function nu(n){var a=n;do{if((a.flags&32768)!==0){gv(a,ri);return}n=a.return;var o=c_(a.alternate,a,Aa);if(o!==null){Qe=o;return}if(a=a.sibling,a!==null){Qe=a;return}Qe=a=n}while(a!==null);Pt===0&&(Pt=5)}function gv(n,a){do{var o=u_(n.alternate,n);if(o!==null){o.flags&=32767,Qe=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){Qe=n;return}Qe=n=o}while(n!==null);Pt=6,Qe=null}function yv(n,a,o,c,p,y,A,z,K){n.cancelPendingCommit=null;do ru();while(on!==0);if((ft&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=mt,qt(n,o,y,A,z,K),n===Et&&(Qe=Et=null,tt=0),Bo=a,oi=n,Ma=o,Oh=y,Ah=p,ov=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,E_(dn,function(){return Ev(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=H.T,H.T=null,p=J.p,J.p=2,A=ft,ft|=4;try{f_(n,a,o)}finally{ft=A,J.p=p,H.T=c}}on=1,vv(),bv(),Sv()}}function vv(){if(on===1){on=0;var n=oi,a=Bo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=H.T,H.T=null;var c=J.p;J.p=2;var p=ft;ft|=4;try{W0(a,n);var y=Bh,A=xd(n.containerInfo),z=y.focusedElem,K=y.selectionRange;if(A!==z&&z&&z.ownerDocument&&Wu(z.ownerDocument.documentElement,z)){if(K!==null&&Is(z)){var oe=K.start,he=K.end;if(he===void 0&&(he=oe),"selectionStart"in z)z.selectionStart=oe,z.selectionEnd=Math.min(he,z.value.length);else{var ge=z.ownerDocument||document,se=ge&&ge.defaultView||window;if(se.getSelection){var ce=se.getSelection(),Oe=z.textContent.length,Le=Math.min(K.start,Oe),wt=K.end===void 0?Le:Math.min(K.end,Oe);!ce.extend&&Le>wt&&(A=wt,wt=Le,Le=A);var ne=Ed(z,Le),Q=Ed(z,wt);if(ne&&Q&&(ce.rangeCount!==1||ce.anchorNode!==ne.node||ce.anchorOffset!==ne.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var ie=ge.createRange();ie.setStart(ne.node,ne.offset),ce.removeAllRanges(),Le>wt?(ce.addRange(ie),ce.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),ce.addRange(ie))}}}}for(ge=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&ge.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ge.length;z++){var me=ge[z];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}mu=!!Fh,Bh=Fh=null}finally{ft=p,J.p=c,H.T=o}}n.current=a,on=2}}function bv(){if(on===2){on=0;var n=oi,a=Bo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=H.T,H.T=null;var c=J.p;J.p=2;var p=ft;ft|=4;try{K0(n,a.alternate,a)}finally{ft=p,J.p=c,H.T=o}}on=3}}function Sv(){if(on===4||on===3){on=0,$e();var n=oi,a=Bo,o=Ma,c=ov;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?on=5:(on=0,Bo=oi=null,wv(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ii=null),Yr(o),a=a.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(vr,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=H.T,p=J.p,J.p=2,H.T=null;try{for(var y=n.onRecoverableError,A=0;A<c.length;A++){var z=c[A];y(z.value,{componentStack:z.stack})}}finally{H.T=a,J.p=p}}(Ma&3)!==0&&ru(),ia(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Mh?sl++:(sl=0,Mh=n):sl=0,ll(0)}}function wv(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,qs(a)))}function ru(){return vv(),bv(),Sv(),Ev()}function Ev(){if(on!==5)return!1;var n=oi,a=Oh;Oh=0;var o=Yr(Ma),c=H.T,p=J.p;try{J.p=32>o?32:o,H.T=null,o=Ah,Ah=null;var y=oi,A=Ma;if(on=0,Bo=oi=null,Ma=0,(ft&6)!==0)throw Error(i(331));var z=ft;if(ft|=4,rv(y.current),ev(y,y.current,A,o),ft=z,ll(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(vr,y)}catch{}return!0}finally{J.p=p,H.T=c,wv(n,a)}}function xv(n,a,o){a=Sr(o,a),a=lh(n.stateNode,a,2),n=Ja(n,a,2),n!==null&&(ea(n,2),ia(n))}function yt(n,a,o){if(n.tag===3)xv(n,n,o);else for(;a!==null;){if(a.tag===3){xv(a,n,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ii===null||!ii.has(c))){n=Sr(o,n),o=_0(2),c=Ja(a,o,2),c!==null&&(T0(o,c,a,n),ea(c,2),ia(c));break}}a=a.return}}function Nh(n,a,o){var c=n.pingCache;if(c===null){c=n.pingCache=new p_;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(o)||(Th=!0,p.add(o),n=b_.bind(null,n,a,o),a.then(n,n))}function b_(n,a,o){var c=n.pingCache;c!==null&&c.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Et===n&&(tt&o)===o&&(Pt===4||Pt===3&&(tt&62914560)===tt&&300>Ze()-Qc?(ft&2)===0&&Ho(n,0):Ch|=o,Fo===tt&&(Fo=0)),ia(n)}function _v(n,a){a===0&&(a=Ia()),n=Hn(n,a),n!==null&&(ea(n,a),ia(n))}function S_(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),_v(n,o)}function w_(n,a){var o=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),_v(n,o)}function E_(n,a){return je(n,a)}var au=null,Ko=null,Dh=!1,iu=!1,zh=!1,li=0;function ia(n){n!==Ko&&n.next===null&&(Ko===null?au=Ko=n:Ko=Ko.next=n),iu=!0,Dh||(Dh=!0,__())}function ll(n,a){if(!zh&&iu){zh=!0;do for(var o=!1,c=au;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var y=0;else{var A=c.suspendedLanes,z=c.pingedLanes;y=(1<<31-Dt(42|n)+1)-1,y&=p&~(A&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,Ov(c,y))}else y=tt,y=br(c,c===Et?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||zr(c,y)||(o=!0,Ov(c,y));c=c.next}while(o);zh=!1}}function x_(){Tv()}function Tv(){iu=Dh=!1;var n=0;li!==0&&D_()&&(n=li);for(var a=Ze(),o=null,c=au;c!==null;){var p=c.next,y=Cv(c,a);y===0?(c.next=null,o===null?au=p:o.next=p,p===null&&(Ko=o)):(o=c,(n!==0||(y&3)!==0)&&(iu=!0)),c=p}on!==0&&on!==5||ll(n),li!==0&&(li=0)}function Cv(n,a){for(var o=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Dt(y),z=1<<A,K=p[A];K===-1?((z&o)===0||(z&c)!==0)&&(p[A]=wo(z,a)):K<=a&&(n.expiredLanes|=z),y&=~z}if(a=Et,o=tt,o=br(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,o===0||n===a&&(gt===2||gt===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Se(c),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||zr(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(c!==null&&Se(c),Yr(o)){case 2:case 8:o=bn;break;case 32:o=dn;break;case 268435456:o=jt;break;default:o=dn}return c=Rv.bind(null,n),o=je(o,c),n.callbackPriority=a,n.callbackNode=o,a}return c!==null&&c!==null&&Se(c),n.callbackPriority=2,n.callbackNode=null,2}function Rv(n,a){if(on!==0&&on!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(ru()&&n.callbackNode!==o)return null;var c=tt;return c=br(n,n===Et?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(lv(n,c,a),Cv(n,Ze()),n.callbackNode!=null&&n.callbackNode===o?Rv.bind(null,n):null)}function Ov(n,a){if(ru())return null;lv(n,a,!0)}function __(){$_(function(){(ft&6)!==0?je(vn,x_):Tv()})}function $h(){if(li===0){var n=ko;n===0&&(n=Pn,Pn<<=1,(Pn&261888)===0&&(Pn=256)),li=n}return li}function Av(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:js(""+n)}function Mv(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 T_(n,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var y=Av((p[Dn]||null).action),A=c.submitter;A&&(a=(a=A[Dn]||null)?Av(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var z=new Ds("action","action",null,c,p);n.push({event:z,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(li!==0){var K=A?Mv(p,A):new FormData(p);nh(o,{pending:!0,data:K,method:p.method,action:y},null,K)}}else typeof y=="function"&&(z.preventDefault(),K=A?Mv(p,A):new FormData(p),nh(o,{pending:!0,data:K,method:p.method,action:y},y,K))},currentTarget:p}]})}}for(var Ph=0;Ph<He.length;Ph++){var Ih=He[Ph],C_=Ih.toLowerCase(),R_=Ih[0].toUpperCase()+Ih.slice(1);Ye(C_,"on"+R_)}Ye(Y,"onAnimationEnd"),Ye(fe,"onAnimationIteration"),Ye(ve,"onAnimationStart"),Ye("dblclick","onDoubleClick"),Ye("focusin","onFocus"),Ye("focusout","onBlur"),Ye(_e,"onTransitionRun"),Ye(pe,"onTransitionStart"),Ye(Ce,"onTransitionCancel"),Ye(Re,"onTransitionEnd"),Ii("onMouseEnter",["mouseout","mouseover"]),Ii("onMouseLeave",["mouseout","mouseover"]),Ii("onPointerEnter",["pointerout","pointerover"]),Ii("onPointerLeave",["pointerout","pointerover"]),Ba("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ba("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ba("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ba("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ba("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ba("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),O_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function jv(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var c=n[o],p=c.event;c=c.listeners;e:{var y=void 0;if(a)for(var A=c.length-1;0<=A;A--){var z=c[A],K=z.instance,oe=z.currentTarget;if(z=z.listener,K!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){et(he)}p.currentTarget=null,y=K}else for(A=0;A<c.length;A++){if(z=c[A],K=z.instance,oe=z.currentTarget,z=z.listener,K!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){et(he)}p.currentTarget=null,y=K}}}}function We(n,a){var o=a[fc];o===void 0&&(o=a[fc]=new Set);var c=n+"__bubble";o.has(c)||(kv(a,n,2,!1),o.add(c))}function Lh(n,a,o){var c=0;a&&(c|=4),kv(o,n,c,a)}var ou="_reactListening"+Math.random().toString(36).slice(2);function Uh(n){if(!n[ou]){n[ou]=!0,Ku.forEach(function(o){o!=="selectionchange"&&(O_.has(o)||Lh(o,!1,n),Lh(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[ou]||(a[ou]=!0,Lh("selectionchange",!1,a))}}function kv(n,a,o,c){switch(sb(a)){case 2:var p=n2;break;case 8:p=r2;break;default:p=tp}o=p.bind(null,a,o,n),p=void 0,!Dl||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?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 Vh(n,a,o,c,p){var y=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var A=c.tag;if(A===3||A===4){var z=c.stateNode.containerInfo;if(z===p)break;if(A===4)for(A=c.return;A!==null;){var K=A.tag;if((K===3||K===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;z!==null;){if(A=zi(z),A===null)return;if(K=A.tag,K===5||K===6||K===26||K===27){c=y=A;continue e}z=z.parentNode}}c=c.return}nd(function(){var oe=y,he=vc(o),ge=[];e:{var se=Ue.get(n);if(se!==void 0){var ce=Ds,Oe=n;switch(n){case"keypress":if(ks(o)===0)break e;case"keydown":case"keyup":ce=gm;break;case"focusin":Oe="focus",ce=zs;break;case"focusout":Oe="blur",ce=zs;break;case"beforeblur":case"afterblur":ce=zs;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=id;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=ho;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=bm;break;case Y:case fe:case ve:ce=lm;break;case Re:ce=ay;break;case"scroll":case"scrollend":ce=Fe;break;case"wheel":ce=cd;break;case"copy":case"cut":case"paste":ce=um;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=ua;break;case"toggle":case"beforetoggle":ce=sy}var Le=(a&4)!==0,wt=!Le&&(n==="scroll"||n==="scrollend"),ne=Le?se!==null?se+"Capture":null:se;Le=[];for(var Q=oe,ie;Q!==null;){var me=Q;if(ie=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ie===null||ne===null||(me=qi(Q,ne),me!=null&&Le.push(ul(Q,me,ie))),wt)break;Q=Q.return}0<Le.length&&(se=new ce(se,Oe,null,o,he),ge.push({event:se,listeners:Le}))}}if((a&7)===0){e:{if(se=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",se&&o!==yc&&(Oe=o.relatedTarget||o.fromElement)&&(zi(Oe)||Oe[La]))break e;if((ce||se)&&(se=he.window===he?he:(se=he.ownerDocument)?se.defaultView||se.parentWindow:window,ce?(Oe=o.relatedTarget||o.toElement,ce=oe,Oe=Oe?zi(Oe):null,Oe!==null&&(wt=l(Oe),Le=Oe.tag,Oe!==wt||Le!==5&&Le!==27&&Le!==6)&&(Oe=null)):(ce=null,Oe=oe),ce!==Oe)){if(Le=id,me="onMouseLeave",ne="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(Le=ua,me="onPointerLeave",ne="onPointerEnter",Q="pointer"),wt=ce==null?se:Eo(ce),ie=Oe==null?se:Eo(Oe),se=new Le(me,Q+"leave",ce,o,he),se.target=wt,se.relatedTarget=ie,me=null,zi(he)===oe&&(Le=new Le(ne,Q+"enter",Oe,o,he),Le.target=ie,Le.relatedTarget=wt,me=Le),wt=me,ce&&Oe)t:{for(Le=A_,ne=ce,Q=Oe,ie=0,me=ne;me;me=Le(me))ie++;me=0;for(var Pe=Q;Pe;Pe=Le(Pe))me++;for(;0<ie-me;)ne=Le(ne),ie--;for(;0<me-ie;)Q=Le(Q),me--;for(;ie--;){if(ne===Q||Q!==null&&ne===Q.alternate){Le=ne;break t}ne=Le(ne),Q=Le(Q)}Le=null}else Le=null;ce!==null&&Nv(ge,se,ce,Le,!1),Oe!==null&&wt!==null&&Nv(ge,wt,Oe,Le,!0)}}e:{if(se=oe?Eo(oe):window,ce=se.nodeName&&se.nodeName.toLowerCase(),ce==="select"||ce==="input"&&se.type==="file")var st=yd;else if(md(se))if(vd)st=py;else{st=Ai;var De=wd}else ce=se.nodeName,!ce||ce.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?oe&&gc(oe.elementType)&&(st=yd):st=Sm;if(st&&(st=st(n,oe))){gd(ge,st,o,he);break e}De&&De(n,se,oe),n==="focusout"&&oe&&se.type==="number"&&oe.memoizedProps.value!=null&&pc(se,"number",se.value)}switch(De=oe?Eo(oe):window,n){case"focusin":(md(De)||De.contentEditable==="true")&&(Va=De,wc=oe,Co=null);break;case"focusout":Co=wc=Va=null;break;case"mousedown":Ec=!0;break;case"contextmenu":case"mouseup":case"dragend":Ec=!1,_d(ge,o,he);break;case"selectionchange":if(my)break;case"keydown":case"keyup":_d(ge,o,he)}var Ke;if($l)e:{switch(n){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else Fi?hd(n,o)&&(nt="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(nt="onCompositionStart");nt&&(ud&&o.locale!=="ko"&&(Fi||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&Fi&&(Ke=rd()):(ca=he,bc="value"in ca?ca.value:ca.textContent,Fi=!0)),De=su(oe,nt),0<De.length&&(nt=new sd(nt,n,null,o,he),ge.push({event:nt,listeners:De}),Ke?nt.data=Ke:(Ke=pd(o),Ke!==null&&(nt.data=Ke)))),(Ke=cy?uy(n,o):fy(n,o))&&(nt=su(oe,"onBeforeInput"),0<nt.length&&(De=new sd("onBeforeInput","beforeinput",null,o,he),ge.push({event:De,listeners:nt}),De.data=Ke)),T_(ge,n,oe,o,he)}jv(ge,a)})}function ul(n,a,o){return{instance:n,listener:a,currentTarget:o}}function su(n,a){for(var o=a+"Capture",c=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=qi(n,o),p!=null&&c.unshift(ul(n,p,y)),p=qi(n,a),p!=null&&c.push(ul(n,p,y))),n.tag===3)return c;n=n.return}return[]}function A_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Nv(n,a,o,c,p){for(var y=a._reactName,A=[];o!==null&&o!==c;){var z=o,K=z.alternate,oe=z.stateNode;if(z=z.tag,K!==null&&K===c)break;z!==5&&z!==26&&z!==27||oe===null||(K=oe,p?(oe=qi(o,y),oe!=null&&A.unshift(ul(o,oe,K))):p||(oe=qi(o,y),oe!=null&&A.push(ul(o,oe,K)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var M_=/\r\n?/g,j_=/\u0000|\uFFFD/g;function Dv(n){return(typeof n=="string"?n:""+n).replace(M_,`
9
+ `).replace(j_,"")}function zv(n,a){return a=Dv(a),Dv(n)===a}function St(n,a,o,c,p,y){switch(o){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Li(n,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Li(n,""+c);break;case"className":As(n,"class",c);break;case"tabIndex":As(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":As(n,o,c);break;case"style":td(n,c,y);break;case"data":if(a!=="object"){As(n,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=js(""+c),n.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="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"&&St(n,a,"name",p.name,p,null),St(n,a,"formEncType",p.formEncType,p,null),St(n,a,"formMethod",p.formMethod,p,null),St(n,a,"formTarget",p.formTarget,p,null)):(St(n,a,"encType",p.encType,p,null),St(n,a,"method",p.method,p,null),St(n,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=js(""+c),n.setAttribute(o,c);break;case"onClick":c!=null&&(n.onclick=ta);break;case"onScroll":c!=null&&We("scroll",n);break;case"onScrollEnd":c!=null&&We("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}o=js(""+c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""+c):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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":c===!0?n.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,c):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(o,c):n.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(o):n.setAttribute(o,c);break;case"popover":We("beforetoggle",n),We("toggle",n),Os(n,"popover",c);break;case"xlinkActuate":Zr(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Zr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Zr(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Zr(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Zr(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Zr(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Zr(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Zr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Zr(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Os(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=ey.get(o)||o,Os(n,o,c))}}function qh(n,a,o,c,p,y){switch(o){case"style":td(n,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof c=="string"?Li(n,c):(typeof c=="number"||typeof c=="bigint")&&Li(n,""+c);break;case"onScroll":c!=null&&We("scroll",n);break;case"onScrollEnd":c!=null&&We("scrollend",n);break;case"onClick":c!=null&&(n.onclick=ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.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[Dn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof c=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,c,p);break e}o in n?n[o]=c:c===!0?n.setAttribute(o,""):Os(n,o,c)}}}function Tn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",n),We("load",n);var c=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,y,A,o,null)}}p&&St(n,a,"srcSet",o.srcSet,o,null),c&&St(n,a,"src",o.src,o,null);return;case"input":We("invalid",n);var z=y=A=p=null,K=null,oe=null;for(c in o)if(o.hasOwnProperty(c)){var he=o[c];if(he!=null)switch(c){case"name":p=he;break;case"type":A=he;break;case"checked":K=he;break;case"defaultChecked":oe=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:St(n,a,c,he,o,null)}}Wf(n,y,z,K,oe,A,p,!1);return;case"select":We("invalid",n),c=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":c=z;default:St(n,a,p,z,o,null)}a=y,o=A,n.multiple=!!c,a!=null?Ci(n,!!c,a,!1):o!=null&&Ci(n,!!c,o,!0);return;case"textarea":We("invalid",n),y=p=c=null;for(A in o)if(o.hasOwnProperty(A)&&(z=o[A],z!=null))switch(A){case"value":c=z;break;case"defaultValue":p=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(91));break;default:St(n,a,A,z,o,null)}Jf(n,c,p,y);return;case"option":for(K in o)o.hasOwnProperty(K)&&(c=o[K],c!=null)&&(K==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":St(n,a,K,c,o,null));return;case"dialog":We("beforetoggle",n),We("toggle",n),We("cancel",n),We("close",n);break;case"iframe":case"object":We("load",n);break;case"video":case"audio":for(c=0;c<cl.length;c++)We(cl[c],n);break;case"image":We("error",n),We("load",n);break;case"details":We("toggle",n);break;case"embed":case"source":case"link":We("error",n),We("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(oe in o)if(o.hasOwnProperty(oe)&&(c=o[oe],c!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,oe,c,o,null)}return;default:if(gc(a)){for(he in o)o.hasOwnProperty(he)&&(c=o[he],c!==void 0&&qh(n,a,he,c,o,void 0));return}}for(z in o)o.hasOwnProperty(z)&&(c=o[z],c!=null&&St(n,a,z,c,o,null))}function k_(n,a,o,c){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,K=null,oe=null,he=null;for(ce in o){var ge=o[ce];if(o.hasOwnProperty(ce)&&ge!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":K=ge;default:c.hasOwnProperty(ce)||St(n,a,ce,null,c,ge)}}for(var se in c){var ce=c[se];if(ge=o[se],c.hasOwnProperty(se)&&(ce!=null||ge!=null))switch(se){case"type":y=ce;break;case"name":p=ce;break;case"checked":oe=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!==ge&&St(n,a,se,ce,c,ge)}}kl(n,A,z,K,oe,he,y,p);return;case"select":ce=A=z=se=null;for(y in o)if(K=o[y],o.hasOwnProperty(y)&&K!=null)switch(y){case"value":break;case"multiple":ce=K;default:c.hasOwnProperty(y)||St(n,a,y,null,c,K)}for(p in c)if(y=c[p],K=o[p],c.hasOwnProperty(p)&&(y!=null||K!=null))switch(p){case"value":se=y;break;case"defaultValue":z=y;break;case"multiple":A=y;default:y!==K&&St(n,a,p,y,c,K)}a=z,o=A,c=ce,se!=null?Ci(n,!!o,se,!1):!!c!=!!o&&(a!=null?Ci(n,!!o,a,!0):Ci(n,!!o,o?[]:"",!1));return;case"textarea":ce=se=null;for(z in o)if(p=o[z],o.hasOwnProperty(z)&&p!=null&&!c.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:St(n,a,z,null,c,p)}for(A in c)if(p=c[A],y=o[A],c.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":se=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&St(n,a,A,p,c,y)}mc(n,se,ce);return;case"option":for(var Oe in o)se=o[Oe],o.hasOwnProperty(Oe)&&se!=null&&!c.hasOwnProperty(Oe)&&(Oe==="selected"?n.selected=!1:St(n,a,Oe,null,c,se));for(K in c)se=c[K],ce=o[K],c.hasOwnProperty(K)&&se!==ce&&(se!=null||ce!=null)&&(K==="selected"?n.selected=se&&typeof se!="function"&&typeof se!="symbol":St(n,a,K,se,c,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 Le in o)se=o[Le],o.hasOwnProperty(Le)&&se!=null&&!c.hasOwnProperty(Le)&&St(n,a,Le,null,c,se);for(oe in c)if(se=c[oe],ce=o[oe],c.hasOwnProperty(oe)&&se!==ce&&(se!=null||ce!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,a));break;default:St(n,a,oe,se,c,ce)}return;default:if(gc(a)){for(var wt in o)se=o[wt],o.hasOwnProperty(wt)&&se!==void 0&&!c.hasOwnProperty(wt)&&qh(n,a,wt,void 0,c,se);for(he in c)se=c[he],ce=o[he],!c.hasOwnProperty(he)||se===ce||se===void 0&&ce===void 0||qh(n,a,he,se,c,ce);return}}for(var ne in o)se=o[ne],o.hasOwnProperty(ne)&&se!=null&&!c.hasOwnProperty(ne)&&St(n,a,ne,null,c,se);for(ge in c)se=c[ge],ce=o[ge],!c.hasOwnProperty(ge)||se===ce||se==null&&ce==null||St(n,a,ge,se,c,ce)}function $v(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function N_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var p=o[c],y=p.transferSize,A=p.initiatorType,z=p.duration;if(y&&z&&$v(A)){for(A=0,z=p.responseEnd,c+=1;c<o.length;c++){var K=o[c],oe=K.startTime;if(oe>z)break;var he=K.transferSize,ge=K.initiatorType;he&&$v(ge)&&(K=K.responseEnd,A+=he*(K<z?1:(z-oe)/(K-oe)))}if(--c,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 Fh=null,Bh=null;function lu(n){return n.nodeType===9?n:n.ownerDocument}function Pv(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 Iv(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 Hh(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 Gh=null;function D_(){var n=window.event;return n&&n.type==="popstate"?n===Gh?!1:(Gh=n,!0):(Gh=null,!1)}var Lv=typeof setTimeout=="function"?setTimeout:void 0,z_=typeof clearTimeout=="function"?clearTimeout:void 0,Uv=typeof Promise=="function"?Promise:void 0,$_=typeof queueMicrotask=="function"?queueMicrotask:typeof Uv<"u"?function(n){return Uv.resolve(null).then(n).catch(P_)}:Lv;function P_(n){setTimeout(function(){throw n})}function ci(n){return n==="head"}function Vv(n,a){var o=a,c=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(c===0){n.removeChild(p),Qo(a);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")fl(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,fl(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"&&fl(n.ownerDocument.body);o=p}while(o);Qo(a)}function qv(n,a){var o=n;n=0;do{var c=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||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=c}while(o)}function Kh(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":Kh(o),dc(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function I_(n,a,o,c){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){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=Tr(n.nextSibling),n===null)break}return null}function L_(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Tr(n.nextSibling),n===null))return null;return n}function Fv(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Tr(n.nextSibling),n===null))return null;return n}function Yh(n){return n.data==="$?"||n.data==="$~"}function Zh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function U_(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var c=function(){a(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Tr(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 Xh=null;function Bv(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Tr(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Hv(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 Gv(n,a,o){switch(a=lu(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 fl(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);dc(n)}var Cr=new Map,Kv=new Set;function cu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ja=J.d;J.d={f:V_,r:q_,D:F_,C:B_,L:H_,m:G_,X:Y_,S:K_,M:Z_};function V_(){var n=ja.f(),a=eu();return n||a}function q_(n){var a=$i(n);a!==null&&a.tag===5&&a.type==="form"?u0(a):ja.r(n)}var Yo=typeof document>"u"?null:document;function Yv(n,a,o){var c=Yo;if(c&&typeof a=="string"&&a){var p=In(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Kv.has(p)||(Kv.add(p),n={rel:n,crossOrigin:o,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Tn(a,"link",n),rn(a),c.head.appendChild(a)))}}function F_(n){ja.D(n),Yv("dns-prefetch",n,null)}function B_(n,a){ja.C(n,a),Yv("preconnect",n,a)}function H_(n,a,o){ja.L(n,a,o);var c=Yo;if(c&&n&&a){var p='link[rel="preload"][as="'+In(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+In(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+In(o.imageSizes)+'"]')):p+='[href="'+In(n)+'"]';var y=p;switch(a){case"style":y=Zo(n);break;case"script":y=Xo(n)}Cr.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Cr.set(y,n),c.querySelector(p)!==null||a==="style"&&c.querySelector(dl(y))||a==="script"&&c.querySelector(hl(y))||(a=c.createElement("link"),Tn(a,"link",n),rn(a),c.head.appendChild(a)))}}function G_(n,a){ja.m(n,a);var o=Yo;if(o&&n){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+In(c)+'"][href="'+In(n)+'"]',y=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Xo(n)}if(!Cr.has(y)&&(n=g({rel:"modulepreload",href:n},a),Cr.set(y,n),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(hl(y)))return}c=o.createElement("link"),Tn(c,"link",n),rn(c),o.head.appendChild(c)}}}function K_(n,a,o){ja.S(n,a,o);var c=Yo;if(c&&n){var p=Pi(c).hoistableStyles,y=Zo(n);a=a||"default";var A=p.get(y);if(!A){var z={loading:0,preload:null};if(A=c.querySelector(dl(y)))z.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Cr.get(y))&&Qh(n,o);var K=A=c.createElement("link");rn(K),Tn(K,"link",n),K._p=new Promise(function(oe,he){K.onload=oe,K.onerror=he}),K.addEventListener("load",function(){z.loading|=1}),K.addEventListener("error",function(){z.loading|=2}),z.loading|=4,uu(A,a,c)}A={type:"stylesheet",instance:A,count:1,state:z},p.set(y,A)}}}function Y_(n,a){ja.X(n,a);var o=Yo;if(o&&n){var c=Pi(o).hoistableScripts,p=Xo(n),y=c.get(p);y||(y=o.querySelector(hl(p)),y||(n=g({src:n,async:!0},a),(a=Cr.get(p))&&Wh(n,a),y=o.createElement("script"),rn(y),Tn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function Z_(n,a){ja.M(n,a);var o=Yo;if(o&&n){var c=Pi(o).hoistableScripts,p=Xo(n),y=c.get(p);y||(y=o.querySelector(hl(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=Cr.get(p))&&Wh(n,a),y=o.createElement("script"),rn(y),Tn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function Zv(n,a,o,c){var p=(p=ee.current)?cu(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=Zo(o.href),o=Pi(p).hoistableStyles,c=o.get(a),c||(c={type:"style",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Zo(o.href);var y=Pi(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(dl(n)))&&!y._p&&(A.instance=y,A.state.loading=5),Cr.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},Cr.set(n,o),y||X_(p,n,o,A.state))),a&&c===null)throw Error(i(528,""));return A}if(a&&c!==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=Xo(o),o=Pi(p).hoistableScripts,c=o.get(a),c||(c={type:"script",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Zo(n){return'href="'+In(n)+'"'}function dl(n){return'link[rel="stylesheet"]['+n+"]"}function Xv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function X_(n,a,o,c){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=n.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Tn(a,"link",o),rn(a),n.head.appendChild(a))}function Xo(n){return'[src="'+In(n)+'"]'}function hl(n){return"script[async]"+n}function Qv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var c=n.querySelector('style[data-href~="'+In(o.href)+'"]');if(c)return a.instance=c,rn(c),c;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),rn(c),Tn(c,"style",p),uu(c,o.precedence,n),a.instance=c;case"stylesheet":p=Zo(o.href);var y=n.querySelector(dl(p));if(y)return a.state.loading|=4,a.instance=y,rn(y),y;c=Xv(o),(p=Cr.get(p))&&Qh(c,p),y=(n.ownerDocument||n).createElement("link"),rn(y);var A=y;return A._p=new Promise(function(z,K){A.onload=z,A.onerror=K}),Tn(y,"link",c),a.state.loading|=4,uu(y,o.precedence,n),a.instance=y;case"script":return y=Xo(o.src),(p=n.querySelector(hl(y)))?(a.instance=p,rn(p),p):(c=o,(p=Cr.get(y))&&(c=g({},o),Wh(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),rn(p),Tn(p,"link",c),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&&(c=a.instance,a.state.loading|=4,uu(c,o.precedence,n));return a.instance}function uu(n,a,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,y=p,A=0;A<c.length;A++){var z=c[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 Qh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Wh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var fu=null;function Wv(n,a,o){if(fu===null){var c=new Map,p=fu=new Map;p.set(o,c)}else p=fu,c=p.get(o),c||(c=new Map,p.set(o,c));if(c.has(n))return c;for(c.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[co]||y[gn]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var z=c.get(A);z?z.push(y):c.set(A,[y])}}return c}function Jv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function Q_(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 eb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function W_(n,a,o,c){if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Zo(c.href),y=a.querySelector(dl(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=du.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,rn(y);return}y=a.ownerDocument||a,c=Xv(c),(p=Cr.get(p))&&Qh(c,p),y=y.createElement("link"),rn(y);var A=y;A._p=new Promise(function(z,K){A.onload=z,A.onerror=K}),Tn(y,"link",c),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=du.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var Jh=0;function J_(n,a){return n.stylesheets&&n.count===0&&pu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var c=setTimeout(function(){if(n.stylesheets&&pu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&Jh===0&&(Jh=62500*N_());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&pu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Jh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var hu=null;function pu(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,hu=new Map,a.forEach(e2,n),hu=null,du.call(n))}function e2(n,a){if(!(a.state.loading&4)){var o=hu.get(n);if(o)var c=o.get(null);else{o=new Map,hu.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),c=A)}c&&o.set(null,c)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||c,y===c&&o.set(null,p),o.set(A,p),this.count++,c=du.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var pl={$$typeof:O,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function t2(n,a,o,c,p,y,A,z,K){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=Gr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gr(0),this.hiddenUpdates=Gr(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function tb(n,a,o,c,p,y,A,z,K,oe,he,ge){return n=new t2(n,a,o,A,K,oe,he,ge,z),a=1,y===!0&&(a|=24),y=Yt(3,null,null,a),n.current=y,y.stateNode=n,a=kd(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:c,isDehydrated:o,cache:a},$d(y),n}function nb(n){return n?(n=Qr,n):Qr}function rb(n,a,o,c,p,y){p=nb(p),c.context===null?c.context=p:c.pendingContext=p,c=Wa(a),c.payload={element:o},y=y===void 0?null:y,y!==null&&(c.callback=y),o=Ja(n,c,a),o!==null&&(Xn(o,n,a),Gs(o,n,a))}function ab(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function ep(n,a){ab(n,a),(n=n.alternate)&&ab(n,a)}function ib(n){if(n.tag===13||n.tag===31){var a=Hn(n,67108864);a!==null&&Xn(a,n,67108864),ep(n,67108864)}}function ob(n){if(n.tag===13||n.tag===31){var a=fr();a=jn(a);var o=Hn(n,a);o!==null&&Xn(o,n,a),ep(n,a)}}var mu=!0;function n2(n,a,o,c){var p=H.T;H.T=null;var y=J.p;try{J.p=2,tp(n,a,o,c)}finally{J.p=y,H.T=p}}function r2(n,a,o,c){var p=H.T;H.T=null;var y=J.p;try{J.p=8,tp(n,a,o,c)}finally{J.p=y,H.T=p}}function tp(n,a,o,c){if(mu){var p=np(c);if(p===null)Vh(n,a,c,gu,o),lb(n,c);else if(i2(p,n,a,o,c))c.stopPropagation();else if(lb(n,c),a&4&&-1<a2.indexOf(n)){for(;p!==null;){var y=$i(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Mn(y.pendingLanes);if(A!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;A;){var K=1<<31-Dt(A);z.entanglements[1]|=K,A&=~K}ia(y),(ft&6)===0&&(Wc=Ze()+500,ll(0))}}break;case 31:case 13:z=Hn(y,2),z!==null&&Xn(z,y,2),eu(),ep(y,2)}if(y=np(c),y===null&&Vh(n,a,c,gu,o),y===p)break;p=y}p!==null&&c.stopPropagation()}else Vh(n,a,c,null,o)}}function np(n){return n=vc(n),rp(n)}var gu=null;function rp(n){if(gu=null,n=zi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=u(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 sb(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(hn()){case vn:return 2;case bn:return 8;case dn:case xt:return 32;case jt:return 268435456;default:return 32}default:return 32}}var ap=!1,ui=null,fi=null,di=null,ml=new Map,gl=new Map,hi=[],a2="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 lb(n,a){switch(n){case"focusin":case"focusout":ui=null;break;case"dragenter":case"dragleave":fi=null;break;case"mouseover":case"mouseout":di=null;break;case"pointerover":case"pointerout":ml.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":gl.delete(a.pointerId)}}function yl(n,a,o,c,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:c,nativeEvent:y,targetContainers:[p]},a!==null&&(a=$i(a),a!==null&&ib(a)),n):(n.eventSystemFlags|=c,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function i2(n,a,o,c,p){switch(a){case"focusin":return ui=yl(ui,n,a,o,c,p),!0;case"dragenter":return fi=yl(fi,n,a,o,c,p),!0;case"mouseover":return di=yl(di,n,a,o,c,p),!0;case"pointerover":var y=p.pointerId;return ml.set(y,yl(ml.get(y)||null,n,a,o,c,p)),!0;case"gotpointercapture":return y=p.pointerId,gl.set(y,yl(gl.get(y)||null,n,a,o,c,p)),!0}return!1}function cb(n){var a=zi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=u(o),a!==null){n.blockedOn=a,jl(n.priority,function(){ob(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,jl(n.priority,function(){ob(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 yu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=np(n.nativeEvent);if(o===null){o=n.nativeEvent;var c=new o.constructor(o.type,o);yc=c,o.target.dispatchEvent(c),yc=null}else return a=$i(o),a!==null&&ib(a),n.blockedOn=o,!1;a.shift()}return!0}function ub(n,a,o){yu(n)&&o.delete(a)}function o2(){ap=!1,ui!==null&&yu(ui)&&(ui=null),fi!==null&&yu(fi)&&(fi=null),di!==null&&yu(di)&&(di=null),ml.forEach(ub),gl.forEach(ub)}function vu(n,a){n.blockedOn===a&&(n.blockedOn=null,ap||(ap=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,o2)))}var bu=null;function fb(n){bu!==n&&(bu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bu===n&&(bu=null);for(var a=0;a<n.length;a+=3){var o=n[a],c=n[a+1],p=n[a+2];if(typeof c!="function"){if(rp(c||o)===null)continue;break}var y=$i(o);y!==null&&(n.splice(a,3),a-=3,nh(y,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function Qo(n){function a(K){return vu(K,n)}ui!==null&&vu(ui,n),fi!==null&&vu(fi,n),di!==null&&vu(di,n),ml.forEach(a),gl.forEach(a);for(var o=0;o<hi.length;o++){var c=hi[o];c.blockedOn===n&&(c.blockedOn=null)}for(;0<hi.length&&(o=hi[0],o.blockedOn===null);)cb(o),o.blockedOn===null&&hi.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],y=o[c+1],A=p[Dn]||null;if(typeof y=="function")A||fb(o);else if(A){var z=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[Dn]||null)z=A.formAction;else if(rp(p)!==null)continue}else z=A.action;typeof z=="function"?o[c+1]=z:(o.splice(c,3),c-=3),fb(o)}}}function db(){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),c||setTimeout(o,20)}function o(){if(!c&&!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 c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function ip(n){this._internalRoot=n}Su.prototype.render=ip.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,c=fr();rb(o,c,n,a,null,null)},Su.prototype.unmount=ip.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;rb(n.current,2,null,n,null,null),eu(),a[La]=null}};function Su(n){this._internalRoot=n}Su.prototype.unstable_scheduleHydration=function(n){if(n){var a=Ml();n={blockedOn:null,target:n,priority:a};for(var o=0;o<hi.length&&a!==0&&a<hi[o].priority;o++);hi.splice(o,0,n),o===0&&cb(n)}};var hb=t.version;if(hb!=="19.2.4")throw Error(i(527,hb,"19.2.4"));J.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 s2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{vr=wu.inject(s2),Gt=wu}catch{}}return mb.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,c="",p=S0,y=w0,A=E0;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=tb(n,1,!1,null,null,o,c,null,p,y,A,db),n[La]=a.current,Uh(n),new ip(a)},mb.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var c=!1,p="",y=S0,A=w0,z=E0,K=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!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&&(K=o.formState)),a=tb(n,1,!0,a,o??null,c,p,K,y,A,z,db),a.context=nb(null),o=a.current,c=fr(),c=jn(c),p=Wa(c),p.callback=null,Ja(o,p,c),o=c,a.current.lanes=o,ea(a,o),ia(a),n[La]=a.current,Uh(n),new Su(a)},mb.version="19.2.4",mb}var j5;function ZV(){if(j5)return f2.exports;j5=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(),f2.exports=YV(),f2.exports}var XV=ZV(),Rg=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(){}},QV={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},WV=class{#e=QV;#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)}},bp=new WV;function JV(e){setTimeout(e,0)}var Ap=typeof window>"u"||"Deno"in globalThis;function io(){}function eq(e,t){return typeof e=="function"?e(t):e}function fC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Nz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function yf(e,t){return typeof e=="function"?e(t):e}function hs(e,t){return typeof e=="function"?e(t):e}function k5(e,t){const{type:r="all",exact:i,fetchStatus:s,predicate:l,queryKey:u,stale:f}=e;if(u){if(i){if(t.queryHash!==oO(u,t.options))return!1}else if(!a1(t.queryKey,u))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 N5(e,t){const{exact:r,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Mp(t.options.mutationKey)!==Mp(l))return!1}else if(!a1(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function oO(e,t){return(t?.queryKeyHashFn||Mp)(e)}function Mp(e){return JSON.stringify(e,(t,r)=>dC(r)?Object.keys(r).sort().reduce((i,s)=>(i[s]=r[s],i),{}):r)}function a1(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>a1(e[r],t[r])):!1}var tq=Object.prototype.hasOwnProperty;function Dz(e,t,r=0){if(e===t)return e;if(r>500)return t;const i=D5(e)&&D5(t);if(!i&&!(dC(e)&&dC(t)))return t;const l=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),f=u.length,d=i?new Array(f):{};let h=0;for(let m=0;m<f;m++){const g=i?m:u[m],v=e[g],x=t[g];if(v===x){d[g]=v,(i?m<l:tq.call(e,g))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){d[g]=x;continue}const b=Dz(v,x,r+1);d[g]=b,b===v&&h++}return l===f&&h===l?e:d}function lE(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 D5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dC(e){if(!z5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!z5(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function z5(e){return Object.prototype.toString.call(e)==="[object Object]"}function nq(e){return new Promise(t=>{bp.setTimeout(t,e)})}function hC(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Dz(e,t):t}function rq(e,t,r=0){const i=[...e,t];return r&&i.length>r?i.slice(1):i}function aq(e,t,r=0){const i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var sO=Symbol();function zz(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===sO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function lO(e,t){return typeof e=="function"?e(...t):!!e}function iq(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 oq=class extends Rg{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ap&&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"}},cO=new oq;function pC(){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 sq=JV;function lq(){let e=[],t=0,r=f=>{f()},i=f=>{f()},s=sq;const l=f=>{t?e.push(f):s(()=>{r(f)})},u=()=>{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||u()}return d},batchCalls:f=>(...d)=>{l(()=>{f(...d)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{s=f}}}var Da=lq(),cq=class extends Rg{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ap&&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}},cE=new cq;function uq(e){return Math.min(1e3*2**e,3e4)}function $z(e){return(e??"online")==="online"?cE.isOnline():!0}var mC=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Pz(e){let t=!1,r=0,i;const s=pC(),l=()=>s.status!=="pending",u=w=>{if(!l()){const S=new mC(w);v(S),e.onCancel?.(S)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>cO.isFocused()&&(e.networkMode==="always"||cE.isOnline())&&e.canRun(),m=()=>$z(e.networkMode)&&e.canRun(),g=w=>{l()||(i?.(),s.resolve(w))},v=w=>{l()||(i?.(),s.reject(w))},x=()=>new Promise(w=>{i=S=>{(l()||h())&&w(S)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),b=()=>{if(l())return;let w;const S=r===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{if(l())return;const E=e.retry??(Ap?0:3),O=e.retryDelay??uq,T=typeof O=="function"?O(r,_):O,C=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(t||!C){v(_);return}r++,e.onFail?.(r,_),nq(T).then(()=>h()?void 0:x()).then(()=>{t?v(_):b()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(i?.(),s),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?b():x().then(b),s)}}var Iz=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fC(this.gcTime)&&(this.#e=bp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ap?1/0:300*1e3))}clearGcTimeout(){this.#e&&(bp.clearTimeout(this.#e),this.#e=void 0)}},fq=class extends Iz{#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=P5(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=P5(this.options);t.data!==void 0&&(this.setState($5(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=hC(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(io).catch(io):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>hs(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>yf(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:!Nz(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=zz(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)},u=(()=>{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(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=Pz({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof mC&&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:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.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 mC){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,...Lz(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...$5(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),Da.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Lz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$z(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $5(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function P5(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 dq=class extends Rg{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#s=pC(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#o;#s;#i;#m;#d;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),I5(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gC(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 hs(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&&!lE(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&L5(this.#t,r,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#t!==r||hs(this.options.enabled,this.#t)!==hs(t.enabled,this.#t)||yf(this.options.staleTime,this.#t)!==yf(t.staleTime,this.#t))&&this.#g();const s=this.#y();i&&(this.#t!==r||hs(this.options.enabled,this.#t)!==hs(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 pq(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(io)),t}#g(){this.#S();const e=yf(this.options.staleTime,this.#t);if(Ap||this.#a.isStale||!fC(e))return;const r=Nz(this.#a.dataUpdatedAt,e)+1;this.#c=bp.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,!(Ap||hs(this.options.enabled,this.#t)===!1||!fC(this.#l)||this.#l===0)&&(this.#u=bp.setInterval(()=>{(this.options.refetchIntervalInBackground||cO.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#c&&(bp.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(bp.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const r=this.#t,i=this.options,s=this.#a,l=this.#r,u=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(),I=!D&&I5(e,t),B=D&&L5(e,r,t,i);(I||B)&&(m={...m,...Lz(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:b,status:w}=m;v=m.data;let S=!1;if(t.placeholderData!==void 0&&v===void 0&&w==="pending"){let D;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(D=s.data,S=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(w="success",v=hC(s?.data,D,t),g=!0)}if(t.select&&v!==void 0&&!S)if(s&&v===l?.data&&t.select===this.#m)v=this.#d;else try{this.#m=t.select,v=t.select(v),v=hC(s?.data,v,t),this.#d=v,this.#i=null}catch(D){this.#i=D}this.#i&&(x=this.#i,v=this.#d,b=Date.now(),w="error");const _=m.fetchStatus==="fetching",E=w==="pending",O=w==="error",T=E&&_,C=v!==void 0,M={status:w,fetchStatus:m.fetchStatus,isPending:E,isSuccess:w==="success",isError:O,isInitialLoading:T,isLoading:T,data:v,dataUpdatedAt:m.dataUpdatedAt,error:x,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:_,isRefetching:_&&!E,isLoadingError:O&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:O&&C,isStale:uO(e,t),refetch:this.refetch,promise:this.#s,isEnabled:hs(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,I=M.status==="error"&&!D,B=G=>{I?G.reject(M.error):D&&G.resolve(M.data)},V=()=>{const G=this.#s=M.promise=pC();B(G)},F=this.#s;switch(F.status){case"pending":e.queryHash===r.queryHash&&B(F);break;case"fulfilled":(I||M.data!==F.value)&&V();break;case"rejected":(!I||M.error!==F.reason)&&V();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),lE(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(u=>{const f=u;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){Da.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function hq(e,t){return hs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function I5(e,t){return hq(e,t)||e.state.data!==void 0&&gC(e,t,t.refetchOnMount)}function gC(e,t,r){if(hs(t.enabled,e)!==!1&&yf(t.staleTime,e)!=="static"){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&uO(e,t)}return!1}function L5(e,t,r,i){return(e!==t||hs(i.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&uO(e,r)}function uO(e,t){return hs(t.enabled,e)!==!1&&e.isStaleByTime(yf(t.staleTime,e))}function pq(e,t){return!lE(e.getCurrentResult(),t)}function U5(e){return{onFetch:(t,r)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let m=!1;const g=b=>{iq(b,()=>t.signal,()=>m=!0)},v=zz(t.options,t.fetchOptions),x=async(b,w,S)=>{if(m)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return g(R),R})(),O=await v(E),{maxPages:T}=t.options,C=S?aq:rq;return{pages:C(b.pages,O,T),pageParams:C(b.pageParams,w,T)}};if(s&&l.length){const b=s==="backward",w=b?mq:V5,S={pages:l,pageParams:u},_=w(i,S);f=await x(S,_,b)}else{const b=e??l.length;do{const w=d===0?u[0]??i.initialPageParam:V5(i,f);if(d>0&&w==null)break;f=await x(f,w),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 V5(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 mq(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var gq=class extends Iz{#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||Uz(),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=Pz({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},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 u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,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(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,r)}catch(u){Promise.reject(u)}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),Da.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Uz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yq=class extends Rg{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 gq({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=hS(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=hS(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=hS(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=hS(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Da.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=>N5(t,r))}findAll(e={}){return this.getAll().filter(t=>N5(e,t))}notify(e){Da.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Da.batch(()=>Promise.all(e.map(t=>t.continue().catch(io))))}};function hS(e){return e.options.scope?.id}var vq=class extends Rg{#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),lE(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Mp(r.mutationKey)!==Mp(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??Uz();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){Da.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)})})}},bq=class extends Rg{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const i=t.queryKey,s=t.queryHash??oO(i,t);let l=this.get(s);return l||(l=new fq({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(){Da.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){Da.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Da.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Da.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Sq=class{#e;#t;#n;#a;#r;#o;#s;#i;constructor(e={}){this.#e=e.queryCache||new bq,this.#t=e.mutationCache||new yq,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=cO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=cE.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(yf(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,u=eq(t,l);if(u!==void 0)return this.#e.build(this,i).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Da.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;Da.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Da.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},i=Da.batch(()=>this.#e.findAll(e).map(s=>s.cancel(r)));return Promise.all(i).then(io).catch(io)}invalidateQueries(e,t={}){return Da.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=Da.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(io)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(io)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(yf(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(io).catch(io)}fetchInfiniteQuery(e){return e.behavior=U5(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(io).catch(io)}ensureInfiniteQueryData(e){return e.behavior=U5(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cE.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(Mp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],r={};return t.forEach(i=>{a1(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Mp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(i=>{a1(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=oO(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===sO&&(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()}},Vz=j.createContext(void 0),qz=e=>{const t=j.useContext(Vz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},wq=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(Vz.Provider,{value:e,children:t})),Fz=j.createContext(!1),Eq=()=>j.useContext(Fz);Fz.Provider;function xq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _q=j.createContext(xq()),Tq=()=>j.useContext(_q),Cq=(e,t,r)=>{const i=r?.state.error&&typeof e.throwOnError=="function"?lO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},Rq=e=>{j.useEffect(()=>{e.clearReset()},[e])},Oq=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||lO(r,[e.error,i])),Aq=(e,t)=>t.state.data===void 0,Mq=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))}},jq=(e,t)=>e.isLoading&&e.isFetching&&!t,kq=(e,t)=>e?.suspense&&t.isPending,q5=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Nq(e,t,r){const i=Eq(),s=Tq(),l=qz(),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const f=l.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",Mq(u),Cq(u,s,f),Rq(s);const d=!l.getQueryCache().get(u.queryHash),[h]=j.useState(()=>new t(l,u)),m=h.getOptimisticResult(u),g=!i&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(v=>{const x=g?h.subscribe(Da.batchCalls(v)):io;return h.updateResult(),x},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(u)},[u,h]),kq(u,m))throw q5(u,h,s);if(Oq({result:m,errorResetBoundary:s,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw m.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,m),u.experimental_prefetchInRender&&!Ap&&jq(m,i)&&(d?q5(u,h,s):f?.promise)?.catch(io).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?m:h.trackResult(m)}function Bz(e,t){return Nq({...e,enabled:!0,suspense:!0,throwOnError:Aq,placeholderData:void 0},dq)}function Dq(e,t){const r=qz(),[i]=j.useState(()=>new vq(r,e));j.useEffect(()=>{i.setOptions(e)},[i,e]);const s=j.useSyncExternalStore(j.useCallback(u=>i.subscribe(Da.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=j.useCallback((u,f)=>{i.mutate(u,f).catch(io)},[i]);if(s.error&&lO(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}var zq={};const fO=Iq();function Nr(e,...t){if(!fO)return;const r=Pq(e,...t);performance.mark(r);try{console.log(e,...t)}catch{console.log(r)}}function $q(e,...t){fO&&console.warn(e,...t)}function Pq(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 Iq(){if(typeof window>"u")return(zq.DEBUG||"").includes("nuqs");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 Lq={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 N1(e){return`[nuqs] ${Lq[e]}
10
+ See https://nuqs.dev/NUQS-${e}`}function Uq(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}=${Vq(s)}`)}return"?"+t.join("&")}function Vq(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 jp=j.createContext({useAdapter(){throw new Error(N1(404))}});jp.displayName="NuqsAdapterContext";fO&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==jp&&console.error(N1(303)),window.__NuqsAdapterContext=jp);function qq(e){return({children:t,defaultOptions:r,processUrlSearchParams:i,...s})=>j.createElement(jp.Provider,{...s,value:{useAdapter:e,defaultOptions:r,processUrlSearchParams:i}},t)}function Fq(e){const t=j.useContext(jp);if(!("useAdapter"in t))throw new Error(N1(404));return t.useAdapter(e)}const Bq=()=>j.useContext(jp).defaultOptions,Hq=()=>j.useContext(jp).processUrlSearchParams;function Gq(){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 Kq(e){return{method:"throttle",timeMs:e}}const Ub=Kq(Gq());function Yq(e){return e===null||Array.isArray(e)&&e.length===0}function Zq(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 dO(){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 yC(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 vC(){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 Xq(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 bC(){return new URLSearchParams(location.search)}var Hz=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=Ub.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:r},i=Ub.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Nr("[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=bC}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=bC,rateLimitFactor:t=1,...r},i){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Nr("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=vC();const s=()=>{this.lastFlushedAt=performance.now();const[u,f]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},i);f===null?(this.resolvers.resolve(u),this.resetQueueOnNextPush=!0):this.resolvers.reject(u),this.resolvers=null};return yC(()=>{const u=performance.now()-this.lastFlushedAt,f=this.timeMs,d=t*Math.max(0,f-u);Nr("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",d,f,t),d===0?s():yC(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 Nr("[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=Ub.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:r,getSearchParamsSnapshot:i}=e;let s=i();if(Nr("[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()),u={...this.options},f=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Nr("[nuqs gtq] Flushing queue %O with options %O",l,u);for(const[d,h]of l)h===null?s.delete(d):s=Zq(h,d,s);t&&(s=t(s));try{return Xq(f,()=>{r(s,u)}),[s,null]}catch(d){return console.error(N1(429),l.map(([h])=>h).join(),d),[s,d]}}};const Pw=new Hz;function Qq(e,t,r){const i=j.useCallback(()=>{const l=Object.fromEntries(e.map(u=>[u,r(u)]));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 u=e.map(f=>t(f,l));return()=>u.forEach(f=>f())},[e.join(","),t]),()=>{const[l,u]=i();return s.current[0]===l?s.current[1]:(s.current=[l,u],u)},()=>s.current[1])}var Wq=class{callback;resolvers=vC();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,yC(()=>{const r=this.resolvers;try{Nr("[nuqs dq] Flushing debounce queue",e);const i=this.callback(e);Nr("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=vC(),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}},Jq=class{throttleQueue;queues=new Map;queuedQuerySync=dO();constructor(e=new Hz){this.throttleQueue=e}useQueuedQueries(e){return Qq(e,(t,r)=>this.queuedQuerySync.on(t,r),t=>this.getQueuedQuery(t))}push(e,t,r,i){if(!Number.isFinite(t)){const u=r.getSearchParamsSnapshot??bC;return Promise.resolve(u())}const s=e.key;if(!this.queues.has(s)){Nr("[nuqs dqc] Creating debounce queue for `%s`",s);const u=new Wq(f=>(this.throttleQueue.push(f),this.throttleQueue.flush(r,i).finally(()=>{this.queues.get(f.key)?.queuedValue===void 0&&(Nr("[nuqs dqc] Cleaning up empty queue for `%s`",f.key),this.queues.delete(f.key)),this.queuedQuerySync.emit(f.key)})));this.queues.set(s,u)}Nr("[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?(Nr("[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())Nr("[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 m2=new Jq(Pw);function Gz(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 F5(e,t,r){return i=>{if(!(t.length===0||t.some(l=>!Gz(i.getAll(l),e.getAll(l)))))return Nr("[nuqs `%s`] no change, returning previous",t.join(","),i),i;const s=Kz(e,t,r);return Nr("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),i,s),s}}function Kz(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 eF="__nuqs__",SC=dO();function tF(e){return function(r,i){const s=new URL(location.href);s.search=Uq(r),Nr("[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,eF,s),SC.emit("update",r),i.scroll===!0&&window.scrollTo({top:0})}}const Yz=j.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function nF(e){const{fullPageNavigationOnShallowFalseUpdates:t}=j.useContext(Yz),[r,i]=j.useState(()=>typeof location>"u"?new URLSearchParams:Kz(new URLSearchParams(location.search),e,!1));return j.useEffect(()=>{const s=()=>{i(F5(new URLSearchParams(location.search),e,!1))},l=u=>{i(F5(u,e,!0))};return SC.on("update",l),window.addEventListener("popstate",s),()=>{SC.off("update",l),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:r,updateUrl:j.useMemo(()=>tF(t),[t])}}const rF=qq(nF);function aF({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...r}){return j.createElement(Yz.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},j.createElement(rF,{...r,children:e}))}const Zz=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();const iF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const oF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase());const B5=e=>{const t=oF(e);return t.charAt(0).toUpperCase()+t.slice(1)};var sF={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 lF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const cF=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:u,...f},d)=>j.createElement("svg",{ref:d,...sF,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Zz("lucide",s),...!l&&!lF(f)&&{"aria-hidden":"true"},...f},[...u.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const Di=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(cF,{ref:l,iconNode:t,className:Zz(`lucide-${iF(B5(e))}`,`lucide-${e}`,i),...s}));return r.displayName=B5(e),r};const uF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hO=Di("check",uF);const fF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xz=Di("chevron-down",fF);const dF=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],hF=Di("chevron-up",dF);const pF=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],mF=Di("chevrons-up-down",pF);const gF=[["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"}]],yF=Di("circle-alert",gF);const vF=[["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"}]],bF=Di("external-link",vF);const SF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],wF=Di("info",SF);const EF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],xF=Di("loader-circle",EF);const _F=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],TF=Di("log-out",_F);const CF=[["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"}]],RF=Di("moon",CF);const OF=[["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"}]],AF=Di("play",OF);const MF=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Qz=Di("plug-zap",MF);const jF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kF=Di("search",jF);const NF=[["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"}]],DF=Di("sun",NF);const zF=[["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"}]],$F=Di("trash",zF);const PF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],IF=Di("x",PF);function LF(e,t){const r=getComputedStyle(e),i=parseFloat(r.fontSize);return t*i}function UF(e,t){const r=getComputedStyle(e.ownerDocument.body),i=parseFloat(r.fontSize);return t*i}function VF(e){return e/100*window.innerHeight}function qF(e){return e/100*window.innerWidth}function FF(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 pS({groupSize:e,panelElement:t,styleProp:r}){let i;const[s,l]=FF(r);switch(l){case"%":{i=s/100*e;break}case"px":{i=s;break}case"rem":{i=UF(t,s);break}case"em":{i=LF(t,s);break}case"vh":{i=VF(s);break}case"vw":{i=qF(s);break}}return i}function go(e){return parseFloat(e.toFixed(3))}function og({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 wC(e){const{panels:t}=e,r=og({group:e});return r===0?t.map(i=>({groupResizeBehavior:i.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:i.panelConstraints.disabled,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:s,panelConstraints:l}=i;let u=0;if(l.collapsedSize!==void 0){const m=pS({groupSize:r,panelElement:s,styleProp:l.collapsedSize});u=go(m/r*100)}let f;if(l.defaultSize!==void 0){const m=pS({groupSize:r,panelElement:s,styleProp:l.defaultSize});f=go(m/r*100)}let d=0;if(l.minSize!==void 0){const m=pS({groupSize:r,panelElement:s,styleProp:l.minSize});d=go(m/r*100)}let h=100;if(l.maxSize!==void 0){const m=pS({groupSize:r,panelElement:s,styleProp:l.maxSize});h=go(m/r*100)}return{groupResizeBehavior:l.groupResizeBehavior,collapsedSize:u,collapsible:l.collapsible===!0,defaultSize:f,disabled:l.disabled,minSize:d,maxSize:h,panelId:i.id}})}function tr(e,t="Assertion error"){if(!e)throw Error(t)}function EC(e,t){return Array.from(t).sort(e==="horizontal"?BF:HF)}function BF(e,t){const r=e.element.offsetLeft-t.element.offsetLeft;return r!==0?r:e.element.offsetWidth-t.element.offsetWidth}function HF(e,t){const r=e.element.offsetTop-t.element.offsetTop;return r!==0?r:e.element.offsetHeight-t.element.offsetHeight}function Wz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(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 GF({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 u of t){const{x:f,y:d}=Jz(i,u),h=e==="horizontal"?f:d;h<l&&(l=h,s=u)}return tr(s,"No rect found"),s}let mS;function KF(){return mS===void 0&&(typeof matchMedia=="function"?mS=!!matchMedia("(pointer:coarse)").matches:mS=!1),mS}function e6(e){const{element:t,orientation:r,panels:i,separators:s}=e,l=EC(r,Array.from(t.children).filter(Wz).map(b=>({element:b}))).map(({element:b})=>b),u=[];let f=!1,d=!1,h=-1,m=-1,g=0,v,x=[];{let b=-1;for(const w of l)w.hasAttribute("data-panel")&&(b++,w.ariaDisabled===null&&(g++,h===-1&&(h=b),m=b))}if(g>1){let b=-1;for(const w of l)if(w.hasAttribute("data-panel")){b++;const S=i.find(_=>_.element===w);if(S){if(v){const _=v.element.getBoundingClientRect(),E=w.getBoundingClientRect();let O;if(d){const T=r==="horizontal"?new DOMRect(_.right,_.top,0,_.height):new DOMRect(_.left,_.bottom,_.width,0),C=r==="horizontal"?new DOMRect(E.left,E.top,0,E.height):new DOMRect(E.left,E.top,E.width,0);switch(x.length){case 0:{O=[T,C];break}case 1:{const R=x[0],M=GF({orientation:r,rects:[_,E],targetRect:R.element.getBoundingClientRect()});O=[R,M===_?C:T];break}default:{O=x;break}}}else x.length?O=x:O=[r==="horizontal"?new DOMRect(_.right,E.top,E.left-_.right,E.height):new DOMRect(E.left,_.bottom,E.width,E.top-_.bottom)];for(const T of O){let C="width"in T?T:T.element.getBoundingClientRect();const R=KF()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(C.width<R){const D=R-C.width;C=new DOMRect(C.x-D/2,C.y,C.width+D,C.height)}if(C.height<R){const D=R-C.height;C=new DOMRect(C.x,C.y-D/2,C.width,C.height+D)}const M=b<=h||b>m;!f&&!M&&u.push({group:e,groupSize:og({group:e}),panels:[v,S],separator:"width"in T?void 0:T,rect:C}),f=!1}}d=!1,v=S,x=[]}}else if(w.hasAttribute("data-separator")){w.ariaDisabled!==null&&(f=!0);const S=s.find(_=>_.element===w);S?x.push(S):(v=void 0,x=[])}else d=!0}return u}class t6{#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 u=Array.from(i);for(let f=0;f<u.length;f++){const d=u[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)}}}let Yl=new Map;const n6=new t6;function YF(e){Yl=new Map(Yl),Yl.delete(e)}function H5(e,t){for(const[r]of Yl)if(r.id===e)return r}function vf(e,t){for(const[r,i]of Yl)if(r.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Gp(){return Yl}function pO(e,t){return n6.addListener("groupChange",r=>{r.group.id===e&&t(r)})}function zu(e,t){const r=Yl.get(e);Yl=new Map(Yl),Yl.set(e,t),n6.emit("groupChange",{group:e,prev:r,next:t})}function ZF(e,t,r){let i,s={x:1/0,y:1/0};for(const l of t){const u=Jz(r,l.rect);switch(e){case"horizontal":{u.x<=s.x&&(i=l,s=u);break}case"vertical":{u.y<=s.y&&(i=l,s=u);break}}}return i?{distance:s,hitRegion:i}:void 0}function XF(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function QF(e,t){if(e===t)throw new Error("Cannot compare node with itself");const r={a:Y5(e),b:Y5(t)};let i;for(;r.a.at(-1)===r.b.at(-1);)i=r.a.pop(),r.b.pop();tr(i,"Stacking order can only be calculated for elements with a common ancestor");const s={a:K5(G5(r.a)),b:K5(G5(r.b))};if(s.a===s.b){const l=i.childNodes,u={a:r.a.at(-1),b:r.b.at(-1)};let f=l.length;for(;f--;){const d=l[f];if(d===u.a)return 1;if(d===u.b)return-1}}return Math.sign(s.a-s.b)}const WF=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function JF(e){const t=getComputedStyle(r6(e)??e).display;return t==="flex"||t==="inline-flex"}function eB(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||JF(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"||WF.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function G5(e){let t=e.length;for(;t--;){const r=e[t];if(tr(r,"Missing node"),eB(r))return r}return null}function K5(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Y5(e){const t=[];for(;e;)t.push(e),e=r6(e);return t}function r6(e){const{parentNode:t}=e;return XF(t)?t.host:t}function tB(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 nB({groupElement:e,hitRegion:t,pointerEventTarget:r}){if(!Wz(r)||r.contains(e)||e.contains(r))return!0;if(QF(r,e)>0){let i=r;for(;i;){if(i.contains(e))return!0;if(tB(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function mO(e,t){const r=[];return t.forEach((i,s)=>{if(s.disabled)return;const l=e6(s),u=ZF(s.orientation,l,{x:e.clientX,y:e.clientY});u&&u.distance.x<=0&&u.distance.y<=0&&nB({groupElement:s.element,hitRegion:u.hitRegion.rect,pointerEventTarget:e.target})&&r.push(u.hitRegion)}),r}function rB(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 oo(e,t,r=0){return Math.abs(go(e)-go(t))<=r}function Fl(e,t){return oo(e,t)?0:e>t?1:-1}function Pm({overrideDisabledPanels:e,panelConstraints:t,prevSize:r,size:i}){const{collapsedSize:s=0,collapsible:l,disabled:u,maxSize:f=100,minSize:d=0}=t;if(u&&!e)return r;if(Fl(i,d)<0)if(l){const h=(s+d)/2;Fl(i,h)<0?i=s:i=d}else i=d;return i=Math.min(f,i),i=go(i),i}function i1({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:i,prevLayout:s,trigger:l}){if(oo(e,0))return t;const u=l==="imperative-api",f=Object.values(t),d=Object.values(s),h=[...f],[m,g]=i;tr(m!=null,"Invalid first pivot index"),tr(g!=null,"Invalid second pivot index");let v=0;switch(l){case"keyboard":{{const w=e<0?g:m,S=r[w];tr(S,`Panel constraints not found for index ${w}`);const{collapsedSize:_=0,collapsible:E,minSize:O=0}=S;if(E){const T=f[w];if(tr(T!=null,`Previous layout not found for panel index ${w}`),oo(T,_)){const C=O-T;Fl(C,Math.abs(e))>0&&(e=e<0?0-C:C)}}}{const w=e<0?m:g,S=r[w];tr(S,`No panel constraints found for index ${w}`);const{collapsedSize:_=0,collapsible:E,minSize:O=0}=S;if(E){const T=f[w];if(tr(T!=null,`Previous layout not found for panel index ${w}`),oo(T,O)){const C=T-_;Fl(C,Math.abs(e))>0&&(e=e<0?0-C:C)}}}break}default:{const w=e<0?g:m,S=r[w];tr(S,`Panel constraints not found for index ${w}`);const _=f[w],{collapsible:E,collapsedSize:O,minSize:T}=S;if(E&&Fl(_,T)<0)if(e>0){const C=T-O,R=C/2,M=_+e;Fl(M,T)<0&&(e=Fl(e,R)<=0?0:C)}else{const C=T-O,R=100-C/2,M=_-e;Fl(M,T)<0&&(e=Fl(100+e,R)>0?0:-C)}break}}{const w=e<0?1:-1;let S=e<0?g:m,_=0;for(;;){const O=f[S];tr(O!=null,`Previous layout not found for panel index ${S}`);const T=Pm({overrideDisabledPanels:u,panelConstraints:r[S],prevSize:O,size:100})-O;if(_+=T,S+=w,S<0||S>=r.length)break}const E=Math.min(Math.abs(e),Math.abs(_));e=e<0?0-E:E}{let w=e<0?m:g;for(;w>=0&&w<r.length;){const S=Math.abs(e)-Math.abs(v),_=f[w];tr(_!=null,`Previous layout not found for panel index ${w}`);const E=_-S,O=Pm({overrideDisabledPanels:u,panelConstraints:r[w],prevSize:_,size:E});if(!oo(_,O)&&(v+=_-O,h[w]=O,v.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?w--:w++}}if(rB(d,h))return s;{const w=e<0?g:m,S=f[w];tr(S!=null,`Previous layout not found for panel index ${w}`);const _=S+v,E=Pm({overrideDisabledPanels:u,panelConstraints:r[w],prevSize:S,size:_});if(h[w]=E,!oo(E,_)){let O=_-E,T=e<0?g:m;for(;T>=0&&T<r.length;){const C=h[T];tr(C!=null,`Previous layout not found for panel index ${T}`);const R=C+O,M=Pm({overrideDisabledPanels:u,panelConstraints:r[T],prevSize:C,size:R});if(oo(C,M)||(O-=M-C,h[T]=M),oo(O,0))break;e>0?T--:T++}}}const x=Object.values(h).reduce((w,S)=>S+w,0);if(!oo(x,100,.1))return s;const b=Object.keys(s);return h.reduce((w,S,_)=>(w[b[_]]=S,w),{})}function kp(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(t[r]===void 0||Fl(e[r],t[r])!==0)return!1;return!0}function Np({layout:e,panelConstraints:t}){const r=Object.values(e),i=[...r],s=i.reduce((f,d)=>f+d,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(f=>`${f}%`).join(", ")}`);if(!oo(s,100)&&i.length>0)for(let f=0;f<t.length;f++){const d=i[f];tr(d!=null,`No layout data found for index ${f}`);const h=100/s*d;i[f]=h}let l=0;for(let f=0;f<t.length;f++){const d=r[f];tr(d!=null,`No layout data found for index ${f}`);const h=i[f];tr(h!=null,`No layout data found for index ${f}`);const m=Pm({overrideDisabledPanels:!0,panelConstraints:t[f],prevSize:d,size:h});h!=m&&(l+=h-m,i[f]=m)}if(!oo(l,0))for(let f=0;f<t.length;f++){const d=i[f];tr(d!=null,`No layout data found for index ${f}`);const h=d+l,m=Pm({overrideDisabledPanels:!0,panelConstraints:t[f],prevSize:d,size:h});if(d!==m&&(l-=m-d,i[f]=m,oo(l,0)))break}const u=Object.keys(e);return i.reduce((f,d,h)=>(f[u[h]]=d,f),{})}function a6({groupId:e,panelId:t}){const r=()=>{const f=Gp();for(const[d,{defaultLayoutDeferred:h,derivedPanelConstraints:m,layout:g,groupSize:v,separatorToPanels:x}]of f)if(d.id===e)return{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:d,groupSize:v,layout:g,separatorToPanels:x};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}`)},u=f=>{const d=l();if(f===d)return;const{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:g,groupSize:v,layout:x,separatorToPanels:b}=r(),w=g.panels.findIndex(O=>O.id===t),S=w===g.panels.length-1,_=i1({delta:S?d-f:f-d,initialLayout:x,panelConstraints:m,pivotIndices:S?[w-1,w]:[w,w+1],prevLayout:x,trigger:"imperative-api"}),E=Np({layout:_,panelConstraints:m});kp(x,E)||zu(g,{defaultLayoutDeferred:h,derivedPanelConstraints:m,groupSize:v,layout:E,separatorToPanels:b})};return{collapse:()=>{const{collapsible:f,collapsedSize:d}=i(),{mutableValues:h}=s(),m=l();f&&m!==d&&(h.expandToSize=m,u(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),u(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&&oo(d,h)},resize:f=>{if(l()!==f){let d;switch(typeof f){case"number":{const{group:h}=r(),m=og({group:h});d=go(f/m*100);break}case"string":{d=parseFloat(f);break}}u(d)}}}}function Z5(e){if(e.defaultPrevented)return;const t=Gp();mO(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=a6({groupId:r.group.id,panelId:i.id});l&&s!==void 0&&(l.resize(s),e.preventDefault())}}})}function Iw(e){const t=Gp();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 i6({groupId:e}){const t=()=>{const r=Gp();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,groupSize:u,layout:f,separatorToPanels:d}=t(),h=Np({layout:r,panelConstraints:s});return i?f:(kp(f,h)||zu(l,{defaultLayoutDeferred:i,derivedPanelConstraints:s,groupSize:u,layout:h,separatorToPanels:d}),h)}}}function op(e,t){const r=Iw(e),i=vf(r.id,!0),s=r.separators.find(m=>m.element===e);tr(s,"Matching separator not found");const l=i.separatorToPanels.get(s);tr(l,"Matching panels not found");const u=l.map(m=>r.panels.indexOf(m)),f=i6({groupId:r.id}).getLayout(),d=i1({delta:t,initialLayout:f,panelConstraints:i.derivedPanelConstraints,pivotIndices:u,prevLayout:f,trigger:"keyboard"}),h=Np({layout:d,panelConstraints:i.derivedPanelConstraints});kp(f,h)||zu(r,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:h,separatorToPanels:i.separatorToPanels})}function X5(e){if(e.defaultPrevented)return;const t=e.currentTarget,r=Iw(t);if(!r.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),r.orientation==="vertical"&&op(t,5);break}case"ArrowLeft":{e.preventDefault(),r.orientation==="horizontal"&&op(t,-5);break}case"ArrowRight":{e.preventDefault(),r.orientation==="horizontal"&&op(t,5);break}case"ArrowUp":{e.preventDefault(),r.orientation==="vertical"&&op(t,-5);break}case"End":{e.preventDefault(),op(t,100);break}case"Enter":{e.preventDefault();const i=Iw(t),s=vf(i.id,!0),{derivedPanelConstraints:l,layout:u,separatorToPanels:f}=s,d=i.separators.find(v=>v.element===t);tr(d,"Matching separator not found");const h=f.get(d);tr(h,"Matching panels not found");const m=h[0],g=l.find(v=>v.panelId===m.id);if(tr(g,"Panel metadata not found"),g.collapsible){const v=u[m.id],x=g.collapsedSize===v?i.mutableState.expandedPanelSizes[m.id]??g.minSize:g.collapsedSize;op(t,x-v)}break}case"F6":{e.preventDefault();const i=Iw(t).separators.map(u=>u.element),s=Array.from(i).findIndex(u=>u===e.currentTarget);tr(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({preventScroll:!0});break}case"Home":{e.preventDefault(),op(t,-100);break}}}let Xm={cursorFlags:0,state:"inactive"};const gO=new t6;function Dp(){return Xm}function aB(e){return gO.addListener("change",e)}function iB(e){const t=Xm,r={...Xm};r.cursorFlags=e,Xm=r,gO.emit("change",{prev:t,next:r})}function Qm(e){const t=Xm;Xm=e,gO.emit("change",{prev:t,next:e})}function Q5(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=Gp(),r=mO(e,t),i=new Map;let s=!1;r.forEach(l=>{l.separator&&(s||(s=!0,l.separator.element.focus({preventScroll:!0})));const u=t.get(l.group);u&&i.set(l.group,u.layout)}),Qm({cursorFlags:0,hitRegions:r,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),r.length&&e.preventDefault()}const oB=e=>e,g2=()=>{},o6=1,s6=2,l6=4,c6=8,W5=3,J5=12;let gS;function e3(){return gS===void 0&&(gS=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(gS=!0)),gS}function sB({cursorFlags:e,groups:t,state:r}){let i=0,s=0;switch(r){case"active":case"hover":t.forEach(l=>{if(!l.mutableState.disableCursor)switch(l.orientation){case"horizontal":{i++;break}case"vertical":{s++;break}}})}if(!(i===0&&s===0)){switch(r){case"active":{if(e&&e3()){const l=(e&o6)!==0,u=(e&s6)!==0,f=(e&l6)!==0,d=(e&c6)!==0;if(l)return f?"se-resize":d?"ne-resize":"e-resize";if(u)return f?"sw-resize":d?"nw-resize":"w-resize";if(f)return"s-resize";if(d)return"n-resize"}break}}return e3()?i>0&&s>0?"move":i>0?"ew-resize":"ns-resize":i>0&&s>0?"grab":i>0?"col-resize":"row-resize"}}const t3=new WeakMap;function yO(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:r}=t3.get(e)??{};r===void 0&&(r=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(r));const i=Dp();switch(i.state){case"active":case"hover":{const s=sB({cursorFlags:i.cursorFlags,groups:i.hitRegions.map(u=>u.group),state:i.state}),l=`*, *:hover {cursor: ${s} !important; }`;if(t===l)return;t=l,s?r.cssRules.length===0?r.insertRule(l):r.replaceSync(l):r.cssRules.length===1&&r.deleteRule(0);break}case"inactive":{t=void 0,r.cssRules.length===1&&r.deleteRule(0);break}}t3.set(e,{prevStyle:t,styleSheet:r})}function u6({document:e,event:t,hitRegions:r,initialLayoutMap:i,mountedGroups:s,pointerDownAtPoint:l,prevCursorFlags:u}){let f=0;r.forEach(h=>{const{group:m,groupSize:g}=h,{orientation:v,panels:x}=m,{disableCursor:b}=m.mutableState;let w=0;l?v==="horizontal"?w=(t.clientX-l.x)/g*100:w=(t.clientY-l.y)/g*100:v==="horizontal"?w=t.clientX<0?-100:100:w=t.clientY<0?-100:100;const S=i.get(m),_=s.get(m);if(!S||!_)return;const{defaultLayoutDeferred:E,derivedPanelConstraints:O,groupSize:T,layout:C,separatorToPanels:R}=_;if(O&&C&&R){const M=i1({delta:w,initialLayout:S,panelConstraints:O,pivotIndices:h.panels.map(D=>x.indexOf(D)),prevLayout:C,trigger:"mouse-or-touch"});if(kp(M,C)){if(w!==0&&!b)switch(v){case"horizontal":{f|=w<0?o6:s6;break}case"vertical":{f|=w<0?l6:c6;break}}}else zu(h.group,{defaultLayoutDeferred:E,derivedPanelConstraints:O,groupSize:T,layout:M,separatorToPanels:R})}});let d=0;t.movementX===0?d|=u&W5:d|=f&W5,t.movementY===0?d|=u&J5:d|=f&J5,iB(d),yO(e)}function n3(e){const t=Gp(),r=Dp();r.state==="active"&&u6({document:e.currentTarget,event:e,hitRegions:r.hitRegions,initialLayoutMap:r.initialLayoutMap,mountedGroups:t,prevCursorFlags:r.cursorFlags})}function r3(e){if(e.defaultPrevented)return;const t=Dp(),r=Gp();switch(t.state){case"active":{if(e.buttons===0){Qm({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(i=>{const s=vf(i.group.id,!0);zu(i.group,s)});return}u6({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const i=mO(e,r);i.length===0?t.state!=="inactive"&&Qm({cursorFlags:0,state:"inactive"}):Qm({cursorFlags:0,hitRegions:i,state:"hover"}),yO(e.currentTarget);break}}}function a3(e){e.relatedTarget instanceof HTMLIFrameElement&&Dp().state==="hover"&&Qm({cursorFlags:0,state:"inactive"})}function i3(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=Dp();t.state==="active"&&(Qm({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(yO(e.currentTarget),t.hitRegions.forEach(r=>{const i=vf(r.group.id,!0);zu(r.group,i)}),e.preventDefault()))}function o3(e){let t=0,r=0;const i={};for(const l of e)if(l.defaultSize!==void 0){t++;const u=go(l.defaultSize);r+=u,i[l.panelId]=u}else i[l.panelId]=void 0;const s=e.length-t;if(s!==0){const l=go((100-r)/s);for(const u of e)u.defaultSize===void 0&&(i[u.panelId]=l)}return i}function lB(e,t,r){if(!r[0])return;const i=e.panels.find(d=>d.element===t);if(!i||!i.onResize)return;const s=og({group:e}),l=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,u=i.mutableValues.prevSize,f={asPercentage:go(l/s*100),inPixels:l};i.mutableValues.prevSize=f,i.onResize(f,i.id,u)}function cB(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 uB({group:e,nextGroupSize:t,prevGroupSize:r,prevLayout:i}){if(r<=0||t<=0||r===t)return i;let s=0,l=0,u=!1;const f=new Map,d=[];for(const g of e.panels){const v=i[g.id]??0;if(g.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){u=!0;const x=v/100*r,b=go(x/t*100);f.set(g.id,b),s+=b}else d.push(g.id),l+=v}if(!u||d.length===0)return i;const h=100-s,m={...i};if(f.forEach((g,v)=>{m[v]=g}),l>0)for(const g of d){const v=i[g]??0;m[g]=go(v/l*h)}else{const g=go(h/d.length);for(const v of d)m[v]=g}return m}function fB(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 Em=new Map;function dB(e){let t=!0;tr(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 w of b){const{borderBoxSize:S,target:_}=w;if(_===e.element){if(t){const E=og({group:e});if(E===0)return;const O=vf(e.id);if(!O)return;const T=wC(e),C=O.defaultLayoutDeferred?o3(T):O.layout,R=uB({group:e,nextGroupSize:E,prevGroupSize:O.groupSize,prevLayout:C}),M=Np({layout:R,panelConstraints:T});if(!O.defaultLayoutDeferred&&kp(O.layout,M)&&cB(O.derivedPanelConstraints,T)&&O.groupSize===E)return;zu(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:T,groupSize:E,layout:M,separatorToPanels:O.separatorToPanels})}}else lB(e,_,S)}});l.observe(e.element),e.panels.forEach(b=>{tr(!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 u=og({group:e}),f=wC(e),d=e.panels.map(({id:b})=>b).join(",");let h=e.mutableState.defaultLayout;h&&(fB(e.panels,h)||(h=void 0));const m=e.mutableState.layouts[d]??h??o3(f),g=Np({layout:m,panelConstraints:f}),v=e.element.ownerDocument;Em.set(v,(Em.get(v)??0)+1);const x=new Map;return e6(e).forEach(b=>{b.separator&&x.set(b.separator,b.panels)}),zu(e,{defaultLayoutDeferred:u===0,derivedPanelConstraints:f,groupSize:u,layout:g,separatorToPanels:x}),e.separators.forEach(b=>{tr(!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",X5)}),Em.get(v)===1&&(v.addEventListener("dblclick",Z5,!0),v.addEventListener("pointerdown",Q5,!0),v.addEventListener("pointerleave",n3),v.addEventListener("pointermove",r3),v.addEventListener("pointerout",a3),v.addEventListener("pointerup",i3,!0)),function(){t=!1,Em.set(v,Math.max(0,(Em.get(v)??0)-1)),YF(e),e.separators.forEach(b=>{b.element.removeEventListener("keydown",X5)}),Em.get(v)||(v.removeEventListener("dblclick",Z5,!0),v.removeEventListener("pointerdown",Q5,!0),v.removeEventListener("pointerleave",n3),v.removeEventListener("pointermove",r3),v.removeEventListener("pointerout",a3),v.removeEventListener("pointerup",i3,!0)),l.disconnect()}}function hB(){const[e,t]=j.useState({}),r=j.useCallback(()=>t({}),[]);return[e,r]}function vO(e){const t=j.useId();return`${e??t}`}const Kp=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Vb(e){const t=j.useRef(e);return Kp(()=>{t.current=e},[e]),j.useCallback((...r)=>t.current?.(...r),[t])}function bO(...e){return Vb(t=>{e.forEach(r=>{if(r)switch(typeof r){case"function":{r(t);break}case"object":{r.current=t;break}}})})}function SO(e){const t=j.useRef({...e});return Kp(()=>{for(const r in e)t.current[r]=e[r]},[e]),t.current}const f6=j.createContext(null);function pB(e,t){const r=j.useRef({getLayout:()=>({}),setLayout:oB});j.useImperativeHandle(t,()=>r.current,[]),Kp(()=>{Object.assign(r.current,i6({groupId:e}))})}function Im({children:e,className:t,defaultLayout:r,disableCursor:i,disabled:s,elementRef:l,groupRef:u,id:f,onLayoutChange:d,onLayoutChanged:h,orientation:m="horizontal",resizeTargetMinimumSize:g={coarse:20,fine:10},style:v,...x}){const b=j.useRef({onLayoutChange:{},onLayoutChanged:{}}),w=Vb(V=>{kp(b.current.onLayoutChange,V)||(b.current.onLayoutChange=V,d?.(V))}),S=Vb(V=>{kp(b.current.onLayoutChanged,V)||(b.current.onLayoutChanged=V,h?.(V))}),_=vO(f),E=j.useRef(null),[O,T]=hB(),C=j.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:g,separators:[]}),R=bO(E,l);pB(_,u);const M=Vb((V,F)=>{const G=Dp(),W=H5(V),te=vf(V);if(te){let H=!1;return G.state==="active"&&(H=G.hitRegions.some(J=>J.group===W)),{flexGrow:te.layout[F]??1,pointerEvents:H?"none":void 0}}return{flexGrow:r?.[F]??1}}),D=SO({defaultLayout:r,disableCursor:i}),I=j.useMemo(()=>({get disableCursor(){return!!D.disableCursor},getPanelStyles:M,id:_,orientation:m,registerPanel:V=>{const F=C.current;return F.panels=EC(m,[...F.panels,V]),T(),()=>{F.panels=F.panels.filter(G=>G!==V),T()}},registerSeparator:V=>{const F=C.current;return F.separators=EC(m,[...F.separators,V]),T(),()=>{F.separators=F.separators.filter(G=>G!==V),T()}},togglePanelDisabled:(V,F)=>{const G=C.current.panels.find(H=>H.id===V);G&&(G.panelConstraints.disabled=F);const W=H5(_),te=vf(_);W&&te&&zu(W,{...te,derivedPanelConstraints:wC(W)})},toggleSeparatorDisabled:(V,F)=>{const G=C.current.separators.find(W=>W.id===V);G&&(G.disabled=F)}}),[M,_,T,m,D]),B=j.useRef(null);return Kp(()=>{const V=E.current;if(V===null)return;const F=C.current;let G;if(D.defaultLayout!==void 0&&Object.keys(D.defaultLayout).length===F.panels.length){G={};for(const ae of F.panels){const N=D.defaultLayout[ae.id];N!==void 0&&(G[ae.id]=N)}}const W={disabled:!!s,element:V,id:_,mutableState:{defaultLayout:G,disableCursor:!!D.disableCursor,expandedPanelSizes:C.current.lastExpandedPanelSizes,layouts:C.current.layouts},orientation:m,panels:F.panels,resizeTargetMinimumSize:F.resizeTargetMinimumSize,separators:F.separators};B.current=W;const te=dB(W),{defaultLayoutDeferred:H,derivedPanelConstraints:J,layout:re}=vf(W.id,!0);!H&&J.length>0&&(w(re),S(re));const le=pO(_,ae=>{const{defaultLayoutDeferred:N,derivedPanelConstraints:U,layout:X}=ae.next;if(N||U.length===0)return;const L=W.panels.map(({id:ee})=>ee).join(",");W.mutableState.layouts[L]=X,U.forEach(ee=>{if(ee.collapsible){const{layout:de}=ae.prev??{};if(de){const ye=oo(ee.collapsedSize,X[ee.panelId]),Te=oo(ee.collapsedSize,de[ee.panelId]);ye&&!Te&&(W.mutableState.expandedPanelSizes[ee.panelId]=de[ee.panelId])}}});const Z=Dp().state!=="active";w(X),Z&&S(X)});return()=>{B.current=null,te(),le()}},[s,_,S,w,m,O,D]),j.useEffect(()=>{const V=B.current;V&&(V.mutableState.defaultLayout=r,V.mutableState.disableCursor=!!i)}),k.jsx(f6.Provider,{value:I,children:k.jsx("div",{...x,className:t,"data-group":!0,"data-testid":_,id:_,ref:R,style:{height:"100%",width:"100%",overflow:"hidden",...v,display:"flex",flexDirection:m==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:m==="horizontal"?"pan-y":"pan-x"},children:e})})}Im.displayName="Group";function y2(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function Ab({debounceSaveMs:e=100,panelIds:t,storage:r=localStorage,...i}){const s=t!==void 0,l="id"in i?i.id:i.groupId,u=y2(l,t??[]),f=j.useSyncExternalStore(mB,()=>r.getItem(u),()=>r.getItem(u)),d=j.useMemo(()=>f?JSON.parse(f):void 0,[f]),h=j.useRef(null),m=j.useCallback(()=>{const x=h.current;x&&(h.current=null,clearTimeout(x))},[]);j.useLayoutEffect(()=>()=>{m()},[m]);const g=j.useCallback(x=>{m();let b;s?b=y2(l,Object.keys(x)):b=y2(l,[]);try{r.setItem(b,JSON.stringify(x))}catch(w){console.error(w)}},[m,s,l,r]),v=j.useCallback(x=>{m(),e===0?g(x):h.current=setTimeout(()=>{g(x)},e)},[m,e,g]);return{defaultLayout:d,onLayoutChange:v,onLayoutChanged:g}}function mB(){return function(){}}function wO(){const e=j.useContext(f6);return tr(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function gB(e,t){const{id:r}=wO(),i=j.useRef({collapse:g2,expand:g2,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:g2});j.useImperativeHandle(t,()=>i.current,[]),Kp(()=>{Object.assign(i.current,a6({groupId:r,panelId:e}))})}function El({children:e,className:t,collapsedSize:r="0%",collapsible:i=!1,defaultSize:s,disabled:l,elementRef:u,groupResizeBehavior:f="preserve-relative-size",id:d,maxSize:h="100%",minSize:m="0%",onResize:g,panelRef:v,style:x,...b}){const w=!!d,S=vO(d),_=SO({disabled:l}),E=j.useRef(null),O=bO(E,u),{getPanelStyles:T,id:C,orientation:R,registerPanel:M,togglePanelDisabled:D}=wO(),I=g!==null,B=Vb((F,G,W)=>{g?.(F,d,W)});Kp(()=>{const F=E.current;if(F!==null){const G={element:F,id:S,idIsStable:w,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:I?B:void 0,panelConstraints:{groupResizeBehavior:f,collapsedSize:r,collapsible:i,defaultSize:s,disabled:_.disabled,maxSize:h,minSize:m}};return M(G)}},[f,r,i,s,I,S,w,h,m,B,M,_]),j.useEffect(()=>{D(S,!!l)},[l,S,D]),gB(S,v);const V=j.useSyncExternalStore(F=>pO(C,F),()=>JSON.stringify(T(C,S)),()=>JSON.stringify(T(C,S)));return k.jsx("div",{...b,"aria-disabled":l||void 0,"data-panel":!0,"data-testid":S,id:S,ref:O,style:{...yB,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...JSON.parse(V)},children:k.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...x,touchAction:R==="horizontal"?"pan-y":"pan-x"},children:e})})}El.displayName="Panel";const yB={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function vB({layout:e,panelConstraints:t,panelId:r,panelIndex:i}){let s,l;const u=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=Np({layout:i1({delta:h-u,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r],s=Np({layout:i1({delta:d-u,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r]}return{valueControls:r,valueMax:s,valueMin:l,valueNow:u}}function Lm({children:e,className:t,disabled:r,elementRef:i,id:s,style:l,...u}){const f=vO(s),d=SO({disabled:r}),[h,m]=j.useState({}),[g,v]=j.useState("inactive"),x=j.useRef(null),b=bO(x,i),{disableCursor:w,id:S,orientation:_,registerSeparator:E,toggleSeparatorDisabled:O}=wO(),T=_==="horizontal"?"vertical":"horizontal";Kp(()=>{const R=x.current;if(R!==null){const M={disabled:d.disabled,element:R,id:f},D=E(M),I=aB(V=>{v(V.next.state!=="inactive"&&V.next.hitRegions.some(F=>F.separator===M)?V.next.state:"inactive")}),B=pO(S,V=>{const{derivedPanelConstraints:F,layout:G,separatorToPanels:W}=V.next,te=W.get(M);if(te){const H=te[0],J=te.indexOf(H);m(vB({layout:G,panelConstraints:F,panelId:H.id,panelIndex:J}))}});return()=>{I(),B(),D()}}},[S,f,E,d]),j.useEffect(()=>{O(f,!!r)},[r,f,O]);let C;return r&&!w&&(C="not-allowed"),k.jsx("div",{...u,"aria-controls":h.valueControls,"aria-disabled":r||void 0,"aria-orientation":T,"aria-valuemax":h.valueMax,"aria-valuemin":h.valueMin,"aria-valuenow":h.valueNow,children:e,className:t,"data-separator":r?"disabled":g,"data-testid":f,id:f,ref:b,role:"separator",style:{flexBasis:"auto",cursor:C,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:r?void 0:0})}Lm.displayName="Separator";const s3=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(x=>x(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},bB=(e=>e?s3(e):s3),SB=e=>e;function wB(e,t=SB){const r=Jo.useSyncExternalStore(e.subscribe,Jo.useCallback(()=>t(e.getState()),[e,t]),Jo.useCallback(()=>t(e.getInitialState()),[e,t]));return Jo.useDebugValue(r),r}const EB=e=>{const t=bB(e),r=i=>wB(t,i);return Object.assign(r,t),r},d6=(e=>EB),Au=d6()(e=>({status:"idle",requiresAuth:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setError:t=>e({error:t}),reset:()=>e({status:"idle",requiresAuth:!1,error:null})}));let EO;EO=globalThis.crypto;async function xB(e){return(await EO).getRandomValues(new Uint8Array(e))}async function _B(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%t.length;let i="";for(;i.length<e;){const s=await xB(e-i.length);for(const l of s)l<r&&(i+=t[l%t.length])}return i}async function TB(e){return await _B(e)}async function CB(e){const t=await(await EO).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function RB(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await TB(e),r=await CB(t);return{code_verifier:t,code_challenge:r}}const OB=Object.freeze({status:"aborted"});function Ne(e,t,r){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:u,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=u.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 u(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(u,"init",{value:i}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class Wm 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 Cf(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 xC(e,t){return typeof t=="bigint"?t.toString():t}function YE(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function xO(e){return e==null}function _O(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function AB(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,u=Number.parseInt(e.toFixed(l).replace(".","")),f=Number.parseInt(t.toFixed(l).replace(".",""));return u%f/10**l}const l3=Symbol("evaluating");function qn(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==l3)return i===void 0&&(i=l3,i=r()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Yp(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function $f(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function c3(e){return JSON.stringify(e)}function MB(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const g6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function o1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const jB=YE(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function sg(e){if(o1(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(o1(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function y6(e){return sg(e)?{...e}:Array.isArray(e)?[...e]:e}const kB=new Set(["string","number","symbol"]);function lg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Pf(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function pt(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 NB(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const DB={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 zB(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=$f(e._zod.def,{get shape(){const u={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(u[f]=r.shape[f])}return Yp(this,"shape",u),u},checks:[]});return Pf(e,l)}function $B(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=$f(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete u[f]}return Yp(this,"shape",u),u},checks:[]});return Pf(e,l)}function PB(e,t){if(!sg(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 u in t)if(Object.getOwnPropertyDescriptor(l,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=$f(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Yp(this,"shape",l),l}});return Pf(e,s)}function IB(e,t){if(!sg(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=$f(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Yp(this,"shape",i),i}});return Pf(e,r)}function LB(e,t){const r=$f(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Yp(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Pf(e,r)}function UB(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 u=$f(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 Yp(this,"shape",d),d},checks:[]});return Pf(t,u)}function VB(e,t,r){const i=$f(t._zod.def,{get shape(){const s=t._zod.def.shape,l={...s};if(r)for(const u in r){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(l[u]=new e({type:"nonoptional",innerType:s[u]}))}else for(const u in s)l[u]=new e({type:"nonoptional",innerType:s[u]});return Yp(this,"shape",l),l}});return Pf(t,i)}function Um(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 Vm(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function yS(e){return typeof e=="string"?e:e?.message}function Rf(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const s=yS(e.inst?._zod.def?.error?.(e))??yS(t?.error?.(e))??yS(r.customError?.(e))??yS(r.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function TO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function s1(...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,xC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},b6=Ne("$ZodError",v6),S6=Ne("$ZodError",v6,{Parent:Error});function qB(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 FB(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(u=>i({issues:u}));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 u=r,f=0;for(;f<l.path.length;){const d=l.path[f];f===l.path.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(l))):u[d]=u[d]||{_errors:[]},u=u[d],f++}}};return i(e),r}const CO=e=>(t,r,i,s)=>{const l=i?Object.assign(i,{async:!1}):{async:!1},u=t._zod.run({value:r,issues:[]},l);if(u instanceof Promise)throw new Wm;if(u.issues.length){const f=new(s?.Err??e)(u.issues.map(d=>Rf(d,l,Cf())));throw g6(f,s?.callee),f}return u.value},RO=e=>async(t,r,i,s)=>{const l=i?Object.assign(i,{async:!0}):{async:!0};let u=t._zod.run({value:r,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const f=new(s?.Err??e)(u.issues.map(d=>Rf(d,l,Cf())));throw g6(f,s?.callee),f}return u.value},ZE=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 Wm;return l.issues.length?{success:!1,error:new(e??b6)(l.issues.map(u=>Rf(u,s,Cf())))}:{success:!0,data:l.value}},w6=ZE(S6),XE=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(u=>Rf(u,s,Cf())))}:{success:!0,data:l.value}},BB=XE(S6),HB=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return CO(e)(t,r,s)},GB=e=>(t,r,i)=>CO(e)(t,r,i),KB=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return RO(e)(t,r,s)},YB=e=>async(t,r,i)=>RO(e)(t,r,i),ZB=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ZE(e)(t,r,s)},XB=e=>(t,r,i)=>ZE(e)(t,r,i),QB=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return XE(e)(t,r,s)},WB=e=>async(t,r,i)=>XE(e)(t,r,i),JB=/^[cC][^\s-]{8,}$/,eH=/^[0-9a-z]+$/,tH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,nH=/^[0-9a-vA-V]{20}$/,rH=/^[A-Za-z0-9]{27}$/,aH=/^[a-zA-Z0-9_-]{21}$/,iH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,oH=/^([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})$/,u3=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)$/,sH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function cH(){return new RegExp(lH,"u")}const uH=/^(?:(?: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])$/,fH=/^(([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}|:))$/,dH=/^((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])$/,hH=/^(([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])$/,pH=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,E6=/^[A-Za-z0-9_-]*$/,mH=/^\+[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])))",gH=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 yH(e){return new RegExp(`^${_6(e)}$`)}function vH(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 bH=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},SH=/^-?\d+$/,T6=/^-?\d+(?:\.\d+)?$/,wH=/^(?:true|false)$/i,EH=/^null$/i,xH=/^[^A-Z]*$/,_H=/^[^a-z]*$/,bo=Ne("$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"},R6=Ne("$ZodCheckLessThan",(e,t)=>{bo.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})}}),O6=Ne("$ZodCheckGreaterThan",(e,t)=>{bo.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})}}),TH=Ne("$ZodCheckMultipleOf",(e,t)=>{bo.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):AB(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})}}),CH=Ne("$ZodCheckNumberFormat",(e,t)=>{bo.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[s,l]=DB[t.format];e._zod.onattach.push(u=>{const f=u._zod.bag;f.format=t.format,f.minimum=s,f.maximum=l,r&&(f.pattern=SH)}),e._zod.check=u=>{const f=u.value;if(r){if(!Number.isInteger(f)){u.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?u.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}):u.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&&u.issues.push({origin:"number",input:f,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),f>l&&u.issues.push({origin:"number",input:f,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),RH=Ne("$ZodCheckMaxLength",(e,t)=>{var r;bo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!xO(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 u=TO(s);i.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),OH=Ne("$ZodCheckMinLength",(e,t)=>{var r;bo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!xO(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 u=TO(s);i.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),AH=Ne("$ZodCheckLengthEquals",(e,t)=>{var r;bo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!xO(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 u=TO(s),f=l>t.length;i.issues.push({origin:u,...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})}}),QE=Ne("$ZodCheckStringFormat",(e,t)=>{var r,i;bo.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=()=>{})}),MH=Ne("$ZodCheckRegex",(e,t)=>{QE.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})}}),jH=Ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=xH),QE.init(e,t)}),kH=Ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_H),QE.init(e,t)}),NH=Ne("$ZodCheckIncludes",(e,t)=>{bo.init(e,t);const r=lg(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})}}),DH=Ne("$ZodCheckStartsWith",(e,t)=>{bo.init(e,t);const r=new RegExp(`^${lg(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})}}),zH=Ne("$ZodCheckEndsWith",(e,t)=>{bo.init(e,t);const r=new RegExp(`.*${lg(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})}}),$H=Ne("$ZodCheckOverwrite",(e,t)=>{bo.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class PH{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(u=>u),s=Math.min(...i.map(u=>u.length-u.trimStart().length)),l=i.map(u=>u.slice(s)).map(u=>" ".repeat(this.indent*2)+u);for(const u of l)this.content.push(u)}compile(){const t=Function,r=this?.args,s=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...r,s.join(`
12
+ `))}}const IH={major:4,minor:3,patch:6},Mr=Ne("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=IH;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=(u,f,d)=>{let h=Um(u),m;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(u))continue}else if(h)continue;const v=u.issues.length,x=g._zod.check(u);if(x instanceof Promise&&d?.async===!1)throw new Wm;if(m||x instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await x,u.issues.length!==v&&(h||(h=Um(u,v)))});else{if(u.issues.length===v)continue;h||(h=Um(u,v))}}return m?m.then(()=>u):u},l=(u,f,d)=>{if(Um(u))return u.aborted=!0,u;const h=s(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Wm;return h.then(m=>e._zod.parse(m,d))}return e._zod.parse(h,d)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const h=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(m=>l(m,u,f)):l(h,u,f)}const d=e._zod.parse(u,f);if(d instanceof Promise){if(f.async===!1)throw new Wm;return d.then(h=>s(h,i,f))}return s(d,i,f)}}qn(e,"~standard",()=>({validate:s=>{try{const l=w6(e,s);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return BB(e,s).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),OO=Ne("$ZodString",(e,t)=>{Mr.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bH(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}}),Dr=Ne("$ZodStringFormat",(e,t)=>{QE.init(e,t),OO.init(e,t)}),LH=Ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=oH),Dr.init(e,t)}),UH=Ne("$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=u3(i))}else t.pattern??(t.pattern=u3());Dr.init(e,t)}),VH=Ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sH),Dr.init(e,t)}),qH=Ne("$ZodURL",(e,t)=>{Dr.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})}}}),FH=Ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=cH()),Dr.init(e,t)}),BH=Ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=aH),Dr.init(e,t)}),HH=Ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=JB),Dr.init(e,t)}),GH=Ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=eH),Dr.init(e,t)}),KH=Ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tH),Dr.init(e,t)}),YH=Ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=nH),Dr.init(e,t)}),ZH=Ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rH),Dr.init(e,t)}),XH=Ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vH(t)),Dr.init(e,t)}),QH=Ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=gH),Dr.init(e,t)}),WH=Ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=yH(t)),Dr.init(e,t)}),JH=Ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=iH),Dr.init(e,t)}),eG=Ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=uH),Dr.init(e,t),e._zod.bag.format="ipv4"}),tG=Ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fH),Dr.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})}}}),nG=Ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=dH),Dr.init(e,t)}),rG=Ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hH),Dr.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 u=Number(l);if(`${u}`!==l)throw new Error;if(u<0||u>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 aG=Ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=pH),Dr.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 iG(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 oG=Ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=E6),Dr.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{iG(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),sG=Ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=mH),Dr.init(e,t)});function lG(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 cG=Ne("$ZodJWT",(e,t)=>{Dr.init(e,t),e._zod.check=r=>{lG(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),M6=Ne("$ZodNumber",(e,t)=>{Mr.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}}),uG=Ne("$ZodNumberFormat",(e,t)=>{CH.init(e,t),M6.init(e,t)}),fG=Ne("$ZodBoolean",(e,t)=>{Mr.init(e,t),e._zod.pattern=wH,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}}),dG=Ne("$ZodNull",(e,t)=>{Mr.init(e,t),e._zod.pattern=EH,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}}),hG=Ne("$ZodAny",(e,t)=>{Mr.init(e,t),e._zod.parse=r=>r}),pG=Ne("$ZodUnknown",(e,t)=>{Mr.init(e,t),e._zod.parse=r=>r}),mG=Ne("$ZodNever",(e,t)=>{Mr.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function f3(e,t,r){e.issues.length&&t.issues.push(...Vm(r,e.issues)),t.value[r]=e.value}const gG=Ne("$ZodArray",(e,t)=>{Mr.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 u=0;u<s.length;u++){const f=s[u],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?l.push(d.then(h=>f3(h,r,u))):f3(d,r,u)}return l.length?Promise.all(l).then(()=>r):r}});function uE(e,t,r,i,s){if(e.issues.length){if(s&&!(r in i))return;t.issues.push(...Vm(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=NB(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 u=[],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"){u.push(g);continue}const v=d.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(x=>uE(x,r,g,t,m))):uE(v,r,g,t,m)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:l}),e.length?Promise.all(e).then(()=>r):r}const yG=Ne("$ZodObject",(e,t)=>{if(Mr.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=YE(()=>j6(t));qn(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=o1,l=t.catchall;let u;e._zod.parse=(f,d)=>{u??(u=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=u.shape;for(const v of u.keys){const x=g[v],b=x._zod.optout==="optional",w=x._zod.run({value:h[v],issues:[]},d);w instanceof Promise?m.push(w.then(S=>uE(S,f,v,h,b))):uE(w,f,v,h,b)}return l?k6(m,h,f,d,i.value,e):m.length?Promise.all(m).then(()=>f):f}}),vG=Ne("$ZodObjectJIT",(e,t)=>{yG.init(e,t);const r=e._zod.parse,i=YE(()=>j6(t)),s=v=>{const x=new PH(["shape","payload","ctx"]),b=i.value,w=O=>{const T=c3(O);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};x.write("const input = payload.value;");const S=Object.create(null);let _=0;for(const O of b.keys)S[O]=`key_${_++}`;x.write("const newResult = {};");for(const O of b.keys){const T=S[O],C=c3(O),M=v[O]?._zod?.optout==="optional";x.write(`const ${T} = ${w(O)};`),M?x.write(`
13
+ if (${T}.issues.length) {
14
+ if (${C} in input) {
15
+ payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${T}.value === undefined) {
23
+ if (${C} in input) {
24
+ newResult[${C}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${C}] = ${T}.value;
28
+ }
29
+
30
+ `):x.write(`
31
+ if (${T}.issues.length) {
32
+ payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
35
+ })));
36
+ }
37
+
38
+ if (${T}.value === undefined) {
39
+ if (${C} in input) {
40
+ newResult[${C}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${C}] = ${T}.value;
44
+ }
45
+
46
+ `)}x.write("payload.value = newResult;"),x.write("return payload;");const E=x.compile();return(O,T)=>E(v,O,T)};let l;const u=o1,f=!p6.jitless,h=f&&jB.value,m=t.catchall;let g;e._zod.parse=(v,x)=>{g??(g=i.value);const b=v.value;return u(b)?f&&h&&x?.async===!1&&x.jitless!==!0?(l||(l=s(t.shape)),v=l(v,x),m?k6([],b,v,x,g,e):v):r(v,x):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function d3(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=>!Um(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(u=>Rf(u,i,Cf())))}),t)}const N6=Ne("$ZodUnion",(e,t)=>{Mr.init(e,t),qn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),qn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),qn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),qn(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=>_O(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 u=!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),u=!0;else{if(h.issues.length===0)return h;f.push(h)}}return u?Promise.all(f).then(d=>d3(d,s,e,l)):d3(f,s,e,l)}}),bG=Ne("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,N6.init(e,t);const r=e._zod.parse;qn(e._zod,"propValues",()=>{const s={};for(const l of t.options){const u=l._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[f,d]of Object.entries(u)){s[f]||(s[f]=new Set);for(const h of d)s[f].add(h)}}return s});const i=YE(()=>{const s=t.options,l=new Map;for(const u of s){const f=u._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const d of f){if(l.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);l.set(d,u)}}return l});e._zod.parse=(s,l)=>{const u=s.value;if(!o1(u))return s.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),s;const f=i.value.get(u?.[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:u,path:[t.discriminator],inst:e}),s)}}),SG=Ne("$ZodIntersection",(e,t)=>{Mr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value,l=t.left._zod.run({value:s,issues:[]},i),u=t.right._zod.run({value:s,issues:[]},i);return l instanceof Promise||u instanceof Promise?Promise.all([l,u]).then(([d,h])=>h3(r,d,h)):h3(r,l,u)}});function _C(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(sg(e)&&sg(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 u=_C(e[l],t[l]);if(!u.valid)return{valid:!1,mergeErrorPath:[l,...u.mergeErrorPath]};s[l]=u.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],u=_C(s,l);if(!u.valid)return{valid:!1,mergeErrorPath:[i,...u.mergeErrorPath]};r.push(u.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function h3(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}),Um(e))return e;const u=_C(t.value,r.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const wG=Ne("$ZodRecord",(e,t)=>{Mr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!sg(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const l=[],u=t.keyType._zod.values;if(u){r.value={};const f=new Set;for(const h of u)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(...Vm(h,g.issues)),r.value[h]=g.value})):(m.issues.length&&r.issues.push(...Vm(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=>Rf(g,i,Cf())),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(...Vm(f,g.issues)),r.value[d.value]=g.value})):(m.issues.length&&r.issues.push(...Vm(f,m.issues)),r.value[d.value]=m.value)}}return l.length?Promise.all(l).then(()=>r):r}}),EG=Ne("$ZodEnum",(e,t)=>{Mr.init(e,t);const r=m6(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(s=>kB.has(typeof s)).map(s=>typeof s=="string"?lg(s):s.toString()).join("|")})$`),e._zod.parse=(s,l)=>{const u=s.value;return i.has(u)||s.issues.push({code:"invalid_value",values:r,input:u,inst:e}),s}}),xG=Ne("$ZodLiteral",(e,t)=>{if(Mr.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"?lg(i):i?lg(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}}),_G=Ne("$ZodTransform",(e,t)=>{Mr.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(u=>(r.value=u,r));if(s instanceof Promise)throw new Wm;return r.value=s,r}});function p3(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const D6=Ne("$ZodOptional",(e,t)=>{Mr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${_O(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=>p3(l,r.value)):p3(s,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),TG=Ne("$ZodExactOptional",(e,t)=>{D6.init(e,t),qn(e._zod,"values",()=>t.innerType._zod.values),qn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),CG=Ne("$ZodNullable",(e,t)=>{Mr.init(e,t),qn(e._zod,"optin",()=>t.innerType._zod.optin),qn(e._zod,"optout",()=>t.innerType._zod.optout),qn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${_O(r.source)}|null)$`):void 0}),qn(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)}),RG=Ne("$ZodDefault",(e,t)=>{Mr.init(e,t),e._zod.optin="optional",qn(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=>m3(l,t)):m3(s,t)}});function m3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const OG=Ne("$ZodPrefault",(e,t)=>{Mr.init(e,t),e._zod.optin="optional",qn(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))}),AG=Ne("$ZodNonOptional",(e,t)=>{Mr.init(e,t),qn(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=>g3(l,e)):g3(s,e)}});function g3(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 MG=Ne("$ZodCatch",(e,t)=>{Mr.init(e,t),qn(e._zod,"optin",()=>t.innerType._zod.optin),qn(e._zod,"optout",()=>t.innerType._zod.optout),qn(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(u=>Rf(u,i,Cf()))},input:r.value}),r.issues=[]),r)):(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(l=>Rf(l,i,Cf()))},input:r.value}),r.issues=[]),r)}}),jG=Ne("$ZodPipe",(e,t)=>{Mr.init(e,t),qn(e._zod,"values",()=>t.in._zod.values),qn(e._zod,"optin",()=>t.in._zod.optin),qn(e._zod,"optout",()=>t.out._zod.optout),qn(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(u=>vS(u,t.in,i)):vS(l,t.in,i)}const s=t.in._zod.run(r,i);return s instanceof Promise?s.then(l=>vS(l,t.out,i)):vS(s,t.out,i)}});function vS(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const kG=Ne("$ZodReadonly",(e,t)=>{Mr.init(e,t),qn(e._zod,"propValues",()=>t.innerType._zod.propValues),qn(e._zod,"values",()=>t.innerType._zod.values),qn(e._zod,"optin",()=>t.innerType?._zod?.optin),qn(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(y3):y3(s)}});function y3(e){return e.value=Object.freeze(e.value),e}const NG=Ne("$ZodCustom",(e,t)=>{bo.init(e,t),Mr.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=>v3(l,r,i,e));v3(s,r,i,e)}});function v3(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(s1(s))}}var b3;class DG{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 zG(){return new DG}(b3=globalThis).__zod_globalRegistry??(b3.__zod_globalRegistry=zG());const Mb=globalThis.__zod_globalRegistry;function $G(e,t){return new e({type:"string",...pt(t)})}function PG(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...pt(t)})}function S3(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...pt(t)})}function IG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...pt(t)})}function LG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...pt(t)})}function UG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...pt(t)})}function VG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...pt(t)})}function z6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...pt(t)})}function qG(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...pt(t)})}function FG(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...pt(t)})}function BG(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...pt(t)})}function HG(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...pt(t)})}function GG(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...pt(t)})}function KG(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...pt(t)})}function YG(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...pt(t)})}function ZG(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...pt(t)})}function XG(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...pt(t)})}function QG(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...pt(t)})}function WG(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...pt(t)})}function JG(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...pt(t)})}function eK(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...pt(t)})}function tK(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...pt(t)})}function nK(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...pt(t)})}function rK(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...pt(t)})}function aK(e,t){return new e({type:"string",format:"date",check:"string_format",...pt(t)})}function iK(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...pt(t)})}function oK(e,t){return new e({type:"string",format:"duration",check:"string_format",...pt(t)})}function sK(e,t){return new e({type:"number",checks:[],...pt(t)})}function lK(e,t){return new e({type:"number",coerce:!0,checks:[],...pt(t)})}function cK(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...pt(t)})}function uK(e,t){return new e({type:"boolean",...pt(t)})}function fK(e,t){return new e({type:"null",...pt(t)})}function dK(e){return new e({type:"any"})}function hK(e){return new e({type:"unknown"})}function pK(e,t){return new e({type:"never",...pt(t)})}function w3(e,t){return new R6({check:"less_than",...pt(t),value:e,inclusive:!1})}function v2(e,t){return new R6({check:"less_than",...pt(t),value:e,inclusive:!0})}function E3(e,t){return new O6({check:"greater_than",...pt(t),value:e,inclusive:!1})}function b2(e,t){return new O6({check:"greater_than",...pt(t),value:e,inclusive:!0})}function x3(e,t){return new TH({check:"multiple_of",...pt(t),value:e})}function $6(e,t){return new RH({check:"max_length",...pt(t),maximum:e})}function fE(e,t){return new OH({check:"min_length",...pt(t),minimum:e})}function P6(e,t){return new AH({check:"length_equals",...pt(t),length:e})}function mK(e,t){return new MH({check:"string_format",format:"regex",...pt(t),pattern:e})}function gK(e){return new jH({check:"string_format",format:"lowercase",...pt(e)})}function yK(e){return new kH({check:"string_format",format:"uppercase",...pt(e)})}function vK(e,t){return new NH({check:"string_format",format:"includes",...pt(t),includes:e})}function bK(e,t){return new DH({check:"string_format",format:"starts_with",...pt(t),prefix:e})}function SK(e,t){return new zH({check:"string_format",format:"ends_with",...pt(t),suffix:e})}function Og(e){return new $H({check:"overwrite",tx:e})}function wK(e){return Og(t=>t.normalize(e))}function EK(){return Og(e=>e.trim())}function xK(){return Og(e=>e.toLowerCase())}function _K(){return Og(e=>e.toUpperCase())}function TK(){return Og(e=>MB(e))}function CK(e,t,r){return new e({type:"array",element:t,...pt(r)})}function RK(e,t,r){const i=pt(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function OK(e,t,r){return new e({type:"custom",check:"custom",fn:t,...pt(r)})}function AK(e){const t=MK(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(s1(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(s1(s))}},e(r.value,r)));return t}function MK(e,t){const r=new bo({check:"custom",...pt(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??Mb,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 ma(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 u={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,u);const f=e._zod.toJSONSchema?.();if(f)u.schema=f;else{const m={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,m);else{const v=u.schema,x=t.processors[s.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);x(e,t,v,m)}const g=e._zod.parent;g&&(u.ref||(u.ref=g),ma(g,t,m),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(u.schema,d),t.io==="input"&&ao(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&u.schema._prefault&&((i=u.schema).default??(i.default=u.schema._prefault)),delete u.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 u of e.seen.entries()){const f=e.metadataRegistry.get(u[0])?.id;if(f){const d=i.get(f);if(d&&d!==u[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,u[0])}}const s=u=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(u[0])?.id,v=e.external.uri??(b=>b);if(g)return{ref:v(g)};const x=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=x,{defId:x,ref:`${v("__shared")}#/${f}/${x}`}}if(u[1]===r)return{ref:"#"};const h=`#/${f}/`,m=u[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:h+m}},l=u=>{if(u[1].schema.$ref)return;const f=u[1],{ref:d,defId:h}=s(u);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 u of e.seen.entries()){const f=u[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 u of e.seen.entries()){const f=u[1];if(t===u[0]){l(u);continue}if(e.external){const h=e.external.registry.get(u[0])?.id;if(t!==u[0]&&h){l(u);continue}}if(e.metadataRegistry.get(u[0])?.id){l(u);continue}if(f.cycle){l(u);continue}if(f.count>1&&e.reused==="ref"){l(u);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=u=>{const f=e.seen.get(u);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),x=v.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(x)):Object.assign(d,x),Object.assign(d,h),u._zod.parent===m)for(const w in d)w==="$ref"||w==="allOf"||w in h||delete d[w];if(x.$ref&&v.def)for(const w in d)w==="$ref"||w==="allOf"||w in v.def&&JSON.stringify(d[w])===JSON.stringify(v.def[w])&&delete d[w]}const g=u._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 x in d)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(d[x])===JSON.stringify(v.def[x])&&delete d[x]}e.override({zodSchema:u,jsonSchema:d,path:f.path??[]})};for(const u of[...e.seen.entries()].reverse())i(u[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 u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}Object.assign(s,r.def??r.schema);const l=e.external?.defs??{};for(const u of e.seen.entries()){const f=u[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 u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:dE(t,"input",e.processors),output:dE(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function ao(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 ao(i.element,r);if(i.type==="set")return ao(i.valueType,r);if(i.type==="lazy")return ao(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 ao(i.innerType,r);if(i.type==="intersection")return ao(i.left,r)||ao(i.right,r);if(i.type==="record"||i.type==="map")return ao(i.keyType,r)||ao(i.valueType,r);if(i.type==="pipe")return ao(i.in,r)||ao(i.out,r);if(i.type==="object"){for(const s in i.shape)if(ao(i.shape[s],r))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(ao(s,r))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(ao(s,r))return!0;return!!(i.rest&&ao(i.rest,r))}return!1}const jK=(e,t={})=>r=>{const i=I6({...r,processors:t});return ma(e,i),L6(i,e),U6(i,e)},dE=(e,t,r={})=>i=>{const{libraryOptions:s,target:l}=i??{},u=I6({...s??{},target:l,io:t,processors:r});return ma(e,u),L6(u,e),U6(u,e)},kK={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},NK=(e,t,r,i)=>{const s=r;s.type="string";const{minimum:l,maximum:u,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(s.minLength=l),typeof u=="number"&&(s.maxLength=u),f&&(s.format=kK[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}))])}},DK=(e,t,r,i)=>{const s=r,{minimum:l,maximum:u,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 u=="number"&&(s.maximum=u,typeof h=="number"&&t.target!=="draft-04"&&(h<=u?delete s.maximum:delete s.exclusiveMaximum)),typeof d=="number"&&(s.multipleOf=d)},zK=(e,t,r,i)=>{r.type="boolean"},$K=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},PK=(e,t,r,i)=>{r.not={}},IK=(e,t,r,i)=>{},LK=(e,t,r,i)=>{},UK=(e,t,r,i)=>{const s=e._zod.def,l=m6(s.entries);l.every(u=>typeof u=="number")&&(r.type="number"),l.every(u=>typeof u=="string")&&(r.type="string"),r.enum=l},VK=(e,t,r,i)=>{const s=e._zod.def,l=[];for(const u of s.values)if(u===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof u=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(u))}else l.push(u);if(l.length!==0)if(l.length===1){const u=l[0];r.type=u===null?"null":typeof u,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[u]:r.const=u}else l.every(u=>typeof u=="number")&&(r.type="number"),l.every(u=>typeof u=="string")&&(r.type="string"),l.every(u=>typeof u=="boolean")&&(r.type="boolean"),l.every(u=>u===null)&&(r.type="null"),r.enum=l},qK=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},FK=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},BK=(e,t,r,i)=>{const s=r,l=e._zod.def,{minimum:u,maximum:f}=e._zod.bag;typeof u=="number"&&(s.minItems=u),typeof f=="number"&&(s.maxItems=f),s.type="array",s.items=ma(l.element,t,{...i,path:[...i.path,"items"]})},HK=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object",s.properties={};const u=l.shape;for(const h in u)s.properties[h]=ma(u[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(u)),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=ma(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},GK=(e,t,r,i)=>{const s=e._zod.def,l=s.inclusive===!1,u=s.options.map((f,d)=>ma(f,t,{...i,path:[...i.path,l?"oneOf":"anyOf",d]}));l?r.oneOf=u:r.anyOf=u},KK=(e,t,r,i)=>{const s=e._zod.def,l=ma(s.left,t,{...i,path:[...i.path,"allOf",0]}),u=ma(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(u)?u.allOf:[u]];r.allOf=d},YK=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object";const u=l.keyType,d=u._zod.bag?.patterns;if(l.mode==="loose"&&d&&d.size>0){const m=ma(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=ma(l.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=ma(l.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=u._zod.values;if(h){const m=[...h].filter(g=>typeof g=="string"||typeof g=="number");m.length>0&&(s.required=m)}},ZK=(e,t,r,i)=>{const s=e._zod.def,l=ma(s.innerType,t,i),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=s.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},XK=(e,t,r,i)=>{const s=e._zod.def;ma(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},QK=(e,t,r,i)=>{const s=e._zod.def;ma(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.default=JSON.parse(JSON.stringify(s.defaultValue))},WK=(e,t,r,i)=>{const s=e._zod.def;ma(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)))},JK=(e,t,r,i)=>{const s=e._zod.def;ma(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType;let u;try{u=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},eY=(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;ma(l,t,i);const u=t.seen.get(e);u.ref=l},tY=(e,t,r,i)=>{const s=e._zod.def;ma(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.readOnly=!0},V6=(e,t,r,i)=>{const s=e._zod.def;ma(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},nY=Ne("ZodISODateTime",(e,t)=>{XH.init(e,t),Br.init(e,t)});function q6(e){return rK(nY,e)}const rY=Ne("ZodISODate",(e,t)=>{QH.init(e,t),Br.init(e,t)});function aY(e){return aK(rY,e)}const iY=Ne("ZodISOTime",(e,t)=>{WH.init(e,t),Br.init(e,t)});function oY(e){return iK(iY,e)}const sY=Ne("ZodISODuration",(e,t)=>{JH.init(e,t),Br.init(e,t)});function lY(e){return oK(sY,e)}const cY=(e,t)=>{b6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>FB(e,r)},flatten:{value:r=>qB(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,xC,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,xC,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ts=Ne("ZodError",cY,{Parent:Error}),uY=CO(Ts),fY=RO(Ts),dY=ZE(Ts),hY=XE(Ts),pY=HB(Ts),mY=GB(Ts),gY=KB(Ts),yY=YB(Ts),vY=ZB(Ts),bY=XB(Ts),SY=QB(Ts),wY=WB(Ts),jr=Ne("ZodType",(e,t)=>(Mr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dE(e,"input"),output:dE(e,"output")}}),e.toJSONSchema=jK(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone($f(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)=>Pf(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>uY(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>dY(e,r,i),e.parseAsync=async(r,i)=>fY(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>hY(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>pY(e,r,i),e.decode=(r,i)=>mY(e,r,i),e.encodeAsync=async(r,i)=>gY(e,r,i),e.decodeAsync=async(r,i)=>yY(e,r,i),e.safeEncode=(r,i)=>vY(e,r,i),e.safeDecode=(r,i)=>bY(e,r,i),e.safeEncodeAsync=async(r,i)=>SY(e,r,i),e.safeDecodeAsync=async(r,i)=>wY(e,r,i),e.refine=(r,i)=>e.check(pZ(r,i)),e.superRefine=r=>e.check(mZ(r)),e.overwrite=r=>e.check(Og(r)),e.optional=()=>Jr(e),e.exactOptional=()=>tZ(e),e.nullable=()=>C3(e),e.nullish=()=>Jr(C3(e)),e.nonoptional=r=>sZ(e,r),e.array=()=>Xe(e),e.or=r=>kr([e,r]),e.and=r=>MO(e,r),e.transform=r=>CC(e,Z6(r)),e.default=r=>aZ(e,r),e.prefault=r=>oZ(e,r),e.catch=r=>cZ(e,r),e.pipe=r=>CC(e,r),e.readonly=()=>dZ(e),e.describe=r=>{const i=e.clone();return Mb.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return Mb.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Mb.get(e);const i=e.clone();return Mb.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),F6=Ne("_ZodString",(e,t)=>{OO.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>NK(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(mK(...i)),e.includes=(...i)=>e.check(vK(...i)),e.startsWith=(...i)=>e.check(bK(...i)),e.endsWith=(...i)=>e.check(SK(...i)),e.min=(...i)=>e.check(fE(...i)),e.max=(...i)=>e.check($6(...i)),e.length=(...i)=>e.check(P6(...i)),e.nonempty=(...i)=>e.check(fE(1,...i)),e.lowercase=i=>e.check(gK(i)),e.uppercase=i=>e.check(yK(i)),e.trim=()=>e.check(EK()),e.normalize=(...i)=>e.check(wK(...i)),e.toLowerCase=()=>e.check(xK()),e.toUpperCase=()=>e.check(_K()),e.slugify=()=>e.check(TK())}),EY=Ne("ZodString",(e,t)=>{OO.init(e,t),F6.init(e,t),e.email=r=>e.check(PG(xY,r)),e.url=r=>e.check(z6(B6,r)),e.jwt=r=>e.check(nK(LY,r)),e.emoji=r=>e.check(qG(TY,r)),e.guid=r=>e.check(S3(_3,r)),e.uuid=r=>e.check(IG(bS,r)),e.uuidv4=r=>e.check(LG(bS,r)),e.uuidv6=r=>e.check(UG(bS,r)),e.uuidv7=r=>e.check(VG(bS,r)),e.nanoid=r=>e.check(FG(CY,r)),e.guid=r=>e.check(S3(_3,r)),e.cuid=r=>e.check(BG(RY,r)),e.cuid2=r=>e.check(HG(OY,r)),e.ulid=r=>e.check(GG(AY,r)),e.base64=r=>e.check(JG($Y,r)),e.base64url=r=>e.check(eK(PY,r)),e.xid=r=>e.check(KG(MY,r)),e.ksuid=r=>e.check(YG(jY,r)),e.ipv4=r=>e.check(ZG(kY,r)),e.ipv6=r=>e.check(XG(NY,r)),e.cidrv4=r=>e.check(QG(DY,r)),e.cidrv6=r=>e.check(WG(zY,r)),e.e164=r=>e.check(tK(IY,r)),e.datetime=r=>e.check(q6(r)),e.date=r=>e.check(aY(r)),e.time=r=>e.check(oY(r)),e.duration=r=>e.check(lY(r))});function we(e){return $G(EY,e)}const Br=Ne("ZodStringFormat",(e,t)=>{Dr.init(e,t),F6.init(e,t)}),xY=Ne("ZodEmail",(e,t)=>{VH.init(e,t),Br.init(e,t)}),_3=Ne("ZodGUID",(e,t)=>{LH.init(e,t),Br.init(e,t)}),bS=Ne("ZodUUID",(e,t)=>{UH.init(e,t),Br.init(e,t)}),B6=Ne("ZodURL",(e,t)=>{qH.init(e,t),Br.init(e,t)});function _Y(e){return z6(B6,e)}const TY=Ne("ZodEmoji",(e,t)=>{FH.init(e,t),Br.init(e,t)}),CY=Ne("ZodNanoID",(e,t)=>{BH.init(e,t),Br.init(e,t)}),RY=Ne("ZodCUID",(e,t)=>{HH.init(e,t),Br.init(e,t)}),OY=Ne("ZodCUID2",(e,t)=>{GH.init(e,t),Br.init(e,t)}),AY=Ne("ZodULID",(e,t)=>{KH.init(e,t),Br.init(e,t)}),MY=Ne("ZodXID",(e,t)=>{YH.init(e,t),Br.init(e,t)}),jY=Ne("ZodKSUID",(e,t)=>{ZH.init(e,t),Br.init(e,t)}),kY=Ne("ZodIPv4",(e,t)=>{eG.init(e,t),Br.init(e,t)}),NY=Ne("ZodIPv6",(e,t)=>{tG.init(e,t),Br.init(e,t)}),DY=Ne("ZodCIDRv4",(e,t)=>{nG.init(e,t),Br.init(e,t)}),zY=Ne("ZodCIDRv6",(e,t)=>{rG.init(e,t),Br.init(e,t)}),$Y=Ne("ZodBase64",(e,t)=>{aG.init(e,t),Br.init(e,t)}),PY=Ne("ZodBase64URL",(e,t)=>{oG.init(e,t),Br.init(e,t)}),IY=Ne("ZodE164",(e,t)=>{sG.init(e,t),Br.init(e,t)}),LY=Ne("ZodJWT",(e,t)=>{cG.init(e,t),Br.init(e,t)}),AO=Ne("ZodNumber",(e,t)=>{M6.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>DK(e,i,s),e.gt=(i,s)=>e.check(E3(i,s)),e.gte=(i,s)=>e.check(b2(i,s)),e.min=(i,s)=>e.check(b2(i,s)),e.lt=(i,s)=>e.check(w3(i,s)),e.lte=(i,s)=>e.check(v2(i,s)),e.max=(i,s)=>e.check(v2(i,s)),e.int=i=>e.check(T3(i)),e.safe=i=>e.check(T3(i)),e.positive=i=>e.check(E3(0,i)),e.nonnegative=i=>e.check(b2(0,i)),e.negative=i=>e.check(w3(0,i)),e.nonpositive=i=>e.check(v2(0,i)),e.multipleOf=(i,s)=>e.check(x3(i,s)),e.step=(i,s)=>e.check(x3(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 Fn(e){return sK(AO,e)}const UY=Ne("ZodNumberFormat",(e,t)=>{uG.init(e,t),AO.init(e,t)});function T3(e){return cK(UY,e)}const VY=Ne("ZodBoolean",(e,t)=>{fG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>zK(e,r,i)});function Or(e){return uK(VY,e)}const qY=Ne("ZodNull",(e,t)=>{dG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>$K(e,r,i)});function H6(e){return fK(qY,e)}const FY=Ne("ZodAny",(e,t)=>{hG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>IK()});function BY(){return dK(FY)}const HY=Ne("ZodUnknown",(e,t)=>{pG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>LK()});function qr(){return hK(HY)}const GY=Ne("ZodNever",(e,t)=>{mG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>PK(e,r,i)});function KY(e){return pK(GY,e)}const YY=Ne("ZodArray",(e,t)=>{gG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>BK(e,r,i,s),e.element=t.element,e.min=(r,i)=>e.check(fE(r,i)),e.nonempty=r=>e.check(fE(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 Xe(e,t){return CK(YY,e,t)}const G6=Ne("ZodObject",(e,t)=>{vG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>HK(e,r,i,s),qn(e,"shape",()=>t.shape),e.keyof=()=>ls(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:qr()}),e.loose=()=>e.clone({...e._zod.def,catchall:qr()}),e.strict=()=>e.clone({...e._zod.def,catchall:KY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>PB(e,r),e.safeExtend=r=>IB(e,r),e.merge=r=>LB(e,r),e.pick=r=>zB(e,r),e.omit=r=>$B(e,r),e.partial=(...r)=>UB(X6,e,r[0]),e.required=(...r)=>VB(Q6,e,r[0])});function Je(e,t){const r={type:"object",shape:e??{},...pt(t)};return new G6(r)}function bi(e,t){return new G6({type:"object",shape:e,catchall:qr(),...pt(t)})}const K6=Ne("ZodUnion",(e,t)=>{N6.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>GK(e,r,i,s),e.options=t.options});function kr(e,t){return new K6({type:"union",options:e,...pt(t)})}const ZY=Ne("ZodDiscriminatedUnion",(e,t)=>{K6.init(e,t),bG.init(e,t)});function Y6(e,t,r){return new ZY({type:"union",options:t,discriminator:e,...pt(r)})}const XY=Ne("ZodIntersection",(e,t)=>{SG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>KK(e,r,i,s)});function MO(e,t){return new XY({type:"intersection",left:e,right:t})}const QY=Ne("ZodRecord",(e,t)=>{wG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>YK(e,r,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function Fr(e,t,r){return new QY({type:"record",keyType:e,valueType:t,...pt(r)})}const TC=Ne("ZodEnum",(e,t)=>{EG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>UK(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 u of i)if(r.has(u))l[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new TC({...t,checks:[],...pt(s),entries:l})},e.exclude=(i,s)=>{const l={...t.entries};for(const u of i)if(r.has(u))delete l[u];else throw new Error(`Key ${u} not found in enum`);return new TC({...t,checks:[],...pt(s),entries:l})}});function ls(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new TC({type:"enum",entries:r,...pt(t)})}const WY=Ne("ZodLiteral",(e,t)=>{xG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>VK(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 vt(e,t){return new WY({type:"literal",values:Array.isArray(e)?e:[e],...pt(t)})}const JY=Ne("ZodTransform",(e,t)=>{_G.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>FK(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(s1(l,r.value,t));else{const u=l;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(s1(u))}};const s=t.transform(r.value,r);return s instanceof Promise?s.then(l=>(r.value=l,r)):(r.value=s,r)}});function Z6(e){return new JY({type:"transform",transform:e})}const X6=Ne("ZodOptional",(e,t)=>{D6.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>V6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function Jr(e){return new X6({type:"optional",innerType:e})}const eZ=Ne("ZodExactOptional",(e,t)=>{TG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>V6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function tZ(e){return new eZ({type:"optional",innerType:e})}const nZ=Ne("ZodNullable",(e,t)=>{CG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>ZK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function C3(e){return new nZ({type:"nullable",innerType:e})}const rZ=Ne("ZodDefault",(e,t)=>{RG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>QK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function aZ(e,t){return new rZ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():y6(t)}})}const iZ=Ne("ZodPrefault",(e,t)=>{OG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>WK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function oZ(e,t){return new iZ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():y6(t)}})}const Q6=Ne("ZodNonOptional",(e,t)=>{AG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>XK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function sZ(e,t){return new Q6({type:"nonoptional",innerType:e,...pt(t)})}const lZ=Ne("ZodCatch",(e,t)=>{MG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>JK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function cZ(e,t){return new lZ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const uZ=Ne("ZodPipe",(e,t)=>{jG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>eY(e,r,i,s),e.in=t.in,e.out=t.out});function CC(e,t){return new uZ({type:"pipe",in:e,out:t})}const fZ=Ne("ZodReadonly",(e,t)=>{kG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>tY(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function dZ(e){return new fZ({type:"readonly",innerType:e})}const W6=Ne("ZodCustom",(e,t)=>{NG.init(e,t),jr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>qK(e,r)});function hZ(e,t){return RK(W6,e??(()=>!0),t)}function pZ(e,t={}){return OK(W6,e,t)}function mZ(e){return AK(e)}function J6(e,t){return CC(Z6(e),t)}const gZ={custom:"custom"};function yZ(e){return lK(AO,e)}const WE="2025-11-25",vZ=[WE,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],gp="io.modelcontextprotocol/related-task",JE="2.0",Si=hZ(e=>e!==null&&(typeof e=="object"||typeof e=="function")),e9=kr([we(),Fn().int()]),t9=we();bi({ttl:kr([Fn(),H6()]).optional(),pollInterval:Fn().optional()});const bZ=Je({ttl:Fn().optional()}),SZ=Je({taskId:we()}),jO=bi({progressToken:e9.optional(),[gp]:SZ.optional()}),cs=Je({_meta:jO.optional()}),D1=cs.extend({task:bZ.optional()}),wZ=e=>D1.safeParse(e).success,xi=Je({method:we(),params:cs.loose().optional()}),Cs=Je({_meta:jO.optional()}),Rs=Je({method:we(),params:Cs.loose().optional()}),_i=bi({_meta:jO.optional()}),ex=kr([we(),Fn().int()]),n9=Je({jsonrpc:vt(JE),id:ex,...xi.shape}).strict(),RC=e=>n9.safeParse(e).success,r9=Je({jsonrpc:vt(JE),...Rs.shape}).strict(),EZ=e=>r9.safeParse(e).success,kO=Je({jsonrpc:vt(JE),id:ex,result:_i}).strict(),jb=e=>kO.safeParse(e).success;var Ut;(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"})(Ut||(Ut={}));const NO=Je({jsonrpc:vt(JE),id:ex.optional(),error:Je({code:Fn().int(),message:we(),data:qr().optional()})}).strict(),xZ=e=>NO.safeParse(e).success,S2=kr([n9,r9,kO,NO]);kr([kO,NO]);const qm=_i.strict(),_Z=Cs.extend({requestId:ex.optional(),reason:we().optional()}),DO=Rs.extend({method:vt("notifications/cancelled"),params:_Z}),TZ=Je({src:we(),mimeType:we().optional(),sizes:Xe(we()).optional(),theme:ls(["light","dark"]).optional()}),z1=Je({icons:Xe(TZ).optional()}),cg=Je({name:we(),title:we().optional()}),a9=cg.extend({...cg.shape,...z1.shape,version:we(),websiteUrl:we().optional(),description:we().optional()}),CZ=MO(Je({applyDefaults:Or().optional()}),Fr(we(),qr())),RZ=J6(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,MO(Je({form:CZ.optional(),url:Si.optional()}),Fr(we(),qr()).optional())),OZ=bi({list:Si.optional(),cancel:Si.optional(),requests:bi({sampling:bi({createMessage:Si.optional()}).optional(),elicitation:bi({create:Si.optional()}).optional()}).optional()}),AZ=bi({list:Si.optional(),cancel:Si.optional(),requests:bi({tools:bi({call:Si.optional()}).optional()}).optional()}),MZ=Je({experimental:Fr(we(),Si).optional(),sampling:Je({context:Si.optional(),tools:Si.optional()}).optional(),elicitation:RZ.optional(),roots:Je({listChanged:Or().optional()}).optional(),tasks:OZ.optional()}),jZ=cs.extend({protocolVersion:we(),capabilities:MZ,clientInfo:a9}),kZ=xi.extend({method:vt("initialize"),params:jZ}),NZ=Je({experimental:Fr(we(),Si).optional(),logging:Si.optional(),completions:Si.optional(),prompts:Je({listChanged:Or().optional()}).optional(),resources:Je({subscribe:Or().optional(),listChanged:Or().optional()}).optional(),tools:Je({listChanged:Or().optional()}).optional(),tasks:AZ.optional()}),i9=_i.extend({protocolVersion:we(),capabilities:NZ,serverInfo:a9,instructions:we().optional()}),o9=Rs.extend({method:vt("notifications/initialized"),params:Cs.optional()}),DZ=e=>o9.safeParse(e).success,zO=xi.extend({method:vt("ping"),params:cs.optional()}),zZ=Je({progress:Fn(),total:Jr(Fn()),message:Jr(we())}),$Z=Je({...Cs.shape,...zZ.shape,progressToken:e9}),$O=Rs.extend({method:vt("notifications/progress"),params:$Z}),PZ=cs.extend({cursor:t9.optional()}),$1=xi.extend({params:PZ.optional()}),P1=_i.extend({nextCursor:t9.optional()}),IZ=ls(["working","input_required","completed","failed","cancelled"]),I1=Je({taskId:we(),status:IZ,ttl:kr([Fn(),H6()]),createdAt:we(),lastUpdatedAt:we(),pollInterval:Jr(Fn()),statusMessage:Jr(we())}),l1=_i.extend({task:I1}),LZ=Cs.merge(I1),hE=Rs.extend({method:vt("notifications/tasks/status"),params:LZ}),PO=xi.extend({method:vt("tasks/get"),params:cs.extend({taskId:we()})}),IO=_i.merge(I1),LO=xi.extend({method:vt("tasks/result"),params:cs.extend({taskId:we()})});_i.loose();const UO=$1.extend({method:vt("tasks/list")}),VO=P1.extend({tasks:Xe(I1)}),qO=xi.extend({method:vt("tasks/cancel"),params:cs.extend({taskId:we()})}),UZ=_i.merge(I1),s9=Je({uri:we(),mimeType:Jr(we()),_meta:Fr(we(),qr()).optional()}),l9=s9.extend({text:we()}),FO=we().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),c9=s9.extend({blob:FO}),L1=ls(["user","assistant"]),Ag=Je({audience:Xe(L1).optional(),priority:Fn().min(0).max(1).optional(),lastModified:q6({offset:!0}).optional()}),u9=Je({...cg.shape,...z1.shape,uri:we(),description:Jr(we()),mimeType:Jr(we()),annotations:Ag.optional(),_meta:Jr(bi({}))}),VZ=Je({...cg.shape,...z1.shape,uriTemplate:we(),description:Jr(we()),mimeType:Jr(we()),annotations:Ag.optional(),_meta:Jr(bi({}))}),qZ=$1.extend({method:vt("resources/list")}),f9=P1.extend({resources:Xe(u9)}),FZ=$1.extend({method:vt("resources/templates/list")}),d9=P1.extend({resourceTemplates:Xe(VZ)}),BO=cs.extend({uri:we()}),BZ=BO,HZ=xi.extend({method:vt("resources/read"),params:BZ}),h9=_i.extend({contents:Xe(kr([l9,c9]))}),p9=Rs.extend({method:vt("notifications/resources/list_changed"),params:Cs.optional()}),GZ=BO,KZ=xi.extend({method:vt("resources/subscribe"),params:GZ}),YZ=BO,ZZ=xi.extend({method:vt("resources/unsubscribe"),params:YZ}),XZ=Cs.extend({uri:we()}),QZ=Rs.extend({method:vt("notifications/resources/updated"),params:XZ}),WZ=Je({name:we(),description:Jr(we()),required:Jr(Or())}),JZ=Je({...cg.shape,...z1.shape,description:Jr(we()),arguments:Jr(Xe(WZ)),_meta:Jr(bi({}))}),eX=$1.extend({method:vt("prompts/list")}),m9=P1.extend({prompts:Xe(JZ)}),tX=cs.extend({name:we(),arguments:Fr(we(),we()).optional()}),nX=xi.extend({method:vt("prompts/get"),params:tX}),HO=Je({type:vt("text"),text:we(),annotations:Ag.optional(),_meta:Fr(we(),qr()).optional()}),GO=Je({type:vt("image"),data:FO,mimeType:we(),annotations:Ag.optional(),_meta:Fr(we(),qr()).optional()}),KO=Je({type:vt("audio"),data:FO,mimeType:we(),annotations:Ag.optional(),_meta:Fr(we(),qr()).optional()}),rX=Je({type:vt("tool_use"),name:we(),id:we(),input:Fr(we(),qr()),_meta:Fr(we(),qr()).optional()}),aX=Je({type:vt("resource"),resource:kr([l9,c9]),annotations:Ag.optional(),_meta:Fr(we(),qr()).optional()}),iX=u9.extend({type:vt("resource_link")}),YO=kr([HO,GO,KO,iX,aX]),oX=Je({role:L1,content:YO}),g9=_i.extend({description:we().optional(),messages:Xe(oX)}),y9=Rs.extend({method:vt("notifications/prompts/list_changed"),params:Cs.optional()}),sX=Je({title:we().optional(),readOnlyHint:Or().optional(),destructiveHint:Or().optional(),idempotentHint:Or().optional(),openWorldHint:Or().optional()}),lX=Je({taskSupport:ls(["required","optional","forbidden"]).optional()}),v9=Je({...cg.shape,...z1.shape,description:we().optional(),inputSchema:Je({type:vt("object"),properties:Fr(we(),Si).optional(),required:Xe(we()).optional()}).catchall(qr()),outputSchema:Je({type:vt("object"),properties:Fr(we(),Si).optional(),required:Xe(we()).optional()}).catchall(qr()).optional(),annotations:sX.optional(),execution:lX.optional(),_meta:Fr(we(),qr()).optional()}),cX=$1.extend({method:vt("tools/list")}),b9=P1.extend({tools:Xe(v9)}),tx=_i.extend({content:Xe(YO).default([]),structuredContent:Fr(we(),qr()).optional(),isError:Or().optional()});tx.or(_i.extend({toolResult:qr()}));const uX=D1.extend({name:we(),arguments:Fr(we(),qr()).optional()}),fX=xi.extend({method:vt("tools/call"),params:uX}),S9=Rs.extend({method:vt("notifications/tools/list_changed"),params:Cs.optional()}),dX=Je({autoRefresh:Or().default(!0),debounceMs:Fn().int().nonnegative().default(300)}),w9=ls(["debug","info","notice","warning","error","critical","alert","emergency"]),hX=cs.extend({level:w9}),pX=xi.extend({method:vt("logging/setLevel"),params:hX}),mX=Cs.extend({level:w9,logger:we().optional(),data:qr()}),gX=Rs.extend({method:vt("notifications/message"),params:mX}),yX=Je({name:we().optional()}),vX=Je({hints:Xe(yX).optional(),costPriority:Fn().min(0).max(1).optional(),speedPriority:Fn().min(0).max(1).optional(),intelligencePriority:Fn().min(0).max(1).optional()}),bX=Je({mode:ls(["auto","required","none"]).optional()}),SX=Je({type:vt("tool_result"),toolUseId:we().describe("The unique identifier for the corresponding tool call."),content:Xe(YO).default([]),structuredContent:Je({}).loose().optional(),isError:Or().optional(),_meta:Fr(we(),qr()).optional()}),wX=Y6("type",[HO,GO,KO]),pE=Y6("type",[HO,GO,KO,rX,SX]),EX=Je({role:L1,content:kr([pE,Xe(pE)]),_meta:Fr(we(),qr()).optional()}),xX=D1.extend({messages:Xe(EX),modelPreferences:vX.optional(),systemPrompt:we().optional(),includeContext:ls(["none","thisServer","allServers"]).optional(),temperature:Fn().optional(),maxTokens:Fn().int(),stopSequences:Xe(we()).optional(),metadata:Si.optional(),tools:Xe(v9).optional(),toolChoice:bX.optional()}),E9=xi.extend({method:vt("sampling/createMessage"),params:xX}),x9=_i.extend({model:we(),stopReason:Jr(ls(["endTurn","stopSequence","maxTokens"]).or(we())),role:L1,content:wX}),_9=_i.extend({model:we(),stopReason:Jr(ls(["endTurn","stopSequence","maxTokens","toolUse"]).or(we())),role:L1,content:kr([pE,Xe(pE)])}),_X=Je({type:vt("boolean"),title:we().optional(),description:we().optional(),default:Or().optional()}),TX=Je({type:vt("string"),title:we().optional(),description:we().optional(),minLength:Fn().optional(),maxLength:Fn().optional(),format:ls(["email","uri","date","date-time"]).optional(),default:we().optional()}),CX=Je({type:ls(["number","integer"]),title:we().optional(),description:we().optional(),minimum:Fn().optional(),maximum:Fn().optional(),default:Fn().optional()}),RX=Je({type:vt("string"),title:we().optional(),description:we().optional(),enum:Xe(we()),default:we().optional()}),OX=Je({type:vt("string"),title:we().optional(),description:we().optional(),oneOf:Xe(Je({const:we(),title:we()})),default:we().optional()}),AX=Je({type:vt("string"),title:we().optional(),description:we().optional(),enum:Xe(we()),enumNames:Xe(we()).optional(),default:we().optional()}),MX=kr([RX,OX]),jX=Je({type:vt("array"),title:we().optional(),description:we().optional(),minItems:Fn().optional(),maxItems:Fn().optional(),items:Je({type:vt("string"),enum:Xe(we())}),default:Xe(we()).optional()}),kX=Je({type:vt("array"),title:we().optional(),description:we().optional(),minItems:Fn().optional(),maxItems:Fn().optional(),items:Je({anyOf:Xe(Je({const:we(),title:we()}))}),default:Xe(we()).optional()}),NX=kr([jX,kX]),DX=kr([AX,MX,NX]),zX=kr([DX,_X,TX,CX]),$X=D1.extend({mode:vt("form").optional(),message:we(),requestedSchema:Je({type:vt("object"),properties:Fr(we(),zX),required:Xe(we()).optional()})}),PX=D1.extend({mode:vt("url"),message:we(),elicitationId:we(),url:we().url()}),IX=kr([$X,PX]),T9=xi.extend({method:vt("elicitation/create"),params:IX}),LX=Cs.extend({elicitationId:we()}),UX=Rs.extend({method:vt("notifications/elicitation/complete"),params:LX}),C9=_i.extend({action:ls(["accept","decline","cancel"]),content:J6(e=>e===null?void 0:e,Fr(we(),kr([we(),Fn(),Or(),Xe(we())])).optional())}),VX=Je({type:vt("ref/resource"),uri:we()}),qX=Je({type:vt("ref/prompt"),name:we()}),FX=cs.extend({ref:kr([qX,VX]),argument:Je({name:we(),value:we()}),context:Je({arguments:Fr(we(),we()).optional()}).optional()}),BX=xi.extend({method:vt("completion/complete"),params:FX}),R9=_i.extend({completion:bi({values:Xe(we()).max(100),total:Jr(Fn().int()),hasMore:Jr(Or())})}),HX=Je({uri:we().startsWith("file://"),name:we().optional(),_meta:Fr(we(),qr()).optional()}),GX=xi.extend({method:vt("roots/list"),params:cs.optional()}),KX=_i.extend({roots:Xe(HX)}),YX=Rs.extend({method:vt("notifications/roots/list_changed"),params:Cs.optional()});kr([zO,kZ,BX,pX,nX,eX,qZ,FZ,HZ,KZ,ZZ,fX,cX,PO,LO,UO,qO]);kr([DO,$O,o9,YX,hE]);kr([qm,x9,_9,C9,KX,IO,VO,l1]);kr([zO,E9,T9,GX,PO,LO,UO,qO]);kr([DO,$O,gX,QZ,p9,S9,y9,hE,UX]);kr([qm,i9,R9,g9,m9,f9,d9,h9,tx,b9,IO,VO,l1]);class Ot 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===Ut.UrlElicitationRequired&&i){const s=i;if(s.elicitations)return new ZX(s.elicitations,r)}return new Ot(t,r,i)}}class ZX extends Ot{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(Ut.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}const yi=_Y().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:gZ.custom,message:"URL must be parseable",fatal:!0}),OB}).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"}),XX=bi({resource:we().url(),authorization_servers:Xe(yi).optional(),jwks_uri:we().url().optional(),scopes_supported:Xe(we()).optional(),bearer_methods_supported:Xe(we()).optional(),resource_signing_alg_values_supported:Xe(we()).optional(),resource_name:we().optional(),resource_documentation:we().optional(),resource_policy_uri:we().url().optional(),resource_tos_uri:we().url().optional(),tls_client_certificate_bound_access_tokens:Or().optional(),authorization_details_types_supported:Xe(we()).optional(),dpop_signing_alg_values_supported:Xe(we()).optional(),dpop_bound_access_tokens_required:Or().optional()}),O9=bi({issuer:we(),authorization_endpoint:yi,token_endpoint:yi,registration_endpoint:yi.optional(),scopes_supported:Xe(we()).optional(),response_types_supported:Xe(we()),response_modes_supported:Xe(we()).optional(),grant_types_supported:Xe(we()).optional(),token_endpoint_auth_methods_supported:Xe(we()).optional(),token_endpoint_auth_signing_alg_values_supported:Xe(we()).optional(),service_documentation:yi.optional(),revocation_endpoint:yi.optional(),revocation_endpoint_auth_methods_supported:Xe(we()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Xe(we()).optional(),introspection_endpoint:we().optional(),introspection_endpoint_auth_methods_supported:Xe(we()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Xe(we()).optional(),code_challenge_methods_supported:Xe(we()).optional(),client_id_metadata_document_supported:Or().optional()}),QX=bi({issuer:we(),authorization_endpoint:yi,token_endpoint:yi,userinfo_endpoint:yi.optional(),jwks_uri:yi,registration_endpoint:yi.optional(),scopes_supported:Xe(we()).optional(),response_types_supported:Xe(we()),response_modes_supported:Xe(we()).optional(),grant_types_supported:Xe(we()).optional(),acr_values_supported:Xe(we()).optional(),subject_types_supported:Xe(we()),id_token_signing_alg_values_supported:Xe(we()),id_token_encryption_alg_values_supported:Xe(we()).optional(),id_token_encryption_enc_values_supported:Xe(we()).optional(),userinfo_signing_alg_values_supported:Xe(we()).optional(),userinfo_encryption_alg_values_supported:Xe(we()).optional(),userinfo_encryption_enc_values_supported:Xe(we()).optional(),request_object_signing_alg_values_supported:Xe(we()).optional(),request_object_encryption_alg_values_supported:Xe(we()).optional(),request_object_encryption_enc_values_supported:Xe(we()).optional(),token_endpoint_auth_methods_supported:Xe(we()).optional(),token_endpoint_auth_signing_alg_values_supported:Xe(we()).optional(),display_values_supported:Xe(we()).optional(),claim_types_supported:Xe(we()).optional(),claims_supported:Xe(we()).optional(),service_documentation:we().optional(),claims_locales_supported:Xe(we()).optional(),ui_locales_supported:Xe(we()).optional(),claims_parameter_supported:Or().optional(),request_parameter_supported:Or().optional(),request_uri_parameter_supported:Or().optional(),require_request_uri_registration:Or().optional(),op_policy_uri:yi.optional(),op_tos_uri:yi.optional(),client_id_metadata_document_supported:Or().optional()}),WX=Je({...QX.shape,...O9.pick({code_challenge_methods_supported:!0}).shape}),JX=Je({access_token:we(),id_token:we().optional(),token_type:we(),expires_in:yZ().optional(),scope:we().optional(),refresh_token:we().optional()}).strip(),eQ=Je({error:we(),error_description:we().optional(),error_uri:we().optional()}),R3=yi.optional().or(vt("").transform(()=>{})),tQ=Je({redirect_uris:Xe(yi),token_endpoint_auth_method:we().optional(),grant_types:Xe(we()).optional(),response_types:Xe(we()).optional(),client_name:we().optional(),client_uri:yi.optional(),logo_uri:R3,scope:we().optional(),contacts:Xe(we()).optional(),tos_uri:R3,policy_uri:we().optional(),jwks_uri:yi.optional(),jwks:BY().optional(),software_id:we().optional(),software_version:we().optional(),software_statement:we().optional()}).strip(),nQ=Je({client_id:we(),client_secret:we().optional(),client_id_issued_at:Fn().optional(),client_secret_expires_at:Fn().optional()}).strip(),rQ=tQ.merge(nQ);Je({error:we(),error_description:we().optional()}).strip();Je({token:we(),token_type_hint:we().optional()}).strip();function aQ(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function iQ({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 Fa 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 OC extends Fa{}OC.errorCode="invalid_request";class mE extends Fa{}mE.errorCode="invalid_client";class gE extends Fa{}gE.errorCode="invalid_grant";class yE extends Fa{}yE.errorCode="unauthorized_client";class AC extends Fa{}AC.errorCode="unsupported_grant_type";class MC extends Fa{}MC.errorCode="invalid_scope";class jC extends Fa{}jC.errorCode="access_denied";class ug extends Fa{}ug.errorCode="server_error";class kC extends Fa{}kC.errorCode="temporarily_unavailable";class NC extends Fa{}NC.errorCode="unsupported_response_type";class DC extends Fa{}DC.errorCode="unsupported_token_type";class zC extends Fa{}zC.errorCode="invalid_token";class $C extends Fa{}$C.errorCode="method_not_allowed";class PC extends Fa{}PC.errorCode="too_many_requests";class vE extends Fa{}vE.errorCode="invalid_client_metadata";class IC extends Fa{}IC.errorCode="insufficient_scope";class LC extends Fa{}LC.errorCode="invalid_target";const oQ={[OC.errorCode]:OC,[mE.errorCode]:mE,[gE.errorCode]:gE,[yE.errorCode]:yE,[AC.errorCode]:AC,[MC.errorCode]:MC,[jC.errorCode]:jC,[ug.errorCode]:ug,[kC.errorCode]:kC,[NC.errorCode]:NC,[DC.errorCode]:DC,[zC.errorCode]:zC,[$C.errorCode]:$C,[PC.errorCode]:PC,[vE.errorCode]:vE,[IC.errorCode]:IC,[LC.errorCode]:LC};class yp extends Error{constructor(t){super(t??"Unauthorized")}}function sQ(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const w2="code",E2="S256";function lQ(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&&sQ(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 cQ(e,t,r,i){const{client_id:s,client_secret:l}=t;switch(e){case"client_secret_basic":uQ(s,l,r);return;case"client_secret_post":fQ(s,l,i);return;case"none":dQ(s,i);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function uQ(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 fQ(e,t,r){r.set("client_id",e),t&&r.set("client_secret",t)}function dQ(e,t){t.set("client_id",e)}async function A9(e){const t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{const i=eQ.parse(JSON.parse(r)),{error:s,error_description:l,error_uri:u}=i,f=oQ[s]||ug;return new f(l||"",u)}catch(i){const s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${i}. Raw body: ${r}`;return new ug(s)}}async function kb(e,t){try{return await x2(e,t)}catch(r){if(r instanceof mE||r instanceof yE)return await e.invalidateCredentials?.("all"),await x2(e,t);if(r instanceof gE)return await e.invalidateCredentials?.("tokens"),await x2(e,t);throw r}}async function x2(e,{serverUrl:t,authorizationCode:r,scope:i,resourceMetadataUrl:s,fetchFn:l}){const u=await e.discoveryState?.();let f,d,h,m=s;if(!m&&u?.resourceMetadataUrl&&(m=new URL(u.resourceMetadataUrl)),u?.authorizationServerUrl){if(d=u.authorizationServerUrl,f=u.resourceMetadata,h=u.authorizationServerMetadata??await M9(d,{fetchFn:l}),!f)try{f=await ZO(t,{resourceMetadataUrl:m},l)}catch{}(h!==u.authorizationServerMetadata||f!==u.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:f,authorizationServerMetadata:h})}else{const E=await bQ(t,{resourceMetadataUrl:m,fetchFn:l});d=E.authorizationServerUrl,h=E.authorizationServerMetadata,f=E.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:f,authorizationServerMetadata:h})}const g=await pQ(t,e,f);let v=await Promise.resolve(e.clientInformation());if(!v){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,O=e.clientMetadataUrl;if(O&&!hQ(O))throw new vE(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${O}`);if(E&&O)v={client_id:O},await e.saveClientInformation?.(v);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await _Q(d,{metadata:h,clientMetadata:e.clientMetadata,fetchFn:l});await e.saveClientInformation(C),v=C}}const x=!e.redirectUrl;if(r!==void 0||x){const E=await xQ(e,d,{metadata:h,resource:g,authorizationCode:r,fetchFn:l});return await e.saveTokens(E),"AUTHORIZED"}const b=await e.tokens();if(b?.refresh_token)try{const E=await EQ(d,{metadata:h,clientInformation:v,refreshToken:b.refresh_token,resource:g,addClientAuthentication:e.addClientAuthentication,fetchFn:l});return await e.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof Fa)||E instanceof ug))throw E}const w=e.state?await e.state():void 0,{authorizationUrl:S,codeVerifier:_}=await SQ(d,{metadata:h,clientInformation:v,state:w,redirectUrl:e.redirectUrl,scope:i||f?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:g});return await e.saveCodeVerifier(_),await e.redirectToAuthorization(S),"REDIRECT"}function hQ(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function pQ(e,t,r){const i=aQ(e);if(t.validateResourceURL)return await t.validateResourceURL(i,r?.resource);if(r){if(!iQ({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 O3(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[r,i]=t.split(" ");if(r.toLowerCase()!=="bearer"||!i)return{};const s=_2(e,"resource_metadata")||void 0;let l;if(s)try{l=new URL(s)}catch{}const u=_2(e,"scope")||void 0,f=_2(e,"error")||void 0;return{resourceMetadataUrl:l,scope:u,error:f}}function _2(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 ZO(e,t,r=fetch){const i=await yQ(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 XX.parse(await i.json())}async function XO(e,t,r=fetch){try{return await r(e,{headers:t})}catch(i){if(i instanceof TypeError)return t?XO(e,void 0,r):void 0;throw i}}function mQ(e,t="",r={}){return t.endsWith("/")&&(t=t.slice(0,-1)),r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function A3(e,t,r=fetch){return await XO(e,{"MCP-Protocol-Version":t},r)}function gQ(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function yQ(e,t,r,i){const s=new URL(e),l=i?.protocolVersion??WE;let u;if(i?.metadataUrl)u=new URL(i.metadataUrl);else{const d=mQ(t,s.pathname);u=new URL(d,i?.metadataServerUrl??s),u.search=s.search}let f=await A3(u,l,r);if(!i?.metadataUrl&&gQ(f,s.pathname)){const d=new URL(`/.well-known/${t}`,s);f=await A3(d,l,r)}return f}function vQ(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 M9(e,{fetchFn:t=fetch,protocolVersion:r=WE}={}){const i={"MCP-Protocol-Version":r,Accept:"application/json"},s=vQ(e);for(const{url:l,type:u}of s){const f=await XO(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 ${u==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}return u==="oauth"?O9.parse(await f.json()):WX.parse(await f.json())}}}async function bQ(e,t){let r,i;try{r=await ZO(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0&&(i=r.authorization_servers[0])}catch{}i||(i=String(new URL("/",e)));const s=await M9(i,{fetchFn:t?.fetchFn});return{authorizationServerUrl:i,authorizationServerMetadata:s,resourceMetadata:r}}async function SQ(e,{metadata:t,clientInformation:r,redirectUrl:i,scope:s,state:l,resource:u}){let f;if(t){if(f=new URL(t.authorization_endpoint),!t.response_types_supported.includes(w2))throw new Error(`Incompatible auth server: does not support response type ${w2}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(E2))throw new Error(`Incompatible auth server: does not support code challenge method ${E2}`)}else f=new URL("/authorize",e);const d=await RB(),h=d.code_verifier,m=d.code_challenge;return f.searchParams.set("response_type",w2),f.searchParams.set("client_id",r.client_id),f.searchParams.set("code_challenge",m),f.searchParams.set("code_challenge_method",E2),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"),u&&f.searchParams.set("resource",u.href),{authorizationUrl:f,codeVerifier:h}}function wQ(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function j9(e,{metadata:t,tokenRequestParams:r,clientInformation:i,addClientAuthentication:s,resource:l,fetchFn:u}){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=lQ(i,m);cQ(g,i,d,r)}const h=await(u??fetch)(f,{method:"POST",headers:d,body:r});if(!h.ok)throw await A9(h);return JX.parse(await h.json())}async function EQ(e,{metadata:t,clientInformation:r,refreshToken:i,resource:s,addClientAuthentication:l,fetchFn:u}){const f=new URLSearchParams({grant_type:"refresh_token",refresh_token:i}),d=await j9(e,{metadata:t,tokenRequestParams:f,clientInformation:r,addClientAuthentication:l,resource:s,fetchFn:u});return{refresh_token:i,...d}}async function xQ(e,t,{metadata:r,resource:i,authorizationCode:s,fetchFn:l}={}){const u=e.clientMetadata.scope;let f;if(e.prepareTokenRequest&&(f=await e.prepareTokenRequest(u)),!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=wQ(s,h,e.redirectUrl)}const d=await e.clientInformation();return j9(t,{metadata:r,tokenRequestParams:f,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:i,fetchFn:l})}async function _Q(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 A9(l);return rQ.parse(await l.json())}var k9=typeof global=="object"&&global&&global.Object===Object&&global,TQ=typeof self=="object"&&self&&self.Object===Object&&self,oc=k9||TQ||Function("return this")(),Ss=oc.Symbol,N9=Object.prototype,CQ=N9.hasOwnProperty,RQ=N9.toString,gb=Ss?Ss.toStringTag:void 0;function OQ(e){var t=CQ.call(e,gb),r=e[gb];try{e[gb]=void 0;var i=!0}catch{}var s=RQ.call(e);return i&&(t?e[gb]=r:delete e[gb]),s}var AQ=Object.prototype,MQ=AQ.toString;function jQ(e){return MQ.call(e)}var kQ="[object Null]",NQ="[object Undefined]",M3=Ss?Ss.toStringTag:void 0;function Vu(e){return e==null?e===void 0?NQ:kQ:M3&&M3 in Object(e)?OQ(e):jQ(e)}function ws(e){return e!=null&&typeof e=="object"}var DQ="[object Symbol]";function U1(e){return typeof e=="symbol"||ws(e)&&Vu(e)==DQ}function Mg(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 Pa=Array.isArray,j3=Ss?Ss.prototype:void 0,k3=j3?j3.toString:void 0;function D9(e){if(typeof e=="string")return e;if(Pa(e))return Mg(e,D9)+"";if(U1(e))return k3?k3.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var zQ=/\s/;function $Q(e){for(var t=e.length;t--&&zQ.test(e.charAt(t)););return t}var PQ=/^\s+/;function IQ(e){return e&&e.slice(0,$Q(e)+1).replace(PQ,"")}function Cn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var N3=NaN,LQ=/^[-+]0x[0-9a-f]+$/i,UQ=/^0b[01]+$/i,VQ=/^0o[0-7]+$/i,qQ=parseInt;function FQ(e){if(typeof e=="number")return e;if(U1(e))return N3;if(Cn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IQ(e);var r=UQ.test(e);return r||VQ.test(e)?qQ(e.slice(2),r?2:8):LQ.test(e)?N3:+e}var D3=1/0,BQ=17976931348623157e292;function HQ(e){if(!e)return e===0?e:0;if(e=FQ(e),e===D3||e===-D3){var t=e<0?-1:1;return t*BQ}return e===e?e:0}function z9(e){var t=HQ(e),r=t%1;return t===t?r?t-r:t:0}function nx(e){return e}var GQ="[object AsyncFunction]",KQ="[object Function]",YQ="[object GeneratorFunction]",ZQ="[object Proxy]";function V1(e){if(!Cn(e))return!1;var t=Vu(e);return t==KQ||t==YQ||t==GQ||t==ZQ}var T2=oc["__core-js_shared__"],z3=(function(){var e=/[^.]+$/.exec(T2&&T2.keys&&T2.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function XQ(e){return!!z3&&z3 in e}var QQ=Function.prototype,WQ=QQ.toString;function Zp(e){if(e!=null){try{return WQ.call(e)}catch{}try{return e+""}catch{}}return""}var JQ=/[\\^$.*+?()[\]{}|]/g,eW=/^\[object .+?Constructor\]$/,tW=Function.prototype,nW=Object.prototype,rW=tW.toString,aW=nW.hasOwnProperty,iW=RegExp("^"+rW.call(aW).replace(JQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oW(e){if(!Cn(e)||XQ(e))return!1;var t=V1(e)?iW:eW;return t.test(Zp(e))}function sW(e,t){return e?.[t]}function Xp(e,t){var r=sW(e,t);return oW(r)?r:void 0}var UC=Xp(oc,"WeakMap"),$3=Object.create,$9=(function(){function e(){}return function(t){if(!Cn(t))return{};if($3)return $3(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function lW(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 Lw(){}function QO(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var cW=800,uW=16,fW=Date.now;function dW(e){var t=0,r=0;return function(){var i=fW(),s=uW-(i-r);if(r=i,s>0){if(++t>=cW)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function hW(e){return function(){return e}}var bE=(function(){try{var e=Xp(Object,"defineProperty");return e({},"",{}),e}catch{}})(),pW=bE?function(e,t){return bE(e,"toString",{configurable:!0,enumerable:!1,value:hW(t),writable:!0})}:nx,P9=dW(pW);function WO(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function mW(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 gW(e){return e!==e}function yW(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function I9(e,t,r){return t===t?yW(e,t,r):mW(e,gW,r)}function JO(e,t){var r=e==null?0:e.length;return!!r&&I9(e,t,0)>-1}var vW=9007199254740991,bW=/^(?:0|[1-9]\d*)$/;function rx(e,t){var r=typeof e;return t=t??vW,!!t&&(r=="number"||r!="symbol"&&bW.test(e))&&e>-1&&e%1==0&&e<t}function eA(e,t,r){t=="__proto__"&&bE?bE(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function q1(e,t){return e===t||e!==e&&t!==t}var SW=Object.prototype,wW=SW.hasOwnProperty;function ax(e,t,r){var i=e[t];(!(wW.call(e,t)&&q1(i,r))||r===void 0&&!(t in e))&&eA(e,t,r)}function Qp(e,t,r,i){var s=!r;r||(r={});for(var l=-1,u=t.length;++l<u;){var f=t[l],d=void 0;d===void 0&&(d=e[f]),s?eA(r,f,d):ax(r,f,d)}return r}var P3=Math.max;function L9(e,t,r){return t=P3(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,l=P3(i.length-t,0),u=Array(l);++s<l;)u[s]=i[t+s];s=-1;for(var f=Array(t+1);++s<t;)f[s]=i[s];return f[t]=r(u),lW(e,this,f)}}function ix(e,t){return P9(L9(e,t,nx),e+"")}var EW=9007199254740991;function tA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=EW}function If(e){return e!=null&&tA(e.length)&&!V1(e)}function xW(e,t,r){if(!Cn(r))return!1;var i=typeof t;return(i=="number"?If(r)&&rx(t,r.length):i=="string"&&t in r)?q1(r[t],e):!1}function U9(e){return ix(function(t,r){var i=-1,s=r.length,l=s>1?r[s-1]:void 0,u=s>2?r[2]:void 0;for(l=e.length>3&&typeof l=="function"?(s--,l):void 0,u&&xW(r[0],r[1],u)&&(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 _W=Object.prototype;function F1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_W;return e===r}function V9(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var TW="[object Arguments]";function I3(e){return ws(e)&&Vu(e)==TW}var q9=Object.prototype,CW=q9.hasOwnProperty,RW=q9.propertyIsEnumerable,fg=I3((function(){return arguments})())?I3:function(e){return ws(e)&&CW.call(e,"callee")&&!RW.call(e,"callee")};function OW(){return!1}var F9=typeof as=="object"&&as&&!as.nodeType&&as,L3=F9&&typeof is=="object"&&is&&!is.nodeType&&is,AW=L3&&L3.exports===F9,U3=AW?oc.Buffer:void 0,MW=U3?U3.isBuffer:void 0,zp=MW||OW,jW="[object Arguments]",kW="[object Array]",NW="[object Boolean]",DW="[object Date]",zW="[object Error]",$W="[object Function]",PW="[object Map]",IW="[object Number]",LW="[object Object]",UW="[object RegExp]",VW="[object Set]",qW="[object String]",FW="[object WeakMap]",BW="[object ArrayBuffer]",HW="[object DataView]",GW="[object Float32Array]",KW="[object Float64Array]",YW="[object Int8Array]",ZW="[object Int16Array]",XW="[object Int32Array]",QW="[object Uint8Array]",WW="[object Uint8ClampedArray]",JW="[object Uint16Array]",eJ="[object Uint32Array]",Rr={};Rr[GW]=Rr[KW]=Rr[YW]=Rr[ZW]=Rr[XW]=Rr[QW]=Rr[WW]=Rr[JW]=Rr[eJ]=!0;Rr[jW]=Rr[kW]=Rr[BW]=Rr[NW]=Rr[HW]=Rr[DW]=Rr[zW]=Rr[$W]=Rr[PW]=Rr[IW]=Rr[LW]=Rr[UW]=Rr[VW]=Rr[qW]=Rr[FW]=!1;function tJ(e){return ws(e)&&tA(e.length)&&!!Rr[Vu(e)]}function nA(e){return function(t){return e(t)}}var B9=typeof as=="object"&&as&&!as.nodeType&&as,qb=B9&&typeof is=="object"&&is&&!is.nodeType&&is,nJ=qb&&qb.exports===B9,C2=nJ&&k9.process,dg=(function(){try{var e=qb&&qb.require&&qb.require("util").types;return e||C2&&C2.binding&&C2.binding("util")}catch{}})(),V3=dg&&dg.isTypedArray,B1=V3?nA(V3):tJ,rJ=Object.prototype,aJ=rJ.hasOwnProperty;function H9(e,t){var r=Pa(e),i=!r&&fg(e),s=!r&&!i&&zp(e),l=!r&&!i&&!s&&B1(e),u=r||i||s||l,f=u?V9(e.length,String):[],d=f.length;for(var h in e)(t||aJ.call(e,h))&&!(u&&(h=="length"||s&&(h=="offset"||h=="parent")||l&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||rx(h,d)))&&f.push(h);return f}function G9(e,t){return function(r){return e(t(r))}}var iJ=G9(Object.keys,Object),oJ=Object.prototype,sJ=oJ.hasOwnProperty;function K9(e){if(!F1(e))return iJ(e);var t=[];for(var r in Object(e))sJ.call(e,r)&&r!="constructor"&&t.push(r);return t}function gs(e){return If(e)?H9(e):K9(e)}var lJ=Object.prototype,cJ=lJ.hasOwnProperty,uJ=U9(function(e,t){if(F1(t)||If(t)){Qp(t,gs(t),e);return}for(var r in t)cJ.call(t,r)&&ax(e,r,t[r])});function fJ(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var dJ=Object.prototype,hJ=dJ.hasOwnProperty;function pJ(e){if(!Cn(e))return fJ(e);var t=F1(e),r=[];for(var i in e)i=="constructor"&&(t||!hJ.call(e,i))||r.push(i);return r}function H1(e){return If(e)?H9(e,!0):pJ(e)}var mJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gJ=/^\w*$/;function rA(e,t){if(Pa(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||U1(e)?!0:gJ.test(e)||!mJ.test(e)||t!=null&&e in Object(t)}var c1=Xp(Object,"create");function yJ(){this.__data__=c1?c1(null):{},this.size=0}function vJ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var bJ="__lodash_hash_undefined__",SJ=Object.prototype,wJ=SJ.hasOwnProperty;function EJ(e){var t=this.__data__;if(c1){var r=t[e];return r===bJ?void 0:r}return wJ.call(t,e)?t[e]:void 0}var xJ=Object.prototype,_J=xJ.hasOwnProperty;function TJ(e){var t=this.__data__;return c1?t[e]!==void 0:_J.call(t,e)}var CJ="__lodash_hash_undefined__";function RJ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=c1&&t===void 0?CJ:t,this}function $p(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])}}$p.prototype.clear=yJ;$p.prototype.delete=vJ;$p.prototype.get=EJ;$p.prototype.has=TJ;$p.prototype.set=RJ;function OJ(){this.__data__=[],this.size=0}function ox(e,t){for(var r=e.length;r--;)if(q1(e[r][0],t))return r;return-1}var AJ=Array.prototype,MJ=AJ.splice;function jJ(e){var t=this.__data__,r=ox(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():MJ.call(t,r,1),--this.size,!0}function kJ(e){var t=this.__data__,r=ox(t,e);return r<0?void 0:t[r][1]}function NJ(e){return ox(this.__data__,e)>-1}function DJ(e,t){var r=this.__data__,i=ox(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function qu(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])}}qu.prototype.clear=OJ;qu.prototype.delete=jJ;qu.prototype.get=kJ;qu.prototype.has=NJ;qu.prototype.set=DJ;var u1=Xp(oc,"Map");function zJ(){this.size=0,this.__data__={hash:new $p,map:new(u1||qu),string:new $p}}function $J(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function sx(e,t){var r=e.__data__;return $J(t)?r[typeof t=="string"?"string":"hash"]:r.map}function PJ(e){var t=sx(this,e).delete(e);return this.size-=t?1:0,t}function IJ(e){return sx(this,e).get(e)}function LJ(e){return sx(this,e).has(e)}function UJ(e,t){var r=sx(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Fu(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])}}Fu.prototype.clear=zJ;Fu.prototype.delete=PJ;Fu.prototype.get=IJ;Fu.prototype.has=LJ;Fu.prototype.set=UJ;var VJ="Expected a function";function aA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VJ);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 u=e.apply(this,i);return r.cache=l.set(s,u)||l,u};return r.cache=new(aA.Cache||Fu),r}aA.Cache=Fu;var qJ=500;function FJ(e){var t=aA(e,function(i){return r.size===qJ&&r.clear(),i}),r=t.cache;return t}var BJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HJ=/\\(\\)?/g,Y9=FJ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(BJ,function(r,i,s,l){t.push(s?l.replace(HJ,"$1"):i||r)}),t});function iA(e){return e==null?"":D9(e)}function jg(e,t){return Pa(e)?e:rA(e,t)?[e]:Y9(iA(e))}function Wp(e){if(typeof e=="string"||U1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function lx(e,t){t=jg(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Wp(t[r++])];return r&&r==i?e:void 0}function qe(e,t,r){var i=e==null?void 0:lx(e,t);return i===void 0?r:i}function oA(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var q3=Ss?Ss.isConcatSpreadable:void 0;function GJ(e){return Pa(e)||fg(e)||!!(q3&&e&&e[q3])}function G1(e,t,r,i,s){var l=-1,u=e.length;for(r||(r=GJ),s||(s=[]);++l<u;){var f=e[l];t>0&&r(f)?t>1?G1(f,t-1,r,i,s):oA(s,f):i||(s[s.length]=f)}return s}function VC(e){var t=e==null?0:e.length;return t?G1(e,1):[]}function Z9(e){return P9(L9(e,void 0,VC),e+"")}var cx=G9(Object.getPrototypeOf,Object),KJ="[object Object]",YJ=Function.prototype,ZJ=Object.prototype,X9=YJ.toString,XJ=ZJ.hasOwnProperty,QJ=X9.call(Object);function Of(e){if(!ws(e)||Vu(e)!=KJ)return!1;var t=cx(e);if(t===null)return!0;var r=XJ.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&X9.call(r)==QJ}function WJ(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 JJ(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 eee(){this.__data__=new qu,this.size=0}function tee(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function nee(e){return this.__data__.get(e)}function ree(e){return this.__data__.has(e)}var aee=200;function iee(e,t){var r=this.__data__;if(r instanceof qu){var i=r.__data__;if(!u1||i.length<aee-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fu(i)}return r.set(e,t),this.size=r.size,this}function xl(e){var t=this.__data__=new qu(e);this.size=t.size}xl.prototype.clear=eee;xl.prototype.delete=tee;xl.prototype.get=nee;xl.prototype.has=ree;xl.prototype.set=iee;function oee(e,t){return e&&Qp(t,gs(t),e)}function see(e,t){return e&&Qp(t,H1(t),e)}var Q9=typeof as=="object"&&as&&!as.nodeType&&as,F3=Q9&&typeof is=="object"&&is&&!is.nodeType&&is,lee=F3&&F3.exports===Q9,B3=lee?oc.Buffer:void 0,H3=B3?B3.allocUnsafe:void 0;function W9(e,t){if(t)return e.slice();var r=e.length,i=H3?H3(r):new e.constructor(r);return e.copy(i),i}function cee(e,t){for(var r=-1,i=e==null?0:e.length,s=0,l=[];++r<i;){var u=e[r];t(u,r,e)&&(l[s++]=u)}return l}function J9(){return[]}var uee=Object.prototype,fee=uee.propertyIsEnumerable,G3=Object.getOwnPropertySymbols,sA=G3?function(e){return e==null?[]:(e=Object(e),cee(G3(e),function(t){return fee.call(e,t)}))}:J9;function dee(e,t){return Qp(e,sA(e),t)}var hee=Object.getOwnPropertySymbols,e$=hee?function(e){for(var t=[];e;)oA(t,sA(e)),e=cx(e);return t}:J9;function pee(e,t){return Qp(e,e$(e),t)}function t$(e,t,r){var i=t(e);return Pa(e)?i:oA(i,r(e))}function qC(e){return t$(e,gs,sA)}function lA(e){return t$(e,H1,e$)}var FC=Xp(oc,"DataView"),BC=Xp(oc,"Promise"),Jm=Xp(oc,"Set"),K3="[object Map]",mee="[object Object]",Y3="[object Promise]",Z3="[object Set]",X3="[object WeakMap]",Q3="[object DataView]",gee=Zp(FC),yee=Zp(u1),vee=Zp(BC),bee=Zp(Jm),See=Zp(UC),ps=Vu;(FC&&ps(new FC(new ArrayBuffer(1)))!=Q3||u1&&ps(new u1)!=K3||BC&&ps(BC.resolve())!=Y3||Jm&&ps(new Jm)!=Z3||UC&&ps(new UC)!=X3)&&(ps=function(e){var t=Vu(e),r=t==mee?e.constructor:void 0,i=r?Zp(r):"";if(i)switch(i){case gee:return Q3;case yee:return K3;case vee:return Y3;case bee:return Z3;case See:return X3}return t});var wee=Object.prototype,Eee=wee.hasOwnProperty;function xee(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Eee.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var SE=oc.Uint8Array;function cA(e){var t=new e.constructor(e.byteLength);return new SE(t).set(new SE(e)),t}function _ee(e,t){var r=t?cA(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Tee=/\w*$/;function Cee(e){var t=new e.constructor(e.source,Tee.exec(e));return t.lastIndex=e.lastIndex,t}var W3=Ss?Ss.prototype:void 0,J3=W3?W3.valueOf:void 0;function Ree(e){return J3?Object(J3.call(e)):{}}function n$(e,t){var r=t?cA(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Oee="[object Boolean]",Aee="[object Date]",Mee="[object Map]",jee="[object Number]",kee="[object RegExp]",Nee="[object Set]",Dee="[object String]",zee="[object Symbol]",$ee="[object ArrayBuffer]",Pee="[object DataView]",Iee="[object Float32Array]",Lee="[object Float64Array]",Uee="[object Int8Array]",Vee="[object Int16Array]",qee="[object Int32Array]",Fee="[object Uint8Array]",Bee="[object Uint8ClampedArray]",Hee="[object Uint16Array]",Gee="[object Uint32Array]";function Kee(e,t,r){var i=e.constructor;switch(t){case $ee:return cA(e);case Oee:case Aee:return new i(+e);case Pee:return _ee(e,r);case Iee:case Lee:case Uee:case Vee:case qee:case Fee:case Bee:case Hee:case Gee:return n$(e,r);case Mee:return new i;case jee:case Dee:return new i(e);case kee:return Cee(e);case Nee:return new i;case zee:return Ree(e)}}function r$(e){return typeof e.constructor=="function"&&!F1(e)?$9(cx(e)):{}}var Yee="[object Map]";function Zee(e){return ws(e)&&ps(e)==Yee}var ej=dg&&dg.isMap,Xee=ej?nA(ej):Zee,Qee="[object Set]";function Wee(e){return ws(e)&&ps(e)==Qee}var tj=dg&&dg.isSet,Jee=tj?nA(tj):Wee,ete=1,tte=2,nte=4,a$="[object Arguments]",rte="[object Array]",ate="[object Boolean]",ite="[object Date]",ote="[object Error]",i$="[object Function]",ste="[object GeneratorFunction]",lte="[object Map]",cte="[object Number]",o$="[object Object]",ute="[object RegExp]",fte="[object Set]",dte="[object String]",hte="[object Symbol]",pte="[object WeakMap]",mte="[object ArrayBuffer]",gte="[object DataView]",yte="[object Float32Array]",vte="[object Float64Array]",bte="[object Int8Array]",Ste="[object Int16Array]",wte="[object Int32Array]",Ete="[object Uint8Array]",xte="[object Uint8ClampedArray]",_te="[object Uint16Array]",Tte="[object Uint32Array]",hr={};hr[a$]=hr[rte]=hr[mte]=hr[gte]=hr[ate]=hr[ite]=hr[yte]=hr[vte]=hr[bte]=hr[Ste]=hr[wte]=hr[lte]=hr[cte]=hr[o$]=hr[ute]=hr[fte]=hr[dte]=hr[hte]=hr[Ete]=hr[xte]=hr[_te]=hr[Tte]=!0;hr[ote]=hr[i$]=hr[pte]=!1;function Fb(e,t,r,i,s,l){var u,f=t&ete,d=t&tte,h=t&nte;if(r&&(u=s?r(e,i,s,l):r(e)),u!==void 0)return u;if(!Cn(e))return e;var m=Pa(e);if(m){if(u=xee(e),!f)return QO(e,u)}else{var g=ps(e),v=g==i$||g==ste;if(zp(e))return W9(e,f);if(g==o$||g==a$||v&&!s){if(u=d||v?{}:r$(e),!f)return d?pee(e,see(u,e)):dee(e,oee(u,e))}else{if(!hr[g])return s?e:{};u=Kee(e,g,f)}}l||(l=new xl);var x=l.get(e);if(x)return x;l.set(e,u),Jee(e)?e.forEach(function(S){u.add(Fb(S,t,r,S,e,l))}):Xee(e)&&e.forEach(function(S,_){u.set(_,Fb(S,t,r,_,e,l))});var b=h?d?lA:qC:d?H1:gs,w=m?void 0:b(e);return WO(w||e,function(S,_){w&&(_=S,S=e[_]),ax(u,_,Fb(S,t,r,_,e,l))}),u}var Cte=1,Rte=4;function K1(e){return Fb(e,Cte|Rte)}var Ote="__lodash_hash_undefined__";function Ate(e){return this.__data__.set(e,Ote),this}function Mte(e){return this.__data__.has(e)}function Pp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Fu;++t<r;)this.add(e[t])}Pp.prototype.add=Pp.prototype.push=Ate;Pp.prototype.has=Mte;function jte(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 f1(e,t){return e.has(t)}var kte=1,Nte=2;function s$(e,t,r,i,s,l){var u=r&kte,f=e.length,d=t.length;if(f!=d&&!(u&&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,x=r&Nte?new Pp:void 0;for(l.set(e,t),l.set(t,e);++g<f;){var b=e[g],w=t[g];if(i)var S=u?i(w,b,g,t,e,l):i(b,w,g,e,t,l);if(S!==void 0){if(S)continue;v=!1;break}if(x){if(!jte(t,function(_,E){if(!f1(x,E)&&(b===_||s(b,_,r,i,l)))return x.push(E)})){v=!1;break}}else if(!(b===w||s(b,w,r,i,l))){v=!1;break}}return l.delete(e),l.delete(t),v}function Dte(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function uA(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var zte=1,$te=2,Pte="[object Boolean]",Ite="[object Date]",Lte="[object Error]",Ute="[object Map]",Vte="[object Number]",qte="[object RegExp]",Fte="[object Set]",Bte="[object String]",Hte="[object Symbol]",Gte="[object ArrayBuffer]",Kte="[object DataView]",nj=Ss?Ss.prototype:void 0,R2=nj?nj.valueOf:void 0;function Yte(e,t,r,i,s,l,u){switch(r){case Kte:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Gte:return!(e.byteLength!=t.byteLength||!l(new SE(e),new SE(t)));case Pte:case Ite:case Vte:return q1(+e,+t);case Lte:return e.name==t.name&&e.message==t.message;case qte:case Bte:return e==t+"";case Ute:var f=Dte;case Fte:var d=i&zte;if(f||(f=uA),e.size!=t.size&&!d)return!1;var h=u.get(e);if(h)return h==t;i|=$te,u.set(e,t);var m=s$(f(e),f(t),i,s,l,u);return u.delete(e),m;case Hte:if(R2)return R2.call(e)==R2.call(t)}return!1}var Zte=1,Xte=Object.prototype,Qte=Xte.hasOwnProperty;function Wte(e,t,r,i,s,l){var u=r&Zte,f=qC(e),d=f.length,h=qC(t),m=h.length;if(d!=m&&!u)return!1;for(var g=d;g--;){var v=f[g];if(!(u?v in t:Qte.call(t,v)))return!1}var x=l.get(e),b=l.get(t);if(x&&b)return x==t&&b==e;var w=!0;l.set(e,t),l.set(t,e);for(var S=u;++g<d;){v=f[g];var _=e[v],E=t[v];if(i)var O=u?i(E,_,v,t,e,l):i(_,E,v,e,t,l);if(!(O===void 0?_===E||s(_,E,r,i,l):O)){w=!1;break}S||(S=v=="constructor")}if(w&&!S){var T=e.constructor,C=t.constructor;T!=C&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(w=!1)}return l.delete(e),l.delete(t),w}var Jte=1,rj="[object Arguments]",aj="[object Array]",SS="[object Object]",ene=Object.prototype,ij=ene.hasOwnProperty;function tne(e,t,r,i,s,l){var u=Pa(e),f=Pa(t),d=u?aj:ps(e),h=f?aj:ps(t);d=d==rj?SS:d,h=h==rj?SS:h;var m=d==SS,g=h==SS,v=d==h;if(v&&zp(e)){if(!zp(t))return!1;u=!0,m=!1}if(v&&!m)return l||(l=new xl),u||B1(e)?s$(e,t,r,i,s,l):Yte(e,t,d,r,i,s,l);if(!(r&Jte)){var x=m&&ij.call(e,"__wrapped__"),b=g&&ij.call(t,"__wrapped__");if(x||b){var w=x?e.value():e,S=b?t.value():t;return l||(l=new xl),s(w,S,r,i,l)}}return v?(l||(l=new xl),Wte(e,t,r,i,s,l)):!1}function Y1(e,t,r,i,s){return e===t?!0:e==null||t==null||!ws(e)&&!ws(t)?e!==e&&t!==t:tne(e,t,r,i,Y1,s)}var nne=1,rne=2;function ane(e,t,r,i){var s=r.length,l=s;if(e==null)return!l;for(e=Object(e);s--;){var u=r[s];if(u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<l;){u=r[s];var f=u[0],d=e[f],h=u[1];if(u[2]){if(d===void 0&&!(f in e))return!1}else{var m=new xl,g;if(!(g===void 0?Y1(h,d,nne|rne,i,m):g))return!1}}return!0}function l$(e){return e===e&&!Cn(e)}function ine(e){for(var t=gs(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,l$(s)]}return t}function c$(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function one(e){var t=ine(e);return t.length==1&&t[0][2]?c$(t[0][0],t[0][1]):function(r){return r===e||ane(r,e,t)}}function sne(e,t){return e!=null&&t in Object(e)}function u$(e,t,r){t=jg(t,e);for(var i=-1,s=t.length,l=!1;++i<s;){var u=Wp(t[i]);if(!(l=e!=null&&r(e,u)))break;e=e[u]}return l||++i!=s?l:(s=e==null?0:e.length,!!s&&tA(s)&&rx(u,s)&&(Pa(e)||fg(e)))}function f$(e,t){return e!=null&&u$(e,t,sne)}var lne=1,cne=2;function une(e,t){return rA(e)&&l$(t)?c$(Wp(e),t):function(r){var i=qe(r,e);return i===void 0&&i===t?f$(r,e):Y1(t,i,lne|cne)}}function fne(e){return function(t){return t?.[e]}}function dne(e){return function(t){return lx(t,e)}}function hne(e){return rA(e)?fne(Wp(e)):dne(e)}function fA(e){return typeof e=="function"?e:e==null?nx:typeof e=="object"?Pa(e)?une(e[0],e[1]):one(e):hne(e)}function pne(e){return function(t,r,i){for(var s=-1,l=Object(t),u=i(t),f=u.length;f--;){var d=u[++s];if(r(l[d],d,l)===!1)break}return t}}var d$=pne();function h$(e,t){return e&&d$(e,t,gs)}function mne(e,t){return function(r,i){if(r==null)return r;if(!If(r))return e(r,i);for(var s=r.length,l=-1,u=Object(r);++l<s&&i(u[l],l,u)!==!1;);return r}}var p$=mne(h$);function HC(e,t,r){(r!==void 0&&!q1(e[t],r)||r===void 0&&!(t in e))&&eA(e,t,r)}function d1(e){return ws(e)&&If(e)}function GC(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function gne(e){return Qp(e,H1(e))}function yne(e,t,r,i,s,l,u){var f=GC(e,r),d=GC(t,r),h=u.get(d);if(h){HC(e,r,h);return}var m=l?l(f,d,r+"",e,t,u):void 0,g=m===void 0;if(g){var v=Pa(d),x=!v&&zp(d),b=!v&&!x&&B1(d);m=d,v||x||b?Pa(f)?m=f:d1(f)?m=QO(f):x?(g=!1,m=W9(d,!0)):b?(g=!1,m=n$(d,!0)):m=[]:Of(d)||fg(d)?(m=f,fg(f)?m=gne(f):(!Cn(f)||V1(f))&&(m=r$(d))):g=!1}g&&(u.set(d,m),s(m,d,i,l,u),u.delete(d)),HC(e,r,m)}function m$(e,t,r,i,s){e!==t&&d$(t,function(l,u){if(s||(s=new xl),Cn(l))yne(e,t,u,r,m$,i,s);else{var f=i?i(GC(e,u),l,u+"",e,t,s):void 0;f===void 0&&(f=l),HC(e,u,f)}},H1)}var vne=200;function bne(e,t,r,i){var s=-1,l=JO,u=!0,f=e.length,d=[],h=t.length;if(!f)return d;t.length>=vne&&(l=f1,u=!1,t=new Pp(t));e:for(;++s<f;){var m=e[s],g=m;if(m=m!==0?m:0,u&&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 Sne=ix(function(e,t){return d1(e)?bne(e,G1(t,1,d1,!0)):[]});function g$(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function y$(e){return typeof e=="function"?e:nx}function wne(e,t){var r=Pa(e)?WO:p$;return r(e,y$(t))}var Ene=1/0;function xne(e){var t=e==null?0:e.length;return t?G1(e,Ene):[]}var _ne=Object.prototype,Tne=_ne.hasOwnProperty;function Cne(e,t){return e!=null&&Tne.call(e,t)}function Sn(e,t){return e!=null&&u$(e,t,Cne)}var Rne="[object String]";function Af(e){return typeof e=="string"||!Pa(e)&&ws(e)&&Vu(e)==Rne}function One(e,t){return Mg(t,function(r){return e[r]})}function Ane(e){return e==null?[]:One(e,gs(e))}var Mne=Math.max;function jne(e,t,r,i){e=If(e)?e:Ane(e),r=r?z9(r):0;var s=e.length;return r<0&&(r=Mne(s+r,0)),Af(e)?r<=s&&e.indexOf(t,r)>-1:!!s&&I9(e,t,r)>-1}var kne=Math.min;function Nne(e,t,r){for(var i=JO,s=e[0].length,l=e.length,u=l,f=Array(l),d=1/0,h=[];u--;){var m=e[u];d=kne(m.length,d),f[u]=s>=120&&m.length>=120?new Pp(u&&m):void 0}m=e[0];var g=-1,v=f[0];e:for(;++g<s&&h.length<d;){var x=m[g],b=x;if(x=x!==0?x:0,!(v?f1(v,b):i(h,b))){for(u=l;--u;){var w=f[u];if(!(w?f1(w,b):i(e[u],b)))continue e}v&&v.push(b),h.push(x)}}return h}function Dne(e){return d1(e)?e:[]}var oj=ix(function(e){var t=Mg(e,Dne);return t.length&&t[0]===e[0]?Nne(t):[]});function zne(e,t){return t.length<2?e:lx(e,WJ(t,0,-1))}var $ne="[object Map]",Pne="[object Set]",Ine=Object.prototype,Lne=Ine.hasOwnProperty;function oa(e){if(e==null)return!0;if(If(e)&&(Pa(e)||typeof e=="string"||typeof e.splice=="function"||zp(e)||B1(e)||fg(e)))return!e.length;var t=ps(e);if(t==$ne||t==Pne)return!e.size;if(F1(e))return!K9(e).length;for(var r in e)if(Lne.call(e,r))return!1;return!0}function bf(e,t){return Y1(e,t)}function Une(e,t,r){r=typeof r=="function"?r:void 0;var i=r?r(e,t):void 0;return i===void 0?Y1(e,t,void 0,r):!!i}var Vne="[object Number]";function v$(e){return typeof e=="number"||ws(e)&&Vu(e)==Vne}function wE(e){return e==null}function b$(e){return e===void 0}var qne=U9(function(e,t,r){m$(e,t,r)}),Fne=Object.prototype,Bne=Fne.hasOwnProperty;function S$(e,t){t=jg(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__"&&!Bne.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 u=zne(e,t);return u==null||delete u[Wp(g$(t))]}function Hne(e){return Of(e)?void 0:e}var Gne=1,Kne=2,Yne=4,hg=Z9(function(e,t){var r={};if(e==null)return r;var i=!1;t=Mg(t,function(l){return l=jg(l,e),i||(i=l.length>1),l}),Qp(e,lA(e),r),i&&(r=Fb(r,Gne|Kne|Yne,Hne));for(var s=t.length;s--;)S$(r,t[s]);return r});function dA(e,t,r,i){if(!Cn(e))return e;t=jg(t,e);for(var s=-1,l=t.length,u=l-1,f=e;f!=null&&++s<l;){var d=Wp(t[s]),h=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(s!=u){var m=f[d];h=i?i(m,d,f):void 0,h===void 0&&(h=Cn(m)?m:rx(t[s+1])?[]:{})}ax(f,d,h),f=f[d]}return e}function w$(e,t,r){for(var i=-1,s=t.length,l={};++i<s;){var u=t[i],f=lx(e,u);r(f,u)&&dA(l,jg(u,e),f)}return l}function Zne(e,t){if(e==null)return{};var r=Mg(lA(e),function(i){return[i]});return t=fA(t),w$(e,r,function(i,s){return t(i,s[0])})}function Xne(e,t){return w$(e,t,function(r,i){return f$(e,i)})}var hA=Z9(function(e,t){return e==null?{}:Xne(e,t)});function Qne(e,t,r,i,s){return s(e,function(l,u,f){r=i?(i=!1,l):t(r,l,u,f)}),r}function Wne(e,t,r){var i=Pa(e)?JJ:Qne,s=arguments.length<3;return i(e,fA(t),r,s,p$)}function Vn(e,t,r){return e==null?e:dA(e,t,r)}function Jne(e,t,r,i){return i=typeof i=="function"?i:void 0,e==null?e:dA(e,t,r,i)}var ere=9007199254740991,O2=4294967295,tre=Math.min;function E$(e,t){if(e=z9(e),e<1||e>ere)return[];var r=O2,i=tre(e,O2);t=y$(t),e-=O2;for(var s=V9(i,t);++r<e;)t(r);return s}function x$(e){return Pa(e)?Mg(e,Wp):U1(e)?[e]:QO(Y9(iA(e)))}function nre(e,t,r){var i=Pa(e),s=i||zp(e)||B1(e);if(t=fA(t),r==null){var l=e&&e.constructor;s?r=i?new l:[]:Cn(e)?r=V1(l)?$9(cx(e)):{}:r={}}return(s?WO:h$)(e,function(u,f,d){return t(r,u,f,d)}),r}var rre=1/0,are=Jm&&1/uA(new Jm([,-0]))[1]==rre?function(e){return new Jm(e)}:Lw,ire=200;function _$(e,t,r){var i=-1,s=JO,l=e.length,u=!0,f=[],d=f;if(l>=ire){var h=are(e);if(h)return uA(h);u=!1,s=f1,d=new Pp}else d=f;e:for(;++i<l;){var m=e[i],g=m;if(m=m!==0?m:0,u&&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 ore=ix(function(e){return _$(G1(e,1,d1,!0))});function T$(e){return e&&e.length?_$(e):[]}var sre=0;function C$(e){var t=++sre;return iA(e)+t}function lre(e,t){return e==null?!0:S$(e,t)}const kg=d6()(e=>({tools:{},setToolData:(t,r)=>e(i=>wS(i,`tools.${t}`,{...i.tools[t],...r})),updateOpenaiObject:(t,r,i)=>e(s=>s.tools[t]?.openaiObject?wS(s,`tools.${t}.openaiObject.${r}`,i):s),pushOpenAiLog:(t,r)=>e(i=>{const s=i.tools[t]?.openaiLogs||[];return wS(i,`tools.${t}.openaiLogs`,[...s,{...r,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,r)=>e(i=>wS(i,`tools.${t}.openInAppUrl`,r))})),Ng=e=>{const{tools:t}=kg();return t[e]},wS=(e,t,r)=>{const i=K1(e);return Vn(i,t,r),i};function R$(e,t,r){try{return e(t)}catch(i){return $q("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,i,r),null}}function Bu(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),R$(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 cre=Bu({parse:e=>e,serialize:String});Bu({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Bu({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Bu({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}});Bu({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Bu({parse:e=>e.toLowerCase()==="true",serialize:String});function pA(e,t){return e.valueOf()===t.valueOf()}Bu({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:pA});Bu({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:pA});Bu({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:pA});const A2=dO(),ure={};function fre(e,t={}){const r=j.useId(),i=Bq(),s=Hq(),{history:l="replace",scroll:u=i?.scroll??!1,shallow:f=i?.shallow??!0,throttleMs:d=Ub.timeMs,limitUrlUpdates:h=i?.limitUrlUpdates,clearOnDefault:m=i?.clearOnDefault??!0,startTransition:g,urlKeys:v=ure}=t,x=Object.keys(e).join(","),b=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,v[D]??D])),[x,JSON.stringify(v)]),w=Fq(Object.values(b)),S=w.searchParams,_=j.useRef({}),E=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,e[D].defaultValue??null])),[Object.values(e).map(({defaultValue:D})=>D).join(",")]),O=m2.useQueuedQueries(Object.values(b)),[T,C]=j.useState(()=>M2(e,v,S??new URLSearchParams,O).state),R=j.useRef(T);if(Nr("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,x,T,S),Object.keys(_.current).join("&")!==Object.values(b).join("&")){const{state:D,hasChanged:I}=M2(e,v,S,O,_.current,R.current);I&&(Nr("[nuq+ %s `%s`] State changed: %O",r,x,{state:D,initialSearchParams:S,queuedQueries:O,queryRef:_.current,stateRef:R.current}),R.current=D,C(D)),_.current=Object.fromEntries(Object.entries(b).map(([B,V])=>[V,e[B]?.type==="multi"?S?.getAll(V):S?.get(V)??null]))}j.useEffect(()=>{const{state:D,hasChanged:I}=M2(e,v,S,O,_.current,R.current);I&&(Nr("[nuq+ %s `%s`] State changed: %O",r,x,{state:D,initialSearchParams:S,queuedQueries:O,queryRef:_.current,stateRef:R.current}),R.current=D,C(D))},[Object.values(b).map(D=>`${D}=${S?.getAll(D)}`).join("&"),JSON.stringify(O)]),j.useEffect(()=>{const D=Object.keys(e).reduce((I,B)=>(I[B]=({state:V,query:F})=>{C(G=>{const{defaultValue:W}=e[B],te=b[B],H=V??W??null,J=G[B]??W??null;return Object.is(J,H)?(Nr("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,x,te,V,W,R.current),G):(R.current={...R.current,[B]:H},_.current[te]=F,Nr("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,x,te,V,W,R.current),R.current)})},I),{});for(const I of Object.keys(e)){const B=b[I];Nr("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,B,x),A2.on(B,D[I])}return()=>{for(const I of Object.keys(e)){const B=b[I];Nr("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,B,x),A2.off(B,D[I])}}},[x,b]);const M=j.useCallback((D,I={})=>{const B=Object.fromEntries(Object.keys(e).map(J=>[J,null])),V=typeof D=="function"?D(sj(R.current,E))??B:D??B;Nr("[nuq+ %s `%s`] setState: %O",r,x,V);let F,G=0,W=!1;const te=[];for(let[J,re]of Object.entries(V)){const le=e[J],ae=b[J];if(!le||re===void 0)continue;(I.clearOnDefault??le.clearOnDefault??m)&&re!==null&&le.defaultValue!==void 0&&(le.eq??((X,L)=>X===L))(re,le.defaultValue)&&(re=null);const N=re===null?null:(le.serialize??String)(re);A2.emit(ae,{state:re,query:N});const U={key:ae,query:N,options:{history:I.history??le.history??l,shallow:I.shallow??le.shallow??f,scroll:I.scroll??le.scroll??u,startTransition:I.startTransition??le.startTransition??g}};if(I?.limitUrlUpdates?.method==="debounce"||h?.method==="debounce"||le.limitUrlUpdates?.method==="debounce"){U.options.shallow===!0&&console.warn(N1(422));const X=I?.limitUrlUpdates?.timeMs??h?.timeMs??le.limitUrlUpdates?.timeMs??Ub.timeMs,L=m2.push(U,X,w,s);G<X&&(F=L,G=X)}else{const X=I?.limitUrlUpdates?.timeMs??le?.limitUrlUpdates?.timeMs??h?.timeMs??I.throttleMs??le.throttleMs??d;te.push(m2.abort(ae)),Pw.push(U,X),W=!0}}const H=te.reduce((J,re)=>re(J),W?Pw.flush(w,s):Pw.getPendingPromise(w));return F??H},[x,l,f,u,d,h?.method,h?.timeMs,g,b,w.updateUrl,w.getSearchParamsSnapshot,w.rateLimitFactor,s,E]);return[j.useMemo(()=>sj(T,E),[T,E]),M]}function M2(e,t,r,i,s,l){let u=!1;const f=Object.entries(e).reduce((d,[h,m])=>{const g=t?.[h]??h,v=i[g],x=m.type==="multi"?[]:null,b=v===void 0?(m.type==="multi"?r?.getAll(g):r?.get(g))??x:v;return s&&l&&Gz(s[g]??x,b)?(d[h]=l[h]??null,d):(u=!0,d[h]=(Yq(b)?null:R$(m.parse,b,g))??null,s&&(s[g]=b),d)},{});if(!u){const d=Object.keys(e),h=Object.keys(l??{});u=d.length!==h.length||d.some(m=>!h.includes(m))}return{state:f,hasChanged:u}}function sj(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function dre(e,t={}){const{parse:r,type:i,serialize:s,eq:l,defaultValue:u,...f}=t,[{[e]:d},h]=fre({[e]:{parse:r??(m=>m),type:i,serialize:s,eq:l,defaultValue:u}},f);return[d,j.useCallback((m,g={})=>h(v=>({[e]:typeof m=="function"?m(v[e]):m}),g),[e,h])]}function mA(){return dre("tool",cre)}const gA=new Sq,ES="skybridge-devtools-oauth",ds={clientInfo:`${ES}:client-info`,tokens:`${ES}:tokens`,codeVerifier:`${ES}:code-verifier`,state:`${ES}:state`};class O${get redirectUrl(){const t=new URL(window.location.origin+window.location.pathname);return t.searchParams.set("oauth_callback","true"),t.toString()}get clientMetadata(){return{redirect_uris:[this.redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:"Skybridge Devtools",client_uri:window.location.origin}}clientInformation(){const t=localStorage.getItem(ds.clientInfo);return t?JSON.parse(t):void 0}saveClientInformation(t){localStorage.setItem(ds.clientInfo,JSON.stringify(t))}tokens(){const t=localStorage.getItem(ds.tokens);return t?JSON.parse(t):void 0}saveTokens(t){localStorage.setItem(ds.tokens,JSON.stringify(t))}state(){const t=localStorage.getItem(ds.state);if(t)return t;const r=crypto.randomUUID();return localStorage.setItem(ds.state,r),r}redirectToAuthorization(t){window.location.href=t.toString()}saveCodeVerifier(t){localStorage.setItem(ds.codeVerifier,t)}codeVerifier(){return localStorage.getItem(ds.codeVerifier)??""}invalidateCredentials(t){(t==="all"||t==="tokens")&&localStorage.removeItem(ds.tokens),(t==="all"||t==="client")&&localStorage.removeItem(ds.clientInfo),(t==="all"||t==="verifier")&&(localStorage.removeItem(ds.codeVerifier),localStorage.removeItem(ds.state))}}function ux(e){return!!e._zod}function hf(e,t){return ux(e)?w6(e,t):e.safeParse(t)}function A$(e){if(!e)return;let t;if(ux(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function hre(e){if(ux(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}function sp(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function lj(e){const r=A$(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=hre(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function cj(e,t){const r=hf(e,t);if(!r.success)throw r.error;return r.data}const pre=6e4;class mre{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(DO,r=>{this._oncancel(r)}),this.setNotificationHandler($O,r=>{this._onprogress(r)}),this.setRequestHandler(zO,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(PO,async(r,i)=>{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new Ot(Ut.InvalidParams,"Failed to retrieve task: Task not found");return{...s}}),this.setRequestHandler(LO,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 Ot(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 u=await this._taskStore.getTask(l,i.sessionId);if(!u)throw new Ot(Ut.InvalidParams,`Task not found: ${l}`);if(!sp(u.status))return await this._waitForTaskUpdate(l,i.signal),await s();if(sp(u.status)){const f=await this._taskStore.getTaskResult(l,i.sessionId);return this._clearTaskQueue(l),{...f,_meta:{...f._meta,[gp]:{taskId:l}}}}return await s()};return await s()}),this.setRequestHandler(UO,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 Ot(Ut.InvalidParams,`Failed to list tasks: ${s instanceof Error?s.message:String(s)}`)}}),this.setRequestHandler(qO,async(r,i)=>{try{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new Ot(Ut.InvalidParams,`Task not found: ${r.params.taskId}`);if(sp(s.status))throw new Ot(Ut.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 Ot(Ut.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...l}}catch(s){throw s instanceof Ot?s:new Ot(Ut.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),Ot.fromError(Ut.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){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");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,u)=>{s?.(l,u),jb(l)||xZ(l)?this._onresponse(l):RC(l)?this._onrequest(l,u):EZ(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();for(const i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();const r=Ot.fromError(Ut.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?.[gp]?.taskId;if(i===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:Ut.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 u=new AbortController;this._requestHandlerAbortControllers.set(t.id,u);const f=wZ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,s?.sessionId):void 0,h={signal:u.signal,sessionId:s?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(u.signal.aborted)return;const g={relatedRequestId:t.id};l&&(g.relatedTask={taskId:l}),await this.notification(m,g)},sendRequest:async(m,g,v)=>{if(u.signal.aborted)throw new Ot(Ut.ConnectionClosed,"Request was cancelled");const x={...v,relatedRequestId:t.id};l&&!x.relatedTask&&(x.relatedTask={taskId:l});const b=x.relatedTask?.taskId??l;return b&&d&&await d.updateTaskStatus(b,"input_required"),await this.request(m,g,x)},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(u.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(u.signal.aborted)return;const g={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:Ut.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 u=this._responseHandlers.get(s),f=this._timeoutInfo.get(s);if(f&&u&&f.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(d){this._responseHandlers.delete(s),this._progressHandlers.delete(s),this._cleanupTimeout(s),u(d);return}l(i)}_onresponse(t){const r=Number(t.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),jb(t))i(t);else{const u=new Ot(t.error.code,t.error.message,t.error.data);i(u)}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(jb(t)&&t.result&&typeof t.result=="object"){const u=t.result;if(u.task&&typeof u.task=="object"){const f=u.task;typeof f.taskId=="string"&&(l=!0,this._taskProgressTokens.set(f.taskId,r))}}if(l||this._progressHandlers.delete(r),jb(t))s(t);else{const u=Ot.fromError(t.error.code,t.error.message,t.error.data);s(u)}}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(u){yield{type:"error",error:u instanceof Ot?u:new Ot(Ut.InternalError,String(u))}}return}let l;try{const u=await this.request(t,l1,i);if(u.task)l=u.task.taskId,yield{type:"taskCreated",task:u.task};else throw new Ot(Ut.InternalError,"Task creation did not return a task");for(;;){const f=await this.getTask({taskId:l},i);if(yield{type:"taskStatus",task:f},sp(f.status)){f.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)}:f.status==="failed"?yield{type:"error",error:new Ot(Ut.InternalError,`Task ${l} failed`)}:f.status==="cancelled"&&(yield{type:"error",error:new Ot(Ut.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(u){yield{type:"error",error:u instanceof Ot?u:new Ot(Ut.InternalError,String(u))}}}request(t,r,i){const{relatedRequestId:s,resumptionToken:l,onresumptiontoken:u,task:f,relatedTask:d}=i??{};return new Promise((h,m)=>{const g=E=>{m(E)};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(E){g(E);return}i?.signal?.throwIfAborted();const v=this._requestMessageId++,x={...t,jsonrpc:"2.0",id:v};i?.onprogress&&(this._progressHandlers.set(v,i.onprogress),x.params={...t.params,_meta:{...t.params?._meta||{},progressToken:v}}),f&&(x.params={...x.params,task:f}),d&&(x.params={...x.params,_meta:{...x.params?._meta||{},[gp]:d}});const b=E=>{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(E)}},{relatedRequestId:s,resumptionToken:l,onresumptiontoken:u}).catch(T=>this._onerror(new Error(`Failed to send cancellation: ${T}`)));const O=E instanceof Ot?E:new Ot(Ut.RequestTimeout,String(E));m(O)};this._responseHandlers.set(v,E=>{if(!i?.signal?.aborted){if(E instanceof Error)return m(E);try{const O=hf(r,E.result);O.success?h(O.data):m(O.error)}catch(O){m(O)}}}),i?.signal?.addEventListener("abort",()=>{b(i?.signal?.reason)});const w=i?.timeout??pre,S=()=>b(Ot.fromError(Ut.RequestTimeout,"Request timed out",{timeout:w}));this._setupTimeout(v,w,i?.maxTotalTimeout,S,i?.resetTimeoutOnProgress??!1);const _=d?.taskId;if(_){const E=O=>{const T=this._responseHandlers.get(v);T?T(O):this._onerror(new Error(`Response handler missing for side-channeled request ${v}`))};this._requestResolvers.set(v,E),this._enqueueTaskMessage(_,{type:"request",message:x,timestamp:Date.now()}).catch(O=>{this._cleanupTimeout(v),m(O)})}else this._transport.send(x,{relatedRequestId:s,resumptionToken:l,onresumptiontoken:u}).catch(E=>{this._cleanupTimeout(v),m(E)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},IO,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},VO,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},UZ,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||{},[gp]: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||{},[gp]:r.relatedTask}}}),this._transport?.send(f,r).catch(d=>this._onerror(d))});return}let u={...t,jsonrpc:"2.0"};r?.relatedTask&&(u={...u,params:{...u.params,_meta:{...u.params?._meta||{},[gp]:r.relatedTask}}}),await this._transport.send(u,r)}setRequestHandler(t,r){const i=lj(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(s,l)=>{const u=cj(t,s);return Promise.resolve(r(u,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=lj(t);this._notificationHandlers.set(i,s=>{const l=cj(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"&&RC(s.message)){const l=s.message.id,u=this._requestResolvers.get(l);u?(u(new Ot(Ut.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 Ot(Ut.InvalidRequest,"Request cancelled"));return}const u=setTimeout(s,i);r.addEventListener("abort",()=>{clearTimeout(u),l(new Ot(Ut.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 Ot(Ut.InvalidParams,"Failed to retrieve task: Task not found");return l},storeTaskResult:async(s,l,u)=>{await i.storeTaskResult(s,l,u,r);const f=await i.getTask(s,r);if(f){const d=hE.parse({method:"notifications/tasks/status",params:f});await this.notification(d),sp(f.status)&&this._cleanupTaskProgressHandler(s)}},getTaskResult:s=>i.getTaskResult(s,r),updateTaskStatus:async(s,l,u)=>{const f=await i.getTask(s,r);if(!f)throw new Ot(Ut.InvalidParams,`Task "${s}" not found - it may have been cleaned up`);if(sp(f.status))throw new Ot(Ut.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,u,r);const d=await i.getTask(s,r);if(d){const h=hE.parse({method:"notifications/tasks/status",params:d});await this.notification(h),sp(d.status)&&this._cleanupTaskProgressHandler(s)}},listTasks:s=>i.listTasks(s,r)}}}function uj(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function gre(e,t){const r={...e};for(const i in t){const s=i,l=t[s];if(l===void 0)continue;const u=r[s];uj(u)&&uj(l)?r[s]={...u,...l}:r[s]=l}return r}var xS={exports:{}},j2={},Eu={},lp={},k2={},N2={},D2={},fj;function EE(){return fj||(fj=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(E){if(super(),!e.IDENTIFIER.test(E))throw new Error("CodeGen: name must be a valid identifier");this.str=E}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(E){super(),this._items=typeof E=="string"?[E]:E}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const E=this._items[0];return E===""||E==='""'}get str(){var E;return(E=this._str)!==null&&E!==void 0?E:this._str=this._items.reduce((O,T)=>`${O}${T}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((O,T)=>(T instanceof r&&(O[T.str]=(O[T.str]||0)+1),O),{})}}e._Code=i,e.nil=new i("");function s(_,...E){const O=[_[0]];let T=0;for(;T<E.length;)f(O,E[T]),O.push(_[++T]);return new i(O)}e._=s;const l=new i("+");function u(_,...E){const O=[x(_[0])];let T=0;for(;T<E.length;)O.push(l),f(O,E[T]),O.push(l,x(_[++T]));return d(O),new i(O)}e.str=u;function f(_,E){E instanceof i?_.push(...E._items):E instanceof r?_.push(E):_.push(g(E))}e.addCodeArg=f;function d(_){let E=1;for(;E<_.length-1;){if(_[E]===l){const O=h(_[E-1],_[E+1]);if(O!==void 0){_.splice(E-1,3,O);continue}_[E++]="+"}E++}}function h(_,E){if(E==='""')return _;if(_==='""')return E;if(typeof _=="string")return E instanceof r||_[_.length-1]!=='"'?void 0:typeof E!="string"?`${_.slice(0,-1)}${E}"`:E[0]==='"'?_.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(_ instanceof r))return`"${_}${E.slice(1)}`}function m(_,E){return E.emptyStr()?_:_.emptyStr()?E:u`${_}${E}`}e.strConcat=m;function g(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:x(Array.isArray(_)?_.join(","):_)}function v(_){return new i(x(_))}e.stringify=v;function x(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=x;function b(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new i(`.${_}`):s`[${_}]`}e.getProperty=b;function w(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new i(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=w;function S(_){return new i(_.toString())}e.regexpCode=S})(D2)),D2}var z2={},dj;function hj(){return dj||(dj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=EE();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 u=(0,t._)`\n`;class f extends s{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?u: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:x}=v,b=(g=m.key)!==null&&g!==void 0?g:m.ref;let w=this._values[x];if(w){const E=w.get(b);if(E)return E}else w=this._values[x]=new Map;w.set(b,v);const S=this._scope[x]||(this._scope[x]=[]),_=S.length;return S[_]=m.ref,v.setValue(m,{property:x,itemIndex:_}),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 x=t.nil;for(const b in h){const w=h[b];if(!w)continue;const S=g[b]=g[b]||new Map;w.forEach(_=>{if(S.has(_))return;S.set(_,i.Started);let E=m(_);if(E){const O=this.opts.es5?e.varKinds.var:e.varKinds.const;x=(0,t._)`${x}${O} ${_} = ${E};${this.opts._n}`}else if(E=v?.(_))x=(0,t._)`${x}${E}${this.opts._n}`;else throw new r(_);S.set(_,i.Completed)})}return x}}e.ValueScope=f})(z2)),z2}var pj;function tn(){return pj||(pj=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=EE(),r=hj();var i=EE();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=hj();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(L,Z){return this}}class u extends l{constructor(L,Z,ee){super(),this.varKind=L,this.name=Z,this.rhs=ee}render({es5:L,_n:Z}){const ee=L?r.varKinds.var:this.varKind,de=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${de};`+Z}optimizeNames(L,Z){if(L[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,L,Z)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class f extends l{constructor(L,Z,ee){super(),this.lhs=L,this.rhs=Z,this.sideEffects=ee}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,Z){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,L,Z),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return G(L,this.rhs)}}class d extends f{constructor(L,Z,ee,de){super(L,ee,de),this.op=Z}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class h extends l{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class m extends l{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class g extends l{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class v extends l{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,Z){return this.code=W(this.code,L,Z),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class x extends l{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce((Z,ee)=>Z+ee.render(L),"")}optimizeNodes(){const{nodes:L}=this;let Z=L.length;for(;Z--;){const ee=L[Z].optimizeNodes();Array.isArray(ee)?L.splice(Z,1,...ee):ee?L[Z]=ee:L.splice(Z,1)}return L.length>0?this:void 0}optimizeNames(L,Z){const{nodes:ee}=this;let de=ee.length;for(;de--;){const ye=ee[de];ye.optimizeNames(L,Z)||(te(L,ye.names),ee.splice(de,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce((L,Z)=>F(L,Z.names),{})}}class b extends x{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class w extends x{}class S extends b{}S.kind="else";class _ extends b{constructor(L,Z){super(Z),this.condition=L}render(L){let Z=`if(${this.condition})`+super.render(L);return this.else&&(Z+="else "+this.else.render(L)),Z}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let Z=this.else;if(Z){const ee=Z.optimizeNodes();Z=this.else=Array.isArray(ee)?new S(ee):ee}if(Z)return L===!1?Z instanceof _?Z:Z.nodes:this.nodes.length?this:new _(H(L),Z instanceof _?[Z]:Z.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,Z){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames(L,Z),!!(super.optimizeNames(L,Z)||this.else))return this.condition=W(this.condition,L,Z),this}get names(){const L=super.names;return G(L,this.condition),this.else&&F(L,this.else.names),L}}_.kind="if";class E extends b{}E.kind="for";class O extends E{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,Z){if(super.optimizeNames(L,Z))return this.iteration=W(this.iteration,L,Z),this}get names(){return F(super.names,this.iteration.names)}}class T extends E{constructor(L,Z,ee,de){super(),this.varKind=L,this.name=Z,this.from=ee,this.to=de}render(L){const Z=L.es5?r.varKinds.var:this.varKind,{name:ee,from:de,to:ye}=this;return`for(${Z} ${ee}=${de}; ${ee}<${ye}; ${ee}++)`+super.render(L)}get names(){const L=G(super.names,this.from);return G(L,this.to)}}class C extends E{constructor(L,Z,ee,de){super(),this.loop=L,this.varKind=Z,this.name=ee,this.iterable=de}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,Z){if(super.optimizeNames(L,Z))return this.iterable=W(this.iterable,L,Z),this}get names(){return F(super.names,this.iterable.names)}}class R extends b{constructor(L,Z,ee){super(),this.name=L,this.args=Z,this.async=ee}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}R.kind="func";class M extends x{render(L){return"return "+super.render(L)}}M.kind="return";class D extends b{render(L){let Z="try"+super.render(L);return this.catch&&(Z+=this.catch.render(L)),this.finally&&(Z+=this.finally.render(L)),Z}optimizeNodes(){var L,Z;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),(Z=this.finally)===null||Z===void 0||Z.optimizeNodes(),this}optimizeNames(L,Z){var ee,de;return super.optimizeNames(L,Z),(ee=this.catch)===null||ee===void 0||ee.optimizeNames(L,Z),(de=this.finally)===null||de===void 0||de.optimizeNames(L,Z),this}get names(){const L=super.names;return this.catch&&F(L,this.catch.names),this.finally&&F(L,this.finally.names),L}}class I extends b{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}I.kind="catch";class B extends b{render(L){return"finally"+super.render(L)}}B.kind="finally";class V{constructor(L,Z={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...Z,_n:Z.lines?`
49
+ `:""},this._extScope=L,this._scope=new r.Scope({parent:L}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,Z){const ee=this._extScope.value(L,Z);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue(L,Z){return this._extScope.getValue(L,Z)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,Z,ee,de){const ye=this._scope.toName(Z);return ee!==void 0&&de&&(this._constants[ye.str]=ee),this._leafNode(new u(L,ye,ee)),ye}const(L,Z,ee){return this._def(r.varKinds.const,L,Z,ee)}let(L,Z,ee){return this._def(r.varKinds.let,L,Z,ee)}var(L,Z,ee){return this._def(r.varKinds.var,L,Z,ee)}assign(L,Z,ee){return this._leafNode(new f(L,Z,ee))}add(L,Z){return this._leafNode(new d(L,e.operators.ADD,Z))}code(L){return typeof L=="function"?L():L!==t.nil&&this._leafNode(new v(L)),this}object(...L){const Z=["{"];for(const[ee,de]of L)Z.length>1&&Z.push(","),Z.push(ee),(ee!==de||this.opts.es5)&&(Z.push(":"),(0,t.addCodeArg)(Z,de));return Z.push("}"),new t._Code(Z)}if(L,Z,ee){if(this._blockNode(new _(L)),Z&&ee)this.code(Z).else().code(ee).endIf();else if(Z)this.code(Z).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new _(L))}else(){return this._elseNode(new S)}endIf(){return this._endBlockNode(_,S)}_for(L,Z){return this._blockNode(L),Z&&this.code(Z).endFor(),this}for(L,Z){return this._for(new O(L),Z)}forRange(L,Z,ee,de,ye=this.opts.es5?r.varKinds.var:r.varKinds.let){const Te=this._scope.toName(L);return this._for(new T(ye,Te,Z,ee),()=>de(Te))}forOf(L,Z,ee,de=r.varKinds.const){const ye=this._scope.toName(L);if(this.opts.es5){const Te=Z instanceof t.Name?Z:this.var("_arr",Z);return this.forRange("_i",0,(0,t._)`${Te}.length`,Ae=>{this.var(ye,(0,t._)`${Te}[${Ae}]`),ee(ye)})}return this._for(new C("of",de,ye,Z),()=>ee(ye))}forIn(L,Z,ee,de=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,t._)`Object.keys(${Z})`,ee);const ye=this._scope.toName(L);return this._for(new C("in",de,ye,Z),()=>ee(ye))}endFor(){return this._endBlockNode(E)}label(L){return this._leafNode(new h(L))}break(L){return this._leafNode(new m(L))}return(L){const Z=new M;if(this._blockNode(Z),this.code(L),Z.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(L,Z,ee){if(!Z&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const de=new D;if(this._blockNode(de),this.code(L),Z){const ye=this.name("e");this._currNode=de.catch=new I(ye),Z(ye)}return ee&&(this._currNode=de.finally=new B,this.code(ee)),this._endBlockNode(I,B)}throw(L){return this._leafNode(new g(L))}block(L,Z){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock(Z),this}endBlock(L){const Z=this._blockStarts.pop();if(Z===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-Z;if(ee<0||L!==void 0&&ee!==L)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${L} expected`);return this._nodes.length=Z,this}func(L,Z=t.nil,ee,de){return this._blockNode(new R(L,Z,ee)),de&&this.code(de).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,Z){const ee=this._currNode;if(ee instanceof L||Z&&ee instanceof Z)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${Z?`${L.kind}/${Z.kind}`:L.kind}"`)}_elseNode(L){const Z=this._currNode;if(!(Z instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=Z.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const Z=this._nodes;Z[Z.length-1]=L}}e.CodeGen=V;function F(X,L){for(const Z in L)X[Z]=(X[Z]||0)+(L[Z]||0);return X}function G(X,L){return L instanceof t._CodeOrName?F(X,L.names):X}function W(X,L,Z){if(X instanceof t.Name)return ee(X);if(!de(X))return X;return new t._Code(X._items.reduce((ye,Te)=>(Te instanceof t.Name&&(Te=ee(Te)),Te instanceof t._Code?ye.push(...Te._items):ye.push(Te),ye),[]));function ee(ye){const Te=Z[ye.str];return Te===void 0||L[ye.str]!==1?ye:(delete L[ye.str],Te)}function de(ye){return ye instanceof t._Code&&ye._items.some(Te=>Te instanceof t.Name&&L[Te.str]===1&&Z[Te.str]!==void 0)}}function te(X,L){for(const Z in L)X[Z]=(X[Z]||0)-(L[Z]||0)}function H(X){return typeof X=="boolean"||typeof X=="number"||X===null?!X:(0,t._)`!${U(X)}`}e.not=H;const J=N(e.operators.AND);function re(...X){return X.reduce(J)}e.and=re;const le=N(e.operators.OR);function ae(...X){return X.reduce(le)}e.or=ae;function N(X){return(L,Z)=>L===t.nil?Z:Z===t.nil?L:(0,t._)`${U(L)} ${X} ${U(Z)}`}function U(X){return X instanceof t.Name?X:(0,t._)`(${X})`}})(N2)),N2}var sn={},mj;function Nn(){if(mj)return sn;mj=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.checkStrictMode=sn.getErrorPath=sn.Type=sn.useFunc=sn.setEvaluated=sn.evaluatedPropsToName=sn.mergeEvaluated=sn.eachItem=sn.unescapeJsonPointer=sn.escapeJsonPointer=sn.escapeFragment=sn.unescapeFragment=sn.schemaRefOrVal=sn.schemaHasRulesButRef=sn.schemaHasRules=sn.checkUnknownRules=sn.alwaysValidSchema=sn.toHash=void 0;const e=tn(),t=EE();function r(C){const R={};for(const M of C)R[M]=!0;return R}sn.toHash=r;function i(C,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(s(C,R),!l(R,C.self.RULES.all))}sn.alwaysValidSchema=i;function s(C,R=C.schema){const{opts:M,self:D}=C;if(!M.strictSchema||typeof R=="boolean")return;const I=D.RULES.keywords;for(const B in R)I[B]||T(C,`unknown keyword: "${B}"`)}sn.checkUnknownRules=s;function l(C,R){if(typeof C=="boolean")return!C;for(const M in C)if(R[M])return!0;return!1}sn.schemaHasRules=l;function u(C,R){if(typeof C=="boolean")return!C;for(const M in C)if(M!=="$ref"&&R.all[M])return!0;return!1}sn.schemaHasRulesButRef=u;function f({topSchemaRef:C,schemaPath:R},M,D,I){if(!I){if(typeof M=="number"||typeof M=="boolean")return M;if(typeof M=="string")return(0,e._)`${M}`}return(0,e._)`${C}${R}${(0,e.getProperty)(D)}`}sn.schemaRefOrVal=f;function d(C){return g(decodeURIComponent(C))}sn.unescapeFragment=d;function h(C){return encodeURIComponent(m(C))}sn.escapeFragment=h;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}sn.escapeJsonPointer=m;function g(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}sn.unescapeJsonPointer=g;function v(C,R){if(Array.isArray(C))for(const M of C)R(M);else R(C)}sn.eachItem=v;function x({mergeNames:C,mergeToName:R,mergeValues:M,resultToName:D}){return(I,B,V,F)=>{const G=V===void 0?B:V instanceof e.Name?(B instanceof e.Name?C(I,B,V):R(I,B,V),V):B instanceof e.Name?(R(I,V,B),B):M(B,V);return F===e.Name&&!(G instanceof e.Name)?D(I,G):G}}sn.mergeEvaluated={props:x({mergeNames:(C,R,M)=>C.if((0,e._)`${M} !== true && ${R} !== undefined`,()=>{C.if((0,e._)`${R} === true`,()=>C.assign(M,!0),()=>C.assign(M,(0,e._)`${M} || {}`).code((0,e._)`Object.assign(${M}, ${R})`))}),mergeToName:(C,R,M)=>C.if((0,e._)`${M} !== true`,()=>{R===!0?C.assign(M,!0):(C.assign(M,(0,e._)`${M} || {}`),w(C,M,R))}),mergeValues:(C,R)=>C===!0?!0:{...C,...R},resultToName:b}),items:x({mergeNames:(C,R,M)=>C.if((0,e._)`${M} !== true && ${R} !== undefined`,()=>C.assign(M,(0,e._)`${R} === true ? true : ${M} > ${R} ? ${M} : ${R}`)),mergeToName:(C,R,M)=>C.if((0,e._)`${M} !== true`,()=>C.assign(M,R===!0?!0:(0,e._)`${M} > ${R} ? ${M} : ${R}`)),mergeValues:(C,R)=>C===!0?!0:Math.max(C,R),resultToName:(C,R)=>C.var("items",R)})};function b(C,R){if(R===!0)return C.var("props",!0);const M=C.var("props",(0,e._)`{}`);return R!==void 0&&w(C,M,R),M}sn.evaluatedPropsToName=b;function w(C,R,M){Object.keys(M).forEach(D=>C.assign((0,e._)`${R}${(0,e.getProperty)(D)}`,!0))}sn.setEvaluated=w;const S={};function _(C,R){return C.scopeValue("func",{ref:R,code:S[R.code]||(S[R.code]=new t._Code(R.code))})}sn.useFunc=_;var E;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(E||(sn.Type=E={}));function O(C,R,M){if(C instanceof e.Name){const D=R===E.Num;return M?D?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:D?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return M?(0,e.getProperty)(C).toString():"/"+m(C)}sn.getErrorPath=O;function T(C,R,M=C.opts.strictSchema){if(M){if(R=`strict mode: ${R}`,M===!0)throw new Error(R);C.self.logger.warn(R)}}return sn.checkStrictMode=T,sn}var _S={},gj;function Lf(){if(gj)return _S;gj=1,Object.defineProperty(_S,"__esModule",{value:!0});const e=tn(),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 _S.default=t,_S}var yj;function fx(){return yj||(yj=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=tn(),r=Nn(),i=Lf();e.keywordError={message:({keyword:S})=>(0,t.str)`must pass "${S}" keyword validation`},e.keyword$DataError={message:({keyword:S,schemaType:_})=>_?(0,t.str)`"${S}" keyword must be ${_} ($data)`:(0,t.str)`"${S}" keyword is invalid ($data)`};function s(S,_=e.keywordError,E,O){const{it:T}=S,{gen:C,compositeRule:R,allErrors:M}=T,D=g(S,_,E);O??(R||M)?d(C,D):h(T,(0,t._)`[${D}]`)}e.reportError=s;function l(S,_=e.keywordError,E){const{it:O}=S,{gen:T,compositeRule:C,allErrors:R}=O,M=g(S,_,E);d(T,M),C||R||h(O,i.default.vErrors)}e.reportExtraError=l;function u(S,_){S.assign(i.default.errors,_),S.if((0,t._)`${i.default.vErrors} !== null`,()=>S.if(_,()=>S.assign((0,t._)`${i.default.vErrors}.length`,_),()=>S.assign(i.default.vErrors,null)))}e.resetErrorsCount=u;function f({gen:S,keyword:_,schemaValue:E,data:O,errsCount:T,it:C}){if(T===void 0)throw new Error("ajv implementation error");const R=S.name("err");S.forRange("i",T,i.default.errors,M=>{S.const(R,(0,t._)`${i.default.vErrors}[${M}]`),S.if((0,t._)`${R}.instancePath === undefined`,()=>S.assign((0,t._)`${R}.instancePath`,(0,t.strConcat)(i.default.instancePath,C.errorPath))),S.assign((0,t._)`${R}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${_}`),C.opts.verbose&&(S.assign((0,t._)`${R}.schema`,E),S.assign((0,t._)`${R}.data`,O))})}e.extendErrors=f;function d(S,_){const E=S.const("err",_);S.if((0,t._)`${i.default.vErrors} === null`,()=>S.assign(i.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${i.default.vErrors}.push(${E})`),S.code((0,t._)`${i.default.errors}++`)}function h(S,_){const{gen:E,validateName:O,schemaEnv:T}=S;T.$async?E.throw((0,t._)`new ${S.ValidationError}(${_})`):(E.assign((0,t._)`${O}.errors`,_),E.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(S,_,E){const{createErrors:O}=S.it;return O===!1?(0,t._)`{}`:v(S,_,E)}function v(S,_,E={}){const{gen:O,it:T}=S,C=[x(T,E),b(S,E)];return w(S,_,C),O.object(...C)}function x({errorPath:S},{instancePath:_}){const E=_?(0,t.str)`${S}${(0,r.getErrorPath)(_,r.Type.Str)}`:S;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,E)]}function b({keyword:S,it:{errSchemaPath:_}},{schemaPath:E,parentSchema:O}){let T=O?_:(0,t.str)`${_}/${S}`;return E&&(T=(0,t.str)`${T}${(0,r.getErrorPath)(E,r.Type.Str)}`),[m.schemaPath,T]}function w(S,{params:_,message:E},O){const{keyword:T,data:C,schemaValue:R,it:M}=S,{opts:D,propertyName:I,topSchemaRef:B,schemaPath:V}=M;O.push([m.keyword,T],[m.params,typeof _=="function"?_(S):_||(0,t._)`{}`]),D.messages&&O.push([m.message,typeof E=="function"?E(S):E]),D.verbose&&O.push([m.schema,R],[m.parentSchema,(0,t._)`${B}${V}`],[i.default.data,C]),I&&O.push([m.propertyName,I])}})(k2)),k2}var vj;function yre(){if(vj)return lp;vj=1,Object.defineProperty(lp,"__esModule",{value:!0}),lp.boolOrEmptySchema=lp.topBoolOrEmptySchema=void 0;const e=fx(),t=tn(),r=Lf(),i={message:"boolean schema is false"};function s(f){const{gen:d,schema:h,validateName:m}=f;h===!1?u(f,!1):typeof h=="object"&&h.$async===!0?d.return(r.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}lp.topBoolOrEmptySchema=s;function l(f,d){const{gen:h,schema:m}=f;m===!1?(h.var(d,!1),u(f)):h.var(d,!0)}lp.boolOrEmptySchema=l;function u(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 lp}var mi={},cp={},bj;function M$(){if(bj)return cp;bj=1,Object.defineProperty(cp,"__esModule",{value:!0}),cp.getRules=cp.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)}cp.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 cp.getRules=i,cp}var xu={},Sj;function j$(){if(Sj)return xu;Sj=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.shouldUseRule=xu.shouldUseGroup=xu.schemaHasRulesForType=void 0;function e({schema:i,self:s},l){const u=s.RULES.types[l];return u&&u!==!0&&t(i,u)}xu.schemaHasRulesForType=e;function t(i,s){return s.rules.some(l=>r(i,l))}xu.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(u=>i[u]!==void 0))}return xu.shouldUseRule=r,xu}var wj;function xE(){if(wj)return mi;wj=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.reportTypeError=mi.checkDataTypes=mi.checkDataType=mi.coerceAndCheckDataType=mi.getJSONTypes=mi.getSchemaTypes=mi.DataType=void 0;const e=M$(),t=j$(),r=fx(),i=tn(),s=Nn();var l;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(l||(mi.DataType=l={}));function u(E){const O=f(E.type);if(O.includes("null")){if(E.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!O.length&&E.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');E.nullable===!0&&O.push("null")}return O}mi.getSchemaTypes=u;function f(E){const O=Array.isArray(E)?E:E?[E]:[];if(O.every(e.isJSONType))return O;throw new Error("type must be JSONType or JSONType[]: "+O.join(","))}mi.getJSONTypes=f;function d(E,O){const{gen:T,data:C,opts:R}=E,M=m(O,R.coerceTypes),D=O.length>0&&!(M.length===0&&O.length===1&&(0,t.schemaHasRulesForType)(E,O[0]));if(D){const I=b(O,C,R.strictNumbers,l.Wrong);T.if(I,()=>{M.length?g(E,O,M):S(E)})}return D}mi.coerceAndCheckDataType=d;const h=new Set(["string","number","integer","boolean","null"]);function m(E,O){return O?E.filter(T=>h.has(T)||O==="array"&&T==="array"):[]}function g(E,O,T){const{gen:C,data:R,opts:M}=E,D=C.let("dataType",(0,i._)`typeof ${R}`),I=C.let("coerced",(0,i._)`undefined`);M.coerceTypes==="array"&&C.if((0,i._)`${D} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>C.assign(R,(0,i._)`${R}[0]`).assign(D,(0,i._)`typeof ${R}`).if(b(O,R,M.strictNumbers),()=>C.assign(I,R))),C.if((0,i._)`${I} !== undefined`);for(const V of T)(h.has(V)||V==="array"&&M.coerceTypes==="array")&&B(V);C.else(),S(E),C.endIf(),C.if((0,i._)`${I} !== undefined`,()=>{C.assign(R,I),v(E,I)});function B(V){switch(V){case"string":C.elseIf((0,i._)`${D} == "number" || ${D} == "boolean"`).assign(I,(0,i._)`"" + ${R}`).elseIf((0,i._)`${R} === null`).assign(I,(0,i._)`""`);return;case"number":C.elseIf((0,i._)`${D} == "boolean" || ${R} === null
50
+ || (${D} == "string" && ${R} && ${R} == +${R})`).assign(I,(0,i._)`+${R}`);return;case"integer":C.elseIf((0,i._)`${D} === "boolean" || ${R} === null
51
+ || (${D} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(I,(0,i._)`+${R}`);return;case"boolean":C.elseIf((0,i._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(I,!1).elseIf((0,i._)`${R} === "true" || ${R} === 1`).assign(I,!0);return;case"null":C.elseIf((0,i._)`${R} === "" || ${R} === 0 || ${R} === false`),C.assign(I,null);return;case"array":C.elseIf((0,i._)`${D} === "string" || ${D} === "number"
52
+ || ${D} === "boolean" || ${R} === null`).assign(I,(0,i._)`[${R}]`)}}}function v({gen:E,parentData:O,parentDataProperty:T},C){E.if((0,i._)`${O} !== undefined`,()=>E.assign((0,i._)`${O}[${T}]`,C))}function x(E,O,T,C=l.Correct){const R=C===l.Correct?i.operators.EQ:i.operators.NEQ;let M;switch(E){case"null":return(0,i._)`${O} ${R} null`;case"array":M=(0,i._)`Array.isArray(${O})`;break;case"object":M=(0,i._)`${O} && typeof ${O} == "object" && !Array.isArray(${O})`;break;case"integer":M=D((0,i._)`!(${O} % 1) && !isNaN(${O})`);break;case"number":M=D();break;default:return(0,i._)`typeof ${O} ${R} ${E}`}return C===l.Correct?M:(0,i.not)(M);function D(I=i.nil){return(0,i.and)((0,i._)`typeof ${O} == "number"`,I,T?(0,i._)`isFinite(${O})`:i.nil)}}mi.checkDataType=x;function b(E,O,T,C){if(E.length===1)return x(E[0],O,T,C);let R;const M=(0,s.toHash)(E);if(M.array&&M.object){const D=(0,i._)`typeof ${O} != "object"`;R=M.null?D:(0,i._)`!${O} || ${D}`,delete M.null,delete M.array,delete M.object}else R=i.nil;M.number&&delete M.integer;for(const D in M)R=(0,i.and)(R,x(D,O,T,C));return R}mi.checkDataTypes=b;const w={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:O})=>typeof E=="string"?(0,i._)`{type: ${E}}`:(0,i._)`{type: ${O}}`};function S(E){const O=_(E);(0,r.reportError)(O,w)}mi.reportTypeError=S;function _(E){const{gen:O,data:T,schema:C}=E,R=(0,s.schemaRefOrVal)(E,C,"type");return{gen:O,keyword:"type",data:T,schema:C.type,schemaCode:R,schemaValue:R,parentSchema:C,params:{},it:E}}return mi}var yb={},Ej;function vre(){if(Ej)return yb;Ej=1,Object.defineProperty(yb,"__esModule",{value:!0}),yb.assignDefaults=void 0;const e=tn(),t=Nn();function r(s,l){const{properties:u,items:f}=s.schema;if(l==="object"&&u)for(const d in u)i(s,d,u[d].default);else l==="array"&&Array.isArray(f)&&f.forEach((d,h)=>i(s,h,d.default))}yb.assignDefaults=r;function i(s,l,u){const{gen:f,compositeRule:d,data:h,opts:m}=s;if(u===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)(u)}`)}return yb}var vl={},Qn={},xj;function Ol(){if(xj)return Qn;xj=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.validateUnion=Qn.validateArray=Qn.usePattern=Qn.callValidateCode=Qn.schemaProperties=Qn.allSchemaProperties=Qn.noPropertyInData=Qn.propertyInData=Qn.isOwnProperty=Qn.hasPropFunc=Qn.reportMissingProp=Qn.checkMissingProp=Qn.checkReportMissingProp=void 0;const e=tn(),t=Nn(),r=Lf(),i=Nn();function s(E,O){const{gen:T,data:C,it:R}=E;T.if(m(T,C,O,R.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${O}`},!0),E.error()})}Qn.checkReportMissingProp=s;function l({gen:E,data:O,it:{opts:T}},C,R){return(0,e.or)(...C.map(M=>(0,e.and)(m(E,O,M,T.ownProperties),(0,e._)`${R} = ${M}`)))}Qn.checkMissingProp=l;function u(E,O){E.setParams({missingProperty:O},!0),E.error()}Qn.reportMissingProp=u;function f(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Qn.hasPropFunc=f;function d(E,O,T){return(0,e._)`${f(E)}.call(${O}, ${T})`}Qn.isOwnProperty=d;function h(E,O,T,C){const R=(0,e._)`${O}${(0,e.getProperty)(T)} !== undefined`;return C?(0,e._)`${R} && ${d(E,O,T)}`:R}Qn.propertyInData=h;function m(E,O,T,C){const R=(0,e._)`${O}${(0,e.getProperty)(T)} === undefined`;return C?(0,e.or)(R,(0,e.not)(d(E,O,T))):R}Qn.noPropertyInData=m;function g(E){return E?Object.keys(E).filter(O=>O!=="__proto__"):[]}Qn.allSchemaProperties=g;function v(E,O){return g(O).filter(T=>!(0,t.alwaysValidSchema)(E,O[T]))}Qn.schemaProperties=v;function x({schemaCode:E,data:O,it:{gen:T,topSchemaRef:C,schemaPath:R,errorPath:M},it:D},I,B,V){const F=V?(0,e._)`${E}, ${O}, ${C}${R}`:O,G=[[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&&G.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${F}, ${T.object(...G)}`;return B!==e.nil?(0,e._)`${I}.call(${B}, ${W})`:(0,e._)`${I}(${W})`}Qn.callValidateCode=x;const b=(0,e._)`new RegExp`;function w({gen:E,it:{opts:O}},T){const C=O.unicodeRegExp?"u":"",{regExp:R}=O.code,M=R(T,C);return E.scopeValue("pattern",{key:M.toString(),ref:M,code:(0,e._)`${R.code==="new RegExp"?b:(0,i.useFunc)(E,R)}(${T}, ${C})`})}Qn.usePattern=w;function S(E){const{gen:O,data:T,keyword:C,it:R}=E,M=O.name("valid");if(R.allErrors){const I=O.let("valid",!0);return D(()=>O.assign(I,!1)),I}return O.var(M,!0),D(()=>O.break()),M;function D(I){const B=O.const("len",(0,e._)`${T}.length`);O.forRange("i",0,B,V=>{E.subschema({keyword:C,dataProp:V,dataPropType:t.Type.Num},M),O.if((0,e.not)(M),I)})}}Qn.validateArray=S;function _(E){const{gen:O,schema:T,keyword:C,it:R}=E;if(!Array.isArray(T))throw new Error("ajv implementation error");if(T.some(B=>(0,t.alwaysValidSchema)(R,B))&&!R.opts.unevaluated)return;const D=O.let("valid",!1),I=O.name("_valid");O.block(()=>T.forEach((B,V)=>{const F=E.subschema({keyword:C,schemaProp:V,compositeRule:!0},I);O.assign(D,(0,e._)`${D} || ${I}`),E.mergeValidEvaluated(F,I)||O.if((0,e.not)(D))})),E.result(D,()=>E.reset(),()=>E.error(!0))}return Qn.validateUnion=_,Qn}var _j;function bre(){if(_j)return vl;_j=1,Object.defineProperty(vl,"__esModule",{value:!0}),vl.validateKeywordUsage=vl.validSchemaType=vl.funcKeywordCode=vl.macroKeywordCode=void 0;const e=tn(),t=Lf(),r=Ol(),i=fx();function s(v,x){const{gen:b,keyword:w,schema:S,parentSchema:_,it:E}=v,O=x.macro.call(E.self,S,_,E),T=h(b,w,O);E.opts.validateSchema!==!1&&E.self.validateSchema(O,!0);const C=b.name("valid");v.subschema({schema:O,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${w}`,topSchemaRef:T,compositeRule:!0},C),v.pass(C,()=>v.error(!0))}vl.macroKeywordCode=s;function l(v,x){var b;const{gen:w,keyword:S,schema:_,parentSchema:E,$data:O,it:T}=v;d(T,x);const C=!O&&x.compile?x.compile.call(T.self,_,E,T):x.validate,R=h(w,S,C),M=w.let("valid");v.block$data(M,D),v.ok((b=x.valid)!==null&&b!==void 0?b:M);function D(){if(x.errors===!1)V(),x.modifying&&u(v),F(()=>v.error());else{const G=x.async?I():B();x.modifying&&u(v),F(()=>f(v,G))}}function I(){const G=w.let("ruleErrs",null);return w.try(()=>V((0,e._)`await `),W=>w.assign(M,!1).if((0,e._)`${W} instanceof ${T.ValidationError}`,()=>w.assign(G,(0,e._)`${W}.errors`),()=>w.throw(W))),G}function B(){const G=(0,e._)`${R}.errors`;return w.assign(G,null),V(e.nil),G}function V(G=x.async?(0,e._)`await `:e.nil){const W=T.opts.passContext?t.default.this:t.default.self,te=!("compile"in x&&!O||x.schema===!1);w.assign(M,(0,e._)`${G}${(0,r.callValidateCode)(v,R,W,te)}`,x.modifying)}function F(G){var W;w.if((0,e.not)((W=x.valid)!==null&&W!==void 0?W:M),G)}}vl.funcKeywordCode=l;function u(v){const{gen:x,data:b,it:w}=v;x.if(w.parentData,()=>x.assign(b,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function f(v,x){const{gen:b}=v;b.if((0,e._)`Array.isArray(${x})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${x} : ${t.default.vErrors}.concat(${x})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(v)},()=>v.error())}function d({schemaEnv:v},x){if(x.async&&!v.$async)throw new Error("async keyword in sync schema")}function h(v,x,b){if(b===void 0)throw new Error(`keyword "${x}" failed to compile`);return v.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function m(v,x,b=!1){return!x.length||x.some(w=>w==="array"?Array.isArray(v):w==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==w||b&&typeof v>"u")}vl.validSchemaType=m;function g({schema:v,opts:x,self:b,errSchemaPath:w},S,_){if(Array.isArray(S.keyword)?!S.keyword.includes(_):S.keyword!==_)throw new Error("ajv implementation error");const E=S.dependencies;if(E?.some(O=>!Object.prototype.hasOwnProperty.call(v,O)))throw new Error(`parent schema must have dependencies of ${_}: ${E.join(",")}`);if(S.validateSchema&&!S.validateSchema(v[_])){const T=`keyword "${_}" value is invalid at path "${w}": `+b.errorsText(S.validateSchema.errors);if(x.validateSchema==="log")b.logger.error(T);else throw new Error(T)}}return vl.validateKeywordUsage=g,vl}var _u={},Tj;function Sre(){if(Tj)return _u;Tj=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.extendSubschemaMode=_u.extendSubschemaData=_u.getSubschema=void 0;const e=tn(),t=Nn();function r(l,{keyword:u,schemaProp:f,schema:d,schemaPath:h,errSchemaPath:m,topSchemaRef:g}){if(u!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const v=l.schema[u];return f===void 0?{schema:v,schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${l.errSchemaPath}/${u}`}:{schema:v[f],schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(f)}`,errSchemaPath:`${l.errSchemaPath}/${u}/${(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')}_u.getSubschema=r;function i(l,u,{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}=u;if(f!==void 0){const{errorPath:b,dataPathArr:w,opts:S}=u,_=v.let("data",(0,e._)`${u.data}${(0,e.getProperty)(f)}`,!0);x(_),l.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(f,d,S.jsPropertySyntax)}`,l.parentDataProperty=(0,e._)`${f}`,l.dataPathArr=[...w,l.parentDataProperty]}if(h!==void 0){const b=h instanceof e.Name?h:v.let("data",h,!0);x(b),g!==void 0&&(l.propertyName=g)}m&&(l.dataTypes=m);function x(b){l.data=b,l.dataLevel=u.dataLevel+1,l.dataTypes=[],u.definedProperties=new Set,l.parentData=u.data,l.dataNames=[...u.dataNames,b]}}_u.extendSubschemaData=i;function s(l,{jtdDiscriminator:u,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=u,l.jtdMetadata=f}return _u.extendSubschemaMode=s,_u}var ro={},$2,Cj;function k$(){return Cj||(Cj=1,$2=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 u=l[s];if(!e(t[u],r[u]))return!1}return!0}return t!==t&&r!==r}),$2}var P2={exports:{}},Rj;function wre(){if(Rj)return P2.exports;Rj=1;var e=P2.exports=function(i,s,l){typeof s=="function"&&(l=s,s={}),l=s.cb||l;var u=typeof l=="function"?l:l.pre||function(){},f=l.post||function(){};t(s,u,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,u,f,d,h,m,g,v){if(u&&typeof u=="object"&&!Array.isArray(u)){s(u,f,d,h,m,g,v);for(var x in u){var b=u[x];if(Array.isArray(b)){if(x in e.arrayKeywords)for(var w=0;w<b.length;w++)t(i,s,l,b[w],f+"/"+x+"/"+w,d,f,x,u,w)}else if(x in e.propsKeywords){if(b&&typeof b=="object")for(var S in b)t(i,s,l,b[S],f+"/"+x+"/"+r(S),d,f,x,u,S)}else(x in e.keywords||i.allKeys&&!(x in e.skipKeywords))&&t(i,s,l,b,f+"/"+x,d,f,x,u)}l(u,f,d,h,m,g,v)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return P2.exports}var Oj;function dx(){if(Oj)return ro;Oj=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.getSchemaRefs=ro.resolveUrl=ro.normalizeId=ro._getFullPath=ro.getFullPath=ro.inlineRef=void 0;const e=Nn(),t=k$(),r=wre(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(w,S=!0){return typeof w=="boolean"?!0:S===!0?!u(w):S?f(w)<=S:!1}ro.inlineRef=s;const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(w){for(const S in w){if(l.has(S))return!0;const _=w[S];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function f(w){let S=0;for(const _ in w){if(_==="$ref")return 1/0;if(S++,!i.has(_)&&(typeof w[_]=="object"&&(0,e.eachItem)(w[_],E=>S+=f(E)),S===1/0))return 1/0}return S}function d(w,S="",_){_!==!1&&(S=g(S));const E=w.parse(S);return h(w,E)}ro.getFullPath=d;function h(w,S){return w.serialize(S).split("#")[0]+"#"}ro._getFullPath=h;const m=/#\/?$/;function g(w){return w?w.replace(m,""):""}ro.normalizeId=g;function v(w,S,_){return _=g(_),w.resolve(S,_)}ro.resolveUrl=v;const x=/^[a-z_][-a-z0-9._]*$/i;function b(w,S){if(typeof w=="boolean")return{};const{schemaId:_,uriResolver:E}=this.opts,O=g(w[_]||S),T={"":O},C=d(E,O,!1),R={},M=new Set;return r(w,{allKeys:!0},(B,V,F,G)=>{if(G===void 0)return;const W=C+V;let te=T[G];typeof B[_]=="string"&&(te=H.call(this,B[_])),J.call(this,B.$anchor),J.call(this,B.$dynamicAnchor),T[V]=te;function H(re){const le=this.opts.uriResolver.resolve;if(re=g(te?le(te,re):re),M.has(re))throw I(re);M.add(re);let ae=this.refs[re];return typeof ae=="string"&&(ae=this.refs[ae]),typeof ae=="object"?D(B,ae.schema,re):re!==g(W)&&(re[0]==="#"?(D(B,R[re],re),R[re]=B):this.refs[re]=W),re}function J(re){if(typeof re=="string"){if(!x.test(re))throw new Error(`invalid anchor "${re}"`);H.call(this,`#${re}`)}}}),R;function D(B,V,F){if(V!==void 0&&!t(B,V))throw I(F)}function I(B){return new Error(`reference "${B}" resolves to more than one schema`)}}return ro.getSchemaRefs=b,ro}var Aj;function hx(){if(Aj)return Eu;Aj=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.getData=Eu.KeywordCxt=Eu.validateFunctionCode=void 0;const e=yre(),t=xE(),r=j$(),i=xE(),s=vre(),l=bre(),u=Sre(),f=tn(),d=Lf(),h=dx(),m=Nn(),g=fx();function v(ue){if(C(ue)&&(M(ue),T(ue))){S(ue);return}x(ue,()=>(0,e.topBoolOrEmptySchema)(ue))}Eu.validateFunctionCode=v;function x({gen:ue,validateName:be,schema:Ee,schemaEnv:xe,opts:Me},Ve){Me.code.es5?ue.func(be,(0,f._)`${d.default.data}, ${d.default.valCxt}`,xe.$async,()=>{ue.code((0,f._)`"use strict"; ${E(Ee,Me)}`),w(ue,Me),ue.code(Ve)}):ue.func(be,(0,f._)`${d.default.data}, ${b(Me)}`,xe.$async,()=>ue.code(E(Ee,Me)).code(Ve))}function b(ue){return(0,f._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${ue.dynamicRef?(0,f._)`, ${d.default.dynamicAnchors}={}`:f.nil}}={}`}function w(ue,be){ue.if(d.default.valCxt,()=>{ue.var(d.default.instancePath,(0,f._)`${d.default.valCxt}.${d.default.instancePath}`),ue.var(d.default.parentData,(0,f._)`${d.default.valCxt}.${d.default.parentData}`),ue.var(d.default.parentDataProperty,(0,f._)`${d.default.valCxt}.${d.default.parentDataProperty}`),ue.var(d.default.rootData,(0,f._)`${d.default.valCxt}.${d.default.rootData}`),be.dynamicRef&&ue.var(d.default.dynamicAnchors,(0,f._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{ue.var(d.default.instancePath,(0,f._)`""`),ue.var(d.default.parentData,(0,f._)`undefined`),ue.var(d.default.parentDataProperty,(0,f._)`undefined`),ue.var(d.default.rootData,d.default.data),be.dynamicRef&&ue.var(d.default.dynamicAnchors,(0,f._)`{}`)})}function S(ue){const{schema:be,opts:Ee,gen:xe}=ue;x(ue,()=>{Ee.$comment&&be.$comment&&G(ue),B(ue),xe.let(d.default.vErrors,null),xe.let(d.default.errors,0),Ee.unevaluated&&_(ue),D(ue),W(ue)})}function _(ue){const{gen:be,validateName:Ee}=ue;ue.evaluated=be.const("evaluated",(0,f._)`${Ee}.evaluated`),be.if((0,f._)`${ue.evaluated}.dynamicProps`,()=>be.assign((0,f._)`${ue.evaluated}.props`,(0,f._)`undefined`)),be.if((0,f._)`${ue.evaluated}.dynamicItems`,()=>be.assign((0,f._)`${ue.evaluated}.items`,(0,f._)`undefined`))}function E(ue,be){const Ee=typeof ue=="object"&&ue[be.schemaId];return Ee&&(be.code.source||be.code.process)?(0,f._)`/*# sourceURL=${Ee} */`:f.nil}function O(ue,be){if(C(ue)&&(M(ue),T(ue))){R(ue,be);return}(0,e.boolOrEmptySchema)(ue,be)}function T({schema:ue,self:be}){if(typeof ue=="boolean")return!ue;for(const Ee in ue)if(be.RULES.all[Ee])return!0;return!1}function C(ue){return typeof ue.schema!="boolean"}function R(ue,be){const{schema:Ee,gen:xe,opts:Me}=ue;Me.$comment&&Ee.$comment&&G(ue),V(ue),F(ue);const Ve=xe.const("_errs",d.default.errors);D(ue,Ve),xe.var(be,(0,f._)`${Ve} === ${d.default.errors}`)}function M(ue){(0,m.checkUnknownRules)(ue),I(ue)}function D(ue,be){if(ue.opts.jtd)return H(ue,[],!1,be);const Ee=(0,t.getSchemaTypes)(ue.schema),xe=(0,t.coerceAndCheckDataType)(ue,Ee);H(ue,Ee,!xe,be)}function I(ue){const{schema:be,errSchemaPath:Ee,opts:xe,self:Me}=ue;be.$ref&&xe.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(be,Me.RULES)&&Me.logger.warn(`$ref: keywords ignored in schema at path "${Ee}"`)}function B(ue){const{schema:be,opts:Ee}=ue;be.default!==void 0&&Ee.useDefaults&&Ee.strictSchema&&(0,m.checkStrictMode)(ue,"default is ignored in the schema root")}function V(ue){const be=ue.schema[ue.opts.schemaId];be&&(ue.baseId=(0,h.resolveUrl)(ue.opts.uriResolver,ue.baseId,be))}function F(ue){if(ue.schema.$async&&!ue.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:ue,schemaEnv:be,schema:Ee,errSchemaPath:xe,opts:Me}){const Ve=Ee.$comment;if(Me.$comment===!0)ue.code((0,f._)`${d.default.self}.logger.log(${Ve})`);else if(typeof Me.$comment=="function"){const Ie=(0,f.str)`${xe}/$comment`,Be=ue.scopeValue("root",{ref:be.root});ue.code((0,f._)`${d.default.self}.opts.$comment(${Ve}, ${Ie}, ${Be}.schema)`)}}function W(ue){const{gen:be,schemaEnv:Ee,validateName:xe,ValidationError:Me,opts:Ve}=ue;Ee.$async?be.if((0,f._)`${d.default.errors} === 0`,()=>be.return(d.default.data),()=>be.throw((0,f._)`new ${Me}(${d.default.vErrors})`)):(be.assign((0,f._)`${xe}.errors`,d.default.vErrors),Ve.unevaluated&&te(ue),be.return((0,f._)`${d.default.errors} === 0`))}function te({gen:ue,evaluated:be,props:Ee,items:xe}){Ee instanceof f.Name&&ue.assign((0,f._)`${be}.props`,Ee),xe instanceof f.Name&&ue.assign((0,f._)`${be}.items`,xe)}function H(ue,be,Ee,xe){const{gen:Me,schema:Ve,data:Ie,allErrors:Be,opts:ke,self:je}=ue,{RULES:Se}=je;if(Ve.$ref&&(ke.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Ve,Se))){Me.block(()=>de(ue,"$ref",Se.all.$ref.definition));return}ke.jtd||re(ue,be),Me.block(()=>{for(const $e of Se.rules)ze($e);ze(Se.post)});function ze($e){(0,r.shouldUseGroup)(Ve,$e)&&($e.type?(Me.if((0,i.checkDataType)($e.type,Ie,ke.strictNumbers)),J(ue,$e),be.length===1&&be[0]===$e.type&&Ee&&(Me.else(),(0,i.reportTypeError)(ue)),Me.endIf()):J(ue,$e),Be||Me.if((0,f._)`${d.default.errors} === ${xe||0}`))}}function J(ue,be){const{gen:Ee,schema:xe,opts:{useDefaults:Me}}=ue;Me&&(0,s.assignDefaults)(ue,be.type),Ee.block(()=>{for(const Ve of be.rules)(0,r.shouldUseRule)(xe,Ve)&&de(ue,Ve.keyword,Ve.definition,be.type)})}function re(ue,be){ue.schemaEnv.meta||!ue.opts.strictTypes||(le(ue,be),ue.opts.allowUnionTypes||ae(ue,be),N(ue,ue.dataTypes))}function le(ue,be){if(be.length){if(!ue.dataTypes.length){ue.dataTypes=be;return}be.forEach(Ee=>{X(ue.dataTypes,Ee)||Z(ue,`type "${Ee}" not allowed by context "${ue.dataTypes.join(",")}"`)}),L(ue,be)}}function ae(ue,be){be.length>1&&!(be.length===2&&be.includes("null"))&&Z(ue,"use allowUnionTypes to allow union type keyword")}function N(ue,be){const Ee=ue.self.RULES.all;for(const xe in Ee){const Me=Ee[xe];if(typeof Me=="object"&&(0,r.shouldUseRule)(ue.schema,Me)){const{type:Ve}=Me.definition;Ve.length&&!Ve.some(Ie=>U(be,Ie))&&Z(ue,`missing type "${Ve.join(",")}" for keyword "${xe}"`)}}}function U(ue,be){return ue.includes(be)||be==="number"&&ue.includes("integer")}function X(ue,be){return ue.includes(be)||be==="integer"&&ue.includes("number")}function L(ue,be){const Ee=[];for(const xe of ue.dataTypes)X(be,xe)?Ee.push(xe):be.includes("integer")&&xe==="number"&&Ee.push("integer");ue.dataTypes=Ee}function Z(ue,be){const Ee=ue.schemaEnv.baseId+ue.errSchemaPath;be+=` at "${Ee}" (strictTypes)`,(0,m.checkStrictMode)(ue,be,ue.opts.strictTypes)}class ee{constructor(be,Ee,xe){if((0,l.validateKeywordUsage)(be,Ee,xe),this.gen=be.gen,this.allErrors=be.allErrors,this.keyword=xe,this.data=be.data,this.schema=be.schema[xe],this.$data=Ee.$data&&be.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(be,this.schema,xe,this.$data),this.schemaType=Ee.schemaType,this.parentSchema=be.schema,this.params={},this.it=be,this.def=Ee,this.$data)this.schemaCode=be.gen.const("vSchema",Ae(this.$data,be));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,Ee.schemaType,Ee.allowUndefined))throw new Error(`${xe} value must be ${JSON.stringify(Ee.schemaType)}`);("code"in Ee?Ee.trackErrors:Ee.errors!==!1)&&(this.errsCount=be.gen.const("_errs",d.default.errors))}result(be,Ee,xe){this.failResult((0,f.not)(be),Ee,xe)}failResult(be,Ee,xe){this.gen.if(be),xe?xe():this.error(),Ee?(this.gen.else(),Ee(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(be,Ee){this.failResult((0,f.not)(be),void 0,Ee)}fail(be){if(be===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(be),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(be){if(!this.$data)return this.fail(be);const{schemaCode:Ee}=this;this.fail((0,f._)`${Ee} !== undefined && (${(0,f.or)(this.invalid$data(),be)})`)}error(be,Ee,xe){if(Ee){this.setParams(Ee),this._error(be,xe),this.setParams({});return}this._error(be,xe)}_error(be,Ee){(be?g.reportExtraError:g.reportError)(this,this.def.error,Ee)}$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(be){this.allErrors||this.gen.if(be)}setParams(be,Ee){Ee?Object.assign(this.params,be):this.params=be}block$data(be,Ee,xe=f.nil){this.gen.block(()=>{this.check$data(be,xe),Ee()})}check$data(be=f.nil,Ee=f.nil){if(!this.$data)return;const{gen:xe,schemaCode:Me,schemaType:Ve,def:Ie}=this;xe.if((0,f.or)((0,f._)`${Me} === undefined`,Ee)),be!==f.nil&&xe.assign(be,!0),(Ve.length||Ie.validateSchema)&&(xe.elseIf(this.invalid$data()),this.$dataError(),be!==f.nil&&xe.assign(be,!1)),xe.else()}invalid$data(){const{gen:be,schemaCode:Ee,schemaType:xe,def:Me,it:Ve}=this;return(0,f.or)(Ie(),Be());function Ie(){if(xe.length){if(!(Ee instanceof f.Name))throw new Error("ajv implementation error");const ke=Array.isArray(xe)?xe:[xe];return(0,f._)`${(0,i.checkDataTypes)(ke,Ee,Ve.opts.strictNumbers,i.DataType.Wrong)}`}return f.nil}function Be(){if(Me.validateSchema){const ke=be.scopeValue("validate$data",{ref:Me.validateSchema});return(0,f._)`!${ke}(${Ee})`}return f.nil}}subschema(be,Ee){const xe=(0,u.getSubschema)(this.it,be);(0,u.extendSubschemaData)(xe,this.it,be),(0,u.extendSubschemaMode)(xe,be);const Me={...this.it,...xe,items:void 0,props:void 0};return O(Me,Ee),Me}mergeEvaluated(be,Ee){const{it:xe,gen:Me}=this;xe.opts.unevaluated&&(xe.props!==!0&&be.props!==void 0&&(xe.props=m.mergeEvaluated.props(Me,be.props,xe.props,Ee)),xe.items!==!0&&be.items!==void 0&&(xe.items=m.mergeEvaluated.items(Me,be.items,xe.items,Ee)))}mergeValidEvaluated(be,Ee){const{it:xe,gen:Me}=this;if(xe.opts.unevaluated&&(xe.props!==!0||xe.items!==!0))return Me.if(Ee,()=>this.mergeEvaluated(be,f.Name)),!0}}Eu.KeywordCxt=ee;function de(ue,be,Ee,xe){const Me=new ee(ue,Ee,be);"code"in Ee?Ee.code(Me,xe):Me.$data&&Ee.validate?(0,l.funcKeywordCode)(Me,Ee):"macro"in Ee?(0,l.macroKeywordCode)(Me,Ee):(Ee.compile||Ee.validate)&&(0,l.funcKeywordCode)(Me,Ee)}const ye=/^\/(?:[^~]|~0|~1)*$/,Te=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ae(ue,{dataLevel:be,dataNames:Ee,dataPathArr:xe}){let Me,Ve;if(ue==="")return d.default.rootData;if(ue[0]==="/"){if(!ye.test(ue))throw new Error(`Invalid JSON-pointer: ${ue}`);Me=ue,Ve=d.default.rootData}else{const je=Te.exec(ue);if(!je)throw new Error(`Invalid JSON-pointer: ${ue}`);const Se=+je[1];if(Me=je[2],Me==="#"){if(Se>=be)throw new Error(ke("property/index",Se));return xe[be-Se]}if(Se>be)throw new Error(ke("data",Se));if(Ve=Ee[be-Se],!Me)return Ve}let Ie=Ve;const Be=Me.split("/");for(const je of Be)je&&(Ve=(0,f._)`${Ve}${(0,f.getProperty)((0,m.unescapeJsonPointer)(je))}`,Ie=(0,f._)`${Ie} && ${Ve}`);return Ie;function ke(je,Se){return`Cannot access ${je} ${Se} levels up, current level is ${be}`}}return Eu.getData=Ae,Eu}var TS={},Mj;function yA(){if(Mj)return TS;Mj=1,Object.defineProperty(TS,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return TS.default=e,TS}var CS={},jj;function px(){if(jj)return CS;jj=1,Object.defineProperty(CS,"__esModule",{value:!0});const e=dx();class t extends Error{constructor(i,s,l,u){super(u||`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 CS.default=t,CS}var Wo={},kj;function vA(){if(kj)return Wo;kj=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.resolveSchema=Wo.getCompilingSchema=Wo.resolveRef=Wo.compileSchema=Wo.SchemaEnv=void 0;const e=tn(),t=yA(),r=Lf(),i=dx(),s=Nn(),l=hx();class u{constructor(_){var E;this.refs={},this.dynamicAnchors={};let O;typeof _.schema=="object"&&(O=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(E=_.baseId)!==null&&E!==void 0?E:(0,i.normalizeId)(O?.[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=O?.$async,this.refs={}}}Wo.SchemaEnv=u;function f(S){const _=m.call(this,S);if(_)return _;const E=(0,i.getFullPath)(this.opts.uriResolver,S.root.baseId),{es5:O,lines:T}=this.opts.code,{ownProperties:C}=this.opts,R=new e.CodeGen(this.scope,{es5:O,lines:T,ownProperties:C});let M;S.$async&&(M=R.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const D=R.scopeName("validate");S.validateName=D;const I={gen:R,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:R.scopeValue("schema",this.opts.code.source===!0?{ref:S.schema,code:(0,e.stringify)(S.schema)}:{ref:S.schema}),validateName:D,ValidationError:M,schema:S.schema,schemaEnv:S,rootId:E,baseId:S.baseId||E,schemaPath:e.nil,errSchemaPath:S.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let B;try{this._compilations.add(S),(0,l.validateFunctionCode)(I),R.optimize(this.opts.code.optimize);const V=R.toString();B=`${R.scopeRefs(r.default.scope)}return ${V}`,this.opts.code.process&&(B=this.opts.code.process(B,S));const G=new Function(`${r.default.self}`,`${r.default.scope}`,B)(this,this.scope.get());if(this.scope.value(D,{ref:G}),G.errors=null,G.schema=S.schema,G.schemaEnv=S,S.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:D,validateCode:V,scopeValues:R._values}),this.opts.unevaluated){const{props:W,items:te}=I;G.evaluated={props:W instanceof e.Name?void 0:W,items:te instanceof e.Name?void 0:te,dynamicProps:W instanceof e.Name,dynamicItems:te instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return S.validate=G,S}catch(V){throw delete S.validate,delete S.validateName,B&&this.logger.error("Error compiling schema, function code:",B),V}finally{this._compilations.delete(S)}}Wo.compileSchema=f;function d(S,_,E){var O;E=(0,i.resolveUrl)(this.opts.uriResolver,_,E);const T=S.refs[E];if(T)return T;let C=v.call(this,S,E);if(C===void 0){const R=(O=S.localRefs)===null||O===void 0?void 0:O[E],{schemaId:M}=this.opts;R&&(C=new u({schema:R,schemaId:M,root:S,baseId:_}))}if(C!==void 0)return S.refs[E]=h.call(this,C)}Wo.resolveRef=d;function h(S){return(0,i.inlineRef)(S.schema,this.opts.inlineRefs)?S.schema:S.validate?S:f.call(this,S)}function m(S){for(const _ of this._compilations)if(g(_,S))return _}Wo.getCompilingSchema=m;function g(S,_){return S.schema===_.schema&&S.root===_.root&&S.baseId===_.baseId}function v(S,_){let E;for(;typeof(E=this.refs[_])=="string";)_=E;return E||this.schemas[_]||x.call(this,S,_)}function x(S,_){const E=this.opts.uriResolver.parse(_),O=(0,i._getFullPath)(this.opts.uriResolver,E);let T=(0,i.getFullPath)(this.opts.uriResolver,S.baseId,void 0);if(Object.keys(S.schema).length>0&&O===T)return w.call(this,E,S);const C=(0,i.normalizeId)(O),R=this.refs[C]||this.schemas[C];if(typeof R=="string"){const M=x.call(this,S,R);return typeof M?.schema!="object"?void 0:w.call(this,E,M)}if(typeof R?.schema=="object"){if(R.validate||f.call(this,R),C===(0,i.normalizeId)(_)){const{schema:M}=R,{schemaId:D}=this.opts,I=M[D];return I&&(T=(0,i.resolveUrl)(this.opts.uriResolver,T,I)),new u({schema:M,schemaId:D,root:S,baseId:T})}return w.call(this,E,R)}}Wo.resolveSchema=x;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(S,{baseId:_,schema:E,root:O}){var T;if(((T=S.fragment)===null||T===void 0?void 0:T[0])!=="/")return;for(const M of S.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const D=E[(0,s.unescapeFragment)(M)];if(D===void 0)return;E=D;const I=typeof E=="object"&&E[this.opts.schemaId];!b.has(M)&&I&&(_=(0,i.resolveUrl)(this.opts.uriResolver,_,I))}let C;if(typeof E!="boolean"&&E.$ref&&!(0,s.schemaHasRulesButRef)(E,this.RULES)){const M=(0,i.resolveUrl)(this.opts.uriResolver,_,E.$ref);C=x.call(this,O,M)}const{schemaId:R}=this.opts;if(C=C||new u({schema:E,schemaId:R,root:O,baseId:_}),C.schema!==C.root.schema)return C}return Wo}const Ere="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",xre="Meta-schema for $data reference (JSON AnySchema extension proposal)",_re="object",Tre=["$data"],Cre={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Rre=!1,Ore={$id:Ere,description:xre,type:_re,required:Tre,properties:Cre,additionalProperties:Rre};var RS={},vb={exports:{}},I2,Nj;function N$(){if(Nj)return I2;Nj=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 x="",b=0,w=0;for(w=0;w<v.length;w++)if(b=v[w].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";x+=v[w];break}for(w+=1;w<v.length;w++){if(b=v[w].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";x+=v[w]}return x}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(v){return v.length=0,!0}function l(v,x,b){if(v.length){const w=r(v);if(w!=="")x.push(w);else return b.error=!0,!1;v.length=0}return!0}function u(v){let x=0;const b={error:!1,address:"",zone:""},w=[],S=[];let _=!1,E=!1,O=l;for(let T=0;T<v.length;T++){const C=v[T];if(!(C==="["||C==="]"))if(C===":"){if(_===!0&&(E=!0),!O(S,w,b))break;if(++x>7){b.error=!0;break}T>0&&v[T-1]===":"&&(_=!0),w.push(":");continue}else if(C==="%"){if(!O(S,w,b))break;O=s}else{S.push(C);continue}}return S.length&&(O===s?b.zone=S.join(""):E?w.push(S.join("")):w.push(r(S))),b.address=w.join(""),b}function f(v){if(d(v,":")<2)return{host:v,isIPV6:!1};const x=u(v);if(x.error)return{host:v,isIPV6:!1};{let b=x.address,w=x.address;return x.zone&&(b+="%"+x.zone,w+="%25"+x.zone),{host:b,isIPV6:!0,escapedHost:w}}}function d(v,x){let b=0;for(let w=0;w<v.length;w++)v[w]===x&&b++;return b}function h(v){let x=v;const b=[];let w=-1,S=0;for(;S=x.length;){if(S===1){if(x===".")break;if(x==="/"){b.push("/");break}else{b.push(x);break}}else if(S===2){if(x[0]==="."){if(x[1]===".")break;if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&(x[1]==="."||x[1]==="/")){b.push("/");break}}else if(S===3&&x==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(x[0]==="."){if(x[1]==="."){if(x[2]==="/"){x=x.slice(3);continue}}else if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&x[1]==="."){if(x[2]==="/"){x=x.slice(2);continue}else if(x[2]==="."&&x[3]==="/"){x=x.slice(3),b.length!==0&&b.pop();continue}}if((w=x.indexOf("/",1))===-1){b.push(x);break}else b.push(x.slice(0,w)),x=x.slice(w)}return b.join("")}function m(v,x){const b=x!==!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 x=[];if(v.userinfo!==void 0&&(x.push(v.userinfo),x.push("@")),v.host!==void 0){let b=unescape(v.host);if(!t(b)){const w=f(b);w.isIPV6===!0?b=`[${w.escapedHost}]`:b=v.host}x.push(b)}return(typeof v.port=="number"||typeof v.port=="string")&&(x.push(":"),x.push(String(v.port))),x.length?x.join(""):void 0}return I2={nonSimpleDomain:i,recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:h,isIPv4:t,isUUID:e,normalizeIPv6:f,stringArrayToHexStripped:r},I2}var L2,Dj;function Are(){if(Dj)return L2;Dj=1;const{isUUID:e}=N$(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(C){return r.indexOf(C)!==-1}function s(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function l(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function u(C){const R=String(C.scheme).toLowerCase()==="https";return(C.port===(R?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function f(C){return C.secure=s(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function d(C){if((C.port===(s(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[R,M]=C.resourceName.split("?");C.path=R&&R!=="/"?R:void 0,C.query=M,C.resourceName=void 0}return C.fragment=void 0,C}function h(C,R){if(!C.path)return C.error="URN can not be parsed",C;const M=C.path.match(t);if(M){const D=R.scheme||C.scheme||"urn";C.nid=M[1].toLowerCase(),C.nss=M[2];const I=`${D}:${R.nid||C.nid}`,B=T(I);C.path=void 0,B&&(C=B.parse(C,R))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,R){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const M=R.scheme||C.scheme||"urn",D=C.nid.toLowerCase(),I=`${M}:${R.nid||D}`,B=T(I);B&&(C=B.serialize(C,R));const V=C,F=C.nss;return V.path=`${D||R.nid}:${F}`,R.skipEscape=!0,V}function g(C,R){const M=C;return M.uuid=M.nss,M.nss=void 0,!R.tolerant&&(!M.uuid||!e(M.uuid))&&(M.error=M.error||"UUID is not valid."),M}function v(C){const R=C;return R.nss=(C.uuid||"").toLowerCase(),R}const x={scheme:"http",domainHost:!0,parse:l,serialize:u},b={scheme:"https",domainHost:x.domainHost,parse:l,serialize:u},w={scheme:"ws",domainHost:!0,parse:f,serialize:d},S={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},O={http:x,https:b,ws:w,wss:S,urn:{scheme:"urn",parse:h,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(O,null);function T(C){return C&&(O[C]||O[C.toLowerCase()])||void 0}return L2={wsIsSecure:s,SCHEMES:O,isValidSchemeName:i,getSchemeHandler:T},L2}var zj;function D$(){if(zj)return vb.exports;zj=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:s,nonSimpleDomain:l}=N$(),{SCHEMES:u,getSchemeHandler:f}=Are();function d(S,_){return typeof S=="string"?S=v(b(S,_),_):typeof S=="object"&&(S=b(v(S,_),_)),S}function h(S,_,E){const O=E?Object.assign({scheme:"null"},E):{scheme:"null"},T=m(b(S,O),b(_,O),O,!0);return O.skipEscape=!0,v(T,O)}function m(S,_,E,O){const T={};return O||(S=b(v(S,E),E),_=b(v(_,E),E)),E=E||{},!E.tolerant&&_.scheme?(T.scheme=_.scheme,T.userinfo=_.userinfo,T.host=_.host,T.port=_.port,T.path=t(_.path||""),T.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(T.userinfo=_.userinfo,T.host=_.host,T.port=_.port,T.path=t(_.path||""),T.query=_.query):(_.path?(_.path[0]==="/"?T.path=t(_.path):((S.userinfo!==void 0||S.host!==void 0||S.port!==void 0)&&!S.path?T.path="/"+_.path:S.path?T.path=S.path.slice(0,S.path.lastIndexOf("/")+1)+_.path:T.path=_.path,T.path=t(T.path)),T.query=_.query):(T.path=S.path,_.query!==void 0?T.query=_.query:T.query=S.query),T.userinfo=S.userinfo,T.host=S.host,T.port=S.port),T.scheme=S.scheme),T.fragment=_.fragment,T}function g(S,_,E){return typeof S=="string"?(S=unescape(S),S=v(i(b(S,E),!0),{...E,skipEscape:!0})):typeof S=="object"&&(S=v(i(S,!0),{...E,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=v(i(b(_,E),!0),{...E,skipEscape:!0})):typeof _=="object"&&(_=v(i(_,!0),{...E,skipEscape:!0})),S.toLowerCase()===_.toLowerCase()}function v(S,_){const E={host:S.host,scheme:S.scheme,userinfo:S.userinfo,port:S.port,path:S.path,query:S.query,nid:S.nid,nss:S.nss,uuid:S.uuid,fragment:S.fragment,reference:S.reference,resourceName:S.resourceName,secure:S.secure,error:""},O=Object.assign({},_),T=[],C=f(O.scheme||E.scheme);C&&C.serialize&&C.serialize(E,O),E.path!==void 0&&(O.skipEscape?E.path=unescape(E.path):(E.path=escape(E.path),E.scheme!==void 0&&(E.path=E.path.split("%3A").join(":")))),O.reference!=="suffix"&&E.scheme&&T.push(E.scheme,":");const R=r(E);if(R!==void 0&&(O.reference!=="suffix"&&T.push("//"),T.push(R),E.path&&E.path[0]!=="/"&&T.push("/")),E.path!==void 0){let M=E.path;!O.absolutePath&&(!C||!C.absolutePath)&&(M=t(M)),R===void 0&&M[0]==="/"&&M[1]==="/"&&(M="/%2F"+M.slice(2)),T.push(M)}return E.query!==void 0&&T.push("?",E.query),E.fragment!==void 0&&T.push("#",E.fragment),T.join("")}const x=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(S,_){const E=Object.assign({},_),O={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let T=!1;E.reference==="suffix"&&(E.scheme?S=E.scheme+":"+S:S="//"+S);const C=S.match(x);if(C){if(O.scheme=C[1],O.userinfo=C[3],O.host=C[4],O.port=parseInt(C[5],10),O.path=C[6]||"",O.query=C[7],O.fragment=C[8],isNaN(O.port)&&(O.port=C[5]),O.host)if(s(O.host)===!1){const D=e(O.host);O.host=D.host.toLowerCase(),T=D.isIPV6}else T=!0;O.scheme===void 0&&O.userinfo===void 0&&O.host===void 0&&O.port===void 0&&O.query===void 0&&!O.path?O.reference="same-document":O.scheme===void 0?O.reference="relative":O.fragment===void 0?O.reference="absolute":O.reference="uri",E.reference&&E.reference!=="suffix"&&E.reference!==O.reference&&(O.error=O.error||"URI is not a "+E.reference+" reference.");const R=f(E.scheme||O.scheme);if(!E.unicodeSupport&&(!R||!R.unicodeSupport)&&O.host&&(E.domainHost||R&&R.domainHost)&&T===!1&&l(O.host))try{O.host=URL.domainToASCII(O.host.toLowerCase())}catch(M){O.error=O.error||"Host's domain name can not be converted to ASCII: "+M}(!R||R&&!R.skipNormalize)&&(S.indexOf("%")!==-1&&(O.scheme!==void 0&&(O.scheme=unescape(O.scheme)),O.host!==void 0&&(O.host=unescape(O.host))),O.path&&(O.path=escape(unescape(O.path))),O.fragment&&(O.fragment=encodeURI(decodeURIComponent(O.fragment)))),R&&R.parse&&R.parse(O,E)}else O.error=O.error||"URI can not be parsed.";return O}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:m,equal:g,serialize:v,parse:b};return vb.exports=w,vb.exports.default=w,vb.exports.fastUri=w,vb.exports}var $j;function Mre(){if($j)return RS;$j=1,Object.defineProperty(RS,"__esModule",{value:!0});const e=D$();return e.code='require("ajv/dist/runtime/uri").default',RS.default=e,RS}var Pj;function jre(){return Pj||(Pj=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=hx();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=tn();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=yA(),s=px(),l=M$(),u=vA(),f=tn(),d=dx(),h=xE(),m=Nn(),g=Ore,v=Mre(),x=(ae,N)=>new RegExp(ae,N);x.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),S={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."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function O(ae){var N,U,X,L,Z,ee,de,ye,Te,Ae,ue,be,Ee,xe,Me,Ve,Ie,Be,ke,je,Se,ze,$e,Ze,hn;const vn=ae.strict,bn=(N=ae.code)===null||N===void 0?void 0:N.optimize,dn=bn===!0||bn===void 0?1:bn||0,xt=(X=(U=ae.code)===null||U===void 0?void 0:U.regExp)!==null&&X!==void 0?X:x,jt=(L=ae.uriResolver)!==null&&L!==void 0?L:v.default;return{strictSchema:(ee=(Z=ae.strictSchema)!==null&&Z!==void 0?Z:vn)!==null&&ee!==void 0?ee:!0,strictNumbers:(ye=(de=ae.strictNumbers)!==null&&de!==void 0?de:vn)!==null&&ye!==void 0?ye:!0,strictTypes:(Ae=(Te=ae.strictTypes)!==null&&Te!==void 0?Te:vn)!==null&&Ae!==void 0?Ae:"log",strictTuples:(be=(ue=ae.strictTuples)!==null&&ue!==void 0?ue:vn)!==null&&be!==void 0?be:"log",strictRequired:(xe=(Ee=ae.strictRequired)!==null&&Ee!==void 0?Ee:vn)!==null&&xe!==void 0?xe:!1,code:ae.code?{...ae.code,optimize:dn,regExp:xt}:{optimize:dn,regExp:xt},loopRequired:(Me=ae.loopRequired)!==null&&Me!==void 0?Me:E,loopEnum:(Ve=ae.loopEnum)!==null&&Ve!==void 0?Ve:E,meta:(Ie=ae.meta)!==null&&Ie!==void 0?Ie:!0,messages:(Be=ae.messages)!==null&&Be!==void 0?Be:!0,inlineRefs:(ke=ae.inlineRefs)!==null&&ke!==void 0?ke:!0,schemaId:(je=ae.schemaId)!==null&&je!==void 0?je:"$id",addUsedSchema:(Se=ae.addUsedSchema)!==null&&Se!==void 0?Se:!0,validateSchema:(ze=ae.validateSchema)!==null&&ze!==void 0?ze:!0,validateFormats:($e=ae.validateFormats)!==null&&$e!==void 0?$e:!0,unicodeRegExp:(Ze=ae.unicodeRegExp)!==null&&Ze!==void 0?Ze:!0,int32range:(hn=ae.int32range)!==null&&hn!==void 0?hn:!0,uriResolver:jt}}class T{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...O(N)};const{es5:U,lines:X}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:w,es5:U,lines:X}),this.logger=F(N.logger);const L=N.validateFormats;N.validateFormats=!1,this.RULES=(0,l.getRules)(),C.call(this,S,N,"NOT SUPPORTED"),C.call(this,_,N,"DEPRECATED","warn"),this._metaOpts=B.call(this),N.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&I.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),M.call(this),N.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:U,schemaId:X}=this.opts;let L=g;X==="id"&&(L={...g},L.id=L.$id,delete L.$id),U&&N&&this.addMetaSchema(L,L[X],!1)}defaultMeta(){const{meta:N,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[U]||N:void 0}validate(N,U){let X;if(typeof N=="string"){if(X=this.getSchema(N),!X)throw new Error(`no schema with key or ref "${N}"`)}else X=this.compile(N);const L=X(U);return"$async"in X||(this.errors=X.errors),L}compile(N,U){const X=this._addSchema(N,U);return X.validate||this._compileSchemaEnv(X)}compileAsync(N,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:X}=this.opts;return L.call(this,N,U);async function L(Ae,ue){await Z.call(this,Ae.$schema);const be=this._addSchema(Ae,ue);return be.validate||ee.call(this,be)}async function Z(Ae){Ae&&!this.getSchema(Ae)&&await L.call(this,{$ref:Ae},!0)}async function ee(Ae){try{return this._compileSchemaEnv(Ae)}catch(ue){if(!(ue instanceof s.default))throw ue;return de.call(this,ue),await ye.call(this,ue.missingSchema),ee.call(this,Ae)}}function de({missingSchema:Ae,missingRef:ue}){if(this.refs[Ae])throw new Error(`AnySchema ${Ae} is loaded but ${ue} cannot be resolved`)}async function ye(Ae){const ue=await Te.call(this,Ae);this.refs[Ae]||await Z.call(this,ue.$schema),this.refs[Ae]||this.addSchema(ue,Ae,U)}async function Te(Ae){const ue=this._loading[Ae];if(ue)return ue;try{return await(this._loading[Ae]=X(Ae))}finally{delete this._loading[Ae]}}}addSchema(N,U,X,L=this.opts.validateSchema){if(Array.isArray(N)){for(const ee of N)this.addSchema(ee,void 0,X,L);return this}let Z;if(typeof N=="object"){const{schemaId:ee}=this.opts;if(Z=N[ee],Z!==void 0&&typeof Z!="string")throw new Error(`schema ${ee} must be string`)}return U=(0,d.normalizeId)(U||Z),this._checkUnique(U),this.schemas[U]=this._addSchema(N,X,U,L,!0),this}addMetaSchema(N,U,X=this.opts.validateSchema){return this.addSchema(N,U,!0,X),this}validateSchema(N,U){if(typeof N=="boolean")return!0;let X;if(X=N.$schema,X!==void 0&&typeof X!="string")throw new Error("$schema must be a string");if(X=X||this.opts.defaultMeta||this.defaultMeta(),!X)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(X,N);if(!L&&U){const Z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(Z);else throw new Error(Z)}return L}getSchema(N){let U;for(;typeof(U=R.call(this,N))=="string";)N=U;if(U===void 0){const{schemaId:X}=this.opts,L=new u.SchemaEnv({schema:{},schemaId:X});if(U=u.resolveSchema.call(this,L,N),!U)return;this.refs[N]=U}return U.validate||this._compileSchemaEnv(U)}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 U=R.call(this,N);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const U=N;this._cache.delete(U);let X=N[this.opts.schemaId];return X&&(X=(0,d.normalizeId)(X),delete this.schemas[X],delete this.refs[X]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const U of N)this.addKeyword(U);return this}addKeyword(N,U){let X;if(typeof N=="string")X=N,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=X);else if(typeof N=="object"&&U===void 0){if(U=N,X=U.keyword,Array.isArray(X)&&!X.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,X,U),!U)return(0,m.eachItem)(X,Z=>te.call(this,Z)),this;J.call(this,U);const L={...U,type:(0,h.getJSONTypes)(U.type),schemaType:(0,h.getJSONTypes)(U.schemaType)};return(0,m.eachItem)(X,L.type.length===0?Z=>te.call(this,Z,L):Z=>L.type.forEach(ee=>te.call(this,Z,L,ee))),this}getKeyword(N){const U=this.RULES.all[N];return typeof U=="object"?U.definition:!!U}removeKeyword(N){const{RULES:U}=this;delete U.keywords[N],delete U.all[N];for(const X of U.rules){const L=X.rules.findIndex(Z=>Z.keyword===N);L>=0&&X.rules.splice(L,1)}return this}addFormat(N,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[N]=U,this}errorsText(N=this.errors,{separator:U=", ",dataVar:X="data"}={}){return!N||N.length===0?"No errors":N.map(L=>`${X}${L.instancePath} ${L.message}`).reduce((L,Z)=>L+U+Z)}$dataMetaSchema(N,U){const X=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const L of U){const Z=L.split("/").slice(1);let ee=N;for(const de of Z)ee=ee[de];for(const de in X){const ye=X[de];if(typeof ye!="object")continue;const{$data:Te}=ye.definition,Ae=ee[de];Te&&Ae&&(ee[de]=le(Ae))}}return N}_removeAllSchemas(N,U){for(const X in N){const L=N[X];(!U||U.test(X))&&(typeof L=="string"?delete N[X]:L&&!L.meta&&(this._cache.delete(L.schema),delete N[X]))}}_addSchema(N,U,X,L=this.opts.validateSchema,Z=this.opts.addUsedSchema){let ee;const{schemaId:de}=this.opts;if(typeof N=="object")ee=N[de];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 ye=this._cache.get(N);if(ye!==void 0)return ye;X=(0,d.normalizeId)(ee||X);const Te=d.getSchemaRefs.call(this,N,X);return ye=new u.SchemaEnv({schema:N,schemaId:de,meta:U,baseId:X,localRefs:Te}),this._cache.set(ye.schema,ye),Z&&!X.startsWith("#")&&(X&&this._checkUnique(X),this.refs[X]=ye),L&&this.validateSchema(N,!0),ye}_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):u.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const U=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,N)}finally{this.opts=U}}}T.ValidationError=i.default,T.MissingRefError=s.default,e.default=T;function C(ae,N,U,X="error"){for(const L in ae){const Z=L;Z in N&&this.logger[X](`${U}: option ${L}. ${ae[Z]}`)}}function R(ae){return ae=(0,d.normalizeId)(ae),this.schemas[ae]||this.refs[ae]}function M(){const ae=this.opts.schemas;if(ae)if(Array.isArray(ae))this.addSchema(ae);else for(const N in ae)this.addSchema(ae[N],N)}function D(){for(const ae in this.opts.formats){const N=this.opts.formats[ae];N&&this.addFormat(ae,N)}}function I(ae){if(Array.isArray(ae)){this.addVocabulary(ae);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in ae){const U=ae[N];U.keyword||(U.keyword=N),this.addKeyword(U)}}function B(){const ae={...this.opts};for(const N of b)delete ae[N];return ae}const V={log(){},warn(){},error(){}};function F(ae){if(ae===!1)return V;if(ae===void 0)return console;if(ae.log&&ae.warn&&ae.error)return ae;throw new Error("logger must implement log, warn and error methods")}const G=/^[a-z_$][a-z0-9_$:-]*$/i;function W(ae,N){const{RULES:U}=this;if((0,m.eachItem)(ae,X=>{if(U.keywords[X])throw new Error(`Keyword ${X} is already defined`);if(!G.test(X))throw new Error(`Keyword ${X} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function te(ae,N,U){var X;const L=N?.post;if(U&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Z}=this;let ee=L?Z.post:Z.rules.find(({type:ye})=>ye===U);if(ee||(ee={type:U,rules:[]},Z.rules.push(ee)),Z.keywords[ae]=!0,!N)return;const de={keyword:ae,definition:{...N,type:(0,h.getJSONTypes)(N.type),schemaType:(0,h.getJSONTypes)(N.schemaType)}};N.before?H.call(this,ee,de,N.before):ee.rules.push(de),Z.all[ae]=de,(X=N.implements)===null||X===void 0||X.forEach(ye=>this.addKeyword(ye))}function H(ae,N,U){const X=ae.rules.findIndex(L=>L.keyword===U);X>=0?ae.rules.splice(X,0,N):(ae.rules.push(N),this.logger.warn(`rule ${U} is not defined`))}function J(ae){let{metaSchema:N}=ae;N!==void 0&&(ae.$data&&this.opts.$data&&(N=le(N)),ae.validateSchema=this.compile(N,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function le(ae){return{anyOf:[ae,re]}}})(j2)),j2}var OS={},AS={},MS={},Ij;function kre(){if(Ij)return MS;Ij=1,Object.defineProperty(MS,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return MS.default=e,MS}var tf={},Lj;function Nre(){if(Lj)return tf;Lj=1,Object.defineProperty(tf,"__esModule",{value:!0}),tf.callRef=tf.getValidate=void 0;const e=px(),t=Ol(),r=tn(),i=Lf(),s=vA(),l=Nn(),u={keyword:"$ref",schemaType:"string",code(h){const{gen:m,schema:g,it:v}=h,{baseId:x,schemaEnv:b,validateName:w,opts:S,self:_}=v,{root:E}=b;if((g==="#"||g==="#/")&&x===E.baseId)return T();const O=s.resolveRef.call(_,E,x,g);if(O===void 0)throw new e.default(v.opts.uriResolver,x,g);if(O instanceof s.SchemaEnv)return C(O);return R(O);function T(){if(b===E)return d(h,w,b,b.$async);const M=m.scopeValue("root",{ref:E});return d(h,(0,r._)`${M}.validate`,E,E.$async)}function C(M){const D=f(h,M);d(h,D,M,M.$async)}function R(M){const D=m.scopeValue("schema",S.code.source===!0?{ref:M,code:(0,r.stringify)(M)}:{ref:M}),I=m.name("valid"),B=h.subschema({schema:M,dataTypes:[],schemaPath:r.nil,topSchemaRef:D,errSchemaPath:g},I);h.mergeEvaluated(B),h.ok(I)}}};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`}tf.getValidate=f;function d(h,m,g,v){const{gen:x,it:b}=h,{allErrors:w,schemaEnv:S,opts:_}=b,E=_.passContext?i.default.this:r.nil;v?O():T();function O(){if(!S.$async)throw new Error("async schema referenced by sync schema");const M=x.let("valid");x.try(()=>{x.code((0,r._)`await ${(0,t.callValidateCode)(h,m,E)}`),R(m),w||x.assign(M,!0)},D=>{x.if((0,r._)`!(${D} instanceof ${b.ValidationError})`,()=>x.throw(D)),C(D),w||x.assign(M,!1)}),h.ok(M)}function T(){h.result((0,t.callValidateCode)(h,m,E),()=>R(m),()=>C(m))}function C(M){const D=(0,r._)`${M}.errors`;x.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${D} : ${i.default.vErrors}.concat(${D})`),x.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function R(M){var D;if(!b.opts.unevaluated)return;const I=(D=g?.validate)===null||D===void 0?void 0:D.evaluated;if(b.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(b.props=l.mergeEvaluated.props(x,I.props,b.props));else{const B=x.var("props",(0,r._)`${M}.evaluated.props`);b.props=l.mergeEvaluated.props(x,B,b.props,r.Name)}if(b.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(b.items=l.mergeEvaluated.items(x,I.items,b.items));else{const B=x.var("items",(0,r._)`${M}.evaluated.items`);b.items=l.mergeEvaluated.items(x,B,b.items,r.Name)}}}return tf.callRef=d,tf.default=u,tf}var Uj;function Dre(){if(Uj)return AS;Uj=1,Object.defineProperty(AS,"__esModule",{value:!0});const e=kre(),t=Nre(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return AS.default=r,AS}var jS={},kS={},Vj;function zre(){if(Vj)return kS;Vj=1,Object.defineProperty(kS,"__esModule",{value:!0});const e=tn(),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:u})=>(0,e.str)`must be ${r[l].okStr} ${u}`,params:({keyword:l,schemaCode:u})=>(0,e._)`{comparison: ${r[l].okStr}, limit: ${u}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(l){const{keyword:u,data:f,schemaCode:d}=l;l.fail$data((0,e._)`${f} ${r[u].fail} ${d} || isNaN(${f})`)}};return kS.default=s,kS}var NS={},qj;function $re(){if(qj)return NS;qj=1,Object.defineProperty(NS,"__esModule",{value:!0});const e=tn(),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:u,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._)`(${u} === 0 || (${h} = ${l}/${u}, ${m}))`)}};return NS.default=r,NS}var DS={},zS={},Fj;function Pre(){if(Fj)return zS;Fj=1,Object.defineProperty(zS,"__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 zS.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',zS}var Bj;function Ire(){if(Bj)return DS;Bj=1,Object.defineProperty(DS,"__esModule",{value:!0});const e=tn(),t=Nn(),r=Pre(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:u}){const f=l==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${f} than ${u} characters`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:u,data:f,schemaCode:d,it:h}=l,m=u==="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 DS.default=s,DS}var $S={},Hj;function Lre(){if(Hj)return $S;Hj=1,Object.defineProperty($S,"__esModule",{value:!0});const e=Ol(),t=tn(),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:u,schema:f,schemaCode:d,it:h}=s,m=h.opts.unicodeRegExp?"u":"",g=u?(0,t._)`(new RegExp(${d}, ${m}))`:(0,e.usePattern)(s,f);s.fail$data((0,t._)`!${g}.test(${l})`)}};return $S.default=i,$S}var PS={},Gj;function Ure(){if(Gj)return PS;Gj=1,Object.defineProperty(PS,"__esModule",{value:!0});const e=tn(),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:u}=i,f=s==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${l}).length ${f} ${u}`)}};return PS.default=r,PS}var IS={},Kj;function Vre(){if(Kj)return IS;Kj=1,Object.defineProperty(IS,"__esModule",{value:!0});const e=Ol(),t=tn(),r=Nn(),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:u,schema:f,schemaCode:d,data:h,$data:m,it:g}=l,{opts:v}=g;if(!m&&f.length===0)return;const x=f.length>=v.loopRequired;if(g.allErrors?b():w(),v.strictRequired){const E=l.parentSchema.properties,{definedProperties:O}=l.it;for(const T of f)if(E?.[T]===void 0&&!O.has(T)){const C=g.schemaEnv.baseId+g.errSchemaPath,R=`required property "${T}" is not defined at "${C}" (strictRequired)`;(0,r.checkStrictMode)(g,R,g.opts.strictRequired)}}function b(){if(x||m)l.block$data(t.nil,S);else for(const E of f)(0,e.checkReportMissingProp)(l,E)}function w(){const E=u.let("missing");if(x||m){const O=u.let("valid",!0);l.block$data(O,()=>_(E,O)),l.ok(O)}else u.if((0,e.checkMissingProp)(l,f,E)),(0,e.reportMissingProp)(l,E),u.else()}function S(){u.forOf("prop",d,E=>{l.setParams({missingProperty:E}),u.if((0,e.noPropertyInData)(u,h,E,v.ownProperties),()=>l.error())})}function _(E,O){l.setParams({missingProperty:E}),u.forOf(E,d,()=>{u.assign(O,(0,e.propertyInData)(u,h,E,v.ownProperties)),u.if((0,t.not)(O),()=>{l.error(),u.break()})},t.nil)}}};return IS.default=s,IS}var LS={},Yj;function qre(){if(Yj)return LS;Yj=1,Object.defineProperty(LS,"__esModule",{value:!0});const e=tn(),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:u}=i,f=s==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${l}.length ${f} ${u}`)}};return LS.default=r,LS}var US={},VS={},Zj;function bA(){if(Zj)return VS;Zj=1,Object.defineProperty(VS,"__esModule",{value:!0});const e=k$();return e.code='require("ajv/dist/runtime/equal").default',VS.default=e,VS}var Xj;function Fre(){if(Xj)return US;Xj=1,Object.defineProperty(US,"__esModule",{value:!0});const e=xE(),t=tn(),r=Nn(),i=bA(),l={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:u,j:f}})=>(0,t.str)`must NOT have duplicate items (items ## ${f} and ${u} are identical)`,params:({params:{i:u,j:f}})=>(0,t._)`{i: ${u}, j: ${f}}`},code(u){const{gen:f,data:d,$data:h,schema:m,parentSchema:g,schemaCode:v,it:x}=u;if(!h&&!m)return;const b=f.let("valid"),w=g.items?(0,e.getSchemaTypes)(g.items):[];u.block$data(b,S,(0,t._)`${v} === false`),u.ok(b);function S(){const T=f.let("i",(0,t._)`${d}.length`),C=f.let("j");u.setParams({i:T,j:C}),f.assign(b,!0),f.if((0,t._)`${T} > 1`,()=>(_()?E:O)(T,C))}function _(){return w.length>0&&!w.some(T=>T==="object"||T==="array")}function E(T,C){const R=f.name("item"),M=(0,e.checkDataTypes)(w,R,x.opts.strictNumbers,e.DataType.Wrong),D=f.const("indices",(0,t._)`{}`);f.for((0,t._)`;${T}--;`,()=>{f.let(R,(0,t._)`${d}[${T}]`),f.if(M,(0,t._)`continue`),w.length>1&&f.if((0,t._)`typeof ${R} == "string"`,(0,t._)`${R} += "_"`),f.if((0,t._)`typeof ${D}[${R}] == "number"`,()=>{f.assign(C,(0,t._)`${D}[${R}]`),u.error(),f.assign(b,!1).break()}).code((0,t._)`${D}[${R}] = ${T}`)})}function O(T,C){const R=(0,r.useFunc)(f,i.default),M=f.name("outer");f.label(M).for((0,t._)`;${T}--;`,()=>f.for((0,t._)`${C} = ${T}; ${C}--;`,()=>f.if((0,t._)`${R}(${d}[${T}], ${d}[${C}])`,()=>{u.error(),f.assign(b,!1).break(M)})))}}};return US.default=l,US}var qS={},Qj;function Bre(){if(Qj)return qS;Qj=1,Object.defineProperty(qS,"__esModule",{value:!0});const e=tn(),t=Nn(),r=bA(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:l})=>(0,e._)`{allowedValue: ${l}}`},code(l){const{gen:u,data:f,$data:d,schemaCode:h,schema:m}=l;d||m&&typeof m=="object"?l.fail$data((0,e._)`!${(0,t.useFunc)(u,r.default)}(${f}, ${h})`):l.fail((0,e._)`${m} !== ${f}`)}};return qS.default=s,qS}var FS={},Wj;function Hre(){if(Wj)return FS;Wj=1,Object.defineProperty(FS,"__esModule",{value:!0});const e=tn(),t=Nn(),r=bA(),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:u,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 x;const b=()=>x??(x=(0,t.useFunc)(u,r.default));let w;if(v||d)w=u.let("valid"),l.block$data(w,S);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const E=u.const("vSchema",m);w=(0,e.or)(...h.map((O,T)=>_(E,T)))}l.pass(w);function S(){u.assign(w,!1),u.forOf("v",m,E=>u.if((0,e._)`${b()}(${f}, ${E})`,()=>u.assign(w,!0).break()))}function _(E,O){const T=h[O];return typeof T=="object"&&T!==null?(0,e._)`${b()}(${f}, ${E}[${O}])`:(0,e._)`${f} === ${T}`}}};return FS.default=s,FS}var Jj;function Gre(){if(Jj)return jS;Jj=1,Object.defineProperty(jS,"__esModule",{value:!0});const e=zre(),t=$re(),r=Ire(),i=Lre(),s=Ure(),l=Vre(),u=qre(),f=Fre(),d=Bre(),h=Hre(),m=[e.default,t.default,r.default,i.default,s.default,l.default,u.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,h.default];return jS.default=m,jS}var BS={},xm={},ek;function z$(){if(ek)return xm;ek=1,Object.defineProperty(xm,"__esModule",{value:!0}),xm.validateAdditionalItems=void 0;const e=tn(),t=Nn(),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:u,it:f}=l,{items:d}=u;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,u){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:u.length}),l.pass((0,e._)`${v} <= ${u.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(g,d)){const b=f.var("valid",(0,e._)`${v} <= ${u.length}`);f.if((0,e.not)(b),()=>x(b)),l.ok(b)}function x(b){f.forRange("i",u.length,v,w=>{l.subschema({keyword:m,dataProp:w,dataPropType:t.Type.Num},b),g.allErrors||f.if((0,e.not)(b),()=>f.break())})}}return xm.validateAdditionalItems=s,xm.default=i,xm}var HS={},_m={},tk;function $$(){if(tk)return _m;tk=1,Object.defineProperty(_m,"__esModule",{value:!0}),_m.validateTuple=void 0;const e=tn(),t=Nn(),r=Ol(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(l){const{schema:u,it:f}=l;if(Array.isArray(u))return s(l,"additionalItems",u);f.items=!0,!(0,t.alwaysValidSchema)(f,u)&&l.ok((0,r.validateArray)(l))}};function s(l,u,f=l.schema){const{gen:d,parentSchema:h,data:m,keyword:g,it:v}=l;w(h),v.opts.unevaluated&&f.length&&v.items!==!0&&(v.items=t.mergeEvaluated.items(d,f.length,v.items));const x=d.name("valid"),b=d.const("len",(0,e._)`${m}.length`);f.forEach((S,_)=>{(0,t.alwaysValidSchema)(v,S)||(d.if((0,e._)`${b} > ${_}`,()=>l.subschema({keyword:g,schemaProp:_,dataProp:_},x)),l.ok(x))});function w(S){const{opts:_,errSchemaPath:E}=v,O=f.length,T=O===S.minItems&&(O===S.maxItems||S[u]===!1);if(_.strictTuples&&!T){const C=`"${g}" is ${O}-tuple, but minItems or maxItems/${u} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(v,C,_.strictTuples)}}}return _m.validateTuple=s,_m.default=i,_m}var nk;function Kre(){if(nk)return HS;nk=1,Object.defineProperty(HS,"__esModule",{value:!0});const e=$$(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return HS.default=t,HS}var GS={},rk;function Yre(){if(rk)return GS;rk=1,Object.defineProperty(GS,"__esModule",{value:!0});const e=tn(),t=Nn(),r=Ol(),i=z$(),l={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},code(u){const{schema:f,parentSchema:d,it:h}=u,{prefixItems:m}=d;h.items=!0,!(0,t.alwaysValidSchema)(h,f)&&(m?(0,i.validateAdditionalItems)(u,m):u.ok((0,r.validateArray)(u)))}};return GS.default=l,GS}var KS={},ak;function Zre(){if(ak)return KS;ak=1,Object.defineProperty(KS,"__esModule",{value:!0});const e=tn(),t=Nn(),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:u,parentSchema:f,data:d,it:h}=s;let m,g;const{minContains:v,maxContains:x}=f;h.opts.next?(m=v===void 0?1:v,g=x):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,u)){let O=(0,e._)`${b} >= ${m}`;g!==void 0&&(O=(0,e._)`${O} && ${b} <= ${g}`),s.pass(O);return}h.items=!0;const w=l.name("valid");g===void 0&&m===1?_(w,()=>l.if(w,()=>l.break())):m===0?(l.let(w,!0),g!==void 0&&l.if((0,e._)`${d}.length > 0`,S)):(l.let(w,!1),S()),s.result(w,()=>s.reset());function S(){const O=l.name("_valid"),T=l.let("count",0);_(O,()=>l.if(O,()=>E(T)))}function _(O,T){l.forRange("i",0,b,C=>{s.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},O),T()})}function E(O){l.code((0,e._)`${O}++`),g===void 0?l.if((0,e._)`${O} >= ${m}`,()=>l.assign(w,!0).break()):(l.if((0,e._)`${O} > ${g}`,()=>l.assign(w,!1).break()),m===1?l.assign(w,!0):l.if((0,e._)`${O} >= ${m}`,()=>l.assign(w,!0)))}}};return KS.default=i,KS}var U2={},ik;function Xre(){return ik||(ik=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=tn(),r=Nn(),i=Ol();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);u(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 u(d,h=d.schema){const{gen:m,data:g,it:v}=d;if(Object.keys(h).length===0)return;const x=m.let("missing");for(const b in h){const w=h[b];if(w.length===0)continue;const S=(0,i.propertyInData)(m,g,b,v.opts.ownProperties);d.setParams({property:b,depsCount:w.length,deps:w.join(", ")}),v.allErrors?m.if(S,()=>{for(const _ of w)(0,i.checkReportMissingProp)(d,_)}):(m.if((0,t._)`${S} && (${(0,i.checkMissingProp)(d,w,x)})`),(0,i.reportMissingProp)(d,x),m.else())}}e.validatePropertyDeps=u;function f(d,h=d.schema){const{gen:m,data:g,keyword:v,it:x}=d,b=m.name("valid");for(const w in h)(0,r.alwaysValidSchema)(x,h[w])||(m.if((0,i.propertyInData)(m,g,w,x.opts.ownProperties),()=>{const S=d.subschema({keyword:v,schemaProp:w},b);d.mergeValidEvaluated(S,b)},()=>m.var(b,!0)),d.ok(b))}e.validateSchemaDeps=f,e.default=s})(U2)),U2}var YS={},ok;function Qre(){if(ok)return YS;ok=1,Object.defineProperty(YS,"__esModule",{value:!0});const e=tn(),t=Nn(),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:u,data:f,it:d}=s;if((0,t.alwaysValidSchema)(d,u))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 YS.default=i,YS}var ZS={},sk;function P$(){if(sk)return ZS;sk=1,Object.defineProperty(ZS,"__esModule",{value:!0});const e=Ol(),t=tn(),r=Lf(),i=Nn(),l={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:u})=>(0,t._)`{additionalProperty: ${u.additionalProperty}}`},code(u){const{gen:f,schema:d,parentSchema:h,data:m,errsCount:g,it:v}=u;if(!g)throw new Error("ajv implementation error");const{allErrors:x,opts:b}=v;if(v.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(v,d))return;const w=(0,e.allSchemaProperties)(h.properties),S=(0,e.allSchemaProperties)(h.patternProperties);_(),u.ok((0,t._)`${g} === ${r.default.errors}`);function _(){f.forIn("key",m,R=>{!w.length&&!S.length?T(R):f.if(E(R),()=>T(R))})}function E(R){let M;if(w.length>8){const D=(0,i.schemaRefOrVal)(v,h.properties,"properties");M=(0,e.isOwnProperty)(f,D,R)}else w.length?M=(0,t.or)(...w.map(D=>(0,t._)`${R} === ${D}`)):M=t.nil;return S.length&&(M=(0,t.or)(M,...S.map(D=>(0,t._)`${(0,e.usePattern)(u,D)}.test(${R})`))),(0,t.not)(M)}function O(R){f.code((0,t._)`delete ${m}[${R}]`)}function T(R){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){O(R);return}if(d===!1){u.setParams({additionalProperty:R}),u.error(),x||f.break();return}if(typeof d=="object"&&!(0,i.alwaysValidSchema)(v,d)){const M=f.name("valid");b.removeAdditional==="failing"?(C(R,M,!1),f.if((0,t.not)(M),()=>{u.reset(),O(R)})):(C(R,M),x||f.if((0,t.not)(M),()=>f.break()))}}function C(R,M,D){const I={keyword:"additionalProperties",dataProp:R,dataPropType:i.Type.Str};D===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(I,M)}}};return ZS.default=l,ZS}var XS={},lk;function Wre(){if(lk)return XS;lk=1,Object.defineProperty(XS,"__esModule",{value:!0});const e=hx(),t=Ol(),r=Nn(),i=P$(),s={keyword:"properties",type:"object",schemaType:"object",code(l){const{gen:u,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 S of g)m.definedProperties.add(S);m.opts.unevaluated&&g.length&&m.props!==!0&&(m.props=r.mergeEvaluated.props(u,(0,r.toHash)(g),m.props));const v=g.filter(S=>!(0,r.alwaysValidSchema)(m,f[S]));if(v.length===0)return;const x=u.name("valid");for(const S of v)b(S)?w(S):(u.if((0,t.propertyInData)(u,h,S,m.opts.ownProperties)),w(S),m.allErrors||u.else().var(x,!0),u.endIf()),l.it.definedProperties.add(S),l.ok(x);function b(S){return m.opts.useDefaults&&!m.compositeRule&&f[S].default!==void 0}function w(S){l.subschema({keyword:"properties",schemaProp:S,dataProp:S},x)}}};return XS.default=s,XS}var QS={},ck;function Jre(){if(ck)return QS;ck=1,Object.defineProperty(QS,"__esModule",{value:!0});const e=Ol(),t=tn(),r=Nn(),i=Nn(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(l){const{gen:u,schema:f,data:d,parentSchema:h,it:m}=l,{opts:g}=m,v=(0,e.allSchemaProperties)(f),x=v.filter(T=>(0,r.alwaysValidSchema)(m,f[T]));if(v.length===0||x.length===v.length&&(!m.opts.unevaluated||m.props===!0))return;const b=g.strictSchema&&!g.allowMatchingProperties&&h.properties,w=u.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,i.evaluatedPropsToName)(u,m.props));const{props:S}=m;_();function _(){for(const T of v)b&&E(T),m.allErrors?O(T):(u.var(w,!0),O(T),u.if(w))}function E(T){for(const C in b)new RegExp(T).test(C)&&(0,r.checkStrictMode)(m,`property ${C} matches pattern ${T} (use allowMatchingProperties)`)}function O(T){u.forIn("key",d,C=>{u.if((0,t._)`${(0,e.usePattern)(l,T)}.test(${C})`,()=>{const R=x.includes(T);R||l.subschema({keyword:"patternProperties",schemaProp:T,dataProp:C,dataPropType:i.Type.Str},w),m.opts.unevaluated&&S!==!0?u.assign((0,t._)`${S}[${C}]`,!0):!R&&!m.allErrors&&u.if((0,t.not)(w),()=>u.break())})})}}};return QS.default=s,QS}var WS={},uk;function eae(){if(uk)return WS;uk=1,Object.defineProperty(WS,"__esModule",{value:!0});const e=Nn(),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 u=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),r.failResult(u,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return WS.default=t,WS}var JS={},fk;function tae(){if(fk)return JS;fk=1,Object.defineProperty(JS,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ol().validateUnion,error:{message:"must match a schema in anyOf"}};return JS.default=t,JS}var ew={},dk;function nae(){if(dk)return ew;dk=1,Object.defineProperty(ew,"__esModule",{value:!0});const e=tn(),t=Nn(),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:u,parentSchema:f,it:d}=s;if(!Array.isArray(u))throw new Error("ajv implementation error");if(d.opts.discriminator&&f.discriminator)return;const h=u,m=l.let("valid",!1),g=l.let("passing",null),v=l.name("_valid");s.setParams({passing:g}),l.block(x),s.result(m,()=>s.reset(),()=>s.error(!0));function x(){h.forEach((b,w)=>{let S;(0,t.alwaysValidSchema)(d,b)?l.var(v,!0):S=s.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},v),w>0&&l.if((0,e._)`${v} && ${m}`).assign(m,!1).assign(g,(0,e._)`[${g}, ${w}]`).else(),l.if(v,()=>{l.assign(m,!0),l.assign(g,w),S&&s.mergeEvaluated(S,e.Name)})})}}};return ew.default=i,ew}var tw={},hk;function rae(){if(hk)return tw;hk=1,Object.defineProperty(tw,"__esModule",{value:!0});const e=Nn(),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 u=i.name("valid");s.forEach((f,d)=>{if((0,e.alwaysValidSchema)(l,f))return;const h=r.subschema({keyword:"allOf",schemaProp:d},u);r.ok(u),r.mergeEvaluated(h)})}};return tw.default=t,tw}var nw={},pk;function aae(){if(pk)return nw;pk=1,Object.defineProperty(nw,"__esModule",{value:!0});const e=tn(),t=Nn(),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:u,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=u.let("valid",!0),v=u.name("_valid");if(x(),l.reset(),h&&m){const w=u.let("ifClause");l.setParams({ifClause:w}),u.if(v,b("then",w),b("else",w))}else h?u.if(v,b("then")):u.if((0,e.not)(v),b("else"));l.pass(g,()=>l.error(!0));function x(){const w=l.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);l.mergeEvaluated(w)}function b(w,S){return()=>{const _=l.subschema({keyword:w},v);u.assign(g,v),l.mergeValidEvaluated(_,g),S?u.assign(S,(0,e._)`${w}`):l.setParams({ifClause:w})}}}};function s(l,u){const f=l.schema[u];return f!==void 0&&!(0,t.alwaysValidSchema)(l,f)}return nw.default=i,nw}var rw={},mk;function iae(){if(mk)return rw;mk=1,Object.defineProperty(rw,"__esModule",{value:!0});const e=Nn(),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 rw.default=t,rw}var gk;function oae(){if(gk)return BS;gk=1,Object.defineProperty(BS,"__esModule",{value:!0});const e=z$(),t=Kre(),r=$$(),i=Yre(),s=Zre(),l=Xre(),u=Qre(),f=P$(),d=Wre(),h=Jre(),m=eae(),g=tae(),v=nae(),x=rae(),b=aae(),w=iae();function S(_=!1){const E=[m.default,g.default,v.default,x.default,b.default,w.default,u.default,f.default,l.default,d.default,h.default];return _?E.push(t.default,i.default):E.push(e.default,r.default),E.push(s.default),E}return BS.default=S,BS}var aw={},iw={},yk;function sae(){if(yk)return iw;yk=1,Object.defineProperty(iw,"__esModule",{value:!0});const e=tn(),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:u,$data:f,schema:d,schemaCode:h,it:m}=i,{opts:g,errSchemaPath:v,schemaEnv:x,self:b}=m;if(!g.validateFormats)return;f?w():S();function w(){const _=l.scopeValue("formats",{ref:b.formats,code:g.code.formats}),E=l.const("fDef",(0,e._)`${_}[${h}]`),O=l.let("fType"),T=l.let("format");l.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>l.assign(O,(0,e._)`${E}.type || "string"`).assign(T,(0,e._)`${E}.validate`),()=>l.assign(O,(0,e._)`"string"`).assign(T,E)),i.fail$data((0,e.or)(C(),R()));function C(){return g.strictSchema===!1?e.nil:(0,e._)`${h} && !${T}`}function R(){const M=x.$async?(0,e._)`(${E}.async ? await ${T}(${u}) : ${T}(${u}))`:(0,e._)`${T}(${u})`,D=(0,e._)`(typeof ${T} == "function" ? ${M} : ${T}.test(${u}))`;return(0,e._)`${T} && ${T} !== true && ${O} === ${s} && !${D}`}}function S(){const _=b.formats[d];if(!_){C();return}if(_===!0)return;const[E,O,T]=R(_);E===s&&i.pass(M());function C(){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 R(D){const I=D instanceof RegExp?(0,e.regexpCode)(D):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(d)}`:void 0,B=l.scopeValue("formats",{key:d,ref:D,code:I});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,e._)`${B}.validate`]:["string",D,B]}function M(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!x.$async)throw new Error("async format in sync schema");return(0,e._)`await ${T}(${u})`}return typeof O=="function"?(0,e._)`${T}(${u})`:(0,e._)`${T}.test(${u})`}}}};return iw.default=r,iw}var vk;function lae(){if(vk)return aw;vk=1,Object.defineProperty(aw,"__esModule",{value:!0});const t=[sae().default];return aw.default=t,aw}var up={},bk;function cae(){return bk||(bk=1,Object.defineProperty(up,"__esModule",{value:!0}),up.contentVocabulary=up.metadataVocabulary=void 0,up.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],up.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),up}var Sk;function uae(){if(Sk)return OS;Sk=1,Object.defineProperty(OS,"__esModule",{value:!0});const e=Dre(),t=Gre(),r=oae(),i=lae(),s=cae(),l=[e.default,t.default,(0,r.default)(),i.default,s.metadataVocabulary,s.contentVocabulary];return OS.default=l,OS}var ow={},bb={},wk;function fae(){if(wk)return bb;wk=1,Object.defineProperty(bb,"__esModule",{value:!0}),bb.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(bb.DiscrError=e={})),bb}var Ek;function dae(){if(Ek)return ow;Ek=1,Object.defineProperty(ow,"__esModule",{value:!0});const e=tn(),t=fae(),r=vA(),i=px(),s=Nn(),u={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:x}=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(!x)throw new Error("discriminator: requires oneOf keyword");const w=d.let("valid",!1),S=d.const("tag",(0,e._)`${h}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${S} == "string"`,()=>_(),()=>f.error(!1,{discrError:t.DiscrError.Tag,tag:S,tagName:b})),f.ok(w);function _(){const T=O();d.if(!1);for(const C in T)d.elseIf((0,e._)`${S} === ${C}`),d.assign(w,E(T[C]));d.else(),f.error(!1,{discrError:t.DiscrError.Mapping,tag:S,tagName:b}),d.endIf()}function E(T){const C=d.name("valid"),R=f.subschema({keyword:"oneOf",schemaProp:T},C);return f.mergeEvaluated(R,e.Name),C}function O(){var T;const C={},R=D(g);let M=!0;for(let V=0;V<x.length;V++){let F=x[V];if(F?.$ref&&!(0,s.schemaHasRulesButRef)(F,v.self.RULES)){const W=F.$ref;if(F=r.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,W),F instanceof r.SchemaEnv&&(F=F.schema),F===void 0)throw new i.default(v.opts.uriResolver,v.baseId,W)}const G=(T=F?.properties)===null||T===void 0?void 0:T[b];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);M=M&&(R||D(F)),I(G,V)}if(!M)throw new Error(`discriminator: "${b}" must be required`);return C;function D({required:V}){return Array.isArray(V)&&V.includes(b)}function I(V,F){if(V.const)B(V.const,F);else if(V.enum)for(const G of V.enum)B(G,F);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function B(V,F){if(typeof V!="string"||V in C)throw new Error(`discriminator: "${b}" values must be unique strings`);C[V]=F}}}};return ow.default=u,ow}const hae="http://json-schema.org/draft-07/schema#",pae="http://json-schema.org/draft-07/schema#",mae="Core schema meta-schema",gae={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:[]}},yae=["object","boolean"],vae={$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:"#"}},bae={$schema:hae,$id:pae,title:mae,definitions:gae,type:yae,properties:vae,default:!0};var xk;function SA(){return xk||(xk=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=jre(),i=uae(),s=dae(),l=bae,u=["/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,u):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=hx();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var m=tn();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=yA();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var v=px();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(xS,xS.exports)),xS.exports}var Sae=SA();const I$=ic(Sae);var sw={exports:{}},V2={},_k;function wae(){return _k||(_k=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(V,F){return{validate:V,compare:F}}e.fullFormats={date:t(l,u),time:t(d(!0),h),"date-time":t(v(!0),x),"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:_,"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:B,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:O,int32:{type:"number",validate:R},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$/,u),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,x),"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(V){return V%4===0&&(V%100!==0||V%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(V){const F=i.exec(V);if(!F)return!1;const G=+F[1],W=+F[2],te=+F[3];return W>=1&&W<=12&&te>=1&&te<=(W===2&&r(G)?29:s[W])}function u(V,F){if(V&&F)return V>F?1:V<F?-1:0}const f=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(V){return function(G){const W=f.exec(G);if(!W)return!1;const te=+W[1],H=+W[2],J=+W[3],re=W[4],le=W[5]==="-"?-1:1,ae=+(W[6]||0),N=+(W[7]||0);if(ae>23||N>59||V&&!re)return!1;if(te<=23&&H<=59&&J<60)return!0;const U=H-N*le,X=te-ae*le-(U<0?1:0);return(X===23||X===-1)&&(U===59||U===-1)&&J<61}}function h(V,F){if(!(V&&F))return;const G=new Date("2020-01-01T"+V).valueOf(),W=new Date("2020-01-01T"+F).valueOf();if(G&&W)return G-W}function m(V,F){if(!(V&&F))return;const G=f.exec(V),W=f.exec(F);if(G&&W)return V=G[1]+G[2]+G[3],F=W[1]+W[2]+W[3],V>F?1:V<F?-1:0}const g=/t|\s/i;function v(V){const F=d(V);return function(W){const te=W.split(g);return te.length===2&&l(te[0])&&F(te[1])}}function x(V,F){if(!(V&&F))return;const G=new Date(V).valueOf(),W=new Date(F).valueOf();if(G&&W)return G-W}function b(V,F){if(!(V&&F))return;const[G,W]=V.split(g),[te,H]=F.split(g),J=u(G,te);if(J!==void 0)return J||h(W,H)}const w=/\/|:/,S=/^(?:[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 _(V){return w.test(V)&&S.test(V)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function O(V){return E.lastIndex=0,E.test(V)}const T=-2147483648,C=2**31-1;function R(V){return Number.isInteger(V)&&V<=C&&V>=T}function M(V){return Number.isInteger(V)}function D(){return!0}const I=/[^\\]\\Z/;function B(V){if(I.test(V))return!1;try{return new RegExp(V),!0}catch{return!1}}})(V2)),V2}var q2={},Tk;function Eae(){return Tk||(Tk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=SA(),r=tn(),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:x,self:b}=v;if(!x.validateFormats)return;const w=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");w.$data?S():_();function S(){const O=d.scopeValue("formats",{ref:b.formats,code:x.code.formats}),T=d.const("fmt",(0,r._)`${O}[${w.schemaCode}]`);f.fail$data((0,r.or)((0,r._)`typeof ${T} != "object"`,(0,r._)`${T} instanceof RegExp`,(0,r._)`typeof ${T}.compare != "function"`,E(T)))}function _(){const O=w.schema,T=b.formats[O];if(!T||T===!0)return;if(typeof T!="object"||T instanceof RegExp||typeof T.compare!="function")throw new Error(`"${g}": format "${O}" does not define "compare" function`);const C=d.scopeValue("formats",{key:O,ref:T,code:x.code.formats?(0,r._)`${x.code.formats}${(0,r.getProperty)(O)}`:void 0});f.fail$data(E(C))}function E(O){return(0,r._)`${O}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const u=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=u})(q2)),q2}var Ck;function xae(){return Ck||(Ck=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=wae(),i=Eae(),s=tn(),l=new s.Name("fullFormats"),u=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,u]:[r.fullFormats,l],x=m.formats||r.formatNames;return d(h,x,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 x,b;(x=(b=h.opts.code).formats)!==null&&x!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${v}`);for(const w of m)h.addFormat(w,g[w])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(sw,sw.exports)),sw.exports}var _ae=xae();const Tae=ic(_ae);function Cae(){const e=new I$({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Tae(e),e}class Rae{constructor(t){this._ajv=t??Cae()}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 Oae{constructor(t){this._client=t}async*callToolStream(t,r=tx,i){const s=this._client,l={...i,task:i?.task??(s.isToolTask(t.name)?{}:void 0)},u=s.requestStream({method:"tools/call",params:t},r,l),f=s.getToolOutputValidator(t.name);for await(const d of u){if(d.type==="result"&&f){const h=d.result;if(!h.structuredContent&&!h.isError){yield{type:"error",error:new Ot(Ut.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 Ot(Ut.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Ot){yield{type:"error",error:m};return}yield{type:"error",error:new Ot(Ut.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 Aae(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 Mae(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 Uw(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&&Uw(l,r[s])}}if(Array.isArray(e.anyOf))for(const r of e.anyOf)typeof r!="boolean"&&Uw(r,t);if(Array.isArray(e.oneOf))for(const r of e.oneOf)typeof r!="boolean"&&Uw(r,t)}}function jae(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 kae extends mre{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 Rae,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",S9,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",y9,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",p9,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Oae(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=gre(this._capabilities,t)}setRequestHandler(t,r){const s=A$(t)?.method;if(!s)throw new Error("Schema is missing a method literal");let l;if(ux(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 u=l;if(u==="elicitation/create"){const f=async(d,h)=>{const m=hf(T9,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new Ot(Ut.InvalidParams,`Invalid elicitation request: ${E}`)}const{params:g}=m.data;g.mode=g.mode??"form";const{supportsFormMode:v,supportsUrlMode:x}=jae(this._capabilities.elicitation);if(g.mode==="form"&&!v)throw new Ot(Ut.InvalidParams,"Client does not support form-mode elicitation requests");if(g.mode==="url"&&!x)throw new Ot(Ut.InvalidParams,"Client does not support URL-mode elicitation requests");const b=await Promise.resolve(r(d,h));if(g.task){const E=hf(l1,b);if(!E.success){const O=E.error instanceof Error?E.error.message:String(E.error);throw new Ot(Ut.InvalidParams,`Invalid task creation result: ${O}`)}return E.data}const w=hf(C9,b);if(!w.success){const E=w.error instanceof Error?w.error.message:String(w.error);throw new Ot(Ut.InvalidParams,`Invalid elicitation result: ${E}`)}const S=w.data,_=g.mode==="form"?g.requestedSchema:void 0;if(g.mode==="form"&&S.action==="accept"&&S.content&&_&&this._capabilities.elicitation?.form?.applyDefaults)try{Uw(_,S.content)}catch{}return S};return super.setRequestHandler(t,f)}if(u==="sampling/createMessage"){const f=async(d,h)=>{const m=hf(E9,d);if(!m.success){const S=m.error instanceof Error?m.error.message:String(m.error);throw new Ot(Ut.InvalidParams,`Invalid sampling request: ${S}`)}const{params:g}=m.data,v=await Promise.resolve(r(d,h));if(g.task){const S=hf(l1,v);if(!S.success){const _=S.error instanceof Error?S.error.message:String(S.error);throw new Ot(Ut.InvalidParams,`Invalid task creation result: ${_}`)}return S.data}const b=g.tools||g.toolChoice?_9:x9,w=hf(b,v);if(!w.success){const S=w.error instanceof Error?w.error.message:String(w.error);throw new Ot(Ut.InvalidParams,`Invalid sampling result: ${S}`)}return w.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:WE,capabilities:this._capabilities,clientInfo:this._clientInfo}},i9,r);if(i===void 0)throw new Error(`Server sent invalid initialize result: ${i}`);if(!vZ.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){Aae(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&Mae(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},qm,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}},qm,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},g9,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},m9,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},f9,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},d9,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},h9,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},qm,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},qm,r)}async callTool(t,r=tx,i){if(this.isToolTaskRequired(t.name))throw new Ot(Ut.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 Ot(Ut.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(s.structuredContent)try{const u=l(s.structuredContent);if(!u.valid)throw new Ot(Ut.InvalidParams,`Structured content does not match the tool's output schema: ${u.errorMessage}`)}catch(u){throw u instanceof Ot?u:new Ot(Ut.InvalidParams,`Failed to validate structured content: ${u instanceof Error?u.message:String(u)}`)}}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},b9,r);return this.cacheToolMetadata(i.tools),i}_setupListChangedHandler(t,r,i,s){const l=dX.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:u,debounceMs:f}=l.data,{onChanged:d}=i,h=async()=>{if(!u){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 KC(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Nae(e=fetch,t){return t?async(r,i)=>{const s={...t,...i,headers:i?.headers?{...KC(t.headers),...KC(i.headers)}:t.headers};return e(r,s)}:e}class Rk 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 F2(e){}function Dae(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=F2,onError:r=F2,onRetry:i=F2,onComment:s}=e;let l="",u=!0,f,d="",h="";function m(w){const S=u?w.replace(/^\xEF\xBB\xBF/,""):w,[_,E]=zae(`${l}${S}`);for(const O of _)g(O);l=E,u=!1}function g(w){if(w===""){x();return}if(w.startsWith(":")){s&&s(w.slice(w.startsWith(": ")?2:1));return}const S=w.indexOf(":");if(S!==-1){const _=w.slice(0,S),E=w[S+1]===" "?2:1,O=w.slice(S+E);v(_,O,w);return}v(w,"",w)}function v(w,S,_){switch(w){case"event":h=S;break;case"data":d=`${d}${S}
56
+ `;break;case"id":f=S.includes("\0")?void 0:S;break;case"retry":/^\d+$/.test(S)?i(parseInt(S,10)):r(new Rk(`Invalid \`retry\` value: "${S}"`,{type:"invalid-retry",value:S,line:_}));break;default:r(new Rk(`Unknown field "${w.length>20?`${w.slice(0,20)}…`:w}"`,{type:"unknown-field",field:w,value:S,line:_}));break}}function x(){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(w={}){l&&w.consume&&g(l),u=!0,f=void 0,d="",h="",l=""}return{feed:m,reset:b}}function zae(e){const t=[];let r="",i=0;for(;i<e.length;){const s=e.indexOf("\r",i),l=e.indexOf(`
58
+ `,i);let u=-1;if(s!==-1&&l!==-1?u=Math.min(s,l):s!==-1?s===e.length-1?u=-1:u=s:l!==-1&&(u=l),u===-1){r=e.slice(i);break}else{const f=e.slice(i,u);t.push(f),i=u+1,e[i-1]==="\r"&&e[i]===`
59
+ `&&i++}}return[t,r]}class $ae extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let s;super({start(l){s=Dae({onEvent:u=>{l.enqueue(u)},onError(u){t==="terminate"?l.error(u):typeof t=="function"&&t(u)},onRetry:r,onComment:i})},transform(l){s.feed(l)}})}}const Pae={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Tm extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class Iae{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=Nae(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Pae}async _authThenStart(){if(!this._authProvider)throw new yp("No auth provider");let t;try{t=await kb(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 yp;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=KC(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 Tm(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 u,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new $ae({onRetry:x=>{this._serverRetryMs=x}})).getReader();for(;;){const{value:x,done:b}=await m.read();if(b)break;if(x.id&&(u=x.id,f=!0,s?.(x.id)),!!x.data&&(!x.event||x.event==="message"))try{const w=S2.parse(JSON.parse(x.data));jb(w)&&(d=!0,l!==void 0&&(w.id=l)),this.onmessage?.(w)}catch(w){this.onerror?.(w)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:u,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:u,onresumptiontoken:s,replayMessageId:l},0)}catch(x){this.onerror?.(new Error(`Failed to reconnect: ${x instanceof Error?x.message:String(x)}`))}}})()}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 yp("No auth provider");if(await kb(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new yp("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:RC(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 u={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,u),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 Tm(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:x,scope:b}=O3(f);if(this._resourceMetadataUrl=x,this._scope=b,await kb(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new yp;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:x,scope:b,error:w}=O3(f);if(w==="insufficient_scope"){const S=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===S)throw new Tm(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),x&&(this._resourceMetadataUrl=x),this._lastUpscopingHeader=S??void 0,await kb(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new yp;return this.send(t)}}throw new Tm(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),DZ(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(),x=Array.isArray(v)?v.map(b=>S2.parse(b)):[S2.parse(v)];for(const b of x)this.onmessage?.(b)}else throw await f.body?.cancel(),new Tm(-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 Tm(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 Lae{client=null;transport=null;async connect(t,r){const i=typeof t=="string"?new URL(t):t;this.transport=new Iae(i,{authProvider:r}),this.client=new kae({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 finishAuth(t){if(!this.transport)throw new Error("Transport not available. Call connect() first.");await this.transport.finishAuth(t)}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Mu=new Lae;let Bb=null;const L$=()=>`${window.location.origin}/mcp`;async function mx(){const e=L$(),{setStatus:t,setRequiresAuth:r,setError:i}=Au.getState();t("connecting"),i(null),await Mu.close();let s=!1;try{(await ZO(e))?.authorization_servers?.length&&(s=!0)}catch{}r(s);try{s?(Bb=new O$,await Mu.connect(e,Bb)):(Bb=null,await Mu.connect(e)),t("authenticated"),gA.invalidateQueries({queryKey:["list-tools"]})}catch(l){if(l instanceof yp){t("unauthenticated");return}t("error"),i(l instanceof Error?l.message:"Connection failed")}}async function Uae(e){const t=L$(),r=new O$;await kb(r,{serverUrl:t,authorizationCode:e}),await mx()}async function Vae(){Bb?.invalidateCredentials("all"),Bb=null,await Mu.close(),Au.getState().reset(),gA.invalidateQueries({queryKey:["list-tools"]})}const qae={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},U$=()=>{const{data:e}=Bz({queryKey:["list-tools"],queryFn:()=>Mu.listTools()});return e},Fae=()=>{if(Au(t=>t.status)==="authenticated")return Mu.getServerInfo()},Bae=()=>{const{setToolData:e}=kg();return Dq({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});const i=await Mu.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...qae,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},wA=()=>{const[e]=mA();return U$().find(r=>r.name===e)??null},Uf=()=>{const e=wA();if(!e)throw new Error("No tool is currently selected");return e},V$=e=>Bz({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Mu.readResource(e)}});function gx(){return typeof window<"u"}function Vf(e){return EA(e)?(e.nodeName||"").toLowerCase():"#document"}function ga(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sc(e){var t;return(t=(EA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EA(e){return gx()?e instanceof Node||e instanceof ga(e).Node:!1}function nr(e){return gx()?e instanceof Element||e instanceof ga(e).Element:!1}function Ur(e){return gx()?e instanceof HTMLElement||e instanceof ga(e).HTMLElement:!1}function h1(e){return!gx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ga(e).ShadowRoot}function qf(e){const{overflow:t,overflowX:r,overflowY:i,display:s}=ss(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&s!=="inline"&&s!=="contents"}function Hae(e){return/^(table|td|th)$/.test(Vf(e))}function yx(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Gae=/transform|translate|scale|rotate|perspective|filter/,Kae=/paint|layout|strict|content/,fp=e=>!!e&&e!=="none";let B2;function xA(e){const t=nr(e)?ss(e):e;return fp(t.transform)||fp(t.translate)||fp(t.scale)||fp(t.rotate)||fp(t.perspective)||!vx()&&(fp(t.backdropFilter)||fp(t.filter))||Gae.test(t.willChange||"")||Kae.test(t.contain||"")}function Yae(e){let t=$u(e);for(;Ur(t)&&!ju(t);){if(xA(t))return t;if(yx(t))return null;t=$u(t)}return null}function vx(){return B2==null&&(B2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),B2}function ju(e){return/^(html|body|#document)$/.test(Vf(e))}function ss(e){return ga(e).getComputedStyle(e)}function bx(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $u(e){if(Vf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||h1(e)&&e.host||sc(e);return h1(t)?t.host:t}function q$(e){const t=$u(e);return ju(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ur(t)&&qf(t)?t:q$(t)}function p1(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=q$(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),u=ga(s);if(l){const f=YC(u);return t.concat(u,u.visualViewport||[],qf(s)?s:[],f&&r?p1(f):[])}else return t.concat(s,p1(s,[],r))}function YC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ok={};function Ni(e,t){const r=j.useRef(Ok);return r.current===Ok&&(r.current=e(t)),r}const H2=k1[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Zae=H2&&H2!==j.useLayoutEffect?H2:e=>e();function ot(e){const t=Ni(Xae).current;return t.next=e,Zae(t.effect),t.trampoline}function Xae(){const e={next:void 0,callback:Qae,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Qae(){}const Wae={...k1},Jae=()=>{},at=typeof document<"u"?j.useLayoutEffect:Jae;function ZC(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Hb={};function Z1(e,t,r,i,s){let l={...XC(e,Hb)};return t&&(l=Nb(l,t)),r&&(l=Nb(l,r)),i&&(l=Nb(l,i)),s&&(l=Nb(l,s)),l}function eie(e){if(e.length===0)return Hb;if(e.length===1)return XC(e[0],Hb);let t={...XC(e[0],Hb)};for(let r=1;r<e.length;r+=1)t=Nb(t,e[r]);return t}function Nb(e,t){return F$(t)?t(e):tie(e,t)}function tie(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=ZC(e.style,i);break}case"className":{e[r]=B$(e.className,i);break}default:nie(r,i)?e[r]=rie(e[r],i):e[r]=i}}return e}function nie(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 F$(e){return typeof e=="function"}function XC(e,t){return F$(e)?e(t):e??Hb}function rie(e,t){return t?e?r=>{if(aie(r)){const s=r;QC(s);const l=t(s);return s.baseUIHandlerPrevented||e?.(s),l}const i=t(r);return e?.(r),i}:t:e}function QC(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function B$(e,t){return t?e?t+" "+e:t:e}function aie(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function iie(e,t){return function(i,...s){const l=new URL(e);return l.searchParams.set("code",i.toString()),s.forEach(u=>l.searchParams.append("args[]",u)),`${t} error #${i}; visit ${l} for the full message.`}}const Ti=iie("https://base-ui.com/production-error","Base UI"),H$=j.createContext(void 0);function G$(e=!1){const t=j.useContext(H$);if(t===void 0&&!e)throw new Error(Ti(16));return t}function oie(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:s=0,isNativeButton:l}=e,u=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||u)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,u,f,l,s])}}function Jp(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:s=!0,composite:l}=e,u=j.useRef(null),f=G$(!0),d=l??f!==void 0,{props:h}=oie({focusableWhenDisabled:r,disabled:t,composite:d,tabIndex:i,isNativeButton:s}),m=j.useCallback(()=>{const x=u.current;G2(x)&&d&&t&&h.disabled===void 0&&x.disabled&&(x.disabled=!1)},[t,h.disabled,d]);at(m,[m]);const g=j.useCallback((x={})=>{const{onClick:b,onMouseDown:w,onKeyUp:S,onKeyDown:_,onPointerDown:E,...O}=x;return Z1({type:s?"button":void 0,onClick(C){if(t){C.preventDefault();return}b?.(C)},onMouseDown(C){t||w?.(C)},onKeyDown(C){if(t||(QC(C),_?.(C),C.baseUIHandlerPrevented))return;const R=C.target===C.currentTarget,M=C.currentTarget,D=G2(M),I=!s&&sie(M),B=R&&(s?D:!I),V=C.key==="Enter",F=C.key===" ",G=M.getAttribute("role"),W=G?.startsWith("menuitem")||G==="option"||G==="gridcell";if(R&&d&&F){if(C.defaultPrevented&&W)return;C.preventDefault(),I||s&&D?(M.click(),C.preventBaseUIHandler()):B&&(b?.(C),C.preventBaseUIHandler());return}B&&(!s&&(F||V)&&C.preventDefault(),!s&&V&&b?.(C))},onKeyUp(C){if(!t){if(QC(C),S?.(C),C.target===C.currentTarget&&s&&d&&G2(C.currentTarget)&&C.key===" "){C.preventDefault();return}C.baseUIHandlerPrevented||C.target===C.currentTarget&&!s&&!d&&C.key===" "&&b?.(C)}},onPointerDown(C){if(t){C.preventDefault();return}E?.(C)}},s?void 0:{role:"button"},h,O)},[t,h,d,s]),v=ot(x=>{u.current=x,m()});return{getButtonProps:g,buttonRef:v}}function G2(e){return Ur(e)&&e.tagName==="BUTTON"}function sie(e){return!!(e?.tagName==="A"&&e?.href)}function Pu(e,t,r,i){const s=Ni(K$).current;return cie(s,e,t,r,i)&&Y$(s,[e,t,r,i]),s.callback}function lie(e){const t=Ni(K$).current;return uie(t,e)&&Y$(t,e),t.callback}function K$(){return{callback:null,cleanup:null,refs:[]}}function cie(e,t,r,i,s){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==s}function uie(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function Y$(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 u=l(r);typeof u=="function"&&(i[s]=u);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 u=i[s];typeof u=="function"?u():l(null);break}case"object":{l.current=null;break}}}}}}}const fie=parseInt(j.version,10);function _A(e){return fie>=e}function Ak(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(_A(19)?r?.ref:t.ref)??null}function die(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 hie(e,t){return typeof e=="function"?e(t):e}function pie(e,t){return typeof e=="function"?e(t):e}function mo(){}const m1=Object.freeze([]),za=Object.freeze({}),mie=500,gie={style:{transition:"none"}},Z$="data-base-ui-click-trigger",yie={fallbackAxisSide:"none"},vie={fallbackAxisSide:"end"},bie={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function dr(e,t,r={}){const i=t.render,s=Sie(t,r);if(r.enabled===!1)return null;const l=r.state??za;return Eie(e,i,s,l)}function Sie(e,t={}){const{className:r,style:i,render:s}=e,{state:l=za,ref:u,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?hie(r,l):void 0,g=h?pie(i,l):void 0,v=h?die(l,d):za,x=h?ZC(v,Array.isArray(f)?eie(f):f)??za:za;return typeof document<"u"&&(h?Array.isArray(u)?x.ref=lie([x.ref,Ak(s),...u]):x.ref=Pu(x.ref,Ak(s),u):Pu(null,null)),h?(m!==void 0&&(x.className=B$(x.className,m)),g!==void 0&&(x.style=ZC(x.style,g)),x):za}const wie=Symbol.for("react.lazy");function Eie(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const s=Z1(r,t.props);s.ref=r.ref;let l=t;return l?.$$typeof===wie&&(l=j.Children.toArray(t)[0]),j.cloneElement(l,s)}if(e&&typeof e=="string")return xie(e,r);throw new Error(Ti(8))}function xie(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 _ie=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,focusableWhenDisabled:u=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:m}=Jp({disabled:l,focusableWhenDisabled:u,native:f});return dr("button",t,{state:{disabled:l},ref:[r,m],props:[d,h]})});function X$(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=X$(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function TA(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=X$(e))&&(i&&(i+=" "),i+=t);return i}const Mk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jk=TA,Hu=(e,t)=>r=>{var i;if(t?.variants==null)return jk(e,r?.class,r?.className);const{variants:s,defaultVariants:l}=t,u=Object.keys(s).map(h=>{const m=r?.[h],g=l?.[h];if(m===null)return null;const v=Mk(m)||Mk(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,...x}=m;return Object.entries(x).every(b=>{let[w,S]=b;return Array.isArray(S)?S.includes({...l,...f}[w]):{...l,...f}[w]===S})?[...h,g,v]:h},[]);return jk(e,u,d,r?.class,r?.className)},Tie=(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},Cie=(e,t)=>({classGroupId:e,validator:t}),Q$=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),_E="-",kk=[],Rie="arbitrary..",Oie=e=>{const t=Mie(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return Aie(u);const f=u.split(_E),d=f[0]===""&&f.length>1?1:0;return W$(f,d,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const d=i[u],h=r[u];return d?h?Tie(h,d):d:h||kk}return r[u]||kk}}},W$=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],l=r.nextPart.get(s);if(l){const h=W$(e,t+1,l);if(h)return h}const u=r.validators;if(u===null)return;const f=t===0?e.join(_E):e.slice(t).join(_E),d=u.length;for(let h=0;h<d;h++){const m=u[h];if(m.validator(f))return m.classGroupId}},Aie=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?Rie+i:void 0})(),Mie=e=>{const{theme:t,classGroups:r}=e;return jie(r,t)},jie=(e,t)=>{const r=Q$();for(const i in e){const s=e[i];CA(s,r,i,t)}return r},CA=(e,t,r,i)=>{const s=e.length;for(let l=0;l<s;l++){const u=e[l];kie(u,t,r,i)}},kie=(e,t,r,i)=>{if(typeof e=="string"){Nie(e,t,r);return}if(typeof e=="function"){Die(e,t,r,i);return}zie(e,t,r,i)},Nie=(e,t,r)=>{const i=e===""?t:J$(t,e);i.classGroupId=r},Die=(e,t,r,i)=>{if($ie(e)){CA(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Cie(r,e))},zie=(e,t,r,i)=>{const s=Object.entries(e),l=s.length;for(let u=0;u<l;u++){const[f,d]=s[u];CA(d,J$(t,f),r,i)}},J$=(e,t)=>{let r=e;const i=t.split(_E),s=i.length;for(let l=0;l<s;l++){const u=i[l];let f=r.nextPart.get(u);f||(f=Q$(),r.nextPart.set(u,f)),r=f}return r},$ie=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Pie=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const s=(l,u)=>{r[l]=u,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(l){let u=r[l];if(u!==void 0)return u;if((u=i[l])!==void 0)return s(l,u),u},set(l,u){l in r?r[l]=u:s(l,u)}}},WC="!",Nk=":",Iie=[],Dk=(e,t,r,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),Lie=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=s=>{const l=[];let u=0,f=0,d=0,h;const m=s.length;for(let w=0;w<m;w++){const S=s[w];if(u===0&&f===0){if(S===Nk){l.push(s.slice(d,w)),d=w+1;continue}if(S==="/"){h=w;continue}}S==="["?u++:S==="]"?u--:S==="("?f++:S===")"&&f--}const g=l.length===0?s:s.slice(d);let v=g,x=!1;g.endsWith(WC)?(v=g.slice(0,-1),x=!0):g.startsWith(WC)&&(v=g.slice(1),x=!0);const b=h&&h>d?h-d:void 0;return Dk(l,x,v,b)};if(t){const s=t+Nk,l=i;i=u=>u.startsWith(s)?l(u.slice(s.length)):Dk(Iie,!1,u,void 0,!0)}if(r){const s=i;i=l=>r({className:l,parseClassName:s})}return i},Uie=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 u=r[l],f=u[0]==="[",d=t.has(u);f||d?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(u)):s.push(u)}return s.length>0&&(s.sort(),i.push(...s)),i}},Vie=e=>({cache:Pie(e.cacheSize),parseClassName:Lie(e),sortModifiers:Uie(e),...Oie(e)}),qie=/\s+/,Fie=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,u=[],f=e.trim().split(qie);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:g,modifiers:v,hasImportantModifier:x,baseClassName:b,maybePostfixModifierPosition:w}=r(m);if(g){d=m+(d.length>0?" "+d:d);continue}let S=!!w,_=i(S?b.substring(0,w):b);if(!_){if(!S){d=m+(d.length>0?" "+d:d);continue}if(_=i(b),!_){d=m+(d.length>0?" "+d:d);continue}S=!1}const E=v.length===0?"":v.length===1?v[0]:l(v).join(":"),O=x?E+WC:E,T=O+_;if(u.indexOf(T)>-1)continue;u.push(T);const C=s(_,S);for(let R=0;R<C.length;++R){const M=C[R];u.push(O+M)}d=m+(d.length>0?" "+d:d)}return d},Bie=(...e)=>{let t=0,r,i,s="";for(;t<e.length;)(r=e[t++])&&(i=eP(r))&&(s&&(s+=" "),s+=i);return s},eP=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=eP(e[i]))&&(r&&(r+=" "),r+=t);return r},Hie=(e,...t)=>{let r,i,s,l;const u=d=>{const h=t.reduce((m,g)=>g(m),e());return r=Vie(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=Fie(d,r);return s(d,m),m};return l=u,(...d)=>l(Bie(...d))},Gie=[],ka=e=>{const t=r=>r[e]||Gie;return t.isThemeGetter=!0,t},tP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kie=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yie=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zie=/\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$/,Xie=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qie=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wie=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nf=e=>Kie.test(e),ln=e=>!!e&&!Number.isNaN(Number(e)),rf=e=>!!e&&Number.isInteger(Number(e)),K2=e=>e.endsWith("%")&&ln(e.slice(0,-1)),Tu=e=>Yie.test(e),rP=()=>!0,Jie=e=>Zie.test(e)&&!Xie.test(e),RA=()=>!1,eoe=e=>Qie.test(e),toe=e=>Wie.test(e),noe=e=>!ct(e)&&!dt(e),roe=e=>Ff(e,oP,RA),ct=e=>tP.test(e),dp=e=>Ff(e,sP,Jie),zk=e=>Ff(e,foe,ln),aoe=e=>Ff(e,cP,rP),ioe=e=>Ff(e,lP,RA),$k=e=>Ff(e,aP,RA),ooe=e=>Ff(e,iP,toe),lw=e=>Ff(e,uP,eoe),dt=e=>nP.test(e),Sb=e=>em(e,sP),soe=e=>em(e,lP),Pk=e=>em(e,aP),loe=e=>em(e,oP),coe=e=>em(e,iP),cw=e=>em(e,uP,!0),uoe=e=>em(e,cP,!0),Ff=(e,t,r)=>{const i=tP.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},em=(e,t,r=!1)=>{const i=nP.exec(e);return i?i[1]?t(i[1]):r:!1},aP=e=>e==="position"||e==="percentage",iP=e=>e==="image"||e==="url",oP=e=>e==="length"||e==="size"||e==="bg-size",sP=e=>e==="length",foe=e=>e==="number",lP=e=>e==="family-name",cP=e=>e==="number"||e==="weight",uP=e=>e==="shadow",doe=()=>{const e=ka("color"),t=ka("font"),r=ka("text"),i=ka("font-weight"),s=ka("tracking"),l=ka("leading"),u=ka("breakpoint"),f=ka("container"),d=ka("spacing"),h=ka("radius"),m=ka("shadow"),g=ka("inset-shadow"),v=ka("text-shadow"),x=ka("drop-shadow"),b=ka("blur"),w=ka("perspective"),S=ka("aspect"),_=ka("ease"),E=ka("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...T(),dt,ct],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[dt,ct,d],I=()=>[nf,"full","auto",...D()],B=()=>[rf,"none","subgrid",dt,ct],V=()=>["auto",{span:["full",rf,dt,ct]},rf,dt,ct],F=()=>[rf,"auto",dt,ct],G=()=>["auto","min","max","fr",dt,ct],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...D()],J=()=>[nf,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],re=()=>[nf,"screen","full","dvw","lvw","svw","min","max","fit",...D()],le=()=>[nf,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],ae=()=>[e,dt,ct],N=()=>[...T(),Pk,$k,{position:[dt,ct]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",loe,roe,{size:[dt,ct]}],L=()=>[K2,Sb,dp],Z=()=>["","none","full",h,dt,ct],ee=()=>["",ln,Sb,dp],de=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[ln,K2,Pk,$k],Ae=()=>["","none",b,dt,ct],ue=()=>["none",ln,dt,ct],be=()=>["none",ln,dt,ct],Ee=()=>[ln,dt,ct],xe=()=>[nf,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tu],breakpoint:[Tu],color:[rP],container:[Tu],"drop-shadow":[Tu],ease:["in","out","in-out"],font:[noe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Tu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Tu],shadow:[Tu],spacing:["px",ln],text:[Tu],"text-shadow":[Tu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nf,ct,dt,S]}],container:["container"],columns:[{columns:[ln,ct,dt,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[rf,"auto",dt,ct]}],basis:[{basis:[nf,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ln,nf,"auto","initial","none",ct]}],grow:[{grow:["",ln,dt,ct]}],shrink:[{shrink:["",ln,dt,ct]}],order:[{order:[rf,"first","last","none",dt,ct]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[f,"screen",...J()]}],"min-w":[{"min-w":[f,"screen","none",...J()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,Sb,dp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,uoe,aoe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",K2,ct]}],"font-family":[{font:[soe,ioe,t]}],"font-features":[{"font-features":[ct]}],"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,dt,ct]}],"line-clamp":[{"line-clamp":[ln,"none",dt,zk]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",dt,ct]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dt,ct]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ae()}],"text-color":[{text:ae()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[ln,"from-font","auto",dt,dp]}],"text-decoration-color":[{decoration:ae()}],"underline-offset":[{"underline-offset":[ln,"auto",dt,ct]}],"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",dt,ct]}],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",dt,ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},rf,dt,ct],radial:["",dt,ct],conic:[rf,dt,ct]},coe,ooe]}],"bg-color":[{bg:ae()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:ae()}],"gradient-via":[{via:ae()}],"gradient-to":[{to:ae()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:ae()}],"border-color-x":[{"border-x":ae()}],"border-color-y":[{"border-y":ae()}],"border-color-s":[{"border-s":ae()}],"border-color-e":[{"border-e":ae()}],"border-color-bs":[{"border-bs":ae()}],"border-color-be":[{"border-be":ae()}],"border-color-t":[{"border-t":ae()}],"border-color-r":[{"border-r":ae()}],"border-color-b":[{"border-b":ae()}],"border-color-l":[{"border-l":ae()}],"divide-color":[{divide:ae()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ln,dt,ct]}],"outline-w":[{outline:["",ln,Sb,dp]}],"outline-color":[{outline:ae()}],shadow:[{shadow:["","none",m,cw,lw]}],"shadow-color":[{shadow:ae()}],"inset-shadow":[{"inset-shadow":["none",g,cw,lw]}],"inset-shadow-color":[{"inset-shadow":ae()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ae()}],"ring-offset-w":[{"ring-offset":[ln,dp]}],"ring-offset-color":[{"ring-offset":ae()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":ae()}],"text-shadow":[{"text-shadow":["none",v,cw,lw]}],"text-shadow-color":[{"text-shadow":ae()}],opacity:[{opacity:[ln,dt,ct]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"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":[ln]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":ae()}],"mask-image-linear-to-color":[{"mask-linear-to":ae()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":ae()}],"mask-image-t-to-color":[{"mask-t-to":ae()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":ae()}],"mask-image-r-to-color":[{"mask-r-to":ae()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":ae()}],"mask-image-b-to-color":[{"mask-b-to":ae()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":ae()}],"mask-image-l-to-color":[{"mask-l-to":ae()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":ae()}],"mask-image-x-to-color":[{"mask-x-to":ae()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":ae()}],"mask-image-y-to-color":[{"mask-y-to":ae()}],"mask-image-radial":[{"mask-radial":[dt,ct]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":ae()}],"mask-image-radial-to-color":[{"mask-radial-to":ae()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[ln]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":ae()}],"mask-image-conic-to-color":[{"mask-conic-to":ae()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",dt,ct]}],filter:[{filter:["","none",dt,ct]}],blur:[{blur:Ae()}],brightness:[{brightness:[ln,dt,ct]}],contrast:[{contrast:[ln,dt,ct]}],"drop-shadow":[{"drop-shadow":["","none",x,cw,lw]}],"drop-shadow-color":[{"drop-shadow":ae()}],grayscale:[{grayscale:["",ln,dt,ct]}],"hue-rotate":[{"hue-rotate":[ln,dt,ct]}],invert:[{invert:["",ln,dt,ct]}],saturate:[{saturate:[ln,dt,ct]}],sepia:[{sepia:["",ln,dt,ct]}],"backdrop-filter":[{"backdrop-filter":["","none",dt,ct]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[ln,dt,ct]}],"backdrop-contrast":[{"backdrop-contrast":[ln,dt,ct]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ln,dt,ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ln,dt,ct]}],"backdrop-invert":[{"backdrop-invert":["",ln,dt,ct]}],"backdrop-opacity":[{"backdrop-opacity":[ln,dt,ct]}],"backdrop-saturate":[{"backdrop-saturate":[ln,dt,ct]}],"backdrop-sepia":[{"backdrop-sepia":["",ln,dt,ct]}],"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",dt,ct]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ln,"initial",dt,ct]}],ease:[{ease:["linear","initial",_,dt,ct]}],delay:[{delay:[ln,dt,ct]}],animate:[{animate:["none",E,dt,ct]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,dt,ct]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[dt,ct,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:ae()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ae()}],"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",dt,ct]}],"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-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":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-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":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",dt,ct]}],fill:[{fill:["none",...ae()]}],"stroke-w":[{stroke:[ln,Sb,dp,zk]}],stroke:[{stroke:["none",...ae()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},fP=Hie(doe);function Vt(...e){return fP(TA(e))}const hoe=Hu("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 _l({className:e,variant:t="default",size:r="default",...i}){return k.jsx(_ie,{"data-slot":"button",className:Vt(hoe({variant:t,size:r,className:e})),...i})}const poe={idle:{bg:"bg-gray-100",dot:"bg-gray-400",text:"text-gray-600",label:"Disconnected"},connecting:{bg:"bg-yellow-100",dot:"bg-yellow-500",text:"text-yellow-800",label:"Connecting..."},authenticated:{bg:"bg-green-100",dot:"bg-green-500",text:"text-green-800",label:"Connected"},unauthenticated:{bg:"bg-orange-100",dot:"bg-orange-500",text:"text-orange-800",label:"Login required"},error:{bg:"bg-red-100",dot:"bg-red-500",text:"text-red-800",label:"Error"}};function moe({status:e}){const t=poe[e];return k.jsxs("span",{className:`flex items-center gap-1 rounded-full ${t.bg} px-2 py-0.5 text-xs font-semibold ${t.text}`,children:[k.jsx("span",{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}const goe=()=>{const e=Fae(),t=e?.name,r=e?.version,[,i]=mA(),{status:s,requiresAuth:l,error:u}=Au();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"}),t&&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}),r&&k.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),u&&k.jsx("span",{className:"text-xs text-red-600 max-w-48 truncate",children:u})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[l&&k.jsx(moe,{status:s}),l&&(s==="authenticated"?k.jsxs(_l,{variant:"outline",size:"sm",onClick:()=>{Vae()},children:[k.jsx(TF,{className:"h-3.5 w-3.5"}),"Sign out"]}):k.jsxs(_l,{variant:"outline",size:"sm",onClick:mx,children:[k.jsx(Qz,{className:"h-3.5 w-3.5"}),"Connect"]})),k.jsx(_l,{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(bF,{className:"h-3.5 w-3.5"})]})})]})]})})},dP=j.createContext({});function yoe(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const voe=typeof window<"u",boe=voe?j.useLayoutEffect:j.useEffect,OA=j.createContext(null);function AA(e,t){e.indexOf(t)===-1&&e.push(t)}function TE(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const nc=(e,t,r)=>r>t?t:r<e?e:r;let MA=()=>{};const Mf={},hP=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pP(e){return typeof e=="object"&&e!==null}const mP=e=>/^0[^.\s]+$/u.test(e);function gP(e){let t;return()=>(t===void 0&&(t=e()),t)}const bs=e=>e,Soe=(e,t)=>r=>t(e(r)),X1=(...e)=>e.reduce(Soe),g1=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class jA{constructor(){this.subscriptions=[]}add(t){return AA(this.subscriptions,t),()=>TE(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 u=this.subscriptions[l];u&&u(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const os=e=>e*1e3,ys=e=>e/1e3;function yP(e,t){return t?e*(1e3/t):0}const vP=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,woe=1e-7,Eoe=12;function xoe(e,t,r,i,s){let l,u,f=0;do u=t+(r-t)/2,l=vP(u,i,s)-e,l>0?r=u:t=u;while(Math.abs(l)>woe&&++f<Eoe);return u}function Q1(e,t,r,i){if(e===t&&r===i)return bs;const s=l=>xoe(l,0,1,e,r);return l=>l===0||l===1?l:vP(s(l),t,i)}const bP=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,SP=e=>t=>1-e(1-t),wP=Q1(.33,1.53,.69,.99),kA=SP(wP),EP=bP(kA),xP=e=>e>=1?1:(e*=2)<1?.5*kA(e):.5*(2-Math.pow(2,-10*(e-1))),NA=e=>1-Math.sin(Math.acos(e)),_P=SP(NA),TP=bP(NA),_oe=Q1(.42,0,1,1),Toe=Q1(0,0,.58,1),CP=Q1(.42,0,.58,1),Coe=e=>Array.isArray(e)&&typeof e[0]!="number",RP=e=>Array.isArray(e)&&typeof e[0]=="number",Roe={linear:bs,easeIn:_oe,easeInOut:CP,easeOut:Toe,circIn:NA,circInOut:TP,circOut:_P,backIn:kA,backInOut:EP,backOut:wP,anticipate:xP},Ooe=e=>typeof e=="string",Ik=e=>{if(RP(e)){MA(e.length===4);const[t,r,i,s]=e;return Q1(t,r,i,s)}else if(Ooe(e))return Roe[e];return e},uw=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Aoe(e,t){let r=new Set,i=new Set,s=!1,l=!1;const u=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){u.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,g=!1,v=!1)=>{const b=v&&s?r:i;return g&&u.add(m),b.add(m),m},cancel:m=>{i.delete(m),u.delete(m)},process:m=>{if(f=m,s){l=!0;return}s=!0;const g=r;r=i,i=g,r.forEach(d),r.clear(),s=!1,l&&(l=!1,h.process(m))}};return h}const Moe=40;function OP(e,t){let r=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,u=uw.reduce((O,T)=>(O[T]=Aoe(l),O),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:v,render:x,postRender:b}=u,w=()=>{const O=Mf.useManualTiming,T=O?s.timestamp:performance.now();r=!1,O||(s.delta=i?1e3/60:Math.max(Math.min(T-s.timestamp,Moe),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),x.process(s),b.process(s),s.isProcessing=!1,r&&t&&(i=!1,e(w))},S=()=>{r=!0,i=!0,s.isProcessing||e(w)};return{schedule:uw.reduce((O,T)=>{const C=u[T];return O[T]=(R,M=!1,D=!1)=>(r||S(),C.schedule(R,M,D)),O},{}),cancel:O=>{for(let T=0;T<uw.length;T++)u[uw[T]].cancel(O)},state:s,steps:u}}const{schedule:mr,cancel:jf,state:gi,steps:Y2}=OP(typeof requestAnimationFrame<"u"?requestAnimationFrame:bs,!0);let Vw;function joe(){Vw=void 0}const so={now:()=>(Vw===void 0&&so.set(gi.isProcessing||Mf.useManualTiming?gi.timestamp:performance.now()),Vw),set:e=>{Vw=e,queueMicrotask(joe)}},AP=e=>t=>typeof t=="string"&&t.startsWith(e),MP=AP("--"),koe=AP("var(--"),DA=e=>koe(e)?Noe.test(e.split("/*")[0].trim()):!1,Noe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Lk(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},y1={...Dg,transform:e=>nc(0,1,e)},fw={...Dg,default:1},Gb=e=>Math.round(e*1e5)/1e5,zA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Doe(e){return e==null}const zoe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$A=(e,t)=>r=>!!(typeof r=="string"&&zoe.test(r)&&r.startsWith(e)||t&&!Doe(r)&&Object.prototype.hasOwnProperty.call(r,t)),jP=(e,t,r)=>i=>{if(typeof i!="string")return i;const[s,l,u,f]=i.match(zA);return{[e]:parseFloat(s),[t]:parseFloat(l),[r]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},$oe=e=>nc(0,255,e),Z2={...Dg,transform:e=>Math.round($oe(e))},Sp={test:$A("rgb","red"),parse:jP("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+Z2.transform(e)+", "+Z2.transform(t)+", "+Z2.transform(r)+", "+Gb(y1.transform(i))+")"};function Poe(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 JC={test:$A("#"),parse:Poe,transform:Sp.transform},W1=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),lf=W1("deg"),Jl=W1("%"),ut=W1("px"),Ioe=W1("vh"),Loe=W1("vw"),Uk={...Jl,parse:e=>Jl.parse(e)/100,transform:e=>Jl.transform(e*100)},Fm={test:$A("hsl","hue"),parse:jP("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+Jl.transform(Gb(t))+", "+Jl.transform(Gb(r))+", "+Gb(y1.transform(i))+")"},pa={test:e=>Sp.test(e)||JC.test(e)||Fm.test(e),parse:e=>Sp.test(e)?Sp.parse(e):Fm.test(e)?Fm.parse(e):JC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Sp.transform(e):Fm.transform(e),getAnimatableNone:e=>{const t=pa.parse(e);return t.alpha=0,pa.transform(t)}},Uoe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Voe(e){return isNaN(e)&&typeof e=="string"&&(e.match(zA)?.length||0)+(e.match(Uoe)?.length||0)>0}const kP="number",NP="color",qoe="var",Foe="var(",Vk="${}",Boe=/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 pg(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},s=[];let l=0;const f=t.replace(Boe,d=>(pa.test(d)?(i.color.push(l),s.push(NP),r.push(pa.parse(d))):d.startsWith(Foe)?(i.var.push(l),s.push(qoe),r.push(d)):(i.number.push(l),s.push(kP),r.push(parseFloat(d))),++l,Vk)).split(Vk);return{values:r,split:f,indexes:i,types:s}}function Hoe(e){return pg(e).values}function DP({split:e,types:t}){const r=e.length;return i=>{let s="";for(let l=0;l<r;l++)if(s+=e[l],i[l]!==void 0){const u=t[l];u===kP?s+=Gb(i[l]):u===NP?s+=pa.transform(i[l]):s+=i[l]}return s}}function Goe(e){return DP(pg(e))}const Koe=e=>typeof e=="number"?0:pa.test(e)?pa.getAnimatableNone(e):e,Yoe=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Koe(e);function Zoe(e){const t=pg(e);return DP(t)(t.values.map((i,s)=>Yoe(i,t.split[s])))}const Tl={test:Voe,parse:Hoe,createTransformer:Goe,getAnimatableNone:Zoe};function X2(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 Xoe({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let s=0,l=0,u=0;if(!t)s=l=u=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;s=X2(d,f,e+1/3),l=X2(d,f,e),u=X2(d,f,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function CE(e,t){return r=>r>0?t:e}const Vr=(e,t,r)=>e+(t-e)*r,Q2=(e,t,r)=>{const i=e*e,s=r*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Qoe=[JC,Sp,Fm],Woe=e=>Qoe.find(t=>t.test(e));function qk(e){const t=Woe(e);if(!t)return!1;let r=t.parse(e);return t===Fm&&(r=Xoe(r)),r}const Fk=(e,t)=>{const r=qk(e),i=qk(t);if(!r||!i)return CE(e,t);const s={...r};return l=>(s.red=Q2(r.red,i.red,l),s.green=Q2(r.green,i.green,l),s.blue=Q2(r.blue,i.blue,l),s.alpha=Vr(r.alpha,i.alpha,l),Sp.transform(s))},eR=new Set(["none","hidden"]);function Joe(e,t){return eR.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function ese(e,t){return r=>Vr(e,t,r)}function PA(e){return typeof e=="number"?ese:typeof e=="string"?DA(e)?CE:pa.test(e)?Fk:rse:Array.isArray(e)?zP:typeof e=="object"?pa.test(e)?Fk:tse:CE}function zP(e,t){const r=[...e],i=r.length,s=e.map((l,u)=>PA(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)r[u]=s[u](l);return r}}function tse(e,t){const r={...e,...t},i={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(i[s]=PA(e[s])(e[s],t[s]));return s=>{for(const l in i)r[l]=i[l](s);return r}}function nse(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],u=e.indexes[l][i[l]],f=e.values[u]??0;r[s]=f,i[l]++}return r}const rse=(e,t)=>{const r=Tl.createTransformer(t),i=pg(e),s=pg(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?eR.has(e)&&!s.values.length||eR.has(t)&&!i.values.length?Joe(e,t):X1(zP(nse(i,s),s.values),r):CE(e,t)};function $P(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Vr(e,t,r):PA(e)(e,t)}const ase=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>mr.update(t,r),stop:()=>jf(t),now:()=>gi.isProcessing?gi.timestamp:so.now()}},PP=(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)})`},RE=2e4;function IA(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<RE;)t+=r,i=e.next(t);return t>=RE?1/0:t}function ise(e,t=100,r){const i=r({...e,keyframes:[0,t]}),s=Math.min(IA(i),RE);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:ys(s)}}const Wr={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};function tR(e,t){return e*Math.sqrt(1-t*t)}const ose=12;function sse(e,t,r){let i=r;for(let s=1;s<ose;s++)i=i-e(i)/t(i);return i}const W2=.001;function lse({duration:e=Wr.duration,bounce:t=Wr.bounce,velocity:r=Wr.velocity,mass:i=Wr.mass}){let s,l,u=1-t;u=nc(Wr.minDamping,Wr.maxDamping,u),e=nc(Wr.minDuration,Wr.maxDuration,ys(e)),u<1?(s=h=>{const m=h*u,g=m*e,v=m-r,x=tR(h,u),b=Math.exp(-g);return W2-v/x*b},l=h=>{const g=h*u*e,v=g*r+r,x=Math.pow(u,2)*Math.pow(h,2)*e,b=Math.exp(-g),w=tR(Math.pow(h,2),u);return(-s(h)+W2>0?-1:1)*((v-x)*b)/w}):(s=h=>{const m=Math.exp(-h*e),g=(h-r)*e+1;return-W2+m*g},l=h=>{const m=Math.exp(-h*e),g=(r-h)*(e*e);return m*g});const f=5/e,d=sse(s,l,f);if(e=os(e),isNaN(d))return{stiffness:Wr.stiffness,damping:Wr.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:u*2*Math.sqrt(i*h),duration:e}}}const cse=["duration","bounce"],use=["stiffness","damping","mass"];function Bk(e,t){return t.some(r=>e[r]!==void 0)}function fse(e){let t={velocity:Wr.velocity,stiffness:Wr.stiffness,damping:Wr.damping,mass:Wr.mass,isResolvedFromDuration:!1,...e};if(!Bk(e,use)&&Bk(e,cse))if(t.velocity=0,e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),s=i*i,l=2*nc(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Wr.mass,stiffness:s,damping:l}}else{const r=lse({...e,velocity:0});t={...t,...r,mass:Wr.mass},t.isResolvedFromDuration=!0}return t}function OE(e=Wr.visualDuration,t=Wr.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],u=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:g,velocity:v,isResolvedFromDuration:x}=fse({...r,velocity:-ys(r.velocity||0)}),b=v||0,w=h/(2*Math.sqrt(d*m)),S=u-l,_=ys(Math.sqrt(d/m)),E=Math.abs(S)<5;i||(i=E?Wr.restSpeed.granular:Wr.restSpeed.default),s||(s=E?Wr.restDelta.granular:Wr.restDelta.default);let O,T,C,R,M,D;if(w<1)C=tR(_,w),R=(b+w*_*S)/C,O=B=>{const V=Math.exp(-w*_*B);return u-V*(R*Math.sin(C*B)+S*Math.cos(C*B))},M=w*_*R+S*C,D=w*_*S-R*C,T=B=>Math.exp(-w*_*B)*(M*Math.sin(C*B)+D*Math.cos(C*B));else if(w===1){O=V=>u-Math.exp(-_*V)*(S+(b+_*S)*V);const B=b+_*S;T=V=>Math.exp(-_*V)*(_*B*V-b)}else{const B=_*Math.sqrt(w*w-1);O=W=>{const te=Math.exp(-w*_*W),H=Math.min(B*W,300);return u-te*((b+w*_*S)*Math.sinh(H)+B*S*Math.cosh(H))/B};const V=(b+w*_*S)/B,F=w*_*V-S*B,G=w*_*S-V*B;T=W=>{const te=Math.exp(-w*_*W),H=Math.min(B*W,300);return te*(F*Math.sinh(H)+G*Math.cosh(H))}}const I={calculatedDuration:x&&g||null,velocity:B=>os(T(B)),next:B=>{if(!x&&w<1){const F=Math.exp(-w*_*B),G=Math.sin(C*B),W=Math.cos(C*B),te=u-F*(R*G+S*W),H=os(F*(M*G+D*W));return f.done=Math.abs(H)<=i&&Math.abs(u-te)<=s,f.value=f.done?u:te,f}const V=O(B);if(x)f.done=B>=g;else{const F=os(T(B));f.done=Math.abs(F)<=i&&Math.abs(u-V)<=s}return f.value=f.done?u:V,f},toString:()=>{const B=Math.min(IA(I),RE),V=PP(F=>I.next(B*F).value,B,30);return B+"ms "+V},toTransition:()=>{}};return I}OE.applyToOptions=e=>{const t=ise(e,100,OE);return e.ease=t.ease,e.duration=os(t.duration),e.type="keyframes",e};const dse=5;function IP(e,t,r){const i=Math.max(t-dse,0);return yP(r-e(i),t-i)}function nR({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:u,min:f,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],v={done:!1,value:g},x=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 w=r*t;const S=g+w,_=u===void 0?S:u(S);_!==S&&(w=_-g);const E=D=>-w*Math.exp(-D/i),O=D=>_+E(D),T=D=>{const I=E(D),B=O(D);v.done=Math.abs(I)<=h,v.value=v.done?_:B};let C,R;const M=D=>{x(v.value)&&(C=D,R=OE({keyframes:[v.value,b(v.value)],velocity:IP(O,D,v.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let I=!1;return!R&&C===void 0&&(I=!0,T(D),M(D)),C!==void 0&&D>=C?R.next(D-C):(!I&&T(D),v)}}}function hse(e,t,r){const i=[],s=r||Mf.mix||$P,l=e.length-1;for(let u=0;u<l;u++){let f=s(e[u],e[u+1]);if(t){const d=Array.isArray(t)?t[u]||bs:t;f=X1(d,f)}i.push(f)}return i}function pse(e,t,{clamp:r=!0,ease:i,mixer:s}={}){const l=e.length;if(MA(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=hse(t,i,s),d=f.length,h=m=>{if(u&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const v=g1(e[g],e[g+1],m);return f[g](v)};return r?m=>h(nc(e[0],e[l-1],m)):h}function mse(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const s=g1(0,t,i);e.push(Vr(r,1,s))}}function gse(e){const t=[0];return mse(t,e.length-1),t}function yse(e,t){return e.map(r=>r*t)}function vse(e,t){return e.map(()=>t||CP).splice(0,e.length-1)}function Kb({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const s=Coe(i)?i.map(Ik):Ik(i),l={done:!1,value:t[0]},u=yse(r&&r.length===t.length?r:gse(t),e),f=pse(u,t,{ease:Array.isArray(s)?s:vse(t,s)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const bse=e=>e!==null;function LA(e,{repeat:t,repeatType:r="loop"},i,s=1){const l=e.filter(bse),f=s<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const Sse={decay:nR,inertia:nR,tween:Kb,keyframes:Kb,spring:OE};function LP(e){typeof e.type=="string"&&(e.type=Sse[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 wse=e=>e/100;class VA 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!==so.now()&&this.tick(so.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;LP(t);const{type:r=Kb,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:u=0}=t;let{keyframes:f}=t;const d=r||Kb;d!==Kb&&typeof f[0]!="number"&&(this.mixKeyframes=X1(wse,$P(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-u})),h.calculatedDuration===null&&(h.calculatedDuration=IA(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:u,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:v,repeatDelay:x,type:b,onUpdate:w,finalKeyframe:S}=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 _=this.currentTime-h*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?_<0:_>s;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let O=this.currentTime,T=i;if(g){const D=Math.min(this.currentTime,s)/f;let I=Math.floor(D),B=D%1;!B&&D>=1&&(B=1),B===1&&I--,I=Math.min(I,g+1),I%2&&(v==="reverse"?(B=1-B,x&&(B-=x/f)):v==="mirror"&&(T=u)),O=nc(0,1,B)*f}const C=E?{done:!1,value:m[0]}:T.next(O);l&&!E&&(C.value=l(C.value));let{done:R}=C;!E&&d!==null&&(R=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return M&&b!==nR&&(C.value=LA(m,this.options,S,this.speed)),w&&w(C.value),M&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return ys(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ys(t)}get time(){return ys(this.currentTime)}set time(t){t=os(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const r=this.generator.next(t).value;return IP(i=>this.generator.next(i).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){const r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(so.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=ys(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ase,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(so.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 Ese(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wp=e=>e*180/Math.PI,rR=e=>{const t=wp(Math.atan2(e[1],e[0]));return aR(t)},xse={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rR,rotateZ:rR,skewX:e=>wp(Math.atan(e[1])),skewY:e=>wp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},aR=e=>(e=e%360,e<0&&(e+=360),e),Hk=rR,Gk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Kk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_se={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gk,scaleY:Kk,scale:e=>(Gk(e)+Kk(e))/2,rotateX:e=>aR(wp(Math.atan2(e[6],e[5]))),rotateY:e=>aR(wp(Math.atan2(-e[2],e[0]))),rotateZ:Hk,rotate:Hk,skewX:e=>wp(Math.atan(e[4])),skewY:e=>wp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function iR(e){return e.includes("scale")?1:0}function oR(e,t){if(!e||e==="none")return iR(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(r)i=_se,s=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=xse,s=f}if(!s)return iR(t);const l=i[t],u=s[1].split(",").map(Cse);return typeof l=="function"?l(u):u[l]}const Tse=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return oR(r,t)};function Cse(e){return parseFloat(e.trim())}const zg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$g=new Set(zg),Yk=e=>e===Dg||e===ut,Rse=new Set(["x","y","z"]),Ose=zg.filter(e=>!Rse.has(e));function Ase(e){const t=[];return Ose.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const pf={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-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})=>oR(t,"x"),y:(e,{transform:t})=>oR(t,"y")};pf.translateX=pf.x;pf.translateY=pf.y;const Cp=new Set;let sR=!1,lR=!1,cR=!1;function UP(){if(lR){const e=Array.from(Cp).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const s=Ase(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,u])=>{i.getValue(l)?.set(u)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}lR=!1,sR=!1,Cp.forEach(e=>e.complete(cR)),Cp.clear()}function VP(){Cp.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(lR=!0)})}function Mse(){cR=!0,VP(),UP(),cR=!1}class qA{constructor(t,r,i,s,l,u=!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=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Cp.add(this),sR||(sR=!0,mr.read(VP),mr.resolveKeyframes(UP))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,u);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=u),s&&l===void 0&&s.set(t[0])}Ese(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Cp.delete(this)}cancel(){this.state==="scheduled"&&(Cp.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const jse=e=>e.startsWith("--");function qP(e,t,r){jse(t)?e.style.setProperty(t,r):e.style[t]=r}const kse={};function FP(e,t){const r=gP(e);return()=>kse[t]??r()}const Nse=FP(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),BP=FP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Db=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,Zk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Db([0,.65,.55,1]),circOut:Db([.55,0,1,.45]),backIn:Db([.31,.01,.66,-.59]),backOut:Db([.33,1.53,.69,.99])};function HP(e,t){if(e)return typeof e=="function"?BP()?PP(e,t):"ease-out":RP(e)?Db(e):Array.isArray(e)?e.map(r=>HP(r,t)||Zk.easeOut):Zk[e]}function Dse(e,t,r,{delay:i=0,duration:s=300,repeat:l=0,repeatType:u="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const g=HP(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:u==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function GP(e){return typeof e=="function"&&"applyToOptions"in e}function zse({type:e,...t}){return GP(e)&&BP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class KP 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:u=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,MA(typeof t.type!="string");const h=zse(t);this.animation=Dse(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),qP(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(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ys(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ys(t)}get time(){return ys(Number(this.animation.currentTime)||0)}set time(t){const r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=os(t),r&&this.animation.pause()}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,rangeStart:r,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Nse()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),i&&(this.animation.rangeEnd=i),bs):s(this)}}const YP={anticipate:xP,backInOut:EP,circInOut:TP};function $se(e){return e in YP}function Pse(e){typeof e.ease=="string"&&$se(e.ease)&&(e.ease=YP[e.ease])}const J2=10;class Ise extends KP{constructor(t){Pse(t),LP(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:s,element:l,...u}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new VA({...u,autoplay:!1}),d=Math.max(J2,so.now()-this.startTime),h=nc(0,J2,d-J2),m=f.sample(d).value,{name:g}=this.options;l&&g&&qP(l,g,m),r.setWithVelocity(f.sample(Math.max(0,d-h)).value,m,h),f.stop()}}const Xk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tl.test(e)||e==="0")&&!e.startsWith("url("));function Lse(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 Use(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],u=Xk(s,t),f=Xk(l,t);return!u||!f?!1:Lse(e)||(r==="spring"||GP(r))&&i}function uR(e){e.duration=0,e.type="keyframes"}const Vse=new Set(["opacity","clipPath","filter","transform"]),qse=gP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Fse(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:s,damping:l,type:u}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return qse()&&r&&Vse.has(r)&&(r!=="transform"||!h)&&!d&&!i&&s!=="mirror"&&l!==0&&u!=="inertia"}const Bse=40;class Hse extends UA{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:u="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=so.now();const v={autoplay:t,delay:r,type:i,repeat:s,repeatDelay:l,repeatType:u,name:d,motionValue:h,element:m,...g},x=m?.KeyframeResolver||qA;this.keyframeResolver=new x(f,(b,w,S)=>this.onKeyframesResolved(b,w,v,!S),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,s){this.keyframeResolver=void 0;const{name:l,type:u,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=so.now();let g=!0;Use(t,l,u,f)||(g=!1,(Mf.instantAnimations||!d)&&m?.(LA(t,i,r)),t[0]=t[t.length-1],uR(i),i.repeat=0);const x={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Bse?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},b=g&&!h&&Fse(x),w=x.motionValue?.owner?.current,S=b?new Ise({...x,element:w}):new VA(x);S.finished.then(()=>{this.notifyFinished()}).catch(bs),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}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(),Mse()),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 ZP(e,t,r,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),u=e.size,f=(u-1)*i;return typeof r=="function"?r(l,u):s===1?l*i:f-l*i}const Gse=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Kse(e){const t=Gse.exec(e);if(!t)return[,];const[,r,i,s]=t;return[`--${r??i}`,s]}function XP(e,t,r=1){const[i,s]=Kse(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return hP(u)?parseFloat(u):u}return DA(s)?XP(s,t,r+1):s}const Yse={type:"spring",stiffness:500,damping:25,restSpeed:10},Zse=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xse={type:"keyframes",duration:.8},Qse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Wse=(e,{keyframes:t})=>t.length>2?Xse:$g.has(e)?e.startsWith("scale")?Zse(t[1]):Yse:Qse,Jse=e=>e!==null;function ele(e,{repeat:t,repeatType:r="loop"},i){const s=e.filter(Jse),l=t&&r!=="loop"&&t%2===1?0:s.length-1;return s[l]}function QP(e,t){if(e?.inherit&&t){const{inherit:r,...i}=e;return{...t,...i}}return e}function FA(e,t){const r=e?.[t]??e?.default??e;return r!==e?QP(r,e):r}function tle({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:s,repeat:l,repeatType:u,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const BA=(e,t,r,i={},s,l)=>u=>{const f=FA(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-os(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:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:s};tle(f)||Object.assign(m,Wse(e,m)),m.duration&&(m.duration=os(m.duration)),m.repeatDelay&&(m.repeatDelay=os(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(uR(m),m.delay===0&&(g=!0)),(Mf.instantAnimations||Mf.skipAnimations||s?.shouldSkipAnimations)&&(g=!0,uR(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,g&&!l&&t.get()!==void 0){const v=ele(m.keyframes,f);if(v!==void 0){mr.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new VA(m):new Hse(m)};function Qk(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function HA(e,t,r,i){if(typeof t=="function"){const[s,l]=Qk(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]=Qk(i);t=t(r!==void 0?r:e.custom,s,l)}return t}function Rp(e,t,r){const i=e.getProps();return HA(i,t,r!==void 0?r:i.custom,e)}const WP=new Set(["width","height","top","left","right","bottom",...zg]),Wk=30,nle=e=>!isNaN(parseFloat(e));class rle{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=so.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=so.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=nle(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 jA);const i=this.events[t].add(r);return t==="change"?()=>{i(),mr.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=so.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Wk)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Wk);return yP(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 mg(e,t){return new rle(e,t)}const fR=e=>Array.isArray(e);function ale(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,mg(r))}function ile(e){return fR(e)?e[e.length-1]||0:e}function ole(e,t){const r=Rp(e,t);let{transitionEnd:i={},transition:s={},...l}=r||{};l={...l,...i};for(const u in l){const f=ile(l[u]);ale(e,u,f)}}const wi=e=>!!(e&&e.getVelocity);function sle(e){return!!(wi(e)&&e.add)}function dR(e,t){const r=e.getValue("willChange");if(sle(r))return r.add(t);if(!r&&Mf.WillChange){const i=new Mf.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function GA(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const lle="framerAppearId",JP="data-"+GA(lle);function e8(e){return e.props[JP]}function cle({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function t8(e,t,{delay:r=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:u,...f}=t;const d=e.getDefaultTransition();l=l?QP(l,d):d;const h=l?.reduceMotion;i&&(l=i);const m=[],g=s&&e.animationState&&e.animationState.getState()[s];for(const v in f){const x=e.getValue(v,e.latestValues[v]??null),b=f[v];if(b===void 0||g&&cle(g,v))continue;const w={delay:r,...FA(l||{},v)},S=x.get();if(S!==void 0&&!x.isAnimating&&!Array.isArray(b)&&b===S&&!w.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const T=e8(e);if(T){const C=window.MotionHandoffAnimation(T,v,mr);C!==null&&(w.startTime=C,_=!0)}}dR(e,v);const E=h??e.shouldReduceMotion;x.start(BA(v,x,b,E&&WP.has(v)?{type:!1}:w,e,_));const O=x.animation;O&&m.push(O)}if(u){const v=()=>mr.update(()=>{u&&ole(e,u)});m.length?Promise.all(m).then(v):v()}return m}function hR(e,t,r={}){const i=Rp(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(t8(e,i,r)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=s;return ule(e,t,d,h,m,g,r)}:()=>Promise.resolve(),{when:f}=s;if(f){const[d,h]=f==="beforeChildren"?[l,u]:[u,l];return d().then(()=>h())}else return Promise.all([l(),u(r.delay)])}function ule(e,t,r=0,i=0,s=0,l=1,u){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(hR(d,t,{...u,delay:r+(typeof i=="function"?0:i)+ZP(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function fle(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>hR(e,l,r));i=Promise.all(s)}else if(typeof t=="string")i=hR(e,t,r);else{const s=typeof t=="function"?Rp(e,t,r.custom):t;i=Promise.all(t8(e,s,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}const dle={test:e=>e==="auto",parse:e=>e},n8=e=>t=>t.test(e),r8=[Dg,ut,Jl,lf,Loe,Ioe,dle],Jk=e=>r8.find(n8(e));function hle(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mP(e):!0}const ple=new Set(["brightness","contrast","saturate","opacity"]);function mle(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(zA)||[];if(!i)return e;const s=r.replace(i,"");let l=ple.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+s+")"}const gle=/\b([a-z-]*)\(.*?\)/gu,pR={...Tl,getAnimatableNone:e=>{const t=e.match(gle);return t?t.map(mle).join(" "):e}},mR={...Tl,getAnimatableNone:e=>{const t=Tl.parse(e);return Tl.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},e4={...Dg,transform:Math.round},yle={rotate:lf,rotateX:lf,rotateY:lf,rotateZ:lf,scale:fw,scaleX:fw,scaleY:fw,scaleZ:fw,skew:lf,skewX:lf,skewY:lf,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:y1,originX:Uk,originY:Uk,originZ:ut},KA={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,top:ut,right:ut,bottom:ut,left:ut,inset:ut,insetBlock:ut,insetBlockStart:ut,insetBlockEnd:ut,insetInline:ut,insetInlineStart:ut,insetInlineEnd:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,paddingBlock:ut,paddingBlockStart:ut,paddingBlockEnd:ut,paddingInline:ut,paddingInlineStart:ut,paddingInlineEnd:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,marginBlock:ut,marginBlockStart:ut,marginBlockEnd:ut,marginInline:ut,marginInlineStart:ut,marginInlineEnd:ut,fontSize:ut,backgroundPositionX:ut,backgroundPositionY:ut,...yle,zIndex:e4,fillOpacity:y1,strokeOpacity:y1,numOctaves:e4},vle={...KA,color:pa,backgroundColor:pa,outlineColor:pa,fill:pa,stroke:pa,borderColor:pa,borderTopColor:pa,borderRightColor:pa,borderBottomColor:pa,borderLeftColor:pa,filter:pR,WebkitFilter:pR,mask:mR,WebkitMask:mR},a8=e=>vle[e],ble=new Set([pR,mR]);function i8(e,t){let r=a8(e);return ble.has(r)||(r=Tl),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Sle=new Set(["auto","none","0"]);function wle(e,t,r){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!Sle.has(l)&&pg(l).values.length&&(s=e[i]),i++}if(s&&r)for(const l of t)e[l]=i8(r,s)}class Ele extends qA{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(),DA(g))){const v=XP(g,r.current);v!==void 0&&(t[m]=v),m===t.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!WP.has(i)||t.length!==2)return;const[s,l]=t,u=Jk(s),f=Jk(l),d=Lk(s),h=Lk(l);if(d!==h&&pf[i]){this.needsMeasurement=!0;return}if(u!==f)if(Yk(u)&&Yk(f))for(let m=0;m<t.length;m++){const g=t[m];typeof g=="string"&&(t[m]=parseFloat(g))}else pf[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||hle(t[s]))&&i.push(s);i.length&&wle(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=pf[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,u=i[l];i[l]=pf[r](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}const xle=new Set(["opacity","clipPath","filter","transform"]);function o8(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 s8=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function _le(e){return pP(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:YA}=OP(queueMicrotask,!1),wl={x:!1,y:!1};function l8(){return wl.x||wl.y}function Tle(e){return e==="x"||e==="y"?wl[e]?null:(wl[e]=!0,()=>{wl[e]=!1}):wl.x||wl.y?null:(wl.x=wl.y=!0,()=>{wl.x=wl.y=!1})}function c8(e,t){const r=o8(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[r,s,()=>i.abort()]}function Cle(e){return!(e.pointerType==="touch"||l8())}function Rle(e,t,r={}){const[i,s,l]=c8(e,r);return i.forEach(u=>{let f=!1,d=!1,h;const m=()=>{u.removeEventListener("pointerleave",b)},g=S=>{h&&(h(S),h=void 0),m()},v=S=>{f=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),d&&(d=!1,g(S))},x=()=>{f=!0,window.addEventListener("pointerup",v,s),window.addEventListener("pointercancel",v,s)},b=S=>{if(S.pointerType!=="touch"){if(f){d=!0;return}g(S)}},w=S=>{if(!Cle(S))return;d=!1;const _=t(u,S);typeof _=="function"&&(h=_,u.addEventListener("pointerleave",b,s))};u.addEventListener("pointerenter",w,s),u.addEventListener("pointerdown",x,s)}),l}const u8=(e,t)=>t?e===t?!0:u8(e,t.parentElement):!1,ZA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ole=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ale(e){return Ole.has(e.tagName)||e.isContentEditable===!0}const Mle=new Set(["INPUT","SELECT","TEXTAREA"]);function jle(e){return Mle.has(e.tagName)||e.isContentEditable===!0}const qw=new WeakSet;function t4(e){return t=>{t.key==="Enter"&&e(t)}}function eT(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const kle=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=t4(()=>{if(qw.has(r))return;eT(r,"down");const s=t4(()=>{eT(r,"up")}),l=()=>eT(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 n4(e){return ZA(e)&&!l8()}const r4=new WeakSet;function Nle(e,t,r={}){const[i,s,l]=c8(e,r),u=f=>{const d=f.currentTarget;if(!n4(f)||r4.has(f))return;qw.add(d),r.stopPropagation&&r4.add(f);const h=t(d,f),m=(x,b)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),qw.has(d)&&qw.delete(d),n4(x)&&typeof h=="function"&&h(x,{success:b})},g=x=>{m(x,d===window||d===document||r.useGlobalTarget||u8(d,x.target))},v=x=>{m(x,!1)};window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",v,s)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",u,s),_le(f)&&(f.addEventListener("focus",h=>kle(h,s)),!Ale(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function XA(e){return pP(e)&&"ownerSVGElement"in e}const Fw=new WeakMap;let Bw;const f8=(e,t,r)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:XA(i)&&"getBBox"in i?i.getBBox()[t]:i[r],Dle=f8("inline","width","offsetWidth"),zle=f8("block","height","offsetHeight");function $le({target:e,borderBoxSize:t}){Fw.get(e)?.forEach(r=>{r(e,{get width(){return Dle(e,t)},get height(){return zle(e,t)}})})}function Ple(e){e.forEach($le)}function Ile(){typeof ResizeObserver>"u"||(Bw=new ResizeObserver(Ple))}function Lle(e,t){Bw||Ile();const r=o8(e);return r.forEach(i=>{let s=Fw.get(i);s||(s=new Set,Fw.set(i,s)),s.add(t),Bw?.observe(i)}),()=>{r.forEach(i=>{const s=Fw.get(i);s?.delete(t),s?.size||Bw?.unobserve(i)})}}const Hw=new Set;let Bm;function Ule(){Bm=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Hw.forEach(t=>t(e))},window.addEventListener("resize",Bm)}function Vle(e){return Hw.add(e),Bm||Ule(),()=>{Hw.delete(e),!Hw.size&&typeof Bm=="function"&&(window.removeEventListener("resize",Bm),Bm=void 0)}}function a4(e,t){return typeof e=="function"?Vle(e):Lle(e,t)}function qle(e){return XA(e)&&e.tagName==="svg"}const Fle=[...r8,pa,Tl],Ble=e=>Fle.find(n8(e)),i4=()=>({translate:0,scale:1,origin:0,originPoint:0}),Hm=()=>({x:i4(),y:i4()}),o4=()=>({min:0,max:0}),Na=()=>({x:o4(),y:o4()}),Hle=new WeakMap;function Sx(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function v1(e){return typeof e=="string"||Array.isArray(e)}const QA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],WA=["initial",...QA];function wx(e){return Sx(e.animate)||WA.some(t=>v1(e[t]))}function d8(e){return!!(wx(e)||e.variants)}function Gle(e,t,r){for(const i in t){const s=t[i],l=r[i];if(wi(s))e.addValue(i,s);else if(wi(l))e.addValue(i,mg(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const u=e.getValue(i);u.liveStyle===!0?u.jump(s):u.hasAnimated||u.set(s)}else{const u=e.getStaticValue(i);e.addValue(i,mg(u!==void 0?u:s,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const gR={current:null},h8={current:!1},Kle=typeof window<"u";function Yle(){if(h8.current=!0,!!Kle)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gR.current=e.matches;e.addEventListener("change",t),t()}else gR.current=!1}const s4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let AE={};function p8(e){AE=e}function Zle(){return AE}class Xle{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:u,visualState:f},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=qA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 x=so.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,mr.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=f;this.latestValues=h,this.baseTarget={...h},this.initialValues=r.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=d,this.blockInitialAnimation=!!u,this.isControllingVariants=wx(r),this.isVariantNode=d8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...v}=this.scrapeMotionValuesFromProps(r,{},this);for(const x in v){const b=v[x];h[x]!==void 0&&wi(b)&&b.set(h[x])}}mount(t){if(this.hasBeenMounted)for(const r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,Hle.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:(h8.current||Yle(),this.shouldReduceMotion=gR.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),jf(this.notifyUpdate),jf(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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&xle.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:f,times:d,ease:h,duration:m}=r.accelerate,g=new KP({element:this.current,name:t,keyframes:f,times:d,ease:h,duration:os(m)}),v=u(g);this.valueSubscriptions.set(t,()=>{v(),g.cancel()});return}const i=$g.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&mr.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 AE){const r=AE[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):Na()}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<s4.length;i++){const s=s4[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,u=t[l];u&&(this.propEventSubscriptions[s]=this.on(s,u))}this.prevMotionValues=Gle(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=mg(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"&&(hP(i)||mP(i))?i=parseFloat(i):!Ble(i)&&Tl.test(r)&&(i=i8(t,r)),this.setBaseTarget(t,wi(i)?i.get():i)),wi(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=HA(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&&!wi(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 jA),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){YA.render(this.render)}}class m8 extends Xle{constructor(){super(...arguments),this.KeyframeResolver=Ele}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;wi(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Bf{constructor(t){this.isMounted=!1,this.node=t}update(){}}function g8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function Qle({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wle(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 tT(e){return e===void 0||e===1}function yR({scale:e,scaleX:t,scaleY:r}){return!tT(e)||!tT(t)||!tT(r)}function vp(e){return yR(e)||y8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function y8(e){return l4(e.x)||l4(e.y)}function l4(e){return e&&e!=="0%"}function ME(e,t,r){const i=e-r,s=t*i;return r+s}function c4(e,t,r,i,s){return s!==void 0&&(e=ME(e,s,i)),ME(e,r,i)+t}function vR(e,t=0,r=1,i,s){e.min=c4(e.min,t,r,i,s),e.max=c4(e.max,t,r,i,s)}function v8(e,{x:t,y:r}){vR(e.x,t.translate,t.scale,t.originPoint),vR(e.y,r.translate,r.scale,r.originPoint)}const u4=.999999999999,f4=1.0000000000001;function Jle(e,t,r,i=!1){const s=r.length;if(!s)return;t.x=t.y=1;let l,u;for(let f=0;f<s;f++){l=r[f],u=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&&Km(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,v8(e,u)),i&&vp(l.latestValues)&&Km(e,l.latestValues,l.layout?.layoutBox))}t.x<f4&&t.x>u4&&(t.x=1),t.y<f4&&t.y>u4&&(t.y=1)}function Gm(e,t){e.min=e.min+t,e.max=e.max+t}function d4(e,t,r,i,s=.5){const l=Vr(e.min,e.max,s);vR(e,t,r,l,i)}function h4(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Km(e,t,r){const i=r??e;d4(e.x,h4(t.x,i.x),t.scaleX,t.scale,t.originX),d4(e.y,h4(t.y,i.y),t.scaleY,t.scale,t.originY)}function b8(e,t){return g8(Wle(e.getBoundingClientRect(),t))}function ece(e,t,r){const i=b8(e,r),{scroll:s}=t;return s&&(Gm(i.x,s.offset.x),Gm(i.y,s.offset.y)),i}const tce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nce=zg.length;function rce(e,t,r){let i="",s=!0;for(let l=0;l<nce;l++){const u=zg[l],f=e[u];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(u.startsWith("scale")?1:0);else{const h=parseFloat(f);d=u.startsWith("scale")?h===1:h===0}if(!d||r){const h=s8(f,KA[u]);if(!d){s=!1;const m=tce[u]||u;i+=`${m}(${h}) `}r&&(t[u]=h)}}return i=i.trim(),r?i=r(t,s?"":i):s&&(i="none"),i}function JA(e,t,r){const{style:i,vars:s,transformOrigin:l}=e;let u=!1,f=!1;for(const d in t){const h=t[d];if($g.has(d)){u=!0;continue}else if(MP(d)){s[d]=h;continue}else{const m=s8(h,KA[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(u||r?i.transform=rce(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 S8(e,{style:t,vars:r},i,s){const l=e.style;let u;for(u in t)l[u]=t[u];s?.applyProjectionStyles(l,i);for(u in r)l.setProperty(u,r[u])}function p4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wb={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ut.test(e))e=parseFloat(e);else return e;const r=p4(e,t.target.x),i=p4(e,t.target.y);return`${r}% ${i}%`}},ace={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,s=Tl.parse(e);if(s.length>5)return i;const l=Tl.createTransformer(e),u=typeof s[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;s[0+u]/=f,s[1+u]/=d;const h=Vr(f,d,.5);return typeof s[2+u]=="number"&&(s[2+u]/=h),typeof s[3+u]=="number"&&(s[3+u]/=h),l(s)}},bR={borderRadius:{...wb,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wb,borderTopRightRadius:wb,borderBottomLeftRadius:wb,borderBottomRightRadius:wb,boxShadow:ace};function w8(e,{layout:t,layoutId:r}){return $g.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!bR[e]||e==="opacity")}function eM(e,t,r){const i=e.style,s=t?.style,l={};if(!i)return l;for(const u in i)(wi(i[u])||s&&wi(s[u])||w8(u,e)||r?.getValue(u)?.liveStyle!==void 0)&&(l[u]=i[u]);return l}function ice(e){return window.getComputedStyle(e)}class oce extends m8{constructor(){super(...arguments),this.type="html",this.renderInstance=S8}readValueFromInstance(t,r){if($g.has(r))return this.projection?.isProjecting?iR(r):Tse(t,r);{const i=ice(t),s=(MP(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return b8(t,r)}build(t,r,i){JA(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return eM(t,r,i)}}const sce={offset:"stroke-dashoffset",array:"stroke-dasharray"},lce={offset:"strokeDashoffset",array:"strokeDasharray"};function cce(e,t,r=1,i=0,s=!0){e.pathLength=1;const l=s?sce:lce;e[l.offset]=`${-i}`,e[l.array]=`${t} ${r}`}const uce=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function E8(e,{attrX:t,attrY:r,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:u=0,...f},d,h,m){if(JA(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 x of uce)g[x]!==void 0&&(v[x]=g[x],delete g[x]);t!==void 0&&(g.x=t),r!==void 0&&(g.y=r),i!==void 0&&(g.scale=i),s!==void 0&&cce(g,s,l,u,!1)}const x8=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"]),_8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fce(e,t,r,i){S8(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(x8.has(s)?s:GA(s),t.attrs[s])}function T8(e,t,r){const i=eM(e,t,r);for(const s in e)if(wi(e[s])||wi(t[s])){const l=zg.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class dce extends m8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Na}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if($g.has(r)){const i=a8(r);return i&&i.default||0}return r=x8.has(r)?r:GA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return T8(t,r,i)}build(t,r,i){E8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,s){fce(t,r,i,s)}mount(t){this.isSVGTag=_8(t.tagName),super.mount(t)}}const hce=WA.length;function C8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?C8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<hce;r++){const i=WA[r],s=e.props[i];(v1(s)||s===!1)&&(t[i]=s)}return t}function R8(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 pce=[...QA].reverse(),mce=QA.length;function gce(e){return t=>Promise.all(t.map(({animation:r,options:i})=>fle(e,r,i)))}function yce(e){let t=gce(e),r=m4(),i=!0,s=!1;const l=h=>(m,g)=>{const v=Rp(e,g,h==="exit"?e.presenceContext?.custom:void 0);if(v){const{transition:x,transitionEnd:b,...w}=v;m={...m,...w,...b}}return m};function u(h){t=h(e)}function f(h){const{props:m}=e,g=C8(e.parent)||{},v=[],x=new Set;let b={},w=1/0;for(let _=0;_<mce;_++){const E=pce[_],O=r[E],T=m[E]!==void 0?m[E]:g[E],C=v1(T),R=E===h?O.isActive:null;R===!1&&(w=_);let M=T===g[E]&&T!==m[E]&&C;if(M&&(i||s)&&e.manuallyAnimateOnMount&&(M=!1),O.protectedKeys={...b},!O.isActive&&R===null||!T&&!O.prevProp||Sx(T)||typeof T=="boolean")continue;if(E==="exit"&&O.isActive&&R!==!0){O.prevResolvedValues&&(b={...b,...O.prevResolvedValues});continue}const D=vce(O.prevProp,T);let I=D||E===h&&O.isActive&&!M&&C||_>w&&C,B=!1;const V=Array.isArray(T)?T:[T];let F=V.reduce(l(E),{});R===!1&&(F={});const{prevResolvedValues:G={}}=O,W={...G,...F},te=re=>{I=!0,x.has(re)&&(B=!0,x.delete(re)),O.needsAnimating[re]=!0;const le=e.getValue(re);le&&(le.liveStyle=!1)};for(const re in W){const le=F[re],ae=G[re];if(b.hasOwnProperty(re))continue;let N=!1;fR(le)&&fR(ae)?N=!R8(le,ae):N=le!==ae,N?le!=null?te(re):x.add(re):le!==void 0&&x.has(re)?te(re):O.protectedKeys[re]=!0}O.prevProp=T,O.prevResolvedValues=F,O.isActive&&(b={...b,...F}),(i||s)&&e.blockInitialAnimation&&(I=!1);const H=M&&D;I&&(!H||B)&&v.push(...V.map(re=>{const le={type:E};if(typeof re=="string"&&(i||s)&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:ae}=e,N=Rp(ae,re);if(ae.enteringChildren&&N){const{delayChildren:U}=N.transition||{};le.delay=ZP(ae.enteringChildren,e,U)}}return{animation:re,options:le}}))}if(x.size){const _={};if(typeof m.initial!="boolean"){const E=Rp(e,Array.isArray(m.initial)?m.initial[0]:m.initial);E&&E.transition&&(_.transition=E.transition)}x.forEach(E=>{const O=e.getBaseTarget(E),T=e.getValue(E);T&&(T.liveStyle=!0),_[E]=O??null}),v.push({animation:_})}let S=!!v.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(S=!1),i=!1,s=!1,S?t(v):Promise.resolve()}function d(h,m){if(r[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(v=>v.animationState?.setActive(h,m)),r[h].isActive=m;const g=f(h);for(const v in r)r[v].protectedKeys={};return g}return{animateChanges:f,setActive:d,setAnimateFunction:u,getState:()=>r,reset:()=>{r=m4(),s=!0}}}function vce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!R8(t,e):!1}function hp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function m4(){return{animate:hp(!0),whileInView:hp(),whileHover:hp(),whileTap:hp(),whileDrag:hp(),whileFocus:hp(),exit:hp()}}function SR(e,t){e.min=t.min,e.max=t.max}function bl(e,t){SR(e.x,t.x),SR(e.y,t.y)}function g4(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const O8=1e-4,bce=1-O8,Sce=1+O8,A8=.01,wce=0-A8,Ece=0+A8;function lo(e){return e.max-e.min}function xce(e,t,r){return Math.abs(e-t)<=r}function y4(e,t,r,i=.5){e.origin=i,e.originPoint=Vr(t.min,t.max,e.origin),e.scale=lo(r)/lo(t),e.translate=Vr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=bce&&e.scale<=Sce||isNaN(e.scale))&&(e.scale=1),(e.translate>=wce&&e.translate<=Ece||isNaN(e.translate))&&(e.translate=0)}function Yb(e,t,r,i){y4(e.x,t.x,r.x,i?i.originX:void 0),y4(e.y,t.y,r.y,i?i.originY:void 0)}function v4(e,t,r){e.min=r.min+t.min,e.max=e.min+lo(t)}function _ce(e,t,r){v4(e.x,t.x,r.x),v4(e.y,t.y,r.y)}function b4(e,t,r){e.min=t.min-r.min,e.max=e.min+lo(t)}function jE(e,t,r){b4(e.x,t.x,r.x),b4(e.y,t.y,r.y)}function S4(e,t,r,i,s){return e-=t,e=ME(e,1/r,i),s!==void 0&&(e=ME(e,1/s,i)),e}function Tce(e,t=0,r=1,i=.5,s,l=e,u=e){if(Jl.test(t)&&(t=parseFloat(t),t=Vr(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=Vr(l.min,l.max,i);e===l&&(f-=t),e.min=S4(e.min,t,r,f,s),e.max=S4(e.max,t,r,f,s)}function w4(e,t,[r,i,s],l,u){Tce(e,t[r],t[i],t[s],t.scale,l,u)}const Cce=["x","scaleX","originX"],Rce=["y","scaleY","originY"];function E4(e,t,r,i){w4(e.x,t,Cce,r?r.x:void 0,i?i.x:void 0),w4(e.y,t,Rce,r?r.y:void 0,i?i.y:void 0)}function x4(e){return e.translate===0&&e.scale===1}function M8(e){return x4(e.x)&&x4(e.y)}function _4(e,t){return e.min===t.min&&e.max===t.max}function Oce(e,t){return _4(e.x,t.x)&&_4(e.y,t.y)}function T4(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function j8(e,t){return T4(e.x,t.x)&&T4(e.y,t.y)}function C4(e){return lo(e.x)/lo(e.y)}function R4(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vl(e){return[e("x"),e("y")]}function Ace(e,t,r){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,u=r?.z||0;if((s||l||u)&&(i=`translate3d(${s}px, ${l}px, ${u}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:x,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),g&&(i+=`rotateX(${g}deg) `),v&&(i+=`rotateY(${v}deg) `),x&&(i+=`skewX(${x}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 k8=["TopLeft","TopRight","BottomLeft","BottomRight"],Mce=k8.length,O4=e=>typeof e=="string"?parseFloat(e):e,A4=e=>typeof e=="number"||ut.test(e);function jce(e,t,r,i,s,l){s?(e.opacity=Vr(0,r.opacity??1,kce(i)),e.opacityExit=Vr(t.opacity??1,0,Nce(i))):l&&(e.opacity=Vr(t.opacity??1,r.opacity??1,i));for(let u=0;u<Mce;u++){const f=`border${k8[u]}Radius`;let d=M4(t,f),h=M4(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||A4(d)===A4(h)?(e[f]=Math.max(Vr(O4(d),O4(h),i),0),(Jl.test(h)||Jl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Vr(t.rotate||0,r.rotate||0,i))}function M4(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const kce=N8(0,.5,_P),Nce=N8(.5,.95,bs);function N8(e,t,r){return i=>i<e?0:i>t?1:r(g1(e,t,i))}function Dce(e,t,r){const i=wi(e)?e:mg(e);return i.start(BA("",i,t,r)),i.animation}function b1(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}const zce=(e,t)=>e.depth-t.depth;class $ce{constructor(){this.children=[],this.isDirty=!1}add(t){AA(this.children,t),this.isDirty=!0}remove(t){TE(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zce),this.isDirty=!1,this.children.forEach(t)}}function Pce(e,t){const r=so.now(),i=({timestamp:s})=>{const l=s-r;l>=t&&(jf(i),e(l-t))};return mr.setup(i,!0),()=>jf(i)}function Gw(e){return wi(e)?e.get():e}class Ice{constructor(){this.members=[]}add(t){AA(this.members,t);for(let r=this.members.length-1;r>=0;r--){const i=this.members[r];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(TE(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(TE(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){for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:l}=t.options;(s===void 0||s!==l)&&(t.resumeFrom=i,r&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Kw={hasAnimatedSinceResize:!0,hasEverUpdated:!1},nT=["","X","Y","Z"],Lce=1e3;let Uce=0;function rT(e,t,r,i){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function D8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=e8(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",mr,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&D8(i)}function z8({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(u={},f=t?.()){this.id=Uce++,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(Fce),this.nodes.forEach(Kce),this.nodes.forEach(Yce),this.nodes.forEach(Bce)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,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 $ce)}addEventListener(u,f){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new jA),this.eventHandlers.get(u).add(f)}notifyListeners(u,...f){const d=this.eventHandlers.get(u);d&&d.notify(...f)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=XA(u)&&!qle(u),this.instance=u;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(u),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;mr.read(()=>{g=window.innerWidth}),e(u,()=>{const x=window.innerWidth;x!==g&&(g=x,this.root.updateBlockedByResize=!0,m&&m(),m=Pce(v,250),Kw.hasAnimatedSinceResize&&(Kw.hasAnimatedSinceResize=!1,this.nodes.forEach(N4)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||Jce,{onLayoutAnimationStart:w,onLayoutAnimationComplete:S}=h.getProps(),_=!this.targetLayout||!j8(this.targetLayout,x),E=!g&&v;if(this.options.layoutRoot||this.resumeFrom||E||g&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const O={...FA(b,"layout"),onPlay:w,onComplete:S};(h.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O),this.setAnimationOrigin(m,E)}else g||N4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jf(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(Zce),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&D8(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,(typeof g.latestValues.x=="string"||typeof g.latestValues.y=="string")&&(g.isLayoutDirty=!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(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(j4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(k4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Gce),this.nodes.forEach(Vce),this.nodes.forEach(qce)):this.nodes.forEach(k4),this.clearAllSnapshots();const f=so.now();gi.delta=nc(0,1e3/60,f-gi.timestamp),gi.timestamp=f,gi.isProcessing=!0,Y2.update.process(gi),Y2.preRender.process(gi),Y2.render.process(gi),gi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,YA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hce),this.sharedNodes.forEach(Xce)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!lo(this.snapshot.measuredBox.x)&&!lo(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 u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Na(),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,u?u.layoutBox:void 0)}updateScroll(u="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!M8(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;u&&this.instance&&(f||vp(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return u&&(d=this.removeTransform(d)),eue(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return Na();const f=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(tue))){const{scroll:h}=this.root;h&&(Gm(f.x,h.offset.x),Gm(f.y,h.offset.y))}return f}removeElementScroll(u){const f=Na();if(bl(f,u),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&&bl(f,u),Gm(f.x,m.offset.x),Gm(f.y,m.offset.y))}return f}applyTransform(u,f=!1){const d=Na();bl(d,u);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Km(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),vp(m.latestValues)&&Km(d,m.latestValues,m.layout?.layoutBox)}return vp(this.latestValues)&&Km(d,this.latestValues,this.layout?.layoutBox),d}removeTransform(u){const f=Na();bl(f,u);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!vp(h.latestValues))continue;let m;h.instance&&(yR(h.latestValues)&&h.updateSnapshot(),m=Na(),bl(m,h.measurePageBox())),E4(f,h.latestValues,h.snapshot?.layoutBox,m)}return vp(this.latestValues)&&E4(f,this.latestValues),f}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==gi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!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(!(u||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=gi.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=Na(),this.targetWithTransforms=Na()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_ce(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):bl(this.target,this.layout.layoutBox),v8(this.target,this.targetDelta)):bl(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||yR(this.parent.latestValues)||y8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,f,d){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Na(),this.relativeTargetOrigin=Na(),jE(this.relativeTargetOrigin,f,d),bl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),f=!!this.resumingFrom||this!==u;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===gi.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;bl(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;Jle(this.layoutCorrected,this.treeScale,this.path,f),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Na());const{target:x}=u;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(g4(this.prevProjectionDelta.x,this.projectionDelta.x),g4(this.prevProjectionDelta.y,this.projectionDelta.y)),Yb(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!R4(this.projectionDelta.x,this.prevProjectionDelta.x)||!R4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Hm(),this.projectionDelta=Hm(),this.projectionDeltaWithTransform=Hm()}setAnimationOrigin(u,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},g=Hm();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Na(),x=d?d.source:void 0,b=this.layout?this.layout.source:void 0,w=x!==b,S=this.getStack(),_=!S||S.members.length<=1,E=!!(w&&!_&&this.options.crossfade===!0&&!this.path.some(Wce));this.animationProgress=0;let O;this.mixTargetDelta=T=>{const C=T/1e3;D4(g.x,u.x,C),D4(g.y,u.y,C),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jE(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qce(this.relativeTarget,this.relativeTargetOrigin,v,C),O&&Oce(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Na()),bl(O,this.relativeTarget)),w&&(this.animationValues=m,jce(m,h,this.latestValues,C,E,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(jf(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mr.update(()=>{Kw.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=mg(0)),this.motionValue.jump(0,!1),this.currentAnimation=Dce(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Lce),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=u;if(!(!f||!d||!h)){if(this!==u&&this.layout&&h&&$8(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Na();const g=lo(this.layout.layoutBox.x);d.x.min=u.target.x.min,d.x.max=d.x.min+g;const v=lo(this.layout.layoutBox.y);d.y.min=u.target.y.min,d.y.max=d.y.min+v}bl(f,d),Km(f,m),Yb(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new Ice),this.sharedNodes.get(u).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 u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:d}=u;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&rT("z",u,h,this.animationValues);for(let m=0;m<nT.length;m++)rT(`rotate${nT[m]}`,u,h,this.animationValues),rT(`skew${nT[m]}`,u,h,this.animationValues);u.render();for(const m in h)u.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);u.scheduleRender()}applyProjectionStyles(u,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Gw(f?.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Gw(f?.pointerEvents)||""),this.hasProjected&&!vp(this.latestValues)&&(u.transform=d?d({},""):"none",this.hasProjected=!1);return}u.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let g=Ace(this.projectionDeltaWithTransform,this.treeScale,m);d&&(g=d(m,g)),u.transform=g;const{x:v,y:x}=this.projectionDelta;u.transformOrigin=`${v.origin*100}% ${x.origin*100}% 0`,h.animationValues?u.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in bR){if(m[b]===void 0)continue;const{correct:w,applyTo:S,isCSSVariable:_}=bR[b],E=g==="none"?m[b]:w(m[b],h);if(S){const O=S.length;for(let T=0;T<O;T++)u[S[T]]=E}else _?this.options.visualElement.renderState.vars[b]=E:u[b]=E}this.options.layoutId&&(u.pointerEvents=h===this?Gw(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(j4),this.root.sharedNodes.clear()}}}function Vce(e){e.updateLayout()}function qce(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;if(s==="size")Vl(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=lo(g);g.min=r[m].min,g.max=g.min+v});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";SR(l?t.measuredBox[m]:t.layoutBox[m],r[m])}else $8(s,t.layoutBox,r)&&Vl(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=lo(r[m]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const u=Hm();Yb(u,r,t.layoutBox);const f=Hm();l?Yb(f,e.applyTransform(i,!0),t.measuredBox):Yb(f,r,t.layoutBox);const d=!M8(u);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:v}=m;if(g&&v){const x=Na();jE(x,t.layoutBox,g.layoutBox);const b=Na();jE(b,r,v.layoutBox),j8(x,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=x,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Fce(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 Bce(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hce(e){e.clearSnapshot()}function j4(e){e.clearMeasurements()}function k4(e){e.isLayoutDirty=!1}function Gce(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function N4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kce(e){e.resolveTargetDelta()}function Yce(e){e.calcProjection()}function Zce(e){e.resetSkewAndRotation()}function Xce(e){e.removeLeadSnapshot()}function D4(e,t,r){e.translate=Vr(t.translate,0,r),e.scale=Vr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function z4(e,t,r,i){e.min=Vr(t.min,r.min,i),e.max=Vr(t.max,r.max,i)}function Qce(e,t,r,i){z4(e.x,t.x,r.x,i),z4(e.y,t.y,r.y,i)}function Wce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Jce={duration:.45,ease:[.4,0,.1,1]},$4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),P4=$4("applewebkit/")&&!$4("chrome/")?Math.round:bs;function I4(e){e.min=P4(e.min),e.max=P4(e.max)}function eue(e){I4(e.x),I4(e.y)}function $8(e,t,r){return e==="position"||e==="preserve-aspect"&&!xce(C4(t),C4(r),.2)}function tue(e){return e!==e.root&&e.scroll?.wasRoot}const nue=z8({attachResizeListener:(e,t)=>b1(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),aT={current:void 0},P8=z8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!aT.current){const e=new nue({});e.mount(window),e.setOptions({layoutScroll:!0}),aT.current=e}return aT.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),I8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function rue(e=!0){const t=j.useContext(OA);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 u=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,u]:[!0]}const L8=j.createContext({strict:!1}),L4={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 U4=!1;function aue(){if(U4)return;const e={};for(const t in L4)e[t]={isEnabled:r=>L4[t].some(i=>!!r[i])};p8(e),U4=!0}function U8(){return aue(),Zle()}function iue(e){const t=U8();for(const r in e)t[r]={...t[r],...e[r]};p8(t)}const oue=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","propagate","ignoreStrict","viewport"]);function kE(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oue.has(e)}let V8=e=>!kE(e);function sue(e){typeof e=="function"&&(V8=t=>t.startsWith("on")?!kE(t):e(t))}try{sue(require("@emotion/is-prop-valid").default)}catch{}function lue(e,t,r){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||wi(e[s])||(V8(s)||r===!0&&kE(s)||!t&&!kE(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Ex=j.createContext({});function cue(e,t){if(wx(e)){const{initial:r,animate:i}=e;return{initial:r===!1||v1(r)?r:void 0,animate:v1(i)?i:void 0}}return e.inherit!==!1?t:{}}function uue(e){const{initial:t,animate:r}=cue(e,j.useContext(Ex));return j.useMemo(()=>({initial:t,animate:r}),[V4(t),V4(r)])}function V4(e){return Array.isArray(e)?e.join(" "):e}const tM=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function q8(e,t,r){for(const i in t)!wi(t[i])&&!w8(i,r)&&(e[i]=t[i])}function fue({transformTemplate:e},t){return j.useMemo(()=>{const r=tM();return JA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function due(e,t){const r=e.style||{},i={};return q8(i,r,e),Object.assign(i,fue(e,t)),i}function hue(e,t){const r={},i=due(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 F8=()=>({...tM(),attrs:{}});function pue(e,t,r,i){const s=j.useMemo(()=>{const l=F8();return E8(l,t,_8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};q8(l,e.style,e),s.style={...l,...s.style}}return s}const mue=["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 nM(e){return typeof e!="string"||e.includes("-")?!1:!!(mue.indexOf(e)>-1||/[A-Z]/u.test(e))}function gue(e,t,r,{latestValues:i},s,l=!1,u){const d=(u??nM(e)?pue:hue)(t,i,s,e),h=lue(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:g}=t,v=j.useMemo(()=>wi(g)?g.get():g,[g]);return j.createElement(e,{...m,children:v})}function yue({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,s){return{latestValues:vue(r,i,s,e),renderState:t()}}function vue(e,t,r,i){const s={},l=i(e,{});for(const v in l)s[v]=Gw(l[v]);let{initial:u,animate:f}=e;const d=wx(e),h=d8(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||u===!1;const g=m?f:u;if(g&&typeof g!="boolean"&&!Sx(g)){const v=Array.isArray(g)?g:[g];for(let x=0;x<v.length;x++){const b=HA(e,v[x]);if(b){const{transitionEnd:w,transition:S,..._}=b;for(const E in _){let O=_[E];if(Array.isArray(O)){const T=m?O.length-1:0;O=O[T]}O!==null&&(s[E]=O)}for(const E in w)s[E]=w[E]}}}return s}const B8=e=>(t,r)=>{const i=j.useContext(Ex),s=j.useContext(OA),l=()=>yue(e,t,i,s);return r?l():yoe(l)},bue=B8({scrapeMotionValuesFromProps:eM,createRenderState:tM}),Sue=B8({scrapeMotionValuesFromProps:T8,createRenderState:F8}),wue=Symbol.for("motionComponentSymbol");function Eue(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);const u=i.current;if(typeof u=="function")if(l){const f=u(l);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):u(l);else u&&(u.current=l);t&&(l?t.mount(l):t.unmount())},[t])}const H8=j.createContext({});function km(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xue(e,t,r,i,s,l){const{visualElement:u}=j.useContext(Ex),f=j.useContext(L8),d=j.useContext(OA),h=j.useContext(I8),m=h.reducedMotion,g=h.skipAnimations,v=j.useRef(null),x=j.useRef(!1);i=i||f.renderer,!v.current&&i&&(v.current=i(e,{visualState:t,parent:u,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:g,isSVG:l}),x.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,w=j.useContext(H8);b&&!b.projection&&s&&(b.type==="html"||b.type==="svg")&&_ue(v.current,r,s,w);const S=j.useRef(!1);j.useInsertionEffect(()=>{b&&S.current&&b.update(r,d)});const _=r[JP],E=j.useRef(!!_&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return boe(()=>{x.current=!0,b&&(S.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),E.current&&b.animationState&&b.animationState.animateChanges())}),j.useEffect(()=>{b&&(!E.current&&b.animationState&&b.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),E.current=!1),b.enteringChildren=void 0)}),b}function _ue(e,t,r,i){const{layoutId:s,layout:l,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:G8(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!u||f&&km(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function G8(e){if(e)return e.options.allowProjection!==!1?e.projection:G8(e.parent)}function iT(e,{forwardMotionProps:t=!1,type:r}={},i,s){i&&iue(i);const l=r?r==="svg":nM(e),u=l?Sue:bue;function f(h,m){let g;const v={...j.useContext(I8),...h,layoutId:Tue(h)},{isStatic:x}=v,b=uue(h),w=u(h,x);if(!x&&typeof window<"u"){Cue();const S=Rue(v);g=S.MeasureLayout,b.visualElement=xue(e,w,v,s,S.ProjectionNode,l)}return k.jsxs(Ex.Provider,{value:b,children:[g&&b.visualElement?k.jsx(g,{visualElement:b.visualElement,...v}):null,gue(e,h,Eue(w,b.visualElement,m),w,x,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[wue]=e,d}function Tue({layoutId:e}){const t=j.useContext(dP).id;return t&&e!==void 0?t+"-"+e:e}function Cue(e,t){j.useContext(L8).strict}function Rue(e){const t=U8(),{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 Oue(e,t){if(typeof Proxy>"u")return iT;const r=new Map,i=(l,u)=>iT(l,u,e,t),s=(l,u)=>i(l,u);return new Proxy(s,{get:(l,u)=>u==="create"?i:(r.has(u)||r.set(u,iT(u,void 0,e,t)),r.get(u))})}const Aue=(e,t)=>t.isSVG??nM(e)?new dce(t):new oce(t,{allowProjection:e!==j.Fragment});class Mue extends Bf{constructor(t){super(t),t.animationState||(t.animationState=yce(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Sx(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 jue=0;class kue extends Bf{constructor(){super(...arguments),this.id=jue++,this.isExitComplete=!1}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;if(t&&i===!1){if(this.isExitComplete){const{initial:l,custom:u}=this.node.getProps();if(typeof l=="string"){const f=Rp(this.node,l,u);if(f){const{transition:d,transitionEnd:h,...m}=f;for(const g in m)this.node.getValue(g)?.jump(m[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Nue={animation:{Feature:Mue},exit:{Feature:kue}};function J1(e){return{point:{x:e.pageX,y:e.pageY}}}const Due=e=>t=>ZA(t)&&e(t,J1(t));function Zb(e,t,r,i){return b1(e,t,Due(r),i)}const K8=({current:e})=>e?e.ownerDocument.defaultView:null,q4=(e,t)=>Math.abs(e-t);function zue(e,t){const r=q4(e.x,t.x),i=q4(e.y,t.y);return Math.sqrt(r**2+i**2)}const F4=new Set(["auto","scroll"]);class Y8{constructor(t,r,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=dw(this.lastRawMoveEventInfo,this.transformPagePoint));const x=oT(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,w=zue(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!w)return;const{point:S}=x,{timestamp:_}=gi;this.history.push({...S,timestamp:_});const{onStart:E,onMove:O}=this.handlers;b||(E&&E(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),O&&O(this.lastMoveEvent,x)},this.handlePointerMove=(x,b)=>{this.lastMoveEvent=x,this.lastRawMoveEventInfo=b,this.lastMoveEventInfo=dw(b,this.transformPagePoint),mr.update(this.updatePoint,!0)},this.handlePointerUp=(x,b)=>{this.end();const{onEnd:w,onSessionEnd:S,resumeAnimation:_}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=oT(x.type==="pointercancel"?this.lastMoveEventInfo:dw(b,this.transformPagePoint),this.history);this.startEvent&&w&&w(x,E),S&&S(x,E)},!ZA(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=s||window;const d=J1(t),h=dw(d,this.transformPagePoint),{point:m}=h,{timestamp:g}=gi;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=r;v&&v(t,oT(h,this.history)),this.removeListeners=X1(Zb(this.contextWindow,"pointermove",this.handlePointerMove),Zb(this.contextWindow,"pointerup",this.handlePointerUp),Zb(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let r=t.parentElement;for(;r;){const i=getComputedStyle(r);(F4.has(i.overflowX)||F4.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}),window.addEventListener("scroll",this.onWindowScroll),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),mr.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jf(this.updatePoint)}}function dw(e,t){return t?{point:t(e.point)}:e}function B4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oT({point:e},t){return{point:e,delta:B4(e,Z8(t)),offset:B4(e,$ue(t)),velocity:Pue(t,.1)}}function $ue(e){return e[0]}function Z8(e){return e[e.length-1]}function Pue(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const s=Z8(e);for(;r>=0&&(i=e[r],!(s.timestamp-i.timestamp>os(t)));)r--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>os(t)*2&&(i=e[1]);const l=ys(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const u={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function Iue(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Vr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Vr(r,e,i.max):Math.min(e,r)),e}function H4(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 Lue(e,{top:t,left:r,bottom:i,right:s}){return{x:H4(e.x,r,s),y:H4(e.y,t,i)}}function G4(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 Uue(e,t){return{x:G4(e.x,t.x),y:G4(e.y,t.y)}}function Vue(e,t){let r=.5;const i=lo(e),s=lo(t);return s>i?r=g1(t.min,t.max-i,e.min):i>s&&(r=g1(e.min,e.max-s,t.min)),nc(0,1,r)}function que(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 wR=.35;function Fue(e=wR){return e===!1?e=0:e===!0&&(e=wR),{x:K4(e,"left","right"),y:K4(e,"top","bottom")}}function K4(e,t,r){return{min:Y4(e,t),max:Y4(e,r)}}function Y4(e,t){return typeof e=="number"?e:e[t]||0}const Bue=new WeakMap;class Hue{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=Na(),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.snapToCursor(J1(g).point),this.stopAnimation()},u=(g,v)=>{const{drag:x,dragPropagation:b,onDragStart:w}=this.getProps();if(x&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Tle(x),!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),Vl(_=>{let E=this.getAxisMotionValue(_).get()||0;if(Jl.test(E)){const{projection:O}=this.visualElement;if(O&&O.layout){const T=O.layout.layoutBox[_];T&&(E=lo(T)*(parseFloat(E)/100))}}this.originPoint[_]=E}),w&&mr.update(()=>w(g,v),!1,!0),dR(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},f=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:b,onDirectionLock:w,onDrag:S}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:_}=v;if(b&&this.currentDirection===null){this.currentDirection=Kue(_),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",v.point,_),this.updateAxis("y",v.point,_),this.visualElement.render(),S&&mr.update(()=>S(g,v),!1,!0)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new Y8(t,{onSessionStart:l,onStart:u,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:K8(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:u}=s;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&mr.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||!hw(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(u=Iue(u,this.constraints[t],this.elastic[t])),l.set(u)}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&&km(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Lue(i.layoutBox,t):this.constraints=!1,this.elastic=Fue(r),s!==this.constraints&&!km(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Vl(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=que(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!km(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=ece(i,s.root,this.visualElement.getTransformPagePoint());let u=Uue(s.layout.layoutBox,l);if(r){const f=r(Qle(u));this.hasMutatedConstraints=!!f,f&&(u=g8(f))}return u}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Vl(m=>{if(!hw(m,r,this.currentDirection))return;let g=d&&d[m]||{};(u===!0||u===m)&&(g={min:0,max:0});const v=s?200:1e6,x=s?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:x,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 dR(this.visualElement,t),i.start(BA(t,i,0,r,this.visualElement,!1))}stopAnimation(){Vl(t=>this.getAxisMotionValue(t).stop())}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){Vl(r=>{const{drag:i}=this.getProps();if(!hw(r,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(r);if(s&&s.layout){const{min:u,max:f}=s.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Vr(u,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!km(r)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Vl(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const d=f.get();s[u]=Vue({min:d,max:d},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Vl(u=>{if(!hw(u,t,null))return;const f=this.getAxisMotionValue(u),{min:d,max:h}=this.constraints[u];f.set(Vr(d,h,s[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Bue.set(this.visualElement,this);const t=this.visualElement.current,r=Zb(t,"pointerdown",h=>{const{drag:m,dragListener:g=!0}=this.getProps(),v=h.target,x=v!==t&&jle(v);m&&g&&!x&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();km(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=Gue(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,u=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),mr.read(s);const f=b1(window,"resize",()=>this.scalePositionWithinConstraints()),d=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Vl(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=h[g].translate,v.set(v.get()+h[g].translate))}),this.visualElement.render())}));return()=>{f(),r(),u(),d&&d(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:u=wR,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:u,dragMomentum:f}}}function Z4(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Gue(e,t,r){const i=a4(e,Z4(r)),s=a4(t,Z4(r));return()=>{i(),s()}}function hw(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Kue(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Yue extends Bf{constructor(t){super(t),this.removeGroupControls=bs,this.removeListeners=bs,this.controls=new Hue(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bs}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 sT=e=>(t,r)=>{e&&mr.update(()=>e(t,r),!1,!0)};class Zue extends Bf{constructor(){super(...arguments),this.removePointerDownListener=bs}onPointerDown(t){this.session=new Y8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:K8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:sT(t),onStart:sT(r),onMove:sT(i),onEnd:(l,u)=>{delete this.session,s&&mr.postRender(()=>s(l,u))}}}mount(){this.removePointerDownListener=Zb(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 lT=!1;class Xue 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),lT&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Kw.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:s,isPresent:l}=this.props,{projection:u}=i;return u&&(u.isPresent=l,t.layoutDependency!==r&&u.setOptions({...u.options,layoutDependency:r}),lT=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||mr.postRender(()=>{const f=u.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;lT=!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 X8(e){const[t,r]=rue(),i=j.useContext(dP);return k.jsx(Xue,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(H8),isPresent:t,safeToRemove:r})}const Que={pan:{Feature:Zue},drag:{Feature:Yue,ProjectionNode:P8,MeasureLayout:X8}};function X4(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&&mr.postRender(()=>l(t,J1(t)))}class Wue extends Bf{mount(){const{current:t}=this.node;t&&(this.unmount=Rle(t,(r,i)=>(X4(this.node,i,"Start"),s=>X4(this.node,s,"End"))))}unmount(){}}class Jue extends Bf{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=X1(b1(this.node.current,"focus",()=>this.onFocus()),b1(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Q4(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&&mr.postRender(()=>l(t,J1(t)))}class efe extends Bf{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:i}=this.node.props;this.unmount=Nle(t,(s,l)=>(Q4(this.node,l,"Start"),(u,{success:f})=>Q4(this.node,u,f?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:i?.tap===!1})}unmount(){}}const ER=new WeakMap,cT=new WeakMap,tfe=e=>{const t=ER.get(e.target);t&&t(e)},nfe=e=>{e.forEach(tfe)};function rfe({root:e,...t}){const r=e||document;cT.has(r)||cT.set(r,{});const i=cT.get(r),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(nfe,{root:e,...t})),i[s]}function afe(e,t,r){const i=rfe(t);return ER.set(e,r),i.observe(e),()=>{ER.delete(e),i.unobserve(e)}}const ife={some:0,all:1};class ofe extends Bf{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,u={root:r?r.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:ife[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 afe(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(sfe(t,r))&&this.startObserver()}unmount(){}}function sfe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const lfe={inView:{Feature:ofe},tap:{Feature:efe},focus:{Feature:Jue},hover:{Feature:Wue}},cfe={layout:{ProjectionNode:P8,MeasureLayout:X8}},ufe={...Nue,...lfe,...Que,...cfe},W4=Oue(ufe,Aue),Q8=Jo.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:Vt("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(W4.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(W4.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"})]})]})]})})});Q8.displayName="BackgroundBeams";const ffe=()=>k.jsxs(k.Fragment,{children:[k.jsx(Q8,{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 cn(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 dfe(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),cn(e.additionalItems)}function J4(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 ku="__additional_property",Ep="additionalProperties",Iu="allOf",wn="anyOf",Es="const",xx="default",rM="dependencies",hfe="enum",vi="__errors",rr="$id",aM="if",Ip="items",pfe="_$junk_option_schema_id$_",Yw="$name",en="oneOf",xR="patternProperties",On="properties",uT="readonly",W8="required",NE="submitButtonOptions",ar="$ref",iM="__rjsf_ref",zb="$schema",J8="root",eI="_",mfe=["discriminator","propertyName"],eN="formContext",gfe="layoutGridLookupMap",oM="__rjsf_additionalProperties",tI="__rjsf_rootSchema",yfe="ui:field",sM="ui:widget",Sf="ui:options",_R="ui:globalOptions",vfe="ui:definitions",bfe="https://json-schema.org/draft/2019-09/schema",Zw="https://json-schema.org/draft/2020-12/schema";function _t(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const s=e[i];return i===sM&&cn(s)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Sf&&cn(s)?{...r,...s}:{...r,[i.substring(3)]:s}},{...t}):{...t}}function nI(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=_t(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function TR(e){const t={[vi]:[],addError(r){this[vi].push(r)}};if(Array.isArray(e))return e.reduce((r,i,s)=>({...r,[s]:TR(i)}),t);if(Of(e)){const r=e;return Object.keys(r).reduce((i,s)=>({...i,[s]:TR(r[s])}),t)}return t}function pr(e,t){return Une(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const Sfe=Object.prototype;function $b(e){for(const t in e)if(Sfe.hasOwnProperty.call(e,t))return!1;return!0}const wfe=["array","boolean","integer","null","number","object","string"];new Set(wfe);const Efe=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Efe);const xfe=["items","allOf","oneOf","anyOf"];new Set(xfe);const _fe=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(_fe);function Xw(e){return typeof e=="object"}function Bl(e){return Xw(e)?$b(e):e===!0}function Ym(e,t){return e<t?-1:e>t?1:0}function fT(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 Tfe(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 tN(e){return e.length===0}function dT(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 rI(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const u=[];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,u[m])===0)continue e;f=u.push(h)}return u}const s=r.slice().sort(e);let l=0;for(let u=1;u<i;u++)e(s[l],s[u])!==0&&++l!==u&&(s[l]=s[u]);return s.length=l+1,s}}function Cfe(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 u=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<s&&h<l;){const m=e(u[d],f[h]);m===0?((i.length===0||e(i[i.length-1],u[d])!==0)&&i.push(u[d]),d++,h++):m<0?d++:h++}return i}}function Rfe(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const nN=Rfe,aI=()=>0,Ofe=e=>e===void 0,Afe=e=>typeof e!="object",rN={boolean:0,number:1,string:2};function Mfe(e,t){const r=typeof e,i=typeof t;return r===i?Ym(e,t):rN[r]-rN[i]}function jfe(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const u=e;e=t,t=u}const s=new Set(e),l=t.length;for(let u=0;u<l;u++){const f=t[u];s.has(f)||e.push(f)}return e}function _x(e,t,r=aI){return(i,s)=>e(i)?e(s)?r(i,s):-1:e(s)?1:t(i,s)}function Nm(e){return _x(Ofe,e)}function cf(e,t){return _x(r=>r===void 0||e(r),t)}function hT(e,t){return _x(Array.isArray,e,t)}const ha=Nm(Ym),pT=cf(e=>e===0,(e,t)=>e-t);function kfe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=nN(t,w=>Object.keys(w).sort());function i(w){return(S,_)=>{const E=r(S),O=r(_),T=Math.min(E.length,O.length);for(let C=0;C<T;C++){const R=Ym(E[C],O[C]);if(R!==0)return R}if(E.length!==O.length)return E.length-O.length;for(let C=0;C<T;C++){const R=E[C],M=w(S[R],_[R]);if(M!==0)return M}return 0}}function s(w){const S=dT(w),_=nN(e,rI(w,{threshold:0}));return(E,O)=>S(_(E),_(O))}const l=s(Ym);function u(w,S){if(Xw(w)){if(Xw(S)){const _=Object.keys(w),E=Object.keys(S),O=jfe(_,E),T=O.length;for(let C=0;C<T;C++){const R=O[C];if(w[R]===S[R])continue;const D=(b[R]??f)(w[R],S[R]);if(D!==0)return D}return 0}return S===!0&&$b(w)?0:1}return Xw(S)?w===!0&&$b(S)?0:-1:Ym(w,S)}const f=Nm(h),d=_x(Afe,hT(i(f),dT(h)),Mfe);function h(w,S){return w===null?-1:S===null?1:d(w,S)}const m=Nm(u),g=cf($b,i(m)),v=Nm(s(u)),x=cf(Bl,u),b={$id:ha,$comment:ha,$defs:g,$ref:ha,$schema:ha,const:f,contains:m,contentEncoding:ha,contentMediaType:ha,default:f,definitions:g,description:ha,else:m,examples:f,exclusiveMaximum:ha,exclusiveMinimum:ha,format:ha,if:m,maximum:ha,maxItems:ha,maxLength:ha,maxProperties:ha,minimum:ha,multipleOf:ha,not:m,pattern:ha,propertyNames:m,readOnly:ha,then:m,title:ha,writeOnly:ha,uniqueItems:cf(w=>w===!1,aI),minLength:pT,minItems:pT,minProperties:pT,required:cf(tN,l),enum:cf(tN,s(h)),type:Nm((w,S)=>{const _=Array.isArray(w),E=Array.isArray(S);return!_&&!E?Ym(w,S):l(_?w:[w],E?S:[S])}),items:cf(w=>!Array.isArray(w)&&Bl(w),hT(u,dT(u))),anyOf:v,allOf:v,oneOf:v,properties:g,patternProperties:g,additionalProperties:x,additionalItems:x,dependencies:cf($b,i(Nm(hT(u,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:u}}function aN(e){return e}const iI=(e,t)=>e?iI(t%e,e):t,Nfe=(e,t)=>Math.abs(e*t)/iI(e,t);function Dfe(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*mT(e,t,r){const i=e.length,s=t.length;if(i>0&&s>0)for(let l=0;l<i;l++){const u=e[l];for(let f=0;f<s;f++)yield r(u,t[f])}}function gT(e,t){return e||t}function iN(e){return(t,r)=>{const i={...t},s=Object.keys(r),l=s.length;for(let u=0;u<l;u++){const f=s[u];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function zfe(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function pp(e,t,r){r===void 0||Bl(r)?delete e[t]:e[t]=r}const $fe=["properties","patternProperties","additionalProperties"];function oN(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 sN=[[],[]];function lN(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 u=l.schema;if(u===!1)return!0;e.push(u)}return!1}const Pfe=["items","additionalItems"],Ife=["if","then","else"];function cN(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 yT(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 mp(e,t,r){return[e,t,r]}function Lfe(e){const t=new Map;for(const[r,i,s]of e){const l=u=>{if(!s(u))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(u[r])}, ${i}: ${JSON.stringify(u[i])})`)};for(const u of[[r,i],[i,r]]){let f=t.get(u[0]);f===void 0&&(f=[],t.set(u[0],f)),f.push({oppositeKey:u[1],check:l})}}return t}const Ufe=[mp("minimum","maximum",e=>e.maximum>=e.minimum),mp("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),mp("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),mp("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),mp("minLength","maxLength",e=>e.maxLength>=e.minLength),mp("minItems","maxItems",e=>e.maxItems>=e.minItems),mp("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function Vfe({mergePatterns:e=Dfe,isSubRegExp:t=Object.is,intersectJson:r=Tfe,deduplicateJsonSchemaDef:i=aN,defaultMerger:s=aN,assigners:l=[],checks:u=Ufe,mergers:f}={}){function d(T){const C=T.length;let R=T[0];for(let M=1;M<C;M++){const D=_(R,T[M]);if(D===!1)return!1;Bl(D)||(R=D)}return R}function h(T,C,R,M,D,I,B){if(T.length=0,R===!1)return!1;if(T.push(R),D!==void 0){if(D===!1)return!1;T.push(D)}if(lN(T,C,I))return!1;const F=T.length<2;if(B===!1){if(F)return;if(lN(T,C,M))return!1}else F&&B!==void 0&&T.push(B);return T.length===1?T[0]:d(T)}function m(T,C,R,M,D,I){const B=R.length;if(B>0&&D!==!1)if(I)Object.assign(T,C);else for(let V=0;V<B;V++){const F=R[V];M.has(F)||(T[F]=_(C[F],D))}return T}const g=(T,{properties:C={},patternProperties:R,additionalProperties:M=!0},{properties:D={},patternProperties:I,additionalProperties:B=!0})=>{const V=Bl(M),F=Bl(B);if(V&&F)return pp(T,"properties",E(C,D)),pp(T,"patternProperties",R&&I?E(R,I):R??I),delete T.additionalProperties,T;const G=_(M,B);pp(T,"additionalProperties",G);const W={},te=Object.keys(C),H=te.length,[J,re]=R?oN(R):sN,[le,ae]=I?oN(I):sN,N=[],U=new Set,X=F?void 0:B;for(let Te=0;Te<H;Te++){const Ae=te[Te];U.add(Ae);const ue=h(N,Ae,C[Ae],J,D[Ae],le,X);ue!==void 0&&(W[Ae]=ue)}const L=Object.keys(D),Z=L.length,ee=V?void 0:M;for(let Te=0;Te<Z;Te++){const Ae=L[Te];if(U.has(Ae))continue;const ue=h(N,Ae,D[Ae],le,void 0,J,ee);ue!==void 0&&(W[Ae]=ue)}pp(T,"properties",W);let de={};const ye=new Set;if(re.length>0&&ae.length>0){const Te=mT(re,ae,(Ae,ue)=>{t(Ae,ue)&&ye.add(Ae),t(ue,Ae)&&ye.add(ue),de[e(Ae,ue)]=_(R[Ae],I[ue])});for(;!Te.next().done;);}return de=m(de,R,re,ye,B,F),de=m(de,I,ae,ye,M,V),pp(T,"patternProperties",de),T},v=(T,{items:C=[],additionalItems:R},{items:M=[],additionalItems:D})=>{const I=Array.isArray(C),B=Array.isArray(M),V=[];if(T.items=V,I&&B){const[F,G,W]=C.length<M.length?[C.length,R,M]:[M.length,D,C];let te=0;for(;te<F;te++)V.push(_(C[te],M[te]));if(G===!1)T.additionalItems=!1;else{const H=G===void 0||Bl(G);for(;te<W.length;te++)V.push(H?W[te]:_(W[te],G));pp(T,"additionalItems",R!==void 0&&D!==void 0?_(R,D):R??D)}}else if(I||B){const[F,G,W]=I?[C,M,R]:[M,C,D];pp(T,"additionalItems",W&&_(W,G));for(let te=0;te<F.length;te++)V.push(_(F[te],G))}else delete T.additionalItems,T.items=_(C,M);return T},x=(T,C,R)=>{cN(T,C);const M=cN({},R);return T.allOf===void 0?T.allOf=[M]:T.allOf=T.allOf.concat(M),T};function b(T,C){return i(Array.from(mT(T,C,_)))}const w=zfe([[$fe,g],[Pfe,v],[Ife,x],...l]),S=Lfe(u);function _(T,C){if(T===!1||C===!1)return!1;if(Bl(T))return Bl(C)?!0:C;if(Bl(C))return T;let R={...T};const M=new Set,D=new Set,I=Object.keys(C),B=I.length;for(let V=0;V<B;V++){const F=I[V],G=C[F];if(G===void 0)continue;const W=S.get(F);if(W!==void 0){const re=W.length;for(let le=0;le<re;le++){const ae=W[le];T[ae.oppositeKey]!==void 0&&D.add(ae.check)}}const te=T[F];if(te===void 0){R[F]=G;continue}const H=w.get(F);if(H){M.add(H);continue}const J=O[F]??s;R[F]=J(te,G)}for(const V of M)R=V(R,T,C);for(const V of D)V(R);return R}const E=iN(_),O={$id:s,$ref:s,$schema:s,$comment:s,$defs:E,definitions:E,type:(T,C)=>{if(T===C)return T;const R=Array.isArray(T),M=Array.isArray(C);if(!R&&!M){const D=yT(T,C);if(D!==void 0)return D}else if(R||M){const D=new Set;if(R&&M)for(const B of mT(T,C,yT))B!==void 0&&D.add(B);else{const B=R?T:C,V=R?C:T,F=B.length;for(let G=0;G<F;G++){const W=yT(V,B[G]);W!==void 0&&D.add(W)}}const I=D.size;if(I===1)return D.values().next().value;if(I>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${T.toString()}, ${C.toString()}`)},default:s,description:s,title:s,const:s,format:s,contentEncoding:s,contentMediaType:s,not:(T,C)=>{const R=i([T,C]);return R.length===1?R[0]:{anyOf:R}},pattern:e,readOnly:gT,writeOnly:gT,enum:(T,C)=>{const R=r(T,C);if(R.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(T)}", "${JSON.stringify(C)}"`);return R},anyOf:b,oneOf:b,allOf:(T,C)=>i(T.concat(C)),propertyNames:_,contains:_,dependencies:iN((T,C)=>Array.isArray(T)?Array.isArray(C)?fT(T,C):_(C,{required:T}):Array.isArray(C)?_(T,{required:C}):_(T,C)),examples:(T,C)=>{if(!Array.isArray(T)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(T)}" and "${JSON.stringify(C)}"`);return fT(T,C)},multipleOf:(T,C)=>{let R=1;for(;!Number.isInteger(T)||!Number.isInteger(C);)R*=10,T*=10,C*=10;return Nfe(T,C)/R},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:gT,required:fT,...f};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:d}}function qfe(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 u=s.length-1;u>=0;u--)r.push(s[u])}return t}function Ffe(e){return t=>e(qfe(t))}var Eb={},uN;function Bfe(){if(uN)return Eb;uN=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,x,b=1,w=m.length;b<w;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),x=w>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),x&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!x)break;h=h[v]}var S=h[v];return g===void 0?delete h[v]:h[v]=g,S}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 u(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 u(g,m)},set:function(g,v){return f(g,m,v)}}}return Eb.get=u,Eb.set=f,Eb.compile=d,Eb}var Hfe=Bfe();const vT=ic(Hfe);var Gfe=D$();const lM=ic(Gfe);function DE(e,t){if(rr in e&&lM.equal(e[rr],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(Cn(i)){const s=DE(i,t);if(s!==void 0)return s}}else if(Cn(r)){const i=DE(r,t);if(i!==void 0)return i}}function CR(e,t){const r=qe(e,rr,t);ar in e&&(e={...e,[ar]:lM.resolve(r,e[ar])});for(const[i,s]of Object.entries(e))Array.isArray(s)?e={...e,[i]:s.map(l=>Cn(l)?CR(l,r):l)}:Cn(s)&&(e={...e,[i]:CR(s,r)});return e}function cM(e,t){const r=t[e];return[hg(t,[e]),r]}function oI(e,t={},r=[],i=qe(t,[rr])){const s=e||"";let l;if(s.startsWith("#")){const f=decodeURIComponent(s.substring(1));i===void 0||rr in t&&t[rr]===i?l=vT.get(t,f):t[zb]===Zw&&(l=DE(t,i.replace(/\/$/,"")),l!==void 0&&(l=vT.get(l,f)))}else if(t[zb]===Zw){const f=i?lM.resolve(i,s):s,[d,...h]=f.replace(/#\/?$/,"").split("#");l=DE(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[rr],oa(h)||(l=vT.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const u=l[ar];if(u){if(r.includes(u)){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]=cM(ar,l),h=oI(d,t,[...r,s],i);return Object.keys(f).length>0?t[zb]===bfe||t[zb]===Zw?{[Iu]:[f,h]}:{...f,...h}:h}return l}function uM(e,t={},r=qe(t,[rr])){return oI(e,t,[],r)}function rc(e){let t;const r=qe(e,mfe);return Af(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function S1(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 Cl(e){let{type:t}=e;return!t&&e.const?S1(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 Lu(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},u=t[s];return e&&s in e&&cn(u)?i[s]=Lu(l,u):e&&t&&(Cl(e)==="object"||Cl(t)==="object")&&s===W8&&Array.isArray(l)&&Array.isArray(u)?i[s]=ore(l,u):i[s]=u,i},r)}function sI(e,t,r){var i;if(e&&r){const s=qe(e,r);if(s===void 0)return;for(let l=0;l<t.length;l++){const u=t[l],f=qe(u,[On,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===s||!((i=f.enum)===null||i===void 0)&&i.includes(s)))return l}}}function fM(e,t,r,i,s){if(t===void 0)return 0;const l=sI(t,r,s);if(v$(l))return l;for(let u=0;u<r.length;u++){const f=r[u];if(s&&Sn(f,[On,s])){const d=qe(t,s),h=qe(f,[On,s],{});if(e.isValid(h,d,i))return u}else if(f[On]){const d={anyOf:Object.keys(f[On]).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 u}else if(e.isValid(f,t,i))return u}return 0}function Ei(e,t,r={},i,s,l=!1){return Zl(e,t,r,i,void 0,void 0,s,l)[0]}function Kfe(e,t,r,i,s,l,u){const{if:f,then:d,else:h,...m}=t,g=e.isValid(f,l||{},r);let v=[m],x=[];if(i)d&&typeof d!="boolean"&&(x=x.concat(Zl(e,d,r,l,i,s,u))),h&&typeof h!="boolean"&&(x=x.concat(Zl(e,h,r,l,i,s,u)));else{const b=g?d:h;b&&typeof b!="boolean"&&(x=x.concat(Zl(e,b,r,l,i,s,u)))}return x.length&&(v=x.map(b=>Lu(m,b))),v.flatMap(b=>Zl(e,b,r,l,i,s,u))}function lI(e){return e.reduce((r,i)=>i.length>1?i.flatMap(s=>E$(r.length,l=>[...r[l]].concat(s))):(r.forEach(s=>s.push(i[0])),r),[[]])}function cI(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Vn(r,[i],e.patternProperties[i]),r),{})}function Yfe(e,t,r,i,s,l,u,f){const d=uI(e,t,r,i,s,l,u,f);if(d.length>1||d[0]!==t)return d;if(rM in t)return fI(e,t,r,i,s,l,u).flatMap(m=>Zl(e,m,r,l,i,s,u));if(Iu in t&&Array.isArray(t[Iu])){const h=t.allOf.map(g=>Zl(e,g,r,l,i,s,u));return lI(h).map(g=>({...t,allOf:g}))}return[t]}function uI(e,t,r,i,s,l,u,f){const d=eg(t,r,s,void 0,f);return d!==t?Zl(e,d,r,l,i,s,u,f):[t]}function eg(e,t,r,i,s){if(!cn(e))return e;let l=e;if(ar in l){const{$ref:u,...f}=l;if(r.includes(u))return l;r.push(u),l={...uM(u,t,i),...f,[iM]:u},rr in l&&(i=l[rr])}if(On in l){const u=[],f=nre(l[On],(d,h,m)=>{const g=[...r];d[m]=eg(h,t,g,i,s),u.push(g)},{});qne(r,T$(xne(u))),l={...l,[On]:f}}if(Ip in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:eg(l.items,t,r,i,s)}),s){let u,f;wn in e&&Array.isArray(e[wn])?(u=wn,f=l[wn]):en in e&&Array.isArray(e[en])&&(u=en,f=l[en]),u&&f&&(l={...l,[u]:f.map(d=>eg(d,t,r,i,s))})}return pr(e,l)?e:l}function Zfe(e,t,r,i,s){const l={...t,properties:{...t.properties}},u=i&&cn(i)?i:{};return Object.keys(u).forEach(f=>{if(!(f in l.properties)){if(xR in l){const d=cI(l,f);if(!oa(d)){l.properties[f]=Ei(e,{[Iu]:Object.values(d)},r,qe(u,[f]),s),Vn(l.properties,[f,ku],!0);return}}if(Ep in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?ar in l.additionalProperties?d=Ei(e,{[ar]:qe(l.additionalProperties,[ar])},r,u,s):"type"in l.additionalProperties?d={...l.additionalProperties}:wn in l.additionalProperties||en in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:S1(qe(u,[f]))}:d={type:S1(qe(u,[f]))},l.properties[f]=d,Vn(l.properties,[f,ku],!0)}else l.properties[f]={type:"null"},Vn(l.properties,[f,ku],!0)}}),l}const{compareSchemaDefinitions:Xfe,compareSchemaValues:Qfe}=kfe(),{mergeArrayOfSchemaDefinitions:Wfe}=Vfe({intersectJson:Cfe(Qfe),deduplicateJsonSchemaDef:rI(Xfe)}),Jfe=Ffe(Wfe);function ede(e){return Jfe(e)}function Zl(e,t,r,i,s=!1,l=[],u,f){return cn(t)?Yfe(e,t,r,s,l,i,u,f).flatMap(h=>{var m;let g=h;if(aM in g)return Kfe(e,g,r,s,l,i,u);if(Iu in g){if(s){const{allOf:x,...b}=g;return[...x,b]}try{const x=[],b=[];(m=g.allOf)===null||m===void 0||m.forEach(w=>{typeof w=="object"&&w.contains?x.push(w):b.push(w)}),x.length&&(g={...g,allOf:b}),g=u?u(g):ede(g),x.length&&(g.allOf=x)}catch(x){console.warn(`could not merge subschemas in allOf:
60
+ `,x);const{allOf:b,...w}=g;return w}}return On in g&&xR in g&&(g=Object.keys(g.properties).reduce((x,b)=>{const w=cI(x,b);return oa(w)||(x.properties[b]=Ei(e,{allOf:[x.properties[b],...Object.values(w)]},r,qe(i,[b]),u)),x},{...g,properties:{...g.properties}})),xR in g||Ep in g&&g.additionalProperties!==!1?Zfe(e,g,r,i,u):g}):[{}]}function tde(e,t,r,i,s){let l;const{oneOf:u,anyOf:f,...d}=t;if(Array.isArray(u)?l=u:Array.isArray(f)&&(l=f),l){const h=s===void 0&&i?{}:s,m=rc(t);l=l.map(v=>eg(v,r,[]));const g=fM(e,h,l,r,m);if(i)return l.map(v=>Lu(d,v));t=Lu(d,l[g])}return[t]}function fI(e,t,r,i,s,l,u){const{dependencies:f,...d}=t;return tde(e,d,r,i,l).flatMap(m=>dI(e,f,m,r,i,s,l,u))}function dI(e,t,r,i,s,l,u,f){let d=[r];for(const h in t){if(!s&&qe(u,[h])===void 0||r.properties&&!(h in r.properties))continue;const[m,g]=cM(h,t);return Array.isArray(g)?d[0]=nde(r,g):cn(g)&&(d=rde(e,r,i,h,g,s,l,u,f)),d.flatMap(v=>dI(e,m,v,i,s,l,u,f))}return d}function nde(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 rde(e,t,r,i,s,l,u,f,d){return Zl(e,s,r,f,l,u,d).flatMap(m=>{const{oneOf:g,...v}=m;if(t=Lu(t,v),g===void 0)return t;const x=g.map(w=>typeof w=="boolean"||!(ar in w)?[w]:uI(e,w,r,l,u,f));return lI(x).flatMap(w=>ade(e,t,r,i,w,l,u,f,d))})}function ade(e,t,r,i,s,l,u,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]=cM(i,g.properties),x={...g,properties:v};return Zl(e,x,r,f,l,u,d).map(w=>Lu(t,w))})}function Pb(e,t,r,i,s,l={},u){if(Array.isArray(r[s])){const d=rc(r)||i,h=r[s].map(g=>Ei(e,g,t,l,u)),m=qe(l,d);if(m!==void 0)return h.find(g=>bf(qe(g,[On,d,xx],qe(g,[On,d,Es])),m))}}function hI(e,t,r,i,s){let l=r;if(Sn(r,ar)&&(l=Ei(e,r,t,void 0,s)),oa(i))return l;const u=Array.isArray(i)?i:i.split("."),[f,...d]=u;if(f&&Sn(l,f))return l=qe(l,f),hI(e,t,l,d,s)}function Qw(e,t,r,i,s,l){const u=hI(e,t,r,i,l);return u===void 0?s:u}const fN={title:"!@#$_UNKNOWN_$#@!"};function ide(e,t,r,i,s={},l){const u=Array.isArray(i)?[...i]:i.split(".");let f=r;const d=u.pop();u.length&&u.forEach(v=>{f=Qw(e,t,f,[On,v],{},l),Sn(f,en)?f=Pb(e,t,f,d,en,qe(s,v),l):Sn(f,wn)&&(f=Pb(e,t,f,d,wn,qe(s,v),l))}),Sn(f,en)?f=Pb(e,t,f,d,en,s,l):Sn(f,wn)&&(f=Pb(e,t,f,d,wn,s,l));let h=Qw(e,t,f,[On,d],fN,l);h===fN&&(h=void 0);const m=Qw(e,t,f,W8,[],l);let g;return h&&Array.isArray(m)&&(g=m.includes(d)),{field:h,isRequired:g}}const ode={type:"object",$id:pfe,properties:{__not_really_there__:{type:"number"}}};function RR(e,t,r,i,s){let l=0;return r&&(Cn(r.properties)?l+=Wne(r.properties,(u,f,d)=>{const h=qe(i,d);if(typeof f=="boolean")return u;if(Sn(f,ar)){const m=Ei(e,f,t,h,s);return u+RR(e,t,m,h||{},s)}if((Sn(f,en)||Sn(f,wn))&&h){const m=Sn(f,en)?en:wn,g=rc(f);return u+w1(e,t,h,qe(f,m),-1,g,s)}if(f.type==="object")return Cn(h)&&(u+=1),u+RR(e,t,f,h,s);if(f.type===S1(h)){let m=u+1;return f.default?m+=h===f.default?1:-1:f.const&&(m+=h===f.const?1:-1),m}return u},0):Af(r.type)&&r.type===S1(i)&&(l+=1)),l}function w1(e,t,r,i,s=-1,l,u){const f=i.map(v=>eg(v,t,[])),d=sI(r,i,l);if(v$(d))return d;const h=f.reduce((v,x,b)=>(fM(e,r,[ode,x],t,l)===1&&v.push(b),v),[]);if(h.length===1)return h[0];h.length||E$(f.length,v=>h.push(v));const m=new Set,{bestIndex:g}=h.reduce((v,x)=>{const{bestScore:b}=v,w=f[x],S=RR(e,t,w,r,u);return m.add(S),S>b?{bestIndex:x,bestScore:S}:v},{bestIndex:s,bestScore:0});return m.size===1&&s>=0?s:g}function dM(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>cn(t))}function E1(e,t,r=!1,i=!1,s=!1){if(Array.isArray(t)){const l=Array.isArray(e)?e:[],u=s?l:t,f=s?t:l,d=u.map((h,m)=>f[m]!==void 0?E1(l[m],t[m],r,i,s):h);return(r||s)&&d.length<f.length&&d.push(...f.slice(d.length)),d}if(cn(t)){const l=Object.assign({},e);return Object.keys(t).reduce((u,f)=>{var d;const h=qe(t,f),m=cn(e)&&f in e,g=f in t,v=(d=qe(e,f))!==null&&d!==void 0?d:{},x=m&&Object.entries(v).some(([,S])=>cn(S)),b=m&&cn(qe(e,f)),w=g&&cn(h);return b&&w&&!x?(u[f]={...qe(e,f),...h},u):(u[f]=E1(qe(e,f),h,r,i,s&&(m||!g)),u)},l)}return i&&(e!==void 0&&wE(t)||typeof t=="number"&&isNaN(t))||s&&!wE(t)?e:t}function Lp(e,t,r=!1){return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},u=t[s];if(e&&s in e&&cn(u))i[s]=Lp(l,u,r);else if(r&&Array.isArray(l)&&Array.isArray(u)){let f=u;r==="preventDuplicates"&&(f=u.reduce((d,h)=>(l.includes(h)||d.push(h),d),[])),i[s]=l.concat(f)}else i[s]=u;return i},Object.assign({},e))}function pI(e){return Array.isArray(e.enum)&&e.enum.length===1||Es in e}function hM(e,t,r={},i){const s=Ei(e,t,r,void 0,i),l=s.oneOf||s.anyOf;return Array.isArray(s.enum)?!0:Array.isArray(l)?l.every(u=>typeof u!="boolean"&&pI(u)):!1}function pM(e,t,r,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:hM(e,t.items,r,i)}function mI(e){const t=e[Es],r=Cl(e);return cn(t)&&Af(t?.$data)&&r!=="object"&&r!=="array"}function sde(e){if(hfe in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(Es in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function lde(e,t){const r=new Map(e.map(l=>[String(l.value),l])),i=new Set(t.filter(l=>l!=="*").map(String)),s=e.filter(l=>!i.has(String(l.value)));return t.flatMap(l=>{if(l==="*")return s;const u=r.get(String(l));return u?[u]:[]})}function gg(e,t){if(e.enum){let l,u;if(t){const{enumNames:d,enumOrder:h}=_t(t);l=d,u=h}let f=e.enum.map((d,h)=>({label:Array.isArray(l)?l[h]||String(d):l?.[String(d)]||String(d),value:d}));return u&&(f=lde(f,u)),f}let r,i;e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf);let s=rc(e);if(t){const{optionsSchemaSelector:l=s}=_t(t);s=l}return r&&r.map((l,u)=>{const{title:f}=_t(i?.[u]),d=l;let h,m=f;if(s){const g=qe(d,[On,s],{});h=qe(g,xx,qe(g,Es)),m=m||g?.title||d.title||String(h)}else h=sde(d),m=m||d.title||String(h);return{schema:d,label:m,value:h}})}const cde=["string","number","integer","boolean","null"];var yg;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(yg||(yg={}));function bT(e,t=yg.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!==yg.Ignore&&cn(e.additionalItems)?e.additionalItems:{}}function gI(e,t){const{default:r,type:i}=e;return Array.isArray(i)&&i.includes("null")&&oa(t)&&r===null?null:t}function dN(e,t,r,i,s,l=[],u={},f=!1,d=!1){const{emptyObjectFields:h="populateAllDefaults"}=u;if(i===!0||f)e[t]=r;else if(i==="excludeObjectChildren")(d&&r!==void 0||!cn(r)||!oa(r))&&(e[t]=r);else if(h!=="skipDefaults"){const m=s===void 0?l.includes(t):s;cn(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 wf(e,t,r={}){const{parentDefaults:i,rawFormData:s,rootSchema:l={},includeUndefinedValues:u=!1,_recurseList:f=[],experimental_defaultFormStateBehavior:d=void 0,experimental_customMergeAllOf:h=void 0,required:m,shouldMergeDefaultsIntoFormData:g=!1,initialDefaultsGenerated:v}=r;let x=cn(s)?s:{};const b=cn(t)?t:{};let w=i,S=null,_=d,E=f;if(b[Es]!==void 0&&d?.constAsDefaults!=="never"&&!mI(b))w=b[Es];else if(cn(w)&&cn(b.default)&&!b[wn]&&!b[en]&&!b[ar])w=Lp(w,b.default);else if(xx in b&&!b[wn]&&!b[en]&&!b[ar])w=b.default;else if(ar in b){const C=b[ar];f.includes(C)||(E=f.concat(C),S=uM(C,l));const R=s===void 0||cn(s)&&oa(s);S&&!w&&R&&(w=b.default),g&&S&&!cn(s)&&(x=s)}else if(rM in b){const C={...hN(e,b,r,w),...x};S=fI(e,b,l,!1,[],C,h)[0]}else if(dM(b))w=b.items.map((C,R)=>wf(e,C,{rootSchema:l,includeUndefinedValues:u,_recurseList:f,experimental_defaultFormStateBehavior:d,experimental_customMergeAllOf:h,parentDefaults:Array.isArray(i)?i[R]:void 0,rawFormData:x,required:m,shouldMergeDefaultsIntoFormData:g}));else if(en in b){const{oneOf:C,...R}=b;if(C.length===0)return;const M=rc(b),{type:D="null"}=R;!Array.isArray(D)&&cde.includes(D)&&_?.constAsDefaults==="skipOneOf"&&(_={..._,constAsDefaults:"never"}),S=C[w1(e,l,s??b.default,C,0,M,h)],S=Lu(R,S)}else if(wn in b){const{anyOf:C,...R}=b;if(C.length===0)return;const M=rc(b);S=C[w1(e,l,s??b.default,C,0,M,h)],S=Lu(R,S)}if(S)return wf(e,S,{rootSchema:l,includeUndefinedValues:u,_recurseList:E,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:h,parentDefaults:w,rawFormData:s??x,required:m,shouldMergeDefaultsIntoFormData:g,initialDefaultsGenerated:v});w===void 0&&(w=b.default);const O=hN(e,b,r,w);let T=O??w;if(g){const{arrayMinItems:C={}}=d||{},{mergeExtraDefaults:R}=C,M=ude(e,b,l,s,d,h);(!cn(s)||Iu in b)&&(T=E1(T,M,R,!0))}return T}function ude(e,t,r,i,s,l){const u=!pI(t)&&hM(e,t,r,l);let f=i;if(u){const h=gg(t);f=h?.some(g=>pr(g.value,i))?i:void 0}return t[Es]&&s?.constAsDefaults==="always"&&(f=t.const),f}function fde(e,t,{rawFormData:r,rootSchema:i={},includeUndefinedValues:s=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){{const v=cn(r)?r:{},x=t,w=u?.allOf==="populateDefaults"&&Iu in x||u?.emptyObjectFields!=="skipEmptyDefaults"&&aM in x?Ei(e,x,i,v,f):x,S=w[Es],_=Object.keys(w.properties||{}).reduce((E,O)=>{var T;const C=qe(w,[On,O],{}),R=cn(S)&&S[O]!==void 0,M=(cn(C)&&Es in C||R)&&u?.constAsDefaults!=="never"&&!mI(C),D=wf(e,C,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:qe(g,[O]),rawFormData:qe(v,[O]),required:(T=w.required)===null||T===void 0?void 0:T.includes(O),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});return dN(E,O,D,s,d,w.required,u,M,C?.type==="null"),E},{});if(w.additionalProperties&&!m){const E=cn(w.additionalProperties)?w.additionalProperties:{},O=new Set;cn(g)&&Object.keys(g).filter(C=>!w.properties||!w.properties[C]).forEach(C=>O.add(C));const T=[];Object.keys(v).filter(C=>!w.properties||!w.properties[C]).forEach(C=>{O.add(C),T.push(C)}),O.forEach(C=>{var R;const M=wf(e,E,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:qe(g,[C]),rawFormData:qe(v,[C]),required:(R=w.required)===null||R===void 0?void 0:R.includes(C),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});dN(_,C,M,s,d,T)})}return gI(t,_)}}function dde(e,t,{rawFormData:r,rootSchema:i={},_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:u=void 0,required:f,requiredAsRoot:d=!1,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){var v,x;const b=t,w=(v=l?.arrayMinItems)!==null&&v!==void 0?v:{},{populate:S,mergeExtraDefaults:_}=w,E=S==="never",O=S==="requiredOnly",T=S==="all"||!E&&!O,C=(x=w?.computeSkipPopulate)!==null&&x!==void 0?x:(()=>!1),M=l?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(g)&&(g=g.map((V,F)=>{const G=bT(b,yg.Fallback,F),W=Array.isArray(r)?r[F]:void 0;return wf(e,G,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:V,rawFormData:W,required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m})})),Array.isArray(r)){const V=bT(b);if(E)g=r;else{const F=r.map((W,te)=>wf(e,V,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,rawFormData:W,parentDefaults:qe(g,[te]),required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}));g=E1(g,F,(O&&f||T)&&_)}}if((cn(b)&&Es in b&&l?.constAsDefaults!=="never")===!1){if(E)return g??M;if(O&&!f)return g||void 0}let I;const B=Array.isArray(g)?g.length:0;if(!b.minItems||pM(e,b,i,u)||C(e,b,i)||b.minItems<=B)I=g||!f&&!d?g:M;else{const V=g||[],F=bT(b,yg.Invert),G=F.default,W=Array.from({length:b.minItems-B},()=>wf(e,F,{parentDefaults:G,rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,required:f,shouldMergeDefaultsIntoFormData:h}));I=V.concat(W)}return gI(t,I)}function hN(e,t,r={},i){switch(Cl(t)){case"object":return fde(e,t,r,i);case"array":return dde(e,t,r,i)}}function yI(e,t,r,i,s=!1,l,u,f){if(!cn(t))throw new Error("Invalid schema: "+t);const d=Ei(e,t,i,r,u),h=wf(e,d,{rootSchema:i,includeUndefinedValues:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:f,requiredAsRoot:!0});if(d.type!=="object"&&cn(d.default))return{...h,...r};if(cn(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:m}=l||{};return E1(h,r,!0,m==="useDefaultIfFormDataUndefined",!0)}return h}function vI(e={}){return"widget"in _t(e)&&_t(e).widget!=="hidden"}function bI(e,t,r={},i,s){if(r[sM]==="files")return!0;if(t.items){const l=Ei(e,t.items,i,void 0,s);return l.type==="string"&&l.format==="data-url"}return!1}function hde(e,t,r={},i,s,l){const u=_t(r,s),{label:f=!0}=u;let d=!!f;if(d){const h=Cl(t),m=qe(t,ku,!1);h==="array"&&(d=m||pM(e,t,i,l)||bI(e,t,r,i,l)||vI(r)),h==="object"&&(d=m),h==="boolean"&&r&&!r[sM]&&(d=!1),r&&r[yfe]&&(d=!1)}return d}function uf(e,t,r,i,s,l=[],u){if(ar in t||rM in t||Iu in t||aM in t){const d=Ei(e,t,i,s,u);if(l.findIndex(m=>pr(m,d))===-1)return uf(e,d,r,i,s,l.concat(d),u)}let f={[Yw]:r.replace(/^\./,"")};if(en in t||wn in t){const d=en in t?t.oneOf:t.anyOf,h=rc(t),m=w1(e,i,s,d,0,h,u),g=d[m];f={...f,...uf(e,g,r,i,s,l,u)}}if(Ep in t&&t[Ep]!==!1){Vn(f,oM,!0);const d=Cn(t[Ep])?t[Ep]:{},h=qe(t,On,{});for(const m of Object.keys(s??{}))m in h||(f[m]=uf(e,d,`${r}.${m}`,i,qe(s,[m]),l,u))}if(Ip in t&&Array.isArray(s)){const{items:d,additionalItems:h}=t;Array.isArray(d)?s.forEach((m,g)=>{d[g]?f[g]=uf(e,d[g],`${r}.${g}`,i,m,l,u):h?f[g]=uf(e,h,`${r}.${g}`,i,m,l,u):console.warn(`Unable to generate path schema for "${r}.${g}". No schema defined for it`)}):s.forEach((m,g)=>{f[g]=uf(e,d,`${r}.${g}`,i,m,l,u)})}else if(On in t)for(const d in t.properties){const h=qe(t,[On,d],{});f[d]=uf(e,h,`${r}.${d}`,i,qe(s,[d]),l,u)}return f}function SI(e,t,r="",i,s,l){return uf(e,t,r,i,s,void 0,l)}function wI(e,t){if(t.length===0&&typeof e!="object")return e;const r=hA(e,t);return Array.isArray(e)?Object.keys(r).map(i=>r[i]):r}function EI(e,t){const r=(s,l)=>typeof s!="object"||oa(s)||l&&!oa(s),i=(s,l=[],u=[[]])=>{const f=Object.keys(s);return f.forEach(d=>{const h=s[d];if(typeof h=="object"){const m=u.map(g=>[...g,d]);h[oM]&&h[Yw]!==""?l.push(h[Yw]):i(h,l,m)}else d===Yw&&h!==""&&u.forEach(m=>{const g=qe(t,m),v=f.length===1;(r(g,v)||Array.isArray(g)&&g.every(x=>r(x,v)))&&l.push(m)})}),l};return i(e)}function pde(e,t,r={},i){const s=Ei(e,t,r,i),l=SI(e,s,"",r,i),f=EI(l,i).map(d=>Array.isArray(d)?d.join("."):d);return wI(i,f)}const Cm=Symbol("no Value");function OR(e,t,r,i,s={},l){let u;if(Sn(r,On)){const f={};if(Sn(i,On)){const m=qe(i,On,{});Object.keys(m).forEach(g=>{Sn(s,g)&&(f[g]=void 0)})}const d=Object.keys(qe(r,On,{})),h={};d.forEach(m=>{const g=qe(s,m);let v=qe(i,[On,m],{}),x=qe(r,[On,m],{});Sn(v,ar)&&(v=Ei(e,v,t,g,l)),Sn(x,ar)&&(x=Ei(e,x,t,g,l));const b=qe(v,"type"),w=qe(x,"type");if(!b||b===w)if(Sn(f,m)&&delete f[m],w==="object"||w==="array"&&Array.isArray(g)){const S=OR(e,t,x,v,g,l);(S!==void 0||w==="array")&&(h[m]=S)}else{const S=qe(x,"default",Cm),_=qe(v,"default",Cm);S!==Cm&&S!==g&&(_===g?f[m]=S:qe(x,"readOnly")===!0&&(f[m]=void 0));const E=qe(x,"const",Cm),O=qe(v,"const",Cm);E!==Cm&&E!==g&&(f[m]=O===g?E:void 0)}}),u={...typeof s=="string"||Array.isArray(s)?void 0:s,...f,...h}}else if(qe(i,"type")==="array"&&qe(r,"type")==="array"&&Array.isArray(s)){let f=qe(i,"items"),d=qe(r,"items");if(typeof f=="object"&&typeof d=="object"&&!Array.isArray(f)&&!Array.isArray(d)){Sn(f,ar)&&(f=Ei(e,f,t,s,l)),Sn(d,ar)&&(d=Ei(e,d,t,s,l));const h=qe(f,"type"),m=qe(d,"type");if(!h||h===m){const g=qe(r,"maxItems",-1);m==="object"?u=s.reduce((v,x)=>{const b=OR(e,t,d,f,x,l);return b!==void 0&&(g<0||v.length<g)&&v.push(b),v},[]):u=g>0&&s.length>g?s.slice(0,g):s}}else typeof f=="boolean"&&typeof d=="boolean"&&f===d&&(u=s)}return u}class mde{constructor(t,r,i,s){r&&r[zb]===Zw?this.rootSchema=CR(r,qe(r,rr,"#")):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||!pr(this.rootSchema,r)||!pr(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==s}findFieldInSchema(t,r,i){return ide(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,i,s){return Pb(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,i=!1,s){return yI(this.validator,t,r,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,s)}getDisplayLabel(t,r,i){return hde(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,i,s){return w1(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,i){return fM(this.validator,t,r,this.rootSchema,i)}getFromSchema(t,r,i){return Qw(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}isFilesArray(t,r){return bI(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return pM(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return hM(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,r){return pde(this.validator,t,this.rootSchema,r)}retrieveSchema(t,r,i){return Ei(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,r,i){return OR(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,i){return SI(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}}function gde(e,t,r={},i){return new mde(e,t,r,i)}function yde(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,[u,...f]=s.split(";"),d=u||"",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 x=0;x<m.length;x++)g[x]=m.charCodeAt(x);return{blob:new window.Blob([new Uint8Array(g)],{type:d}),name:h}}catch(m){throw new Error("File is invalid: "+m.message)}}function ff(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function xI(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 xI(t,e).reverse();const r=[];for(let i=e;i<=t;i++)r.push({value:i,label:ff(i,2)});return r}function pN(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 vde(e,t){let r=e;if(Array.isArray(t)){const i=r.split(/(%\d)/);t.forEach((s,l)=>{const u=i.findIndex(f=>f===`%${l+1}`);u>=0&&(i[u]=s)}),r=i.join("")}return r}function bde(e,t){return vde(e,t)}function $a(e,t=[],r){if(Array.isArray(e))return e.map(l=>$a(l,t)).filter(l=>l!==r);const i=e===""||e===null?-1:Number(e),s=t[i];return s?s.value:r}function _I(e,t,r=[]){const i=$a(e,r);return Array.isArray(t)?t.filter(s=>!pr(s,i)):pr(i,t)?void 0:t}function eS(e,t){return Array.isArray(t)?t.some(r=>pr(r,e)):pr(t,e)}function TI(e,t=[],r=!1){const i=t.map((s,l)=>eS(s.value,e)?String(l):void 0).filter(s=>typeof s<"u");return r?i:i[0]}function CI(e,t,r=[]){const i=$a(e,r);if(!wE(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 RI{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"?qe(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},Jne(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?K1(t):{},this}addErrors(t,r){const i=this.getOrCreateErrorBlock(r);let s=qe(i,vi);return Array.isArray(s)||(s=[],i[vi]=s),Array.isArray(t)?Vn(i,vi,[...new Set([...s,...t])]):Vn(i,vi,[...new Set([...s,t])]),this}setErrors(t,r){const i=this.getOrCreateErrorBlock(r),s=Array.isArray(t)?[...new Set([...t])]:[t];return Vn(i,vi,s),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Vn(r,vi,[]),this}}function mN(e,t){const r=Of(e),i=Of(t);if(e===t||!r&&!i)return[];if(r&&!i)return gs(e);if(!r&&i)return gs(t);{const s=gs(Zne(e,(u,f)=>!pr(u,qe(t,f)))),l=Sne(gs(t),gs(e));return[...s,...l]}}function Sde(e,t,r=[1900,new Date().getFullYear()+2],i="YMD"){const{day:s,month:l,year:u,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:u},x=[];switch(i){case"MDY":x.push(g,m,v);break;case"DMY":x.push(m,g,v);break;default:x.push(v,g,m)}return t&&x.push({type:"hour",range:[0,23],value:f},{type:"minute",range:[0,59],value:d},{type:"second",range:[0,59],value:h}),x}function OI(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 AI(e,t,r={},i=!0){const s={type:t||"text",...OI(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 gN={props:{disabled:!1},submitText:"Submit",norender:!1};function MI(e={}){const t=_t(e);if(t&&t[NE]){const r=t[NE];return{...gN,...r}}return gN}function kt(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 mM(){if(typeof process>"u"||qe(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,C$("test-id-")),e.get(r)}})}var ST={exports:{}},Un={};var yN;function wde(){if(yN)return Un;yN=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"),u=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"),x=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function w(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case e:switch(S=S.type,S){case r:case s:case i:case h:case m:return S;default:switch(S=S&&S.$$typeof,S){case f:case u:case d:case v:case g:case l:return S;default:return _}}case t:return _}}}return Un.ContextConsumer=u,Un.ContextProvider=l,Un.Element=e,Un.ForwardRef=d,Un.Fragment=r,Un.Lazy=v,Un.Memo=g,Un.Portal=t,Un.Profiler=s,Un.StrictMode=i,Un.Suspense=h,Un.SuspenseList=m,Un.isAsyncMode=function(){return!1},Un.isConcurrentMode=function(){return!1},Un.isContextConsumer=function(S){return w(S)===u},Un.isContextProvider=function(S){return w(S)===l},Un.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},Un.isForwardRef=function(S){return w(S)===d},Un.isFragment=function(S){return w(S)===r},Un.isLazy=function(S){return w(S)===v},Un.isMemo=function(S){return w(S)===g},Un.isPortal=function(S){return w(S)===t},Un.isProfiler=function(S){return w(S)===s},Un.isStrictMode=function(S){return w(S)===i},Un.isSuspense=function(S){return w(S)===h},Un.isSuspenseList=function(S){return w(S)===m},Un.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===s||S===i||S===h||S===m||S===x||typeof S=="object"&&S!==null&&(S.$$typeof===v||S.$$typeof===g||S.$$typeof===l||S.$$typeof===u||S.$$typeof===d||S.$$typeof===b||S.getModuleId!==void 0)},Un.typeOf=w,Un}var vN;function Ede(){return vN||(vN=1,ST.exports=wde()),ST.exports}var xde=Ede();const bN=ic(xde),wT={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 _de(e){let t=qe(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...s})=>k.jsx(e,{options:{...r,...i},...s}),Vn(e,"MergedWidget",t)}return t}function ac(e,t,r={}){const i=Cl(e);if(typeof t=="function"||t&&bN.isForwardRef(j.createElement(t))||bN.isMemo(t))return _de(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 ac(e,s,r)}if(typeof i=="string"){if(!(i in wT))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in wT[i]){const s=r[wT[i][t]];return ac(e,s,r)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function Tde(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 Cde(e){const t=new Set;return JSON.stringify(e,(r,i)=>(t.add(r),i)),JSON.stringify(e,Array.from(t).sort())}function Xl(e){return Tde(Cde(e))}function Rde(e){return Xl(e)}function Ode(e,t,r={}){try{return ac(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 tm(e,t){return`${Af(e)?e:e[rr]}__${t}`}function nm(e){return tm(e,"description")}function gM(e){return tm(e,"error")}function Tx(e){return tm(e,"examples")}function yM(e){return tm(e,"help")}function Cx(e){return tm(e,"title")}function So(e,t=!1){const r=t?` ${Tx(e)}`:"";return`${gM(e)} ${nm(e)} ${yM(e)}${r}`}function Op(e,t){return`${e}-${t}`}function Ql(e,t){return tm(e,t)}function ET(e,t){return tm(e,`optional${t}`)}function Pg(e){return!wE(e)&&(!Cn(e)||Array.isArray(e)||!oa(e))}function Ade(e,t){const{rootSchema:r,schemaUtils:i}=e;if(bf(t,r))return!0;if(ar in r){const s=i.retrieveSchema(r);return bf(t,hg(s,iM))}return!1}function jI(e,t,r){return t?r:e}function Mde(e){return e?new Date(e).toJSON():void 0}function vM(e,t,r){const i=[gfe];return Sn(e,eN)&&i.unshift(eN),qe(e,[...i,t],r)}function jde(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]),u=r(l),f=e.filter(m=>!u[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 xT(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}}const kde=[Ip,Ep],Nde=[en,wn,Iu];function Ww(e,t,r,i=new Set){const{rootSchema:s,uiSchemaDefinitions:l}=r;let u={...t},f=e;const d=e[ar],h=d&&i.has(d);if(d){if(i.add(d),l&&d in l&&(u=Lp(l[d],u)),h)return u;try{f=uM(d,s)}catch{f=e}}const m=f[On];if(m&&cn(m))for(const[g,v]of Object.entries(m)){const x=u[g]||{},b=Ww(v,x,r,new Set(i));Object.keys(b).length>0&&(u[g]=b)}for(const g of kde){const v=f[g];if(v&&cn(v)&&!Array.isArray(v)){const x=u[g];if(typeof x!="function"){const w=Ww(v,x||{},r,new Set(i));Object.keys(w).length>0&&(u[g]=w)}}}for(const g of Nde){const v=f[g];if(Array.isArray(v)&&v.length>0){const x=u[g],b=Array.isArray(x)?[...x]:[];let w=!1;for(let S=0;S<v.length;S++){const _=v[S],E=b[S]||{},O=Ww(_,E,r,new Set(i));Object.keys(O).length>0&&(b[S]=O,w=!0)}w&&(u[g]=b)}}return u}function Dde(e,t,r){var i,s;const l=(i=e[iM])!==null&&i!==void 0?i:e[ar],u=l?(s=r.uiSchemaDefinitions)===null||s===void 0?void 0:s[l]:void 0;return u?!t||Object.keys(t).length===0?{...u}:Lp(u,t):t||{}}function Xb(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Xb(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Xb(e.oneOf[0]);if(e.allOf){const t=r=>Xb(r);return e.allOf.some(t)}return!1}function kI(e,t,r,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:u,state:f}=e;return!pN(u,t)||!pN(f,r)}const{props:s,state:l}=e;return!pr(s,t)||!pr(l,r)}function SN(e){const t=T$(e.map(r=>Cn(r)?Cl(r):void 0).flat().filter(r=>r!==void 0));return t.length===1?t[0]:t}function tS(e,t,r,i){const{enableOptionalDataFieldForType:s=[]}=_t(i,e.globalUiOptions);let l;return wn in t&&Array.isArray(t[wn])?l=SN(t[wn]):en in t&&Array.isArray(t[en])?l=SN(t[en]):l=Cl(t),!Ade(e,t)&&!r&&!!l&&!Array.isArray(l)&&!!s.find(u=>u===l)}function wN(e,t=!0){const{year:r,month:i,day:s,hour:l=0,minute:u=0,second:f=0}=e,d=Date.UTC(r,i-1,s,l,u,f),h=new Date(d).toJSON();return t?h:h.slice(0,10)}function bM(e,t=[]){if(!e)return[];let r=[];return vi in e&&(r=r.concat(e[vi].map(i=>{const s=`.${t.join(".")}`;return{property:s,message:i,stack:`${s} ${i}`}}))),Object.keys(e).reduce((i,s)=>{if(s!==vi){const l=e[s];Of(l)&&(i=i.concat(bM(l,[...t,s])))}return i},r)}function zde(e){const t=new RI;return e.length&&e.forEach(r=>{const{property:i,message:s}=r,l=i==="."?[]:x$(i);l.length>0&&l[0]===""&&l.splice(0,1),s&&t.addErrors(s,l)}),t.ErrorSchema}function xs(e,t,r,i){const s=Array.isArray(r)?r:r?.path,l=e===""?[]:[e],u=s?s.concat(...l):l,f=[t.idPrefix,...u].join(t.idSeparator);let d;return t.nameGenerator&&u.length>0&&(d=t.nameGenerator(u,t.idPrefix,i)),{path:u,[rr]:f,...d!==void 0&&{name:d}}}function NI(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const i=e[r];return Of(i)?{...t,[r]:NI(i)}:{...t,[r]:i}}},{})}function $de(e){return Object.values(e).every(t=>t!==-1)}function Pde(e){const{className:t="form-control",type:r,range:i,value:s,select:l,rootId:u,name:f,disabled:d,readonly:h,autofocus:m,registry:g,onBlur:v,onFocus:x}=e,b=`${u}_${r}`,{SelectWidget:w}=g.widgets,S=j.useCallback(_=>l(r,_),[l,r]);return k.jsx(w,{schema:{type:"integer"},id:b,name:f,className:t,options:{enumOptions:xI(i[0],i[1])},placeholder:r,value:s,disabled:d,readonly:h,autofocus:m,onChange:S,onBlur:v,onFocus:x,registry:g,label:"","aria-describedby":So(u)})}function Ide(e){const{time:t=!1,disabled:r=!1,readonly:i=!1,options:s,onChange:l,value:u}=e,[f,d]=j.useState(xT(u,t));j.useEffect(()=>{d(xT(u,t))},[t,u]);const h=j.useCallback((x,b)=>{const w={...f,[x]:typeof b>"u"?-1:b};$de(w)?l(wN(w,t)):d(w)},[f,l,t]),m=j.useCallback(x=>{x.preventDefault(),!(r||i)&&l(void 0)},[r,i,l]),g=j.useCallback(x=>{if(x.preventDefault(),r||i)return;const b=xT(new Date().toJSON(),t);l(wN(b,t))},[r,i,t,l]);return{elements:j.useMemo(()=>Sde(f,t,s.yearsRange,s.format),[f,t,s.yearsRange,s.format]),handleChange:h,handleClear:m,handleSetNow:g}}function rm(e){const t=j.useRef(e);return bf(e,t.current)||(t.current=e),t.current}function Lde(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Ude(e){const{name:t,size:r,type:i}=e;return new Promise((s,l)=>{const u=new window.FileReader;u.onerror=l,u.onload=f=>{var d;typeof((d=f.target)===null||d===void 0?void 0:d.result)=="string"?s({dataURL:Lde(f.target.result,t),name:t,size:r,type:i}):s({dataURL:null,name:t,size:r,type:i})},u.readAsDataURL(e)})}function Vde(e){return Promise.all(Array.from(e).map(Ude))}function EN(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:i,name:s}=yde(r);return[...t,{dataURL:r,name:s,size:i.size,type:i.type}]}catch{return t}},[])}function qde(e,t,r=!1){const i=j.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),s=j.useMemo(()=>Array.isArray(e)?EN(e):EN([e||""]),[e]),l=j.useCallback(f=>{Vde(f).then(d=>{const h=d.map(m=>m.dataURL||null);t(r?i.concat(...h):h[0])})},[i,r,t]),u=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:u}}function Fde(e){if(!e)return"";const t=new Date(e),r=ff(t.getFullYear(),4),i=ff(t.getMonth()+1,2),s=ff(t.getDate(),2),l=ff(t.getHours(),2),u=ff(t.getMinutes(),2),f=ff(t.getSeconds(),2),d=ff(t.getMilliseconds(),3);return`${r}-${i}-${s}T${l}:${u}:${f}.${d}`}function Ib(e,t,r=!1){if(!t)return e;const{errors:i,errorSchema:s}=e;let l=bM(t),u=t;return oa(s)||(u=Lp(s,t,r?"preventDuplicates":!0),l=[...i].concat(l)),{errorSchema:u,errors:l}}function Bde(e){for(const t in e){const r=e,i=r[t];t===ar&&typeof i=="string"&&i.startsWith("#")?r[t]=tI+i:r[t]=SM(i)}return e}function Hde(e){for(let t=0;t<e.length;t++)e[t]=SM(e[t]);return e}function SM(e){return Array.isArray(e)?Hde([...e]):Cn(e)?Bde({...e}):e}var nn;(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)"})(nn||(nn={}));function AR(){return C$("rjsf-array-item-")}function xN(e){return Array.isArray(e)?e.map(t=>({key:AR(),item:t})):[]}function DI(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Gde(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function zI(e,t,r,i){let{addable:s}=_t(i,e.globalUiOptions);return s!==!1&&(t.maxItems!==void 0?s=r.length<t.maxItems:s=!0),s}function $I(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 Kde(e,t){const{schemaUtils:r,globalFormOptions:i}=e;let s=t.items;return i.useFallbackUiForUnsupportedType&&!s?s={}:dM(t)&&dfe(t)&&(s=t.additionalItems),r.getDefaultFormState(s)}function Yde(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s=[],disabled:l=!1,readonly:u=!1,autofocus:f=!1,required:d=!1,placeholder:h,onBlur:m,onFocus:g,registry:v,rawErrors:x,name:b,onSelectChange:w}=e,{widgets:S,schemaUtils:_,globalFormOptions:E,globalUiOptions:O}=v,T=_.retrieveSchema(t.items,s),C=i?.items??{},R=gg(T,C),{widget:M="select",title:D,...I}=_t(i,O),B=ac(t,M,S),V=D??t.title??b,F=_.getDisplayLabel(t,i,O),G=rm(xs("",E,r,!0));return k.jsx(B,{id:G[rr],name:b,multiple:!0,onChange:w,onBlur:m,onFocus:g,options:{...I,enumOptions:R},schema:t,uiSchema:i,registry:v,value:s,disabled:l,readonly:u,required:d,label:V,hideLabel:!F,placeholder:h,autofocus:f,rawErrors:x,htmlName:G.name})}function Zde(e){const{schema:t,fieldPathId:r,uiSchema:i,disabled:s=!1,readonly:l=!1,autofocus:u=!1,required:f=!1,hideError:d,placeholder:h,onBlur:m,onFocus:g,formData:v=[],registry:x,rawErrors:b,name:w,onSelectChange:S}=e,{widgets:_,schemaUtils:E,globalFormOptions:O,globalUiOptions:T}=x,{widget:C,title:R,...M}=_t(i,T),D=ac(t,C,_),I=R??t.title??w,B=E.getDisplayLabel(t,i,T),V=rm(xs("",O,r,!0));return k.jsx(D,{id:V[rr],name:w,multiple:!0,onChange:S,onBlur:m,onFocus:g,options:M,schema:t,uiSchema:i,registry:x,value:v,disabled:s,readonly:l,hideError:d,required:f,label:I,hideLabel:!B,placeholder:h,autofocus:u,rawErrors:b,htmlName:V.name})}function Xde(e){const{schema:t,uiSchema:r,fieldPathId:i,name:s,disabled:l=!1,readonly:u=!1,autofocus:f=!1,required:d=!1,onBlur:h,onFocus:m,registry:g,formData:v=[],rawErrors:x,onSelectChange:b}=e,{widgets:w,schemaUtils:S,globalFormOptions:_,globalUiOptions:E}=g,{widget:O="files",title:T,...C}=_t(r,E),R=ac(t,O,w),M=T??t.title??s,D=S.getDisplayLabel(t,r,E),I=rm(xs("",_,i,!0));return k.jsx(R,{options:C,id:I[rr],name:s,multiple:!0,onChange:b,onBlur:h,onFocus:m,schema:t,uiSchema:r,value:v,disabled:l,readonly:u,required:d,registry:g,autofocus:f,rawErrors:x,label:M,hideLabel:!D,htmlName:I.name})}function PI(e){const{itemKey:t,index:r,name:i,disabled:s,hideError:l,readonly:u,registry:f,uiOptions:d,parentUiSchema:h,canAdd:m,canRemove:g=!0,canMoveUp:v,canMoveDown:x,itemSchema:b,itemData:w,itemUiSchema:S,itemFieldPathId:_,itemErrorSchema:E,autofocus:O,onBlur:T,onFocus:C,onChange:R,rawErrors:M,totalItems:D,title:I,handleAddItem:B,handleCopyItem:V,handleRemoveItem:F,handleReorderItems:G}=e,{schemaUtils:W,fields:{ArraySchemaField:te,SchemaField:H},globalUiOptions:J}=f,re=rm(_),le=te||H,ae=kt("ArrayFieldItemTemplate",f,d),N=W.getDisplayLabel(b,S,J),{description:U}=_t(S),X=!!U||!!b.description,{orderable:L=!0,removable:Z=!0,copyable:ee=!1}=d,de={moveUp:L&&v,moveDown:L&&x,copy:ee&&m,remove:Z&&g,toolbar:!1};de.toolbar=Object.keys(de).some(xe=>de[xe]);const ye=j.useCallback(xe=>{B(xe,r+1)},[B,r]),Te=j.useCallback(xe=>{V(xe,r)},[V,r]),Ae=j.useCallback(xe=>{F(xe,r)},[F,r]),ue=j.useCallback(xe=>{G(xe,r,r-1)},[G,r]),be=j.useCallback(xe=>{G(xe,r,r+1)},[G,r]),Ee={children:k.jsx(le,{name:i,title:I,index:r,schema:b,uiSchema:S,formData:w,errorSchema:E,fieldPathId:re,required:Gde(b),onChange:R,onBlur:T,onFocus:C,registry:f,disabled:s,readonly:u,hideError:l,autofocus:O,rawErrors:M}),buttonsProps:{fieldPathId:re,disabled:s,readonly:u,canAdd:m,hasCopy:de.copy,hasMoveUp:de.moveUp,hasMoveDown:de.moveDown,hasRemove:de.remove,index:r,totalItems:D,onAddItem:ye,onCopyItem:Te,onRemoveItem:Ae,onMoveUpItem:ue,onMoveDownItem:be,registry:f,schema:b,uiSchema:S},itemKey:t,className:"rjsf-array-item",disabled:s,hasToolbar:de.toolbar,index:r,totalItems:D,readonly:u,registry:f,schema:b,uiSchema:S,parentUiSchema:h,displayLabel:N,hasDescription:X};return k.jsx(ae,{...Ee})}function Qde(e){const{schema:t,uiSchema:r={},errorSchema:i,fieldPathId:s,formData:l,name:u,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:x,onBlur:b,onFocus:w,rawErrors:S,onChange:_,keyedFormData:E,handleAddItem:O,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:R}=e,M=t.title||f||u,{schemaUtils:D,fields:I,formContext:B,globalFormOptions:V,globalUiOptions:F}=x,{OptionalDataControlsField:G}=I,W=_t(r,F),te=Cn(t.items)?t.items:{},H=D.retrieveSchema(te),J=DI(E),re=tS(x,t,g,r),le=Pg(l),ae=zI(x,t,J,r)&&(!re||le),N=le?E:[],U=re?" rjsf-optional-array-field":"",X=e.childFieldPathId??s,L=re?k.jsx(G,{...e,fieldPathId:X}):void 0,Z={canAdd:ae,items:N.map((de,ye)=>{const{key:Te,item:Ae}=de,ue=Ae,be=D.retrieveSchema(te,ue),Ee=i?i[ye]:void 0,xe=xs(ye,V,X),Me=$I(r,Ae,ye,B),Ve={itemKey:Te,index:ye,name:u&&`${u}-${ye}`,registry:x,uiOptions:W,hideError:v,readonly:h,disabled:d,required:g,title:M?`${M}-${ye+1}`:void 0,canAdd:ae,canMoveUp:ye>0,canMoveDown:ye<J.length-1,itemSchema:be,itemFieldPathId:xe,itemErrorSchema:Ee,itemData:ue,itemUiSchema:Me,autofocus:m&&ye===0,onBlur:b,onFocus:w,rawErrors:S,totalItems:E.length,handleAddItem:O,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:R,onChange:_};return k.jsx(PI,{...Ve},Te)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${H.type}${U}`,disabled:d,fieldPathId:s,uiSchema:r,onAddClick:O,readonly:h,required:g,schema:t,title:M,formData:J,rawErrors:S,registry:x,optionalDataControl:L},ee=kt("ArrayFieldTemplate",x,W);return k.jsx(ee,{...Z})}function Wde(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:u,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:x,onBlur:b,onFocus:w,rawErrors:S,keyedFormData:_,onChange:E,handleAddItem:O,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:R}=e;let{formData:M=[]}=e;const D=t.title||f||u,{schemaUtils:I,fields:B,formContext:V,globalFormOptions:F,globalUiOptions:G}=x,W=_t(r,G),{OptionalDataControlsField:te}=B,H=tS(x,t,g,r),J=Pg(i),le=(Cn(t.items)?t.items:[]).map((ye,Te)=>I.retrieveSchema(ye,M[Te])),ae=Cn(t.additionalItems)?I.retrieveSchema(t.additionalItems,i):null,N=e.childFieldPathId??l;M.length<le.length&&(M=M.concat(new Array(le.length-M.length)));const U=J?_:[],X=H?" rjsf-optional-array-field":"",L=H?k.jsx(te,{...e,fieldPathId:N}):void 0,Z=zI(x,t,M,r)&&!!ae&&(!H||J),ee={canAdd:Z,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${X}`,disabled:d,fieldPathId:l,formData:i,items:U.map((ye,Te)=>{const{key:Ae,item:ue}=ye,be=ue,Ee=Te>=le.length,xe=(Ee&&Cn(t.additionalItems)?I.retrieveSchema(t.additionalItems,be):le[Te])||{},Me=xs(Te,F,N);let Ve;Ee?Ve=r.additionalItems:Array.isArray(r.items)?Ve=r.items[Te]:Ve=$I(r,ue,Te,V);const Ie=s?s[Te]:void 0,Be={index:Te,itemKey:Ae,name:u&&`${u}-${Te}`,registry:x,uiOptions:W,hideError:v,readonly:h,disabled:d,required:g,title:D?`${D}-${Te+1}`:void 0,canAdd:Z,canRemove:Ee,canMoveUp:Te>=le.length+1,canMoveDown:Ee&&Te<M.length-1,itemSchema:xe,itemData:be,itemUiSchema:Ve,itemFieldPathId:Me,itemErrorSchema:Ie,autofocus:m&&Te===0,onBlur:b,onFocus:w,rawErrors:S,totalItems:_.length,onChange:E,handleAddItem:O,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:R};return k.jsx(PI,{...Be},Ae)}),onAddClick:O,readonly:h,required:g,registry:x,schema:t,uiSchema:r,title:D,errorSchema:s,rawErrors:S,optionalDataControl:L},de=kt("ArrayFieldTemplate",x,W);return k.jsx(de,{...ee})}function Jde(e=[]){const t=j.useMemo(()=>Xl(e),[e]),[r,i]=j.useState(()=>({formDataHash:t,keyedFormData:xN(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]})):xN(f),l=t,i({formDataHash:l,keyedFormData:s})}const u=j.useCallback(f=>{const d=DI(f),h=Xl(d);return i({formDataHash:h,keyedFormData:f}),d},[]);return{keyedFormData:s,updateKeyedFormData:u}}function ehe(e){const{schema:t,uiSchema:r,errorSchema:i,fieldPathId:s,registry:l,formData:u,onChange:f}=e,{globalFormOptions:d,schemaUtils:h,translateString:m}=l,{keyedFormData:g,updateKeyedFormData:v}=Jde(u),x=e.childFieldPathId??s,b=j.useCallback((R,M)=>{R&&R.preventDefault();let D;if(i){D={};for(const V in i){const F=parseInt(V);M===void 0||F<M?Vn(D,[F],i[V]):F>=M&&Vn(D,[F+1],i[V])}}const I={key:AR(),item:Kde(l,t)},B=[...g];M!==void 0?B.splice(M,0,I):B.push(I),f(v(B),x.path,D)},[g,l,t,f,v,i,x]),w=j.useCallback((R,M)=>{R&&R.preventDefault();let D;if(i){D={};for(const V in i){const F=parseInt(V);F<=M?Vn(D,[F],i[V]):F>M&&Vn(D,[F+1],i[V])}}const I={key:AR(),item:K1(g[M].item)},B=[...g];M!==void 0?B.splice(M+1,0,I):B.push(I),f(v(B),x.path,D)},[g,f,v,i,x]),S=j.useCallback((R,M)=>{R&&R.preventDefault();let D;if(i){D={};for(const B in i){const V=parseInt(B);V<M?Vn(D,[V],i[B]):V>M&&Vn(D,[V-1],i[B])}}const I=g.filter((B,V)=>V!==M);f(v(I),x.path,D)},[g,f,v,i,x]),_=j.useCallback((R,M,D)=>{R&&(R.preventDefault(),R.currentTarget.blur());let I;if(i){I={};for(const F in i){const G=parseInt(F);G==M?Vn(I,[D],i[M]):G==D?Vn(I,[M],i[D]):Vn(I,[F],i[G])}}function B(){const F=g.slice();return F.splice(M,1),F.splice(D,0,g[M]),F}const V=B();f(v(V),x.path,I)},[g,f,v,i,x]),E=j.useCallback((R,M,D,I)=>{f(R===void 0?null:R,M,D,I)},[f]),O=j.useCallback(R=>{f(R,x.path,void 0,x?.[rr])},[f,x]),T={...e,formData:u,fieldPathId:x,onSelectChange:O},C={...e,handleAddItem:b,handleCopyItem:w,handleRemoveItem:S,handleReorderItems:_,keyedFormData:g,onChange:E};if(!(Ip in t)){if(!d.useFallbackUiForUnsupportedType){const M=_t(r),D=kt("UnsupportedFieldTemplate",l,M);return k.jsx(D,{schema:t,fieldPathId:s,reason:m(nn.MissingItems),registry:l})}const R={...t,[Ip]:{type:void 0}};T.schema=R,C.schema=R}return h.isMultiSelect(T.schema)?k.jsx(Yde,{...T}):vI(r)?k.jsx(Zde,{...T}):dM(T.schema)?k.jsx(Wde,{...C}):h.isFilesArray(T.schema,r)?k.jsx(Xde,{...T}):k.jsx(Qde,{...C})}function the(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,registry:u,required:f,disabled:d,readonly:h,hideError:m,autofocus:g,title:v,onChange:x,onFocus:b,onBlur:w,rawErrors:S}=e,{title:_}=t,{widgets:E,translateString:O,globalUiOptions:T}=u,{widget:C="checkbox",title:R,label:M=!0,enumNames:D,...I}=_t(i,T),B=ac(t,C,E),V=O(nn.YesLabel),F=O(nn.NoLabel);let G;const W=R??_??v??r;if(Array.isArray(t.oneOf))G=gg({oneOf:t.oneOf.map(H=>{if(Cn(H))return{...H,title:H.title||(H.const===!0?V:F)}}).filter(H=>H)},i);else{const H=t.enum??[!0,!1];!D&&H.length===2&&H.every(J=>typeof J=="boolean")?G=[{value:H[0],label:H[0]?V:F},{value:H[1],label:H[1]?V:F}]:G=gg({enum:H},i)}const te=j.useCallback((H,J,re)=>x(H,s.path,J,re),[x,s]);return k.jsx(B,{options:{...I,enumOptions:G},schema:t,uiSchema:i,id:s.$id,name:r,onChange:te,onFocus:b,onBlur:w,label:W,hideLabel:!M,value:l,required:f,disabled:d,readonly:h,hideError:m,registry:u,autofocus:g,rawErrors:S,htmlName:s.name})}function nhe(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function rhe(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function ahe(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 ihe(e){const{id:t,formData:r,displayLabel:i=!0,schema:s,name:l,uiSchema:u,required:f,disabled:d=!1,readonly:h=!1,onBlur:m,onFocus:g,registry:v,fieldPathId:x,onChange:b,errorSchema:w}=e,{translateString:S,fields:_,globalFormOptions:E}=v,[O,T]=j.useState(rhe(r)),C=_t(u),R=rm(xs("__internal_type_selector",E,x)),M=S(nn.Type),D=j.useMemo(()=>nhe(M),[M]),I=F=>{F!=null&&(T(F),b(ahe(r,F),x.path,w,t))};if(!E.useFallbackUiForUnsupportedType){const{reason:F=S(nn.UnknownFieldType,[String(s.type)])}=e,G=kt("UnsupportedFieldTemplate",v,C);return k.jsx(G,{schema:s,fieldPathId:x,reason:F,registry:v})}const B=kt("FallbackFieldTemplate",v,C),{SchemaField:V}=_;return k.jsx(B,{schema:s,registry:v,typeSelector:k.jsx(V,{fieldPathId:R,name:`${l}__fallback_type`,schema:D,formData:O,onChange:I,onBlur:m,onFocus:g,registry:v,hideLabel:!i,disabled:d,readonly:h,required:f},r?Xl(r):"__empty__"),schemaField:k.jsx(V,{...e,schema:{type:O,title:S(nn.Value),...O==="object"&&{additionalProperties:!0}}})})}var Wl;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Wl||(Wl={}));var Qb;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Qb||(Qb={}));const ohe=/^\$lookup=(.+)/,_T="layoutGrid";function _N(e,t){return e??t}function she(e){return/^\d+?$/.test(e)}const Ef=mM();function lhe(e,t,r,i,s){const l=qe(r,[_R],{}),u=qe(r,e),f={...qe(u,[Sf],{}),...t,...l},d={...u};oa(f)||Vn(d,[Sf],f),oa(l)||Vn(d,[_R],l);let{readonly:h}=_t(d);return(s===!0||b$(h)&&i===!0)&&(h=!0,Sn(f,uT)?Vn(d,[Sf,uT],!0):Vn(d,`ui:${uT}`,!0)),{fieldUiSchema:d,uiReadonly:h}}function che(e,t,r="$0m3tH1nG Un3xP3cT3d"){const i=VC([t]).sort(),s=VC([r]).sort();switch(e){case Qb.ALL:return bf(i,s);case Qb.SOME:return oj(i,s).length>0;case Qb.NONE:return oj(i,s).length===0;default:return!1}}function Rx(e,t,r){let i={},s=e[t];if(Of(s)){const{children:l,className:u,...f}=s;if(s=l,u){const h=u.split(" ").map(m=>vM(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 TN(e,t,r){let i;if(she(r)&&e&&e?.type==="array"&&Sn(e,Ip)){const s=Number(r),l=e[Ip];Array.isArray(l)?s>l.length?i=g$(l):i=l[s]:i=l,t={[rr]:t[rr],path:[...t.path.slice(0,t.path.length-1),s]}}return{rawSchema:i,fieldPathId:t}}function uhe(e,t,r,i,s){const{schemaUtils:l,globalFormOptions:u}=e;let f=r,d=s;const h=t.split("."),m=h.pop();let g=l.retrieveSchema(f,i),v=i,x=g.readOnly;h.forEach(S=>{if(d=xs(S,u,d),Sn(g,On))f=qe(g,[On,S],{});else if(g&&(Sn(g,en)||Sn(g,wn))){const _=Sn(g,en)?en:wn,E=l.findSelectedOptionInXxxOf(g,S,_,v);f=qe(E,[On,S],{})}else{const _=TN(g,d,S);f=_.rawSchema??{},d=_.fieldPathId}v=qe(v,S,{}),g=l.retrieveSchema(f,v),x=_N(g.readOnly,x)});let b,w=!1;if(oa(g)&&(g=void 0),g&&m){if(g&&(Sn(g,en)||Sn(g,wn))){const _=Sn(g,en)?en:wn;g=l.findSelectedOptionInXxxOf(g,m,_,v)}d=xs(m,u,d),w=g!==void 0&&Array.isArray(g.required)&&jne(g.required,m);const S=TN(g,d,m);if(S.rawSchema?(g=S.rawSchema,d=S.fieldPathId):(g=qe(g,[On,m]),g=g&&l.retrieveSchema(g)),x=_N(g?.readOnly,x),g&&(Sn(g,en)||Sn(g,wn))){const _=Sn(g,en)?en:wn,E=rc(g);b={options:g[_],hasDiscriminator:!!E}}}return{schema:g,isRequired:w,isReadonly:x,optionsInfo:b,fieldPathId:d}}function fhe(e,t){let r=e;return Af(r)&&(r=vM(t,r)),V1(r)?r:null}function dhe(e,t){let r,i=null,s={},l;if(Af(t)||b$(t))r=t??"";else{const{name:u="",render:f,...d}=t;r=u,s=d,oa(s)||wne(s,(h,m)=>{if(Af(h)){const g=ohe.exec(h);if(Array.isArray(g)&&g.length>1){const v=g[1];s[m]=vM(e,v,v)}}}),i=fhe(f,e),!u&&i&&(l=k.jsx(i,{...d,"data-testid":Ef.uiComponent}))}return{name:r,UIComponent:i,uiProps:s,rendered:l}}function Ox(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:i,schema:s,formData:l}=r,{schemaUtils:u}=i,f=u.retrieveSchema(s,l);return t.map(d=>j.createElement(wM,{...r,key:`layoutGrid-${Xl(d)}`,schema:f,layoutGridSchema:d}))}function hhe(e){const{layoutGridSchema:t,...r}=e,{formData:i,registry:s}=r,{children:l,gridProps:u}=Rx(t,Wl.CONDITION,s),{operator:f,field:d="",value:h}=u,m=qe(i,d,null);return che(f,m,h)?k.jsx(Ox,{...r,childrenLayoutGridSchemaId:l}):null}function phe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:u}=Rx(t,Wl.COLUMN,i),f=_t(s),d=kt("GridTemplate",i,f);return k.jsx(d,{column:!0,"data-testid":Ef.col,...u,children:k.jsx(Ox,{...r,childrenLayoutGridSchemaId:l})})}function mhe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:u}=Rx(t,Wl.COLUMNS,i),f=_t(s),d=kt("GridTemplate",i,f);return l.map(h=>k.jsx(d,{column:!0,"data-testid":Ef.col,...u,children:k.jsx(Ox,{...r,childrenLayoutGridSchemaId:[h]})},`column-${Xl(h)}`))}function ghe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:u}=Rx(t,Wl.ROW,i),f=_t(s),d=kt("GridTemplate",i,f);return k.jsx(d,{...u,"data-testid":Ef.row,children:k.jsx(Ox,{...r,childrenLayoutGridSchemaId:l})})}function yhe(e){const{gridSchema:t,schema:r,uiSchema:i,errorSchema:s,fieldPathId:l,onBlur:u,onFocus:f,formData:d,readonly:h,registry:m,layoutGridSchema:g,...v}=e,{onChange:x}=v,{fields:b}=m,{SchemaField:w,LayoutMultiSchemaField:S}=b,_=dhe(m,t),{name:E,UIComponent:O,uiProps:T}=_,{schema:C,isRequired:R,isReadonly:M,optionsInfo:D,fieldPathId:I}=uhe(m,E,r,d,l),B=rm(I);if(_.rendered)return _.rendered;if(C){const V=D?.hasDiscriminator?S:w,{fieldUiSchema:F,uiReadonly:G}=lhe(E,T,i,M,h);return k.jsx(V,{"data-testid":D?.hasDiscriminator?Ef.layoutMultiSchemaField:Ef.field,...v,name:E,required:R,readonly:G,schema:C,uiSchema:F,errorSchema:qe(s,E),fieldPathId:B,formData:qe(d,E),onChange:x,onBlur:u,onFocus:f,options:D?.options,registry:m})}return O?k.jsx(O,{"data-testid":Ef.uiComponent,...v,name:E,required:R,formData:d,readOnly:!!M||h,errorSchema:s,uiSchema:i,schema:r,fieldPathId:l,onBlur:u,onFocus:f,registry:m,...T}):null}function wM(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const i=_t(t);if(!r&&_T in i&&Cn(i[_T])&&(r=i[_T]),Cn(r)){if(Wl.ROW in r)return k.jsx(ghe,{...e,layoutGridSchema:r});if(Wl.COLUMN in r)return k.jsx(phe,{...e,layoutGridSchema:r});if(Wl.COLUMNS in r)return k.jsx(mhe,{...e,layoutGridSchema:r});if(Wl.CONDITION in r)return k.jsx(hhe,{...e,layoutGridSchema:r})}return k.jsx(yhe,{...e,gridSchema:r})}wM.TEST_IDS=Ef;function vhe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:u,name:f}=e,d=_t(s,u.globalUiOptions),{title:h}=d,{title:m}=i,g=h||r||m||f;if(!g)return null;const v=kt("TitleFieldTemplate",u,d);return k.jsx(v,{id:Cx(t),title:g,required:l,schema:i,uiSchema:s,registry:u})}function TT(e,t,r){const i="!@#!@$@#$!@$#";return e.map(({schema:l})=>l).find(l=>{const u=qe(l,[On,t]);return qe(u,xx,qe(u,Es,i))===r})}function CN(e,t,r,i,s){const l=t.map(d=>r.retrieveSchema(d,s));let u=e;Sn(e,en)?u={...e,[en]:l}:Sn(e,wn)&&(u={...e,[wn]:l});const f=gg(u,i);if(!f)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(u)}`);return f}function bhe(e){const{name:t,baseType:r,disabled:i=!1,formData:s,fieldPathId:l,onBlur:u,onChange:f,options:d,onFocus:h,registry:m,uiSchema:g,schema:v,autofocus:x,readonly:b,required:w,errorSchema:S,hideError:_=!1}=e,{widgets:E,schemaUtils:O,globalUiOptions:T}=m,[C,R]=j.useState(CN(v,d,O,g,s)),M=qe(l,rr),D=rc(v),I=kt("FieldErrorTemplate",m,d),B=kt("FieldTemplate",m,d),V=Xl(v),F=Xl(d),G=g?Xl(g):"",W=s?Xl(s):"";j.useEffect(()=>{R(CN(v,d,O,g,s))},[V,F,O,G,W]);const{widget:te=D?"radio":"select",title:H="",placeholder:J="",optionsSchemaSelector:re=D,hideError:le,...ae}=_t(g);if(!re)throw new Error("No selector field provided for the LayoutMultiSchemaField");const N=qe(s,re);let U=qe(C[0]?.schema,[On,re],{});const X=TT(C,re,N);U=U?.type?U:{...U,type:X?.type||r};const L=ac(U,te,E),Z=le===void 0?_:!!le,ee=qe(S,[vi],[]),de=hg(S,[vi]),ye=O.getDisplayLabel(v,g,T),Te=be=>{const Ee=TT(C,re,be),xe=TT(C,re,N);let Me=O.sanitizeDataForNewSchema(Ee,xe,s);Me&&Ee&&(Me=O.getDefaultFormState(Ee,Me,"excludeObjectChildren")),Me&&Vn(Me,re,be),f(Me,l.path,void 0,M)},Ae={enumOptions:C,...ae},ue=!Z&&ee.length>0?k.jsx(I,{fieldPathId:l,schema:v,errors:ee,registry:m}):void 0;return k.jsx(B,{fieldPathId:l,id:M,schema:v,label:(H||v.title)??"",disabled:i||Array.isArray(C)&&oa(C),uiSchema:g,required:w,readonly:!!b,registry:m,displayLabel:ye,errors:ue,onChange:f,onKeyRename:Lw,onKeyRenameBlur:Lw,onRemoveProperty:Lw,children:k.jsx(L,{id:M,name:t,schema:v,label:(H||v.title)??"",disabled:i||Array.isArray(C)&&oa(C),uiSchema:g,autofocus:x,readonly:b,required:w,registry:m,multiple:!1,rawErrors:ee,hideError:Z,hideLabel:!ye,errorSchema:de,placeholder:J,onChange:Te,onBlur:u,onFocus:h,value:N,options:Ae,htmlName:l.name})})}class RN extends j.Component{constructor(t){super(t);const{formData:r,options:i,registry:{schemaUtils:s}}=this.props,l=i.map(u=>s.retrieveSchema(u,r));this.state={retrievedOptions:l,selectedOption:this.getMatchingOption(0,r,l)}}componentDidUpdate(t,r){const{formData:i,options:s,fieldPathId:l}=this.props,{selectedOption:u}=this.state;let f=this.state;if(!pr(t.options,s)){const{registry:{schemaUtils:d}}=this.props,h=s.map(m=>d.retrieveSchema(m,i));f={selectedOption:u,retrievedOptions:h}}if(!pr(i,t.formData)&&l.$id===t.fieldPathId.$id){const{retrievedOptions:d}=f,h=this.getMatchingOption(u,i,d);r&&h!==u&&(f={selectedOption:h,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(t,r,i){const{schema:s,registry:{schemaUtils:l}}=this.props,u=rc(s);return l.getClosestMatchingOption(r,i,t,u)}onOptionChange=t=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:s,onChange:l,registry:u,fieldPathId:f}=this.props,{schemaUtils:d}=u,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:u,readonly:f,required:d=!1,registry:h,schema:m,uiSchema:g}=this.props,{widgets:v,fields:x,translateString:b,globalUiOptions:w,schemaUtils:S}=h,{SchemaField:_}=x,E=kt("MultiSchemaFieldTemplate",h,w),O=tS(h,m,d,g),T=Pg(s),{selectedOption:C,retrievedOptions:R}=this.state,{widget:M="select",placeholder:D,autofocus:I,autocomplete:B,title:V=m.title,...F}=_t(g,w),G=ac({type:"number"},M,v),W=qe(i,vi,[]),te=hg(i,[vi]),H=S.getDisplayLabel(m,g,w),J=C>=0&&R[C]||null;let re;if(J){const{required:ee}=m;re=ee?Lu({required:ee},J):J}let le=[];en in m&&g&&en in g?Array.isArray(g[en])?le=g[en]:console.warn(`uiSchema.oneOf is not an array for "${V||t}"`):wn in m&&g&&wn in g&&(Array.isArray(g[wn])?le=g[wn]:console.warn(`uiSchema.anyOf is not an array for "${V||t}"`));let ae=g;C>=0&&le.length>C&&(ae=le[C]);const N=V?nn.TitleOptionPrefix:nn.OptionPrefix,U=V?[V]:[],X=R.map((ee,de)=>{const{title:ye=ee.title}=_t(le[de]);return{label:ye||b(N,U.concat(String(de+1))),value:de}}),L=!O||T?k.jsx(G,{id:this.getFieldId(),name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:l,onFocus:u,disabled:r||oa(X),multiple:!1,rawErrors:W,errorSchema:te,value:C>=0?C:void 0,options:{enumOptions:X,...F},registry:h,placeholder:D,autocomplete:B,autofocus:I,label:V??t,hideLabel:!H,readonly:f}):void 0,Z=re&&re.type!=="null"&&k.jsx(_,{...this.props,schema:re,uiSchema:ae})||null;return k.jsx(E,{schema:m,registry:h,uiSchema:g,selector:L,optionSchemaField:Z})}}const She=/\.([0-9]*0)*$/,whe=/[0.]0*$/;function Ehe(e){const{registry:t,onChange:r,formData:i,value:s}=e,[l,u]=j.useState(s),{StringField:f}=t.fields;let d=i;const h=j.useCallback((m,g,v,x)=>{u(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const b=typeof m=="string"&&m.match(She)?J4(m.replace(whe,"")):J4(m);r(b,g,v,x)},[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 Hl(){return Hl=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},Hl.apply(null,arguments)}const pw=["strong","em","del","mark"],ON=[["**",pw[0]],["__",pw[0]],["~~",pw[2]],["==",pw[3]],["*","em"],["_","em"]];function xhe(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 _he(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="",u=0;u<6;u++){var f=ON[u][0];if(e.startsWith(f)&&e.length>=2*f.length){i=f,s=f.length,l=ON[u][1];break}}if(!i)return null;for(var d=s,h=!1,m=!1,g="",v=0,x="",b=!1,w="";d<e.length;){var S=e[d];if(b)x+=S,b=!1,w=S,d++;else if(S!=="\\")if(S!=="`"||v!==0){if(S==="["&&!h&&v===0){var _=xhe(e,d);if(_!==-1){x+=e.slice(d,_),d=_,w=e[_-1];continue}}if(m)x+=S,g?S===g&&(g=""):S==='"'||S==="'"?g=S:S===">"&&(m=!1),w=S,d++;else if(S!=="<"||h){if(S===`
61
+ `&&w===`
62
+ `&&!h&&v===0)return null;if(!h&&v===0){for(var E=0;d+E<e.length&&e[d+E]===i[0];)E++;if(E>=s&&(s!==1||i!=="*"&&i!=="_"||e[d-1]!==i&&e[d+1]!==i)){var O=[e.slice(0,d+E),l,x+e.slice(d+s,d+E)];return O.index=0,O.input=e,O}}x+=S,w=S,d++}else{var T=e[d+1],C=e.indexOf(">",d);if(C!==-1){var R=e.slice(d,C+1).endsWith("/>");T==="/"?v=Math.max(0,v-1):R||v++}m=!0,x+=S,w=S,d++}}else h=!h,x+=S,w=S,d++;else x+=S,b=!0,w=S,d++}return null}const The=["children","options"],AN=["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"}),MN={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Che=["style","script","pre"],Rhe=["src","href","data","formAction","srcDoc","action"],Ohe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Ahe=/\n{2,}$/,jN=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Mhe=/^ *> ?/gm,jhe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,khe=/^ {2,}\n/,Nhe=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,kN=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,NN=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Dhe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,zhe=/^(?:\n *)*\n/,$he=/\r\n?/g,Phe=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Ihe=/^\[\^([^\]]+)]/,Lhe=/\f/g,Uhe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Vhe=/^\[(x|\s)\]/,DN=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,zN=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,$N=/^([^\n]+)\n *(=|-)\2{2,} *\n/,EM=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function qhe(e){const t=EM.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 u=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,x=-1;if(e[g+1]==="/")x=g;else if(e[g+1]===i[0]||e[g+1]===r[0]){let b=!0;for(let w=0;w<i.length;w++){const S=e[g+1+w];if(S!==i[w]&&S!==r[w]){b=!1;break}}!b||e[g+s]!==" "&&e[g+s]!==">"||(v=g)}if(v!==-1||x!==-1)if(v!==-1&&(x===-1||v<x))l=v+s+1,d++;else{let b=x+2;for(;b<h;){const S=e[b];if(S!==" "&&S!==" "&&S!==`
64
+ `&&S!=="\r")break;b++}if(b+i.length>h)return null;let w=!0;for(let S=0;S<i.length;S++){const _=e[b+S];if(_!==i[S]&&_!==r[S]){w=!1;break}}if(!w){l=b;continue}for(b+=i.length;b<h;){const S=e[b];if(S!==" "&&S!==" "&&S!==`
65
+ `&&S!=="\r")break;b++}if(b>=h||e[b]!==">"){l=b;continue}f=x,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(u,f)]}const Fhe=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,PN=/^<!--[\s\S]*?(?:-->)/,Bhe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,MR=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Hhe=/^\{.*\}$/,Ghe=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Khe=/^<([^ >]+[:@\/][^ >]+)>/,Yhe=/-([a-z])?/gi,IN=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Zhe=/^[^\n]+(?: \n|\n{2,})/,Xhe=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Qhe=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Whe=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Jhe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,epe=/\t/g,tpe=/(^ *\||\| *$)/g,npe=/^ *:-+: *$/,rpe=/^ *:-+ *$/,ape=/^ *-+: *$/,ipe=/^(:[a-zA-Z0-9-_]+:)/,ope=/^\\([^0-9A-Za-z\s])/,spe=/\\([^0-9A-Za-z\s])/g,lpe=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,cpe=/^\n+/,upe=/^([ \t]*)/,fpe=/(?:^|\n)( *)$/,xM="(?:\\d+\\.)",_M="(?:[*+-])";function II(e){return"( *)("+(e===1?xM:_M)+") +"}const LI=II(1),UI=II(2);function VI(e){return RegExp("^"+(e===1?LI:UI))}const dpe=VI(1),hpe=VI(2);function qI(e){return RegExp("^"+(e===1?LI:UI)+"[^\\n]*(?:\\n(?!\\1"+(e===1?xM:_M)+" )[^\\n]*)*(\\n|$)","gm")}const ppe=qI(1),mpe=qI(2);function FI(e){const t=e===1?xM:_M;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const BI=FI(1),HI=FI(2);function LN(e,t){const r=t===1,i=r?BI:HI,s=r?ppe:mpe,l=r?dpe:hpe;return{t:u=>l.test(u),o:mf(function(u,f){const d=fpe.exec(f.prevCapture);return d&&(f.list||!f.inline&&!f.simple)?i.exec(u=d[1]+u):null}),u:1,i(u,f,d){const h=r?+u[2]:void 0,m=u[0].replace(Ahe,`
67
+ `).match(s),g=l.exec(m[0]),v=RegExp("^ {1,"+(g?g[0].length:0)+"}","gm");let x=!1;return{items:m.map(function(b,w){const S=b.replace(v,"").replace(l,""),_=w===m.length-1,E=Ul(S,`
68
+
69
+ `)||_&&x;x=E;const O=d.inline,T=d.list;let C;d.list=!0,E?(d.inline=!1,C=Wb(S)+`
70
+
71
+ `):(d.inline=!0,C=Wb(S));const R=f(C,d);return d.inline=O,d.list=T,R}),ordered:r,start:h}}}}const gpe=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),ype=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function UN(e){return typeof e=="string"}function Wb(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function jR(e,t){return e.startsWith(t)}function Ul(e,t){return e.indexOf(t)!==-1}function vpe(e,t,r){if(Array.isArray(r)){for(let i=0;i<r.length;i++)if(jR(e,r[i]))return!0;return!1}return r(e,t)}function xb(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 bpe(e){return ape.test(e)?"right":npe.test(e)?"center":rpe.test(e)?"left":null}function VN(e,t,r,i){const s=r.inTable;r.inTable=!0;let l=[[]],u="";function f(){if(!u)return;const d=l[l.length-1];d.push.apply(d,t(u,r)),u=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,h,m)=>{d.trim()==="|"&&(f(),i)?h!==0&&h!==m.length-1&&l.push([]):u+=d}),f(),r.inTable=s,l}function Spe(e,t,r){r.inline=!0;const i=e[2]?e[2].replace(tpe,"").split("|").map(bpe):[],s=e[3]?(function(u,f,d){return u.trim().split(`
72
+ `).map(function(h){return VN(h,f,d,!0)})})(e[3],t,r):[],l=VN(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 qN(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function mf(e){return e.inline=1,e}function af(e){return mf(function(t,r){return r.inline?e.exec(t):null})}function mw(e){return mf(function(t,r){return r.inline||r.simple?e.exec(t):null})}function Cu(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function FN(e){return mf(function(t){return e.exec(t)})}const wpe=/(javascript|vbscript|data(?!:image)):/i;function Epe(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(wpe.test(t))return null}catch{return null}return e}function ql(e){return e&&e.replace(spe,"$1")}function Jw(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 xpe(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 _pe(e,t,r){const i=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=i,s}const Tpe=(e,t,r)=>({children:Jw(t,e[2],r)});function CT(){return{}}function Cpe(...e){return e.filter(Boolean).join(" ")}function RT(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 OT(e,t,r,i){if(!t||!t.trim())return null;const s=t.match(Ohe);return s?s.reduce(function(l,u){const f=u.indexOf("=");if(f!==-1){const d=(function(g){return g.indexOf("-")!==-1&&g.match(Bhe)===null&&(g=g.replace(Yhe,function(v,x){return x.toUpperCase()})),g})(u.slice(0,f)).trim(),h=AN[d]||d;if(h==="ref")return l;const m=l[h]=(function(g,v,x,b){return v==="style"?(function(w){const S=[];if(!w)return S;let _="",E=0,O="";for(let C=0;C<w.length;C++){const R=w[C];if(R==='"'||R==="'")O?R===O&&(O="",E--):(O=R,E++);else if(R==="("&&_.endsWith("url"))E++;else if(R===")"&&E>0)E--;else if(R===";"&&E===0){const M=_.indexOf(":");M>0&&S.push([_.slice(0,M).trim(),_.slice(M+1).trim()]),_="";continue}_+=R}const T=_.indexOf(":");return T>0&&S.push([_.slice(0,T).trim(),_.slice(T+1).trim()]),S})(x).reduce(function(w,[S,_]){return w[S.replace(/(-[a-z])/g,E=>E[1].toUpperCase())]=b(_,g,S),w},{}):Rhe.indexOf(v)!==-1?b(ql(x),g,v):(x.match(Hhe)&&(x=ql(x.slice(1,x.length-1))),x==="true"||x!=="false"&&x)})(e,d,(function(g){const v=g[0];return(v==='"'||v==="'")&&g.length>=2&&g[g.length-1]===v?g.slice(1,-1):g})(u.slice(f+1).trim()),r);typeof m=="string"&&(EM.test(m)||MR.test(m))&&(l[h]=i(m.trim()))}else u!=="style"&&(l[AN[u]||u]=!0);return l},{}):null}function BN(e,t){for(let r=0;r<e.length;r++)if(e[r].test(t))return!0;return!1}function Rpe(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Hl({},MN,t.namedCodesToUnicode):MN;const r=t.slugify||xb,i=t.sanitizer||Epe,s=t.createElement||j.createElement,l=[jN,kN,NN,t.enforceAtxHeadings?zN:DN,$N,IN,BI,HI],u=[...l,Zhe,EM,PN,MR];function f(b,w,...S){const _=RT(t.overrides,b+".props",{});return s((function(E,O){const T=RT(O,E);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:RT(O,E+".component",E):E})(b,t.overrides),Hl({},w,_,{className:Cpe(w?.className,_.className)||void 0}),...S)}function d(b){b=b.replace(Uhe,"");let w=!1;t.forceInline?w=!0:t.forceBlock||(w=Jhe.test(b)===!1);const S=v(w?b:Wb(b).replace(cpe,"")+`
73
+
74
+ `,{inline:w});if(t.ast)return S;const _=x(S);for(;UN(_[_.length-1])&&!_[_.length-1].trim();)_.pop();if(h.length&&_.push(f("footer",{key:"footer"},h.map(function(T){return f("div",{id:r(T.identifier,xb),key:T.identifier},T.identifier,x(v(T.footnote,{inline:!0})))}))),t.wrapper===null)return _;const E=t.wrapper||(w?"span":"div");let O;if(_.length>1||t.forceWrapper)O=_;else{if(_.length===1)return O=_[0],typeof O=="string"?f("span",{key:"outer"},O):O;O=null}return s(E,Hl({key:"outer"},t.wrapperProps),O)}const h=[],m={},g={0:{t:[">"],o:Cu(jN),u:1,i(b,w,S){const[,_,E]=b[0].replace(Mhe,"").match(jhe);return{alert:_,children:w(E,S)}}},1:{t:[" "],o:af(khe),u:1,i:CT},2:{t:function(b,w){if(w.inline||w.simple)return!1;var S=b[0];return S==="-"||S==="*"||S==="_"},o:Cu(Nhe),u:1,i:CT},3:{t:[" "],o:Cu(NN),u:0,i:b=>({lang:void 0,text:ql(Wb(b[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:Cu(kN),u:0,i:b=>({attrs:OT("code",b[3]||"",i,d),lang:b[2]||void 0,text:b[4],type:"3"})},5:{t:["`"],o:mw(Dhe),u:3,i:b=>({text:ql(b[2])})},6:{t:["[^"],o:Cu(Phe),u:0,i:b=>(h.push({footnote:b[2],identifier:b[1]}),{})},7:{t:["[^"],o:af(Ihe),u:1,i:b=>({target:"#"+r(b[1],xb),text:b[1]})},8:{t:["[ ]","[x]"],o:af(Vhe),u:1,i:b=>({completed:b[1].toLowerCase()==="x"})},9:{t:["#"],o:Cu(t.enforceAtxHeadings?zN:DN),u:1,i:(b,w,S)=>({children:Jw(w,b[2],S),id:r(b[2],xb),level:b[1].length})},10:{t:b=>{const w=b.indexOf(`
75
+ `);return w>0&&w<b.length-1&&(b[w+1]==="="||b[w+1]==="-")},o:Cu($N),u:1,i:(b,w,S)=>({children:Jw(w,b[1],S),level:b[2]==="="?1:2,type:"9"})},11:{t:["<"],o:mf(qhe),u:1,i(b,w,S){const[,_]=b[3].match(upe),E=RegExp("^"+_,"gm"),O=b[3].replace(E,""),T=BN(u,O)?_pe:Jw,C=b[1].toLowerCase(),R=Che.indexOf(C)!==-1,M=(R?C:b[1]).trim(),D={attrs:OT(M,b[2],i,d),noInnerParse:R,tag:M};if(S.inAnchor=S.inAnchor||C==="a",R)D.text=b[3];else{const I=S.inHTML;S.inHTML=!0,D.children=T(w,O,S),S.inHTML=I}return S.inAnchor=!1,D}},13:{t:["<"],o:FN(MR),u:1,i(b){const w=b[1].trim();return{attrs:OT(w,b[2]||"",i,d),tag:w}}},12:{t:["<!--"],o:FN(PN),u:1,i:()=>({})},14:{t:["!["],o:mw(ype),u:1,i:b=>({alt:ql(b[1]),target:ql(b[2]),title:ql(b[3])})},15:{t:["["],o:af(gpe),u:3,i:(b,w,S)=>({children:xpe(w,b[1],S),target:ql(b[2]),title:ql(b[3])})},16:{t:function(b,w){return!(!w.inline||w.inAnchor)&&b[0]==="<"&&(Ul(b,":")||Ul(b,"@")||Ul(b,"/"))},o:af(Khe),u:0,i(b){let w=b[1],S=!1;return Ul(w,"@")&&!Ul(w,"//")&&(S=!0,w=w.replace("mailto:","")),{children:[{text:w,type:"27"}],target:S?"mailto:"+w:w,type:"15"}}},17:{t:(b,w)=>!w.inAnchor&&!t.disableAutoLink&&jR(b,"http"),o:af(Ghe),u:0,i:b=>({children:[{text:b[1],type:"27"}],target:b[1],title:void 0,type:"15"})},20:LN(0,1),30:LN(0,2),19:{t:[`
76
+ `],o:Cu(zhe),u:3,i:CT},21:{t:function(b,w){return!w.inline&&!w.simple},o:mf(function(b,w){if(w.inline||w.simple||w.inHTML&&!Ul(b,`
77
+
78
+ `)&&!Ul(w.prevCapture,`
79
+
80
+ `))return null;let S="",_=0;for(;;){const O=b.indexOf(`
81
+ `,_),T=b.slice(_,O===-1?void 0:O+1),C=b[_];if((C===">"||C==="#"||C==="|"||C==="`"||C==="~"||C==="*"||C==="-"||C==="_"||C===" ")&&BN(l,T)||(S+=T,O===-1||!T.trim()))break;_=O+1}const E=Wb(S);return E===""?null:[S,,E]}),u:3,i:Tpe},22:{t:["["],o:af(Xhe),u:0,i:b=>(m[b[1]]={target:b[2],title:b[4]},{})},23:{t:["!["],o:mw(Qhe),u:0,i:b=>({alt:b[1]?ql(b[1]):void 0,ref:b[2]})},24:{t:b=>b[0]==="["&&!Ul(b,"]("),o:af(Whe),u:0,i:(b,w,S)=>({children:w(b[1],S),fallbackChildren:b[0],ref:b[2]})},25:{t:["|"],o:Cu(IN),u:1,i:Spe},27:{o:mf(function(b,w){let S;return jR(b,":")&&(S=ipe.exec(b)),S||lpe.exec(b)}),u:4,i(b){const w=b[0];return{text:Ul(w,"&")?w.replace(Fhe,(S,_)=>t.namedCodesToUnicode[_]||S):w}}},34:{t:["*","_","~","="],o:mf(_he),u:2,i:(b,w,S)=>({children:w(b[2],S),tag:b[1]})},28:{t:["\\"],o:mw(ope),u:1,i:b=>({text:b[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete g[11],delete g[13]);const v=(function(b){var w=Object.keys(b);function S(_,E){var O=[];if(E.prevCapture=E.prevCapture||"",_.trim())for(;_;)for(var T=0;T<w.length;){var C=w[T],R=b[C];if(!R.t||vpe(_,E,R.t)){var M=R.o(_,E);if(M&&M[0]){_=_.substring(M[0].length);var D=R.i(M,S,E);E.prevCapture+=M[0],D.type||(D.type=C),O.push(D);break}T++}else T++}return E.prevCapture="",O}return w.sort(function(_,E){return b[_].u-b[E].u||(_<E?-1:1)}),function(_,E){return S((function(O){return O.replace($he,`
82
+ `).replace(Lhe,"").replace(epe," ")})(_),E)}})(g),x=(function(b,w,S,_,E){function O(T){return Array.isArray(T)?T.map(C=>"text"in C?C.text:""):"text"in T?T.text:""}return function T(C,R={}){const M=(R.renderDepth||0)+1;if(M>2500)return O(C);R.renderDepth=M;try{if(Array.isArray(C)){const I=R.key,B=[];let V=!1;for(let F=0;F<C.length;F++){R.key=F;const G=T(C[F],R),W=UN(G);W&&V?B[B.length-1]+=G:G!==null&&B.push(G),V=W}return R.key=I,R.renderDepth=M-1,B}const D=(function(I,B,V){const F=()=>(function(G,W,te,H,J,re,le){switch(G.type){case"0":{const ae={key:te.key};return G.alert&&(ae.className="markdown-alert-"+re(G.alert.toLowerCase(),xb),G.children.unshift({attrs:{},children:[{type:"27",text:G.alert}],noInnerParse:!0,type:"11",tag:"header"})),H("blockquote",ae,W(G.children,te))}case"1":return H("br",{key:te.key});case"2":return H("hr",{key:te.key});case"3":return H("pre",{key:te.key},H("code",Hl({},G.attrs,{className:G.lang?"lang-"+G.lang:""}),G.text));case"5":return H("code",{key:te.key},G.text);case"7":return H("a",{key:te.key,href:J(G.target,"a","href")},H("sup",{key:te.key},G.text));case"8":return H("input",{checked:G.completed,key:te.key,readOnly:!0,type:"checkbox"});case"9":return H("h"+G.level,{id:G.id,key:te.key},W(G.children,te));case"11":return H(G.tag,Hl({key:te.key},G.attrs),G.text||(G.children?W(G.children,te):""));case"13":return H(G.tag,Hl({},G.attrs,{key:te.key}));case"14":return H("img",{key:te.key,alt:G.alt||void 0,title:G.title||void 0,src:J(G.target,"img","src")});case"15":return H("a",{key:te.key,href:J(G.target,"a","href"),title:G.title},W(G.children,te));case"23":return le[G.ref]?H("img",{key:te.key,alt:G.alt,src:J(le[G.ref].target,"img","src"),title:le[G.ref].title}):null;case"24":return le[G.ref]?H("a",{key:te.key,href:J(le[G.ref].target,"a","href"),title:le[G.ref].title},W(G.children,te)):H("span",{key:te.key},G.fallbackChildren);case"25":{const ae=G;return H("table",{key:te.key},H("thead",null,H("tr",null,ae.header.map(function(N,U){return H("th",{key:U,style:qN(ae,U)},W(N,te))}))),H("tbody",null,ae.cells.map(function(N,U){return H("tr",{key:U},N.map(function(X,L){return H("td",{key:L,style:qN(ae,L)},W(X,te))}))})))}case"27":return G.text;case"34":return H(G.tag,{key:te.key},W(G.children,te));case"20":case"30":return H(G.ordered?"ol":"ul",{key:te.key,start:G.type==="20"?G.start:void 0},G.items.map(function(ae,N){return H("li",{key:N},W(ae,te))}));case"19":return`
83
+ `;case"21":return H("p",{key:te.key},W(G.children,te));default:return null}})(I,B,V,w,S,_,E);return b?b(F,I,B,V):F()})(C,T,R);return R.renderDepth=M-1,D}catch(D){if(D instanceof RangeError&&D.message.includes("Maximum call stack"))return O(C);throw D}}})(t.renderRule,f,i,r,m);return d(e)}const nS=e=>{let{children:t,options:r}=e,i=(function(s,l){if(s==null)return{};var u={};for(var f in s)if({}.hasOwnProperty.call(s,f)){if(l.indexOf(f)!==-1)continue;u[f]=s[f]}return u})(e,The);return Rpe(t??"",Hl({},r,{wrapperProps:Hl({},r?.wrapperProps,i)}))},GI=Symbol("remove-this-key"),HN=Symbol("reset");function Ope(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function Ape(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(nn.NewStringDefault)}}function Mpe(e){const{fieldPathId:t,schema:r,registry:i,uiSchema:s,errorSchema:l,formData:u,onChange:f,onBlur:d,onFocus:h,disabled:m,readonly:g,required:v,hideError:x,propertyName:b,handleKeyRename:w,handleRemoveProperty:S,addedByAdditionalProperties:_}=e,[E,O]=j.useState(!1),{globalFormOptions:T,fields:C}=i,{SchemaField:R}=C,M=rm(xs(b,T,t.path)),D=j.useCallback((F,G,W,te)=>{F===void 0&&_&&(F=""),f(F,G,W,te)},[f,_]),I=j.useCallback(F=>{b!==F&&O(!0),w(b,F)},[b,w]),B=j.useCallback(F=>{const{target:{value:G}}=F;I(G)},[I]),V=j.useCallback(()=>{S(b)},[b,S]);return k.jsx(R,{name:b,required:v,schema:r,uiSchema:s,errorSchema:l,fieldPathId:M,formData:u,wasPropertyKeyModified:E,onKeyRename:I,onKeyRenameBlur:B,onRemoveProperty:V,onChange:D,onBlur:d,onFocus:h,registry:i,disabled:m,readonly:g,hideError:x})}function jpe(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:u,required:f=!1,disabled:d,readonly:h,hideError:m,onBlur:g,onFocus:v,onChange:x,registry:b,title:w}=e,{fields:S,schemaUtils:_,translateString:E,globalUiOptions:O}=b,{OptionalDataControlsField:T}=S,C=_.retrieveSchema(t,i,!0),R=_t(r,O),{properties:M={}}=C,D=e.childFieldPathId??l,I=R.title??C.title??w??u,B=R.description??C.description,V=tS(b,C,f,r),F=Pg(i);let G=[];const W=j.useCallback((N,U)=>{const{duplicateKeySuffixSeparator:X="-"}=_t(r,O);let L=0,Z=N;for(;Sn(U,Z);)Z=`${N}${X}${++L}`;return Z},[r,O]),te=j.useCallback(()=>{if(!(C.additionalProperties||C.patternProperties))return;const{translateString:N}=b,U={...i},X=W("newKey",U);if(C.patternProperties)Vn(U,X,null);else{let L,Z,ee;if(Cn(C.additionalProperties)){L=C.additionalProperties.type,Z=C.additionalProperties.const,ee=C.additionalProperties.default;let ye=C.additionalProperties;if(ar in ye){const{schemaUtils:Te}=b;ye=Te.retrieveSchema({[ar]:ye[ar]},i),L=ye.type,Z=ye.const,ee=ye.default}!L&&(wn in ye||en in ye)&&(L="object")}const de=Z??ee??Ape(N,L);Vn(U,X,de)}x(U,D.path)},[i,x,b,D,W,C]),H=j.useCallback((N,U)=>{if(N!==U){const X=W(U,i),L={...i},Z={[N]:X},ee=Object.keys(L).map(ye=>({[Z[ye]||ye]:L[ye]})),de=Object.assign({},...ee);x(de,D.path)}},[i,x,D,W]),J=j.useCallback(N=>{x(GI,[...D.path,N])},[x,D]);if(!V||F)try{const N=Object.keys(M);G=jde(N,R.order)}catch(N){return k.jsxs("div",{children:[k.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:k.jsx(nS,{options:{disableParsingRawHTML:!0},children:E(nn.InvalidObjectField,[u||"root",N.message])})}),k.jsx("pre",{children:JSON.stringify(C)})]})}const re=kt("ObjectFieldTemplate",b,R),le=V?k.jsx(T,{...e,fieldPathId:D,schema:C}):void 0,ae={title:R.label===!1?"":I,description:R.label===!1?void 0:B,properties:G.map(N=>{const U=Sn(C,[On,N,ku]),X=U?r.additionalProperties:r[N],L=_t(X).widget==="hidden";return{content:k.jsx(Mpe,{propertyName:N,required:Ope(C,N),schema:qe(C,[On,N],{}),uiSchema:X,errorSchema:qe(s,[N]),fieldPathId:D,formData:qe(i,[N]),handleKeyRename:H,handleRemoveProperty:J,addedByAdditionalProperties:U,onChange:x,onBlur:g,onFocus:v,registry:b,disabled:d,readonly:h,hideError:m},N),name:N,readonly:h,disabled:d,required:f,hidden:L}}),readonly:h,disabled:d,required:f,fieldPathId:l,uiSchema:r,errorSchema:s,schema:C,formData:i,registry:b,optionalDataControl:le,className:V?"rjsf-optional-object-field":void 0};return k.jsx(re,{...ae,onAddProperty:te})}function kpe(e){const{schema:t,uiSchema:r={},formData:i,disabled:s=!1,readonly:l=!1,onChange:u,errorSchema:f,fieldPathId:d,registry:h}=e,{globalUiOptions:m={},schemaUtils:g,translateString:v}=h,x=_t(r,m),b=kt("OptionalDataControlsTemplate",h,x),w=Pg(i);let S,_,E,O;if(s||l)S=ET(d,"Msg"),_=w?void 0:v(nn.OptionalObjectEmptyMsg);else{const T=w?nn.OptionalObjectRemove:nn.OptionalObjectAdd;_=v(T),w?(S=ET(d,"Remove"),O=()=>u(void 0,d.path,f)):(S=ET(d,"Add"),E=()=>{let C=g.getDefaultFormState(t,i,"excludeObjectChildren");C===void 0&&(C=Cl(t)==="array"?[]:{}),u(C,d.path,f)})}return _&&k.jsx(b,{id:S,registry:h,schema:t,uiSchema:r,label:_,onAddClick:E,onRemoveClick:O})}const Npe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function Dpe(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=Cl(e),u=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=Npe[u];return f&&f in s&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in s?s[d]:s.FallbackField}function zpe(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s,errorSchema:l,name:u,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g=!1,registry:v,wasPropertyKeyModified:x=!1}=e,{schemaUtils:b,globalFormOptions:w,globalUiOptions:S,fields:_}=v,{AnyOfField:E,OneOfField:O}=_,T=Dde(t,i,v),C=_t(T,S),R=kt("FieldTemplate",v,C),M=kt("DescriptionFieldTemplate",v,C),D=kt("FieldHelpTemplate",v,C),I=kt("FieldErrorTemplate",v,C),B=b.retrieveSchema(t,s),V=r[rr],F=j.useCallback((Ie,Be,ke,je)=>f(Ie,Be,ke,je||V),[V,f]),G=Dpe(B,C,v),W=!!(C.disabled??e.disabled),te=!!(C.readonly??(e.readonly||e.schema.readOnly||B.readOnly)),H=C.hideError,J=H===void 0?e.hideError:!!H,re=!!(C.autofocus??e.autofocus);if(Object.keys(B).length===0)return null;let le=b.getDisplayLabel(B,T,S);const ae=C.field&&C.fieldReplacesAnyOrOneOf===!0;let N,U,X={fieldPathId:r};if((wn in B||en in B)&&!ae&&!b.isSelect(B)){B[wn]?(N=E,U=B[wn].map(ke=>b.retrieveSchema(Cn(ke)?ke:{},s))):B[en]&&(N=O,U=B[en].map(ke=>b.retrieveSchema(Cn(ke)?ke:{},s)));const Ie=tS(v,B,g,T),Be=Pg(s);le=le&&(!Ie||Be),X={childFieldPathId:r,fieldPathId:xs("XxxOf",w,r)}}const{__errors:L,...Z}=l||{},ee=hg(T,["ui:classNames","classNames","ui:style"]);Sf in ee&&(ee[Sf]=hg(ee[Sf],["classNames","style"]));const de=k.jsx(G,{...e,onChange:F,...X,schema:B,uiSchema:ee,disabled:W,readonly:te,hideError:J,autofocus:re,errorSchema:Z,rawErrors:L}),ye=r[rr];let Te;x?Te=u:Te=ku in B?u:C.title||e.schema.title||B.title||e.title||u;const Ae=C.description||e.schema.description||B.description||"",ue=C.help,be=C.widget==="hidden",Ee=["rjsf-field",`rjsf-field-${Cl(B)}`];!J&&L&&L.length>0&&Ee.push("rjsf-field-error"),C.classNames&&Ee.push(C.classNames);const xe=k.jsx(D,{help:ue,fieldPathId:r,schema:B,uiSchema:T,hasErrors:!J&&L&&L.length>0,registry:v}),Me=J||N&&!b.isSelect(B)?void 0:k.jsx(I,{errors:L,errorSchema:l,fieldPathId:r,schema:B,uiSchema:T,registry:v}),Ve={description:k.jsx(M,{id:nm(ye),description:Ae,schema:B,uiSchema:T,registry:v}),rawDescription:Ae,help:xe,rawHelp:typeof ue=="string"?ue:void 0,errors:Me,rawErrors:J?void 0:L,fieldPathId:r,id:ye,label:Te,hidden:be,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g,disabled:W,readonly:te,hideError:J,displayLabel:le,classNames:Ee.join(" ").trim(),style:C.style,formData:s,schema:B,uiSchema:T,registry:v};return k.jsx(R,{...Ve,children:k.jsxs(k.Fragment,{children:[de,N&&k.jsx(N,{name:u,disabled:W,readonly:te,hideError:J,errorSchema:l,formData:s,fieldPathId:r,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:U,registry:v,required:g,schema:B,uiSchema:T})]})})}class $pe extends j.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:r}}=this.props,{experimental_componentUpdateStrategy:i="customDeep"}=r;return kI(this,t,this.state,i)}render(){return k.jsx(zpe,{...this.props})}}function Ppe(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,required:u,disabled:f=!1,readonly:d=!1,autofocus:h=!1,onChange:m,onBlur:g,onFocus:v,registry:x,rawErrors:b,hideError:w,title:S}=e,{title:_,format:E}=t,{widgets:O,schemaUtils:T,globalUiOptions:C}=x,R=T.isSelect(t)?gg(t,i):void 0;let M=R?"select":"text";E&&Ode(t,E,O)&&(M=E);const{widget:D=M,placeholder:I="",title:B,...V}=_t(i),F=T.getDisplayLabel(t,i,C),G=B??S??_??r,W=ac(t,D,O),te=j.useCallback((H,J,re)=>m(H,s.path,J,re),[m,s]);return k.jsx(W,{options:{...V,enumOptions:R},schema:t,uiSchema:i,id:s.$id,name:r,label:G,hideLabel:!F,hideError:w,value:l,onChange:te,onBlur:g,onFocus:v,required:u,disabled:f,readonly:d,autofocus:h,registry:x,placeholder:I,rawErrors:b,htmlName:s.name})}function Ipe(e){const{formData:t,onChange:r,fieldPathId:i}=e;return j.useEffect(()=>{t===void 0&&r(null,i.path)},[i,t,r]),null}function Lpe(){return{AnyOfField:RN,ArrayField:ehe,BooleanField:the,FallbackField:ihe,LayoutGridField:wM,LayoutHeaderField:vhe,LayoutMultiSchemaField:bhe,NumberField:Ehe,ObjectField:jpe,OneOfField:RN,OptionalDataControlsField:kpe,SchemaField:$pe,StringField:Ppe,NullField:Ipe}}function Upe(e){const{fieldPathId:t,description:r,registry:i,schema:s,uiSchema:l}=e,u=_t(l,i.globalUiOptions),{label:f=!0}=u;if(!r||!f)return null;const d=kt("DescriptionFieldTemplate",i,u);return k.jsx(d,{id:nm(t),description:r,schema:s,uiSchema:l,registry:i})}function Vpe(e){const{children:t,className:r,buttonsProps:i,displayLabel:s,hasDescription:l,hasToolbar:u,registry:f,uiSchema:d}=e,h=_t(d),m=kt("ArrayFieldItemButtonsTemplate",f,h),g={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},v=l?31:9,x={display:"flex",alignItems:s?"center":"baseline"},b={display:"flex",justifyContent:"flex-end",marginTop:s?`${v}px`:0};return k.jsxs("div",{className:r,style:x,children:[k.jsx("div",{className:u?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),u&&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 qpe(e){const{disabled:t,hasCopy:r,hasMoveDown:i,hasMoveUp:s,hasRemove:l,fieldPathId:u,onCopyItem:f,onRemoveItem:d,onMoveDownItem:h,onMoveUpItem:m,readonly:g,registry:v,uiSchema:x}=e,{CopyButton:b,MoveDownButton:w,MoveUpButton:S,RemoveButton:_}=v.templates.ButtonTemplates;return k.jsxs(k.Fragment,{children:[(s||i)&&k.jsx(S,{id:Ql(u,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||g||!s,onClick:m,uiSchema:x,registry:v}),(s||i)&&k.jsx(w,{id:Ql(u,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||g||!i,onClick:h,uiSchema:x,registry:v}),r&&k.jsx(b,{id:Ql(u,"copy"),className:"rjsf-array-item-copy",disabled:t||g,onClick:f,uiSchema:x,registry:v}),l&&k.jsx(_,{id:Ql(u,"remove"),className:"rjsf-array-item-remove",disabled:t||g,onClick:d,uiSchema:x,registry:v})]})}function Fpe(e){const{canAdd:t,className:r,disabled:i,fieldPathId:s,uiSchema:l,items:u,optionalDataControl:f,onAddClick:d,readonly:h,registry:m,required:g,schema:v,title:x}=e,b=_t(l),w=kt("ArrayFieldDescriptionTemplate",m,b),S=kt("ArrayFieldTitleTemplate",m,b),_=!h&&!i,{ButtonTemplates:{AddButton:E}}=m.templates;return k.jsxs("fieldset",{className:r,id:s.$id,children:[k.jsx(S,{fieldPathId:s,title:b.title||x,required:g,schema:v,uiSchema:l,registry:m,optionalDataControl:_?f:void 0}),k.jsx(w,{fieldPathId:s,description:b.description||v.description,schema:v,uiSchema:l,registry:m}),_?void 0:f,k.jsx("div",{className:"row array-item-list",children:u}),t&&k.jsx(E,{id:Ql(s,"add"),className:"rjsf-array-item-add",onClick:d,disabled:i||h,uiSchema:l,registry:m})]})}function Bpe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:u,optionalDataControl:f}=e,d=_t(s,u.globalUiOptions),{label:h=!0}=d;if(!r||!h)return null;const m=kt("TitleFieldTemplate",u,d);return k.jsx(m,{id:Cx(t),title:r,required:l,schema:i,uiSchema:s,registry:u,optionalDataControl:f})}function KI(e){const{id:t,schema:r}=e,{examples:i,default:s}=r;return Array.isArray(i)?k.jsx("datalist",{id:Tx(t),children:i.concat(s!==void 0&&!i.map(String).includes(String(s))?[s]:[]).map(l=>k.jsx("option",{value:l},String(l)))},`datalist_${t}`):null}function Hpe(e){const{id:t,name:r,htmlName:i,value:s,readonly:l,disabled:u,autofocus:f,onBlur:d,onFocus:h,onChange:m,onChangeOverride:g,options:v,schema:x,uiSchema:b,registry:w,rawErrors:S,type:_,hideLabel:E,hideError:O,...T}=e,{ClearButton:C}=w.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const R={...T,...AI(x,_,v)};let M;R.type==="number"||R.type==="integer"?M=s||s===0?s:"":M=s??"";const D=j.useCallback(({target:{value:F}})=>m(F===""?v.emptyValue:F),[m,v]),I=j.useCallback(({target:F})=>d(t,F&&F.value),[d,t]),B=j.useCallback(({target:F})=>h(t,F&&F.value),[h,t]),V=j.useCallback(F=>{F.preventDefault(),F.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:u,autoFocus:f,value:M,...R,list:x.examples?Tx(t):void 0,onChange:g||D,onBlur:I,onFocus:B,"aria-describedby":So(t,!!x.examples)}),v.allowClearTextInputs&&!l&&!u&&M&&k.jsx(C,{registry:w,onClick:V}),k.jsx(KI,{id:t,schema:x})]})}function Gpe({uiSchema:e}){const{submitText:t,norender:r,props:i={}}=MI(e);return r?null:k.jsx("div",{children:k.jsx("button",{type:"submit",...i,className:`btn btn-info ${i.className||""}`,children:t})})}function kf(e){const{iconType:t="default",icon:r,className:i,uiSchema:s,registry:l,...u}=e;return k.jsx("button",{type:"button",className:`btn btn-${t} ${i}`,...u,children:k.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function Kpe(e){const{registry:{translateString:t}}=e;return k.jsx(kf,{title:t(nn.CopyButton),...e,icon:"copy"})}function Ype(e){const{registry:{translateString:t}}=e;return k.jsx(kf,{title:t(nn.MoveDownButton),...e,icon:"arrow-down"})}function Zpe(e){const{registry:{translateString:t}}=e;return k.jsx(kf,{title:t(nn.MoveUpButton),...e,icon:"arrow-up"})}function Xpe(e){const{registry:{translateString:t}}=e;return k.jsx(kf,{title:t(nn.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Qpe({id:e,className:t,onClick:r,disabled:i,registry:s,...l}){const{translateString:u}=s;return k.jsx(kf,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:u(nn.ClearButton),onClick:r,disabled:i,registry:s,...l})}function Wpe({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(kf,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:l(nn.AddButton),onClick:r,disabled:i,registry:s})})})}function Jpe(){return{SubmitButton:Gpe,AddButton:Wpe,CopyButton:Kpe,MoveDownButton:Ype,MoveUpButton:Zpe,RemoveButton:Xpe,ClearButton:Qpe}}const YI=mM();function TM({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return _t(r,i).enableMarkdownInDescription&&typeof e=="string"?k.jsx(nS,{options:{disableParsingRawHTML:!0},"data-testid":YI.markdown,children:e}):e}TM.TEST_IDS=YI;function eme(e){const{id:t,description:r,registry:i,uiSchema:s}=e;return r?k.jsx("div",{id:t,className:"field-description",children:k.jsx(TM,{description:r,registry:i,uiSchema:s})}):null}function tme({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(nn.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 nme(e){const{schema:t,registry:r,typeSelector:i,schemaField:s}=e,l=kt("MultiSchemaFieldTemplate",r);return k.jsx(l,{selector:i,optionSchemaField:s,schema:t,registry:r})}const rme="*";function ZI(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:rme})]}):null}function ame(e){const{id:t,label:r,children:i,errors:s,help:l,description:u,hidden:f,required:d,displayLabel:h,registry:m,uiSchema:g}=e,v=_t(g),x=kt("WrapIfAdditionalTemplate",m,v);if(f)return k.jsx("div",{className:"hidden",children:i});const b=v.widget==="checkbox";return k.jsxs(x,{...e,children:[h&&!b&&k.jsx(ZI,{label:r,required:d,id:t}),h&&u?u:null,i,s,l]})}function ime(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=gM(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 XI=mM();function CM({help:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return _t(r,i).enableMarkdownInHelp&&typeof e=="string"?k.jsx(nS,{options:{disableParsingRawHTML:!0},"data-testid":XI.markdown,children:e}):e}CM.TEST_IDS=XI;function ome(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s}=e;return r?k.jsx("div",{id:yM(t),className:"help-block",children:k.jsx(CM,{help:r,registry:s,uiSchema:i})}):null}function sme(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:i,...s,children:t})}function lme(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 cme(e){const{className:t,description:r,disabled:i,formData:s,fieldPathId:l,onAddProperty:u,optionalDataControl:f,properties:d,readonly:h,registry:m,required:g,schema:v,title:x,uiSchema:b}=e,w=_t(b),S=kt("TitleFieldTemplate",m,w),_=kt("DescriptionFieldTemplate",m,w);if((v.oneOf||v.anyOf)&&!v.properties&&d.length===0)return null;const O=!h&&!i,{ButtonTemplates:{AddButton:T}}=m.templates;return k.jsxs("fieldset",{className:t,id:l.$id,children:[x&&k.jsx(S,{id:Cx(l),title:x,required:g,schema:v,uiSchema:b,registry:m,optionalDataControl:O?f:void 0}),r&&k.jsx(_,{id:nm(l),description:r,schema:v,uiSchema:b,registry:m}),O?void 0:f,d.map(C=>C.content),nI(v,b,s)&&k.jsx(T,{id:Ql(l,"add"),className:"rjsf-object-property-expand",onClick:u,disabled:i||h,uiSchema:b,registry:m})]})}function ume(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx(kf,{id:t,registry:r,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:s,title:i}):l?k.jsx(kf,{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 fme="*";function dme(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:fme}),s&&k.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:s})]})}function hme(e){const{schema:t,fieldPathId:r,reason:i,registry:s}=e,{translateString:l}=s;let u=nn.UnsupportedField;const f=[];return r&&r.$id&&(u=nn.UnsupportedFieldWithId,f.push(r.$id)),i&&(u=u===nn.UnsupportedField?nn.UnsupportedFieldWithReason:nn.UnsupportedFieldWithIdAndReason,f.push(i)),k.jsxs("div",{className:"unsupported-field",children:[k.jsx("p",{children:k.jsx(nS,{options:{disableParsingRawHTML:!0},children:l(u,f)})}),t&&k.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function pme(e){const{id:t,classNames:r,style:i,disabled:s,displayLabel:l,label:u,onKeyRenameBlur:f,onRemoveProperty:d,rawDescription:h,readonly:m,required:g,schema:v,hideError:x,rawErrors:b,children:w,uiSchema:S,registry:_}=e,{templates:E,translateString:O}=_,{RemoveButton:T}=E.ButtonTemplates,C=O(nn.KeyLabel,[u]),R=ku in v,M=!!h,D=["form-group",r];!x&&b&&b.length>0&&D.push("has-error has-danger");const I=D.join(" ").trim();if(!R)return k.jsx("div",{className:I,style:i,children:w});const B=M?46:26;return k.jsx("div",{className:I,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(ZI,{label:C,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:u})]})}),k.jsx("div",{className:"form-additional form-group col-xs-5",children:w}),k.jsx("div",{className:"col-xs-2",style:{marginTop:l?`${B}px`:void 0},children:k.jsx(T,{id:Ql(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:s||m,onClick:d,uiSchema:S,registry:_})})]})})}function mme(){return{ArrayFieldDescriptionTemplate:Upe,ArrayFieldItemTemplate:Vpe,ArrayFieldItemButtonsTemplate:qpe,ArrayFieldTemplate:Fpe,ArrayFieldTitleTemplate:Bpe,ButtonTemplates:Jpe(),BaseInputTemplate:Hpe,DescriptionFieldTemplate:eme,ErrorListTemplate:tme,FallbackFieldTemplate:nme,FieldTemplate:ame,FieldErrorTemplate:ime,FieldHelpTemplate:ome,GridTemplate:sme,MultiSchemaFieldTemplate:lme,ObjectFieldTemplate:cme,OptionalDataControlsTemplate:ume,TitleFieldTemplate:dme,UnsupportedFieldTemplate:hme,WrapIfAdditionalTemplate:pme}}function gme(e){const{disabled:t=!1,readonly:r=!1,autofocus:i=!1,options:s,id:l,name:u,registry:f,onBlur:d,onFocus:h}=e,{translateString:m}=f,{elements:g,handleChange:v,handleClear:x,handleSetNow:b}=Ide(e);return k.jsxs("ul",{className:"list-inline",children:[g.map((w,S)=>k.jsx("li",{className:"list-inline-item",children:k.jsx(Pde,{rootId:l,name:u,select:v,...w,disabled:t,readonly:r,registry:f,onBlur:d,onFocus:h,autofocus:i&&S===0})},S)),(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(nn.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:x,children:m(nn.ClearLabel)})})]})}function yme({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return k.jsx(r,{time:e,...t})}function vme({schema:e,uiSchema:t,options:r,id:i,value:s,disabled:l,readonly:u,label:f,hideLabel:d,autofocus:h=!1,onBlur:m,onFocus:g,onChange:v,registry:x,htmlName:b}){const w=kt("DescriptionFieldTemplate",x,r),S=Xb(e),_=j.useCallback(M=>v(M.target.checked),[v]),E=j.useCallback(M=>m(i,M.target.checked),[m,i]),O=j.useCallback(M=>g(i,M.target.checked),[g,i]),R=_t(t).widget==="checkbox"?void 0:r.description??e.description;return k.jsxs("div",{className:`checkbox ${l||u?"disabled":""}`,children:[!d&&R&&k.jsx(w,{id:nm(i),description:R,schema:e,uiSchema:t,registry:x}),k.jsxs("label",{children:[k.jsx("input",{type:"checkbox",id:i,name:b||i,checked:typeof s>"u"?!1:s,required:S,disabled:l||u,autoFocus:h,onChange:_,onBlur:E,onFocus:O,"aria-describedby":So(i)}),jI(k.jsx("span",{children:f}),d)]})]})}function bme({id:e,disabled:t,options:{inline:r=!1,enumOptions:i,enumDisabled:s,emptyValue:l},value:u,autofocus:f=!1,readonly:d,onChange:h,onBlur:m,onFocus:g,htmlName:v}){const x=Array.isArray(u)?u:[u],b=j.useCallback(({target:S})=>m(e,$a(S&&S.value,i,l)),[m,e,i,l]),w=j.useCallback(({target:S})=>g(e,$a(S&&S.value,i,l)),[g,e,i,l]);return k.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(i)&&i.map((S,_)=>{const E=eS(S.value,x),O=Array.isArray(s)&&s.indexOf(S.value)!==-1,T=t||O||d?"disabled":"",C=M=>{M.target.checked?h(CI(_,x,i)):h(_I(_,x,i))},R=k.jsxs("span",{children:[k.jsx("input",{type:"checkbox",id:Op(e,_),name:v||e,checked:E,value:String(_),disabled:t||O||d,autoFocus:f&&_===0,onChange:C,onBlur:b,onFocus:w,"aria-describedby":So(e)}),k.jsx("span",{children:S.label})]});return r?k.jsx("label",{className:`checkbox-inline ${T}`,children:R},_):k.jsx("div",{className:`checkbox ${T}`,children:k.jsx("label",{children:R})},_)})})}function Sme(e){const{disabled:t,readonly:r,options:i,registry:s}=e,l=kt("BaseInputTemplate",s,i);return k.jsx(l,{type:"color",...e,disabled:t||r})}function wme(e){const{onChange:t,options:r,registry:i}=e,s=kt("BaseInputTemplate",i,r),l=j.useCallback(u=>t(u||void 0),[t]);return k.jsx(s,{type:"date",...e,onChange:l})}function Eme(e){const{onChange:t,value:r,options:i,registry:s}=e,l=kt("BaseInputTemplate",s,i);return k.jsx(l,{type:"datetime-local",...e,value:Fde(r),onChange:u=>t(Mde(u))})}function xme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"email",...e})}function _me({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(nn.PreviewLabel)})]}):null}function Tme({filesInfo:e,registry:t,preview:r,onRemove:i,options:s}){if(e.length===0)return null;const{translateString:l}=t,{RemoveButton:u}=kt("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(nS,{children:l(nn.FilesInfo,[h,g,String(m)])}),r&&k.jsx(_me,{fileInfo:f,registry:t}),k.jsx(u,{onClick:v,registry:t})]},d)})})}function Cme(e){const{disabled:t,readonly:r,required:i,multiple:s,onChange:l,value:u,options:f,registry:d}=e,{filesInfo:h,handleChange:m,handleRemove:g}=qde(u,l,s),v=kt("BaseInputTemplate",d,f),x=b=>{b.target.files&&m(b.target.files)};return k.jsxs("div",{children:[k.jsx(v,{...e,disabled:t||r,type:"file",required:u?!1:i,onChangeOverride:x,value:"",accept:f.accept?String(f.accept):void 0}),k.jsx(Tme,{filesInfo:h,onRemove:g,registry:d,preview:f.filePreview,options:f})]})}function Rme({id:e,value:t,htmlName:r}){return k.jsx("input",{type:"hidden",id:e,name:r||e,value:typeof t>"u"?"":t})}function Ome(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"password",...e})}function Ame({options:e,value:t,required:r,disabled:i,readonly:s,autofocus:l=!1,onBlur:u,onFocus:f,onChange:d,id:h,htmlName:m}){const{enumOptions:g,enumDisabled:v,inline:x,emptyValue:b}=e,w=j.useCallback(({target:_})=>u(h,$a(_&&_.value,g,b)),[u,g,b,h]),S=j.useCallback(({target:_})=>f(h,$a(_&&_.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((_,E)=>{const O=eS(_.value,t),T=Array.isArray(v)&&v.indexOf(_.value)!==-1,C=i||T||s?"disabled":"",R=()=>d(_.value),M=k.jsxs("span",{children:[k.jsx("input",{type:"radio",id:Op(h,E),checked:O,name:m||h,required:r,value:String(E),disabled:i||T||s,autoFocus:l&&E===0,onChange:R,onBlur:w,onFocus:S,"aria-describedby":So(h)}),k.jsx("span",{children:_.label})]});return x?k.jsx("label",{className:`radio-inline ${C}`,children:M},E):k.jsx("div",{className:`radio ${C}`,children:k.jsx("label",{children:M})},E)})})}function Mme(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 jme({id:e,value:t,required:r,disabled:i,readonly:s,autofocus:l,onChange:u,onFocus:f,onBlur:d,schema:h,options:m,htmlName:g}){const{stars:v=5,shape:x="star"}=m,b=h.maximum?Math.min(h.maximum,5):Math.min(Math.max(v,1),5),w=h.minimum||0,S=j.useCallback(T=>{!i&&!s&&u(T)},[u,i,s]),_=j.useCallback(T=>{if(f){const C=Number(T.target.dataset.value);f(e,C)}},[f,e]),E=j.useCallback(T=>{if(d){const C=Number(T.target.dataset.value);d(e,C)}},[d,e]),O=T=>x==="heart"?T?"♥":"♡":T?"★":"☆";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((T,C)=>{const R=w+C,M=R<=t;return k.jsx("span",{onClick:()=>S(R),onFocus:_,onBlur:E,"data-value":R,tabIndex:i||s?-1:0,role:"radio","aria-checked":R===t,"aria-label":`${R} ${x==="heart"?"heart":"star"}${R===1?"":"s"}`,style:{color:M?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:O(M)},C)}),k.jsx("input",{type:"hidden",id:e,name:g||e,value:t||"",required:r,disabled:i||s,"aria-hidden":"true"})]})})}function AT(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function kme({schema:e,id:t,options:r,value:i,required:s,disabled:l,readonly:u,multiple:f=!1,autofocus:d=!1,onChange:h,onBlur:m,onFocus:g,placeholder:v,htmlName:x}){const{enumOptions:b,enumDisabled:w,emptyValue:S}=r,_=f?[]:"",E=j.useCallback(M=>{const D=AT(M,f);return g(t,$a(D,b,S))},[g,t,f,b,S]),O=j.useCallback(M=>{const D=AT(M,f);return m(t,$a(D,b,S))},[m,t,f,b,S]),T=j.useCallback(M=>{const D=AT(M,f);return h($a(D,b,S))},[h,f,b,S]),C=TI(i,b,f),R=!f&&e.default===void 0;return k.jsxs("select",{id:t,name:x||t,multiple:f,role:"combobox",className:"form-control",value:typeof C>"u"?_:C,required:s,disabled:l||u,autoFocus:d,onBlur:O,onFocus:E,onChange:T,"aria-describedby":So(t),children:[R&&k.jsx("option",{value:"",children:v}),Array.isArray(b)&&b.map(({value:M,label:D},I)=>{const B=w&&w.indexOf(M)!==-1;return k.jsx("option",{value:String(I),disabled:B,children:D},I)})]})}function Nme({id:e,options:t={},placeholder:r,value:i,required:s,disabled:l,readonly:u,autofocus:f=!1,onChange:d,onBlur:h,onFocus:m,htmlName:g}){const v=j.useCallback(({target:{value:w}})=>d(w===""?t.emptyValue:w),[d,t.emptyValue]),x=j.useCallback(({target:w})=>h(e,w&&w.value),[h,e]),b=j.useCallback(({target:w})=>m(e,w&&w.value),[e,m]);return k.jsx("textarea",{id:e,name:g||e,className:"form-control",value:i||"",placeholder:r,required:s,disabled:l,readOnly:u,autoFocus:f,rows:t.rows,onBlur:x,onFocus:b,onChange:v,"aria-describedby":So(e)})}function Dme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{...e})}function zme(e){const{onChange:t,options:r,registry:i}=e,s=kt("BaseInputTemplate",i,r),l=j.useCallback(u=>t(u?`${u}:00`:void 0),[t]);return k.jsx(s,{type:"time",...e,onChange:l})}function $me(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"url",...e})}function Pme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"number",...e})}function Ime(){return{AltDateWidget:gme,AltDateTimeWidget:yme,CheckboxWidget:vme,CheckboxesWidget:bme,ColorWidget:Sme,DateWidget:wme,DateTimeWidget:Eme,EmailWidget:xme,FileWidget:Cme,HiddenWidget:Rme,PasswordWidget:Ome,RadioWidget:Ame,RangeWidget:Mme,RatingWidget:jme,SelectWidget:kme,TextWidget:Dme,TextareaWidget:Nme,TimeWidget:zme,UpDownWidget:Pme,URLWidget:$me}}function Lme(){return{fields:Lpe(),templates:mme(),widgets:Ime(),rootSchema:{},formContext:{},translateString:bde,globalFormOptions:{idPrefix:J8,idSeparator:eI,useFallbackUiForUnsupportedType:!1}}}function Rm(e,t){return{...hA(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class Ume extends j.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(t,r){if(t.extraErrors!==r._prevExtraErrors){const i={errors:r.schemaValidationErrors||[],errorSchema:r.schemaValidationErrorSchema||{}};let{errors:s,errorSchema:l}=i;return t.extraErrors&&({errors:s,errorSchema:l}=Ib(i,t.extraErrors)),r.customErrors&&({errors:s,errorSchema:l}=Ib({errors:s,errorSchema:l},r.customErrors.ErrorSchema,!0)),{_prevExtraErrors:t.extraErrors,errors:s,errorSchema:l}}return null}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),_prevExtraErrors:t.extraErrors},s&&!pr(this.state.formData,l)&&s(Rm(this.state)),this.formElement=j.createRef()}getSnapshotBeforeUpdate(t,r){if(!pr(this.props,t)){const i=mN(this.props.formData,t.formData),s=mN(this.props.formData,this.state.formData),l=!pr(t.schema,this.props.schema),u=i.length>0||!pr(t.formData,this.props.formData),f=s.length>0||!pr(this.state.formData,this.props.formData),d=this.getStateFromProps(this.props,this.props.formData,l||u?void 0:this.state.retrievedSchema,l,i,!f),h=!pr(d,r);return{nextState:d,shouldUpdate:h}}return{shouldUpdate:!1}}componentDidUpdate(t,r,i){if(i.shouldUpdate){const{nextState:s}=i,l=!pr(s.formData,this.props.formData),u=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,u&&l)return;l&&!pr(s.formData,r.formData)&&this.props.onChange&&this.props.onChange(Rm(s)),this.setState(s)}}getStateFromProps(t,r,i,s=!1,l=[],u=!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",x="liveValidate"in t?t.liveValidate:this.props.liveValidate,b=v&&!t.noValidate&&x,w="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,S="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let _=f.schemaUtils;(!_||_.doesSchemaUtilsDiffer(h,d,w,S))&&(_=gde(h,d,w,S));const E=_.getRootSchema();let O=r;r===HN?O=void 0:r===void 0&&g&&(O=f.formData);const T=_.getDefaultFormState(E,O,!1,f.initialDefaultsGenerated),C=this.updateRetrievedSchema(i??_.retrieveSchema(E,T)),R=()=>t.noValidate||s?{errors:[],errorSchema:{}}:t.liveValidate?{errors:f.errors||[],errorSchema:f.errorSchema||{}}:{errors:f.schemaValidationErrors||[],errorSchema:f.schemaValidationErrorSchema||{}};let M,D,I=f.schemaValidationErrors,B=f.schemaValidationErrorSchema;if(b&&!u){const H=this.liveValidate(E,_,f.errorSchema,T,void 0,f.customErrors,i,i!==void 0);M=H.errors,D=H.errorSchema,I=H.schemaValidationErrors,B=H.schemaValidationErrorSchema}else{const H=R();if(M=H.errors,D=H.errorSchema,l.length>0&&!b){const re=l.reduce((le,ae)=>(le[ae]=void 0,le),{});D=B=Lp(H.errorSchema,re,"preventDuplicates")}const J=this.mergeErrors({errorSchema:D,errors:M},t.extraErrors,f.customErrors);M=J.errors,D=J.errorSchema}const V=this.getRegistry(t,E,_),F=pr(f.registry,V)?f.registry:V,G=F.uiSchemaDefinitions?Ww(E,m,F):m,W=f.fieldPathId&&f.fieldPathId?.[rr]===F.globalFormOptions.idPrefix?f.fieldPathId:xs("",F.globalFormOptions);return{schemaUtils:_,schema:E,uiSchema:G,fieldPathId:W,formData:T,edit:v,errors:M,errorSchema:D,schemaValidationErrors:I,schemaValidationErrorSchema:B,retrievedSchema:C,initialDefaultsGenerated:!0,registry:F}}shouldComponentUpdate(t,r){const{experimental_componentUpdateStrategy:i="customDeep"}=this.props;return kI(this,t,r,i)}validate(t,r=this.state.schema,i,s){const l=i||this.state.schemaUtils,{customValidate:u,transformErrors:f,uiSchema:d}=this.props,h=s??l.retrieveSchema(r,t);return l.getValidator().validateFormData(t,h,u,f,d)}renderErrors(t){const{errors:r,errorSchema:i,schema:s,uiSchema:l}=this.state,u=_t(l),f=kt("ErrorListTemplate",t,u);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 u=Ib(t,r);s=u.errorSchema,l=u.errors}if(i){const u=Ib(t,i.ErrorSchema,!0);s=u.errorSchema,l=u.errors}return{errors:l,errorSchema:s}}liveValidate(t,r,i,s,l,u,f,d=!1){const h=this.validate(s,t,r,f),m=h.errors;let g=h.errorSchema;d&&(g=Lp(i,h.errorSchema,"preventDuplicates"));const v=m,x=g;return{...this.mergeErrors({errorSchema:g,errors:m},l,u),schemaValidationErrors:v,schemaValidationErrorSchema:x}}getUsedFormData=(t,r)=>wI(t,r);getFieldNames=(t,r)=>EI(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=xs("",i.globalFormOptions,s);this.onChange(r,s,void 0,l[rr])};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:u,liveOmit:f,noValidate:d,liveValidate:h,onChange:m}=this.props,{formData:g,schemaUtils:v,schema:x,fieldPathId:b,schemaValidationErrorSchema:w,errors:S}=this.state;let{customErrors:_,errorSchema:E}=this.state;const O=b.path[0]||"",T=!r||r.length===0||r.length===1&&r[0]===O;let C=this.state.retrievedSchema,R=T?t:K1(g);const M=cn(R)&&Object.keys(R).length>0&&Object.values(R).every(G=>G===void 0),D=g==null,I=M&&D?void 0:R;if(cn(R)||Array.isArray(R)){t===GI?lre(R,r):T||Vn(R,r,t);const G=this.getStateFromProps(this.props,I,void 0,void 0,void 0,!0);R=G.formData,C=G.retrievedSchema}const B=!d&&(h===!0||h==="onChange");let V={formData:R,schema:x},F=R;if(u===!0&&(f===!0||f==="onChange")&&(F=this.omitExtraData(R),V={formData:F}),s){const G=T?w:qe(w,r);if(!oa(G))T?E=s:Vn(E,r,s);else if(_||(_=new RI),T){const W=qe(s,vi);W&&_.setErrors(W)}else Vn(_.ErrorSchema,r,s)}else _&&qe(_.ErrorSchema,[...r,vi])&&_.clearErrors(r);if(B&&this.pendingChanges.length===1){const G=this.liveValidate(x,v,E,F,l,_,C);V={formData:F,...G,customErrors:_}}else if(!d&&s){const G=this.mergeErrors({errorSchema:E,errors:S},l,_);V={formData:F,...G,customErrors:_}}this.setState(V,()=>{m&&m(Rm({...this.state,...V}),i),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return pr(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:r=HN,onChange:i}=this.props,u={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(u,()=>i&&i(Rm({...this.state,...u})))};onBlur=(t,r)=>{const{onBlur:i,omitExtraData:s,liveOmit:l,liveValidate:u}=this.props;if(i&&i(t,r),s===!0&&l==="onBlur"||u==="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}),u==="onBlur"){const{schema:x,schemaUtils:b,errorSchema:w,customErrors:S,retrievedSchema:_}=this.state,E=this.liveValidate(x,b,w,m,d,S,_);g={formData:m,...E,customErrors:S}}const v=Object.keys(g).filter(x=>!x.startsWith("schemaValidation")).some(x=>{const b=qe(this.state,x),w=qe(g,x);return!pr(b,w)});this.setState(g,()=>{f&&v&&f(Rm({...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:u}=this.state;if(r===!0&&(u=this.omitExtraData(u)),s||this.validateFormWithFormData(u)){const f=i||{},d=i?bM(i):[];this.setState({formData:u,errors:d,errorSchema:f,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{l&&l(Rm({...this.state,formData:u},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:r={},experimental_componentUpdateStrategy:i,idSeparator:s=eI,idPrefix:l=J8,nameGenerator:u,useFallbackUiForUnsupportedType:f=!1}=t;return{idPrefix:r["ui:rootFieldId"]||l,idSeparator:s,useFallbackUiForUnsupportedType:f,...i!==void 0&&{experimental_componentUpdateStrategy:i},...u!==void 0&&{nameGenerator:u}}}getRegistry(t,r,i){const{translateString:s,uiSchema:l={}}=t,{fields:u,templates:f,widgets:d,formContext:h,translateString:m}=Lme();return{fields:{...u,...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[_R],globalFormOptions:this.getGlobalFormOptions(t),uiSchemaDefinitions:l[vfe]??{}}}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=x$(s);l[0]===""?l[0]=r:l.unshift(r);const u=l.join(i);let f=this.formElement.current.elements[u];f||(f=this.formElement.current.querySelector(`input[id^="${u}"`)),f&&f.length&&(f=f[0]),f&&f.focus()}validateFormWithFormData=t=>{const{extraErrors:r,extraErrorsBlockSubmit:i,focusOnFirstError:s,onError:l}=this.props,{errors:u}=this.state,f=this.validate(t),{errors:d,errorSchema:h}=r?this.mergeErrors(f,r):f,m=f.errors.length>0||r&&i;return m?(s&&(typeof s=="function"?s(d[0]):this.focusOnError(d[0])),this.setState({errors:d,errorSchema:h,schemaValidationErrors:f.errors,schemaValidationErrorSchema:f.errorSchema},()=>{l?l(d):console.error("Form validation failed",d)})):d.length>0?this.setState({errors:d,errorSchema:h,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):u.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!m};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:u,target:f,action:d,autoComplete:h,enctype:m,acceptCharset:g,noHtml5Validate:v=!1,disabled:x,readonly:b,showErrorList:w="top",_internalFormWrapper:S}=this.props,{schema:_,uiSchema:E,formData:O,errorSchema:T,fieldPathId:C,registry:R}=this.state,{SchemaField:M}=R.fields,{SubmitButton:D}=R.templates.ButtonTemplates,I=S?s:void 0,B=S||s||"form";let{[NE]:V={}}=_t(E);x&&(V={...V,props:{...V.props,disabled:!0}});const F={[Sf]:{[NE]:V}};return k.jsxs(B,{className:i||"rjsf",id:r,name:l,method:u,target:f,action:d,autoComplete:h,encType:m,acceptCharset:g,noValidate:v,onSubmit:this.onSubmit,as:I,ref:this.formElement,children:[w==="top"&&this.renderErrors(R),k.jsx(M,{name:"",schema:_,uiSchema:E,errorSchema:T,fieldPathId:C,formData:O,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:R,disabled:x,readonly:b}),t||k.jsx(D,{uiSchema:F,registry:R}),w==="bottom"&&this.renderErrors(R)]})}}function Vme(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(Ume,{...e,...s,fields:t,widgets:r,templates:i,ref:l})))}var gw={exports:{}},MT={},GN;function qme(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(I,B){return{validate:I,compare:B}}e.fullFormats={date:t(l,u),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:w,"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:_,int32:{type:"number",validate:T},int64:{type:"number",validate:C},float:{type:"number",validate:R},double:{type:"number",validate:R},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,u),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(I){return I%4===0&&(I%100!==0||I%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(I){const B=i.exec(I);if(!B)return!1;const V=+B[1],F=+B[2],G=+B[3];return F>=1&&F<=12&&G>=1&&G<=(F===2&&r(V)?29:s[F])}function u(I,B){if(I&&B)return I>B?1:I<B?-1:0}const f=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function d(I,B){const V=f.exec(I);if(!V)return!1;const F=+V[1],G=+V[2],W=+V[3],te=V[5];return(F<=23&&G<=59&&W<=59||F===23&&G===59&&W===60)&&(!B||te!=="")}function h(I,B){if(!(I&&B))return;const V=f.exec(I),F=f.exec(B);if(V&&F)return I=V[1]+V[2]+V[3]+(V[4]||""),B=F[1]+F[2]+F[3]+(F[4]||""),I>B?1:I<B?-1:0}const m=/t|\s/i;function g(I){const B=I.split(m);return B.length===2&&l(B[0])&&d(B[1],!0)}function v(I,B){if(!(I&&B))return;const[V,F]=I.split(m),[G,W]=B.split(m),te=u(V,G);if(te!==void 0)return te||h(F,W)}const x=/\/|:/,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 w(I){return x.test(I)&&b.test(I)}const S=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(I){return S.lastIndex=0,S.test(I)}const E=-2147483648,O=2**31-1;function T(I){return Number.isInteger(I)&&I<=O&&I>=E}function C(I){return Number.isInteger(I)}function R(){return!0}const M=/[^\\]\\Z/;function D(I){if(M.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}})(MT)),MT}var jT={},KN;function Fme(){return KN||(KN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=SA(),r=tn(),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:x,self:b}=v;if(!x.validateFormats)return;const w=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");w.$data?S():_();function S(){const O=d.scopeValue("formats",{ref:b.formats,code:x.code.formats}),T=d.const("fmt",r._`${O}[${w.schemaCode}]`);f.fail$data(r.or(r._`typeof ${T} != "object"`,r._`${T} instanceof RegExp`,r._`typeof ${T}.compare != "function"`,E(T)))}function _(){const O=w.schema,T=b.formats[O];if(!T||T===!0)return;if(typeof T!="object"||T instanceof RegExp||typeof T.compare!="function")throw new Error(`"${g}": format "${O}" does not define "compare" function`);const C=d.scopeValue("formats",{key:O,ref:T,code:x.code.formats?r._`${x.code.formats}${r.getProperty(O)}`:void 0});f.fail$data(E(C))}function E(O){return r._`${O}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const u=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=u})(jT)),jT}var YN;function Bme(){return YN||(YN=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=qme(),i=Fme(),s=tn(),l=new s.Name("fullFormats"),u=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,u]:[r.fullFormats,l],x=m.formats||r.formatNames;return d(h,x,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 x,b;(x=(b=h.opts.code).formats)!==null&&x!==void 0||(b.formats=s._`require("ajv-formats/dist/formats").${v}`);for(const w of m)h.addFormat(w,g[w])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(gw,gw.exports)),gw.exports}var Hme=Bme();const ZN=ic(Hme),Gme={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Kme=/^(#?([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*\)))$/,Yme=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Zme(e,t,r={},i,s=I$,l){let u=new s({...Gme,...r});return i?ZN(u,i):i!==!1&&ZN(u),u.addFormat("data-url",Yme),u.addFormat("color",Kme),u.addKeyword(ku),u.addKeyword(oM),Array.isArray(e)&&u.addMetaSchema(e),Cn(t)&&Object.keys(t).forEach(f=>{u.addFormat(f,t[f])}),l&&(u=l(u)),u}function Xme(e=[],t){return e.map(i=>{var s;const{instancePath:l,keyword:u,params:f,schemaPath:d,parentSchema:h,...m}=i;let{message:g=""}=m,v=l.replace(/\//g,"."),x=`${v} ${g}`.trim(),b="";const w=[...((s=f.deps)===null||s===void 0?void 0:s.split(", "))||[],f.missingProperty,f.property].filter(S=>S);if(w.length>0)w.forEach(S=>{const _=v?`${v}.${S}`:S;let E=_t(qe(t,`${_.replace(/^\./,"")}`)).title;if(E===void 0){const O=d.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([S]);E=_t(qe(t,O)).title}if(E)g=g.replace(`'${S}'`,`'${E}'`),b=E;else{const O=qe(h,[On,S,"title"]);O&&(g=g.replace(`'${S}'`,`'${O}'`),b=O)}}),x=g;else{const S=_t(qe(t,`${v.replace(/^\./,"")}`)).title;if(S)x=`'${S}' ${g}`.trim(),b=S;else{const _=h?.title;_&&(x=`'${_}' ${g}`.trim(),b=_)}}return"missingProperty"in f&&(v=v?`${v}.${f.missingProperty}`:f.missingProperty),{name:u,property:v,message:g,params:f,stack:x,schemaPath:d,title:b}}).reduce((i,s)=>{const{message:l,schemaPath:u}=s,f=u?.indexOf(`/${wn}/`),d=u?.indexOf(`/${en}/`);let h;return f&&f>=0?h=u?.substring(0,f):d&&d>=0&&(h=u?.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 Qme(e,t,r,i,s,l,u){const{validationError:f}=t;let d=Xme(t.errors,u);f&&(d=[...d,{stack:f.message}]),typeof l=="function"&&(d=l(d,u));let h=zde(d);if(f&&(h={...h,$schema:{__errors:[f.message]}}),typeof s!="function")return{errors:d,errorSchema:h};const m=yI(e,i,r,i,!0),g=s(m,TR(m),u,h),v=NI(g);return Ib({errors:d,errorSchema:h},v)}class Wme{constructor(t,r){const{additionalMetaSchemas:i,customFormats:s,ajvOptionsOverrides:l,ajvFormatOptions:u,AjvClass:f,extenderFn:d}=t;this.ajv=Zme(i,s,l,u,f,d),this.localizer=r}reset(){this.ajv.removeSchema()}rawValidation(t,r){var i,s;let l,u;try{t[rr]&&(u=this.ajv.getSchema(t[rr])),u===void 0&&(u=this.ajv.compile(t)),u(r)}catch(d){l=d}let f;return u&&(typeof this.localizer=="function"&&(((i=u.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(u.errors),((s=u.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=u.errors||void 0,u.errors=null),{errors:f,validationError:l}}validateFormData(t,r,i,s,l){const u=this.rawValidation(r,t);return Qme(this,u,t,r,i,s,l)}handleSchemaUpdate(t){var r,i;const s=(r=t[rr])!==null&&r!==void 0?r:tI;this.ajv.getSchema(s)===void 0?this.ajv.addSchema(t,s):pr(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=SM(t),u=(s=l[rr])!==null&&s!==void 0?s:Rde(l);let f;return f=this.ajv.getSchema(u),f===void 0&&(f=this.ajv.addSchema(l,u).getSchema(u)||this.ajv.compile(l)),f(r)}catch(l){return console.warn("Error encountered compiling schema:",l),!1}}}function Jme(e={},t){return new Wme(e,t)}const ege=Jme();const tge=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nge=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),XN=e=>{const t=nge(e);return t.charAt(0).toUpperCase()+t.slice(1)},QI=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),rge=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var age={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 ige=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:u,...f},d)=>j.createElement("svg",{ref:d,...age,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:QI("lucide",s),...!l&&!rge(f)&&{"aria-hidden":"true"},...f},[...u.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const lc=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(ige,{ref:l,iconNode:t,className:QI(`lucide-${tge(XN(e))}`,`lucide-${e}`,i),...s}));return r.displayName=XN(e),r};const oge=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sge=lc("check",oge);const lge=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],WI=lc("chevron-down",lge);const cge=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uge=lc("chevron-up",cge);const fge=[["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"}]],dge=lc("circle-alert",fge);const hge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],JI=lc("circle-plus",hge);const pge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mge=lc("circle",pge);const gge=[["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"}]],yge=lc("copy",gge);const vge=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],bge=lc("search",vge);const Sge=[["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"}]],wge=lc("trash-2",Sge);const Ege=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],eL=lc("x",Ege);function QN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nf(...e){return t=>{let r=!1;const i=e.map(s=>{const l=QN(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():QN(e[s],null)}}}}function sa(...e){return j.useCallback(Nf(...e),e)}var xge=Symbol.for("react.lazy"),zE=k1[" use ".trim().toString()];function _ge(e){return typeof e=="object"&&e!==null&&"then"in e}function tL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===xge&&"_payload"in e&&_ge(e._payload)}function nL(e){const t=Tge(e),r=j.forwardRef((i,s)=>{let{children:l,...u}=i;tL(l)&&typeof zE=="function"&&(l=zE(l._payload));const f=j.Children.toArray(l),d=f.find(Rge);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,{...u,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...u,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}var rL=nL("Slot");function Tge(e){const t=j.forwardRef((r,i)=>{let{children:s,...l}=r;if(tL(s)&&typeof zE=="function"&&(s=zE(s._payload)),j.isValidElement(s)){const u=Age(s),f=Oge(l,s.props);return s.type!==j.Fragment&&(f.ref=i?Nf(i,u):u),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cge=Symbol("radix.slottable");function Rge(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cge}function Oge(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 Age(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 fn(...e){return fP(TA(e))}const Mge=Hu("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 RM({className:e,variant:t,size:r,asChild:i=!1,...s}){const l=i?rL:"button";return k.jsx(l,{"data-slot":"button",className:fn(Mge({variant:t,size:r,className:e})),...s})}function jge({uiSchema:e,registry:t,className:r,...i}){const{translateString:s}=t;return k.jsx("div",{className:"p-0 m-0",children:k.jsxs(RM,{...i,className:fn("w-fit gap-2",r),variant:"outline",type:"button",children:[k.jsx(JI,{size:16})," ",s(nn.AddItemButton)]})})}function kge(e){const{children:t,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:l,uiSchema:u,registry:f}=e,d=_t(u),h=kt("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 Nge(e){const{canAdd:t,disabled:r,fieldPathId:i,uiSchema:s,items:l,optionalDataControl:u,onAddClick:f,readonly:d,registry:h,required:m,schema:g,title:v}=e,x=_t(s),b=kt("ArrayFieldDescriptionTemplate",h,x),w=kt("ArrayFieldTitleTemplate",h,x),S=!d&&!r,{ButtonTemplates:{AddButton:_}}=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(w,{fieldPathId:i,title:x.title||v,schema:g,uiSchema:s,required:m,registry:h,optionalDataControl:S?u:void 0}),k.jsx(b,{fieldPathId:i,description:x.description||g.description,schema:g,uiSchema:s,registry:h}),k.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[S?void 0:u,l,t&&k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(_,{id:Ql(i,"add"),className:"rjsf-array-item-add",onClick:f,disabled:r||d,uiSchema:s,registry:h})})]},`array-item-list-${i.$id}`)]})})})}function aL({className:e,type:t,...r}){return k.jsx("input",{type:t,"data-slot":"input",className:fn("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 Dge({id:e,htmlName:t,placeholder:r,required:i,readonly:s,disabled:l,type:u,value:f,onChange:d,onChangeOverride:h,onBlur:m,onFocus:g,autofocus:v,options:x,schema:b,rawErrors:w=[],children:S,extraProps:_,className:E,registry:O}){const{ClearButton:T}=O.templates.ButtonTemplates,C={..._,...AI(b,u,x)},R=({target:{value:B}})=>d(B===""?x.emptyValue:B),M=({target:B})=>m(e,B&&B.value),D=({target:B})=>g(e,B&&B.value),I=j.useCallback(B=>{var V;B.preventDefault(),B.stopPropagation(),d((V=x.emptyValue)!==null&&V!==void 0?V:"")},[d,x.emptyValue]);return k.jsxs("div",{className:"p-0.5",children:[k.jsx(aL,{id:e,name:t||e,type:u,placeholder:r,autoFocus:v,required:i,disabled:l,readOnly:s,className:fn({"border-destructive focus-visible:ring-0":w.length>0},E),list:b.examples?Tx(e):void 0,...C,value:f||f===0?f:"",onChange:h||R,onBlur:M,onFocus:D,"aria-describedby":So(e,!!b.examples)}),x.allowClearTextInputs&&!s&&!l&&f&&k.jsx(T,{onClick:I,registry:O}),S,k.jsx(KI,{id:e,schema:b})]})}function zge({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(TM,{description:t,registry:r,uiSchema:i})})}):null}const $ge=Hu("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 Pge({className:e,variant:t,...r}){return k.jsx("div",{"data-slot":"alert",role:"alert",className:fn($ge({variant:t}),e),...r})}function Ige({className:e,...t}){return k.jsx("div",{"data-slot":"alert-title",className:fn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Lge({className:e,...t}){return k.jsx("div",{"data-slot":"alert-description",className:fn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function Uge({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs(Pge,{variant:"destructive",className:"mb-2",children:[k.jsx(dge,{className:"h-4 w-4"}),k.jsx(Ige,{children:r(nn.ErrorsLabel)}),k.jsx(Lge,{className:"flex flex-col gap-1",children:e.map((i,s)=>k.jsxs("span",{children:["• ",i.stack]},s))})]})}function Vge(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=gM(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 qge(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s,hasErrors:l}=e;return r?k.jsx("span",{className:fn("text-xs font-medium text-muted-foreground",{"text-destructive":l}),id:yM(t),children:k.jsx(CM,{help:r,registry:s,uiSchema:i})}):null}function Fge({id:e,children:t,displayLabel:r,rawErrors:i=[],errors:s,help:l,description:u,rawDescription:f,classNames:d,style:h,disabled:m,label:g,hidden:v,onKeyRename:x,onKeyRenameBlur:b,onRemoveProperty:w,readonly:S,required:_,schema:E,uiSchema:O,registry:T}){const C=_t(O),R=kt("WrapIfAdditionalTemplate",T,C);if(v)return k.jsx("div",{className:"hidden",children:t});const M=C.widget==="checkbox";return k.jsx(R,{classNames:d,style:h,disabled:m,id:e,label:g,displayLabel:r,onKeyRename:x,onKeyRenameBlur:b,onRemoveProperty:w,rawDescription:f,readonly:S,required:_,schema:E,uiSchema:O,registry:T,children:k.jsxs("div",{className:"flex flex-col gap-2",children:[r&&!M&&k.jsxs("label",{className:fn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":i.length>0}),htmlFor:e,children:[g,_?"*":null]}),t,r&&f&&!M&&k.jsx("span",{className:fn("text-xs font-medium text-muted-foreground",{" text-destructive":i.length>0}),children:u}),s,l]})})}function Bge(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:fn("grid gap-2",i),...s,children:t})}function Ig(e){const{icon:t,iconType:r,className:i,uiSchema:s,registry:l,...u}=e;return k.jsx(RM,{size:"icon",variant:"outline",className:i,...u,type:"button",children:t})}function Hge(e){const{registry:{translateString:t}}=e;return k.jsx(Ig,{title:t(nn.CopyButton),...e,icon:k.jsx(yge,{className:"h-4 w-4"})})}function Gge(e){const{registry:{translateString:t}}=e;return k.jsx(Ig,{title:t(nn.MoveDownButton),...e,icon:k.jsx(WI,{className:"h-4 w-4"})})}function Kge(e){const{registry:{translateString:t}}=e;return k.jsx(Ig,{title:t(nn.MoveUpButton),...e,icon:k.jsx(uge,{className:"h-4 w-4"})})}function iL(e){const{registry:{translateString:t}}=e;return k.jsx(Ig,{title:t(nn.RemoveButton),...e,className:"border-destructive",icon:k.jsx(wge,{className:"h-4 w-4 stroke-destructive"})})}function Yge(e){const{registry:{translateString:t}}=e;return k.jsx(Ig,{title:t(nn.ClearButton),...e,icon:k.jsx(eL,{})})}function Zge({selector:e,optionSchemaField:t}){return k.jsxs("div",{className:fn("p-4 border rounded-md bg-background shadow-sm"),children:[k.jsx("div",{className:fn("mb-4"),children:e}),t]})}function Xge({description:e,title:t,properties:r,required:i,uiSchema:s,fieldPathId:l,schema:u,formData:f,optionalDataControl:d,onAddProperty:h,disabled:m,readonly:g,registry:v}){const x=_t(s),b=kt("TitleFieldTemplate",v,x),w=kt("DescriptionFieldTemplate",v,x),S=!g&&!m,{ButtonTemplates:{AddButton:_}}=v.templates;return k.jsxs(k.Fragment,{children:[t&&k.jsx(b,{id:Cx(l),title:t,required:i,schema:u,uiSchema:s,registry:v,optionalDataControl:S?d:void 0}),e&&k.jsx(w,{id:nm(l),description:e,schema:u,uiSchema:s,registry:v}),k.jsxs("div",{className:"flex flex-col gap-2",children:[S?void 0:d,r.map((E,O)=>k.jsx("div",{className:`${E.hidden?"hidden":""} flex`,children:k.jsx("div",{className:"w-full",children:E.content})},O)),nI(u,s,f)?k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(_,{id:Ql(l,"add"),onClick:h,disabled:m||g,className:"rjsf-object-property-expand",uiSchema:s,registry:v})}):null]})]})}function Qge(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx(Ig,{id:t,registry:r,className:"rjsf-add-optional-data",onClick:s,title:i,icon:k.jsx(JI,{}),size:"xs"}):l?k.jsx(iL,{id:t,registry:r,className:"rjsf-remove-optional-data",onClick:l,title:i,size:"xs"}):k.jsx("em",{id:t,children:i})}function Wge(e){const{submitText:t,norender:r,props:i}=MI(e.uiSchema);return r?null:k.jsx("div",{children:k.jsx(RM,{type:"submit",...i,className:fn("my-2",i?.className),children:t})})}var _s=kz();const Jge=ic(_s);var eye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cc=eye.reduce((e,t)=>{const r=nL(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:u,...f}=s,d=u?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}},{}),tye="Separator",WN="horizontal",nye=["horizontal","vertical"],oL=j.forwardRef((e,t)=>{const{decorative:r,orientation:i=WN,...s}=e,l=rye(i)?i:WN,f=r?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return k.jsx(cc.div,{"data-orientation":l,...f,...s,ref:t})});oL.displayName=tye;function rye(e){return nye.includes(e)}var aye=oL;function sL({className:e,orientation:t="horizontal",decorative:r=!0,...i}){return k.jsx(aye,{"data-slot":"separator",decorative:r,orientation:t,className:fn("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 iye({id:e,title:t,uiSchema:r,optionalDataControl:i}){const s=_t(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(sL,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function oye({classNames:e,style:t,children:r,disabled:i,id:s,label:l,displayLabel:u,onRemoveProperty:f,onKeyRenameBlur:d,rawDescription:h,readonly:m,required:g,schema:v,uiSchema:x,registry:b}){const{templates:w,translateString:S}=b,{RemoveButton:_}=w.ButtonTemplates,E=S(nn.KeyLabel,[l]);if(!(ku in v))return k.jsx("div",{className:e,style:t,children:r});const C=u?22+(h?-28:0):0,R=`${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:[u&&k.jsx("label",{htmlFor:R,className:"text-sm font-medium text-muted-foreground leading-none",children:E}),k.jsx("div",{className:"pl-0.5",children:k.jsx(aL,{required:g,defaultValue:l,disabled:i||m,id:R,name:R,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:`${C}px`},children:k.jsx(_,{id:Ql(s,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:i||m,onClick:f,uiSchema:x,registry:b})})]}),k.jsx(sL,{dir:"horizontal",className:"mt-2"})]})}function sye(){return{ArrayFieldItemTemplate:kge,ArrayFieldTemplate:Nge,BaseInputTemplate:Dge,ButtonTemplates:{AddButton:jge,CopyButton:Hge,MoveDownButton:Gge,MoveUpButton:Kge,RemoveButton:iL,SubmitButton:Wge,ClearButton:Yge},DescriptionFieldTemplate:zge,ErrorListTemplate:Uge,FieldErrorTemplate:Vge,FieldHelpTemplate:qge,FieldTemplate:Fge,GridTemplate:Bge,MultiSchemaFieldTemplate:Zge,ObjectFieldTemplate:Xge,OptionalDataControlsTemplate:Qge,TitleFieldTemplate:iye,WrapIfAdditionalTemplate:oye}}function lye(e,t){const r=j.createContext(t),i=l=>{const{children:u,...f}=l,d=j.useMemo(()=>f,Object.values(f));return k.jsx(r.Provider,{value:d,children:u})};i.displayName=e+"Provider";function s(l){const u=j.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,s]}function am(e,t=[]){let r=[];function i(l,u){const f=j.createContext(u),d=r.length;r=[...r,u];const h=g=>{const{scope:v,children:x,...b}=g,w=v?.[e]?.[d]||f,S=j.useMemo(()=>b,Object.values(b));return k.jsx(w.Provider,{value:S,children:x})};h.displayName=l+"Provider";function m(g,v){const x=v?.[e]?.[d]||f,b=j.useContext(x);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[h,m]}const s=()=>{const l=r.map(u=>j.createContext(u));return function(f){const d=f?.[e]||l;return j.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return s.scopeName=e,[i,cye(s,...t)]}function cye(...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 u=i.reduce((f,{useScope:d,scopeName:h})=>{const g=d(l)[`__scope${h}`];return{...f,...g}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}function Ar(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e?.(s),r===!1||!s.defaultPrevented)return t?.(s)}}var vg=globalThis?.document?j.useLayoutEffect:()=>{},uye=k1[" useInsertionEffect ".trim().toString()]||vg;function rS({prop:e,defaultProp:t,onChange:r=()=>{},caller:i}){const[s,l,u]=fye({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=dye(m)?m(e):m;g!==e&&u.current?.(g)}else l(m)},[f,e,l,u]);return[d,h]}function fye({defaultProp:e,onChange:t}){const[r,i]=j.useState(e),s=j.useRef(r),l=j.useRef(t);return uye(()=>{l.current=t},[t]),j.useEffect(()=>{s.current!==r&&(l.current?.(r),s.current=r)},[r,s]),[r,i,l]}function dye(e){return typeof e=="function"}function OM(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 AM(e){const[t,r]=j.useState(void 0);return vg(()=>{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 u,f;if("borderBoxSize"in l){const d=l.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,f=h.blockSize}else u=e.offsetWidth,f=e.offsetHeight;r({width:u,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}function hye(e,t){return j.useReducer((r,i)=>t[r][i]??r,e)}var Lg=e=>{const{present:t,children:r}=e,i=pye(t),s=typeof r=="function"?r({present:i.isPresent}):j.Children.only(r),l=sa(i.ref,mye(s));return typeof r=="function"||i.isPresent?j.cloneElement(s,{ref:l}):null};Lg.displayName="Presence";function pye(e){const[t,r]=j.useState(),i=j.useRef(null),s=j.useRef(e),l=j.useRef("none"),u=e?"mounted":"unmounted",[f,d]=hye(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const h=yw(i.current);l.current=f==="mounted"?h:"none"},[f]),vg(()=>{const h=i.current,m=s.current;if(m!==e){const v=l.current,x=yw(h);e?d("MOUNT"):x==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&v!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),vg(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=x=>{const w=yw(i.current).includes(CSS.escape(x.animationName));if(x.target===t&&w&&(d("ANIMATION_END"),!s.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=x=>{x.target===t&&(l.current=yw(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 yw(e){return e?.animationName||"none"}function mye(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 $E(e){const t=gye(e),r=j.forwardRef((i,s)=>{const{children:l,...u}=i,f=j.Children.toArray(l),d=f.find(vye);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,{...u,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...u,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}function gye(e){const t=j.forwardRef((r,i)=>{const{children:s,...l}=r;if(j.isValidElement(s)){const u=Sye(s),f=bye(l,s.props);return s.type!==j.Fragment&&(f.ref=i?Nf(i,u):u),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yye=Symbol("radix.slottable");function vye(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yye}function bye(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 Sye(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 wye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Hr=wye.reduce((e,t)=>{const r=$E(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:u,...f}=s,d=u?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 Eye(e,t){e&&_s.flushSync(()=>e.dispatchEvent(t))}var Ax="Checkbox",[xye]=am(Ax),[_ye,MM]=xye(Ax);function Tye(e){const{__scopeCheckbox:t,checked:r,children:i,defaultChecked:s,disabled:l,form:u,name:f,onCheckedChange:d,required:h,value:m="on",internal_do_not_use_render:g}=e,[v,x]=rS({prop:r,defaultProp:s??!1,onChange:d,caller:Ax}),[b,w]=j.useState(null),[S,_]=j.useState(null),E=j.useRef(!1),O=b?!!u||!!b.closest("form"):!0,T={checked:v,disabled:l,setChecked:x,control:b,setControl:w,name:f,form:u,value:m,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:xf(s)?!1:s,isFormControl:O,bubbleInput:S,setBubbleInput:_};return k.jsx(_ye,{scope:t,...T,children:Cye(g)?g(T):i})}var lL="CheckboxTrigger",cL=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...i},s)=>{const{control:l,value:u,disabled:f,checked:d,required:h,setControl:m,setChecked:g,hasConsumerStoppedPropagationRef:v,isFormControl:x,bubbleInput:b}=MM(lL,e),w=sa(s,m),S=j.useRef(d);return j.useEffect(()=>{const _=l?.form;if(_){const E=()=>g(S.current);return _.addEventListener("reset",E),()=>_.removeEventListener("reset",E)}},[l,g]),k.jsx(Hr.button,{type:"button",role:"checkbox","aria-checked":xf(d)?"mixed":d,"aria-required":h,"data-state":mL(d),"data-disabled":f?"":void 0,disabled:f,value:u,...i,ref:w,onKeyDown:Ar(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:Ar(r,_=>{g(E=>xf(E)?!0:!E),b&&x&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});cL.displayName=lL;var uL=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:i,checked:s,defaultChecked:l,required:u,disabled:f,value:d,onCheckedChange:h,form:m,...g}=e;return k.jsx(Tye,{__scopeCheckbox:r,checked:s,defaultChecked:l,disabled:f,required:u,onCheckedChange:h,name:i,form:m,value:d,internal_do_not_use_render:({isFormControl:v})=>k.jsxs(k.Fragment,{children:[k.jsx(cL,{...g,ref:t,__scopeCheckbox:r}),v&&k.jsx(pL,{__scopeCheckbox:r})]})})});uL.displayName=Ax;var fL="CheckboxIndicator",dL=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:i,...s}=e,l=MM(fL,r);return k.jsx(Lg,{present:i||xf(l.checked)||l.checked===!0,children:k.jsx(Hr.span,{"data-state":mL(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});dL.displayName=fL;var hL="CheckboxBubbleInput",pL=j.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:i,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:u,required:f,disabled:d,name:h,value:m,form:g,bubbleInput:v,setBubbleInput:x}=MM(hL,e),b=sa(r,x),w=OM(l),S=AM(i);j.useEffect(()=>{const E=v;if(!E)return;const O=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(O,"checked").set,R=!s.current;if(w!==l&&C){const M=new Event("click",{bubbles:R});E.indeterminate=xf(l),C.call(E,xf(l)?!1:l),E.dispatchEvent(M)}},[v,w,l,s]);const _=j.useRef(xf(l)?!1:l);return k.jsx(Hr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??_.current,required:f,disabled:d,name:h,value:m,form:g,...t,tabIndex:-1,ref:b,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pL.displayName=hL;function Cye(e){return typeof e=="function"}function xf(e){return e==="indeterminate"}function mL(e){return xf(e)?"indeterminate":e?"checked":"unchecked"}function Rye(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 Oye=["color"],Aye=j.forwardRef(function(e,t){var r=e.color,i=r===void 0?"currentColor":r,s=Rye(e,Oye);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 gL({className:e,...t}){return k.jsx(uL,{"data-slot":"checkbox",className:fn("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(dL,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:k.jsx(Aye,{className:"size-3.5"})})})}var Mye="Label",yL=j.forwardRef((e,t)=>k.jsx(cc.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));yL.displayName=Mye;var jye=yL;function jM({className:e,...t}){return k.jsx(jye,{"data-slot":"label",className:fn("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 kye(e){const{id:t,htmlName:r,value:i,disabled:s,readonly:l,label:u,hideLabel:f,schema:d,autofocus:h,options:m,onChange:g,onBlur:v,onFocus:x,registry:b,uiSchema:w,className:S}=e,_=Xb(d),E=kt("DescriptionFieldTemplate",b,m),O=M=>g(M),T=()=>v(t,i),C=()=>x(t,i),R=m.description||d.description;return k.jsxs("div",{className:`relative ${s||l?"cursor-not-allowed opacity-50":""}`,"aria-describedby":So(t),children:[!f&&R&&k.jsx(E,{id:nm(t),description:R,schema:d,uiSchema:w,registry:b}),k.jsxs("div",{className:"flex items-center gap-2 my-2",children:[k.jsx(gL,{id:t,name:r||t,checked:typeof i>"u"?!1:!!i,required:_,disabled:s||l,autoFocus:h,onCheckedChange:O,onBlur:T,onFocus:C,className:S}),k.jsx(jM,{className:"leading-tight",htmlFor:t,children:jI(u,f||!u)})]})]})}function Nye({id:e,htmlName:t,disabled:r,options:i,value:s,autofocus:l,readonly:u,required:f,onChange:d,onBlur:h,onFocus:m,className:g}){const{enumOptions:v,enumDisabled:x,inline:b,emptyValue:w}=i,S=Array.isArray(s)?s:[s],_=({target:O})=>h(e,$a(O&&O.value,v,w)),E=({target:O})=>m(e,$a(O&&O.value,v,w));return k.jsx("div",{className:fn({"flex flex-col gap-2":!b,"flex flex-row gap-4 flex-wrap":b}),children:Array.isArray(v)&&v.map((O,T)=>{const C=eS(O.value,S),R=Array.isArray(x)&&x.indexOf(O.value)!==-1,M=Op(e,T);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(gL,{id:M,name:t||e,required:f,disabled:r||R||u,onCheckedChange:D=>{d(D?CI(T,S,v):_I(T,S,v))},className:g,checked:C,autoFocus:l&&T===0,onBlur:_,onFocus:E,"aria-describedby":So(e)}),k.jsx(jM,{className:"leading-tight",htmlFor:Op(e,T),children:O.label})]},M)})})}function vL(e){const t=e+"CollectionProvider",[r,i]=am(t),[s,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:S,children:_}=w,E=Jo.useRef(null),O=Jo.useRef(new Map).current;return k.jsx(s,{scope:S,itemMap:O,collectionRef:E,children:_})};u.displayName=t;const f=e+"CollectionSlot",d=$E(f),h=Jo.forwardRef((w,S)=>{const{scope:_,children:E}=w,O=l(f,_),T=sa(S,O.collectionRef);return k.jsx(d,{ref:T,children:E})});h.displayName=f;const m=e+"CollectionItemSlot",g="data-radix-collection-item",v=$E(m),x=Jo.forwardRef((w,S)=>{const{scope:_,children:E,...O}=w,T=Jo.useRef(null),C=sa(S,T),R=l(m,_);return Jo.useEffect(()=>(R.itemMap.set(T,{ref:T,...O}),()=>{R.itemMap.delete(T)})),k.jsx(v,{[g]:"",ref:C,children:E})});x.displayName=m;function b(w){const S=l(e+"CollectionConsumer",w);return Jo.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const O=Array.from(E.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort((R,M)=>O.indexOf(R.ref.current)-O.indexOf(M.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:h,ItemSlot:x},b,i]}var Dye=k1[" useId ".trim().toString()]||(()=>{}),zye=0;function ec(e){const[t,r]=j.useState(Dye());return vg(()=>{r(i=>i??String(zye++))},[e]),t?`radix-${t}`:""}function bg(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>t.current?.(...r),[])}var $ye=j.createContext(void 0);function kM(e){const t=j.useContext($ye);return e||t||"ltr"}var kT="rovingFocusGroup.onEntryFocus",Pye={bubbles:!1,cancelable:!0},aS="RovingFocusGroup",[kR,bL,Iye]=vL(aS),[Lye,SL]=am(aS,[Iye]),[Uye,Vye]=Lye(aS),wL=j.forwardRef((e,t)=>k.jsx(kR.Provider,{scope:e.__scopeRovingFocusGroup,children:k.jsx(kR.Slot,{scope:e.__scopeRovingFocusGroup,children:k.jsx(qye,{...e,ref:t})})}));wL.displayName=aS;var qye=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,v=j.useRef(null),x=sa(t,v),b=kM(l),[w,S]=rS({prop:u,defaultProp:f??null,onChange:d,caller:aS}),[_,E]=j.useState(!1),O=bg(h),T=bL(r),C=j.useRef(!1),[R,M]=j.useState(0);return j.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(kT,O),()=>D.removeEventListener(kT,O)},[O]),k.jsx(Uye,{scope:r,orientation:i,dir:b,loop:s,currentTabStopId:w,onItemFocus:j.useCallback(D=>S(D),[S]),onItemShiftTab:j.useCallback(()=>E(!0),[]),onFocusableItemAdd:j.useCallback(()=>M(D=>D+1),[]),onFocusableItemRemove:j.useCallback(()=>M(D=>D-1),[]),children:k.jsx(Hr.div,{tabIndex:_||R===0?-1:0,"data-orientation":i,...g,ref:x,style:{outline:"none",...e.style},onMouseDown:Ar(e.onMouseDown,()=>{C.current=!0}),onFocus:Ar(e.onFocus,D=>{const I=!C.current;if(D.target===D.currentTarget&&I&&!_){const B=new CustomEvent(kT,Pye);if(D.currentTarget.dispatchEvent(B),!B.defaultPrevented){const V=T().filter(H=>H.focusable),F=V.find(H=>H.active),G=V.find(H=>H.id===w),te=[F,G,...V].filter(Boolean).map(H=>H.ref.current);_L(te,m)}}C.current=!1}),onBlur:Ar(e.onBlur,()=>E(!1))})})}),EL="RovingFocusGroupItem",xL=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:l,children:u,...f}=e,d=ec(),h=l||d,m=Vye(EL,r),g=m.currentTabStopId===h,v=bL(r),{onFocusableItemAdd:x,onFocusableItemRemove:b,currentTabStopId:w}=m;return j.useEffect(()=>{if(i)return x(),()=>b()},[i,x,b]),k.jsx(kR.ItemSlot,{scope:r,id:h,focusable:i,active:s,children:k.jsx(Hr.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...f,ref:t,onMouseDown:Ar(e.onMouseDown,S=>{i?m.onItemFocus(h):S.preventDefault()}),onFocus:Ar(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:Ar(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const _=Hye(S,m.orientation,m.dir);if(_!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let O=v().filter(T=>T.focusable).map(T=>T.ref.current);if(_==="last")O.reverse();else if(_==="prev"||_==="next"){_==="prev"&&O.reverse();const T=O.indexOf(S.currentTarget);O=m.loop?Gye(O,T+1):O.slice(T+1)}setTimeout(()=>_L(O))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:w!=null}):u})})});xL.displayName=EL;var Fye={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bye(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hye(e,t,r){const i=Bye(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Fye[i]}function _L(e,t=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}function Gye(e,t){return e.map((r,i)=>e[(t+i)%e.length])}var Kye=wL,Yye=xL,NM="Radio",[Zye,TL]=am(NM),[Xye,Qye]=Zye(NM),CL=j.forwardRef((e,t)=>{const{__scopeRadio:r,name:i,checked:s=!1,required:l,disabled:u,value:f="on",onCheck:d,form:h,...m}=e,[g,v]=j.useState(null),x=sa(t,S=>v(S)),b=j.useRef(!1),w=g?h||!!g.closest("form"):!0;return k.jsxs(Xye,{scope:r,checked:s,disabled:u,children:[k.jsx(Hr.button,{type:"button",role:"radio","aria-checked":s,"data-state":ML(s),"data-disabled":u?"":void 0,disabled:u,value:f,...m,ref:x,onClick:Ar(e.onClick,S=>{s||d?.(),w&&(b.current=S.isPropagationStopped(),b.current||S.stopPropagation())})}),w&&k.jsx(AL,{control:g,bubbles:!b.current,name:i,value:f,checked:s,required:l,disabled:u,form:h,style:{transform:"translateX(-100%)"}})]})});CL.displayName=NM;var RL="RadioIndicator",OL=j.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:i,...s}=e,l=Qye(RL,r);return k.jsx(Lg,{present:i||l.checked,children:k.jsx(Hr.span,{"data-state":ML(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t})})});OL.displayName=RL;var Wye="RadioBubbleInput",AL=j.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:i=!0,...s},l)=>{const u=j.useRef(null),f=sa(u,l),d=OM(r),h=AM(t);return j.useEffect(()=>{const m=u.current;if(!m)return;const g=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(g,"checked").set;if(d!==r&&x){const b=new Event("click",{bubbles:i});x.call(m,r),m.dispatchEvent(b)}},[d,r,i]),k.jsx(Hr.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}})});AL.displayName=Wye;function ML(e){return e?"checked":"unchecked"}var Jye=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mx="RadioGroup",[e0e]=am(Mx,[SL,TL]),jL=SL(),kL=TL(),[t0e,n0e]=e0e(Mx),NL=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:i,defaultValue:s,value:l,required:u=!1,disabled:f=!1,orientation:d,dir:h,loop:m=!0,onValueChange:g,...v}=e,x=jL(r),b=kM(h),[w,S]=rS({prop:l,defaultProp:s??null,onChange:g,caller:Mx});return k.jsx(t0e,{scope:r,name:i,required:u,disabled:f,value:w,onValueChange:S,children:k.jsx(Kye,{asChild:!0,...x,orientation:d,dir:b,loop:m,children:k.jsx(Hr.div,{role:"radiogroup","aria-required":u,"aria-orientation":d,"data-disabled":f?"":void 0,dir:b,...v,ref:t})})})});NL.displayName=Mx;var DL="RadioGroupItem",zL=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:i,...s}=e,l=n0e(DL,r),u=l.disabled||i,f=jL(r),d=kL(r),h=j.useRef(null),m=sa(t,h),g=l.value===s.value,v=j.useRef(!1);return j.useEffect(()=>{const x=w=>{Jye.includes(w.key)&&(v.current=!0)},b=()=>v.current=!1;return document.addEventListener("keydown",x),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",x),document.removeEventListener("keyup",b)}},[]),k.jsx(Yye,{asChild:!0,...f,focusable:!u,active:g,children:k.jsx(CL,{disabled:u,required:l.required,checked:g,...d,...s,name:l.name,ref:m,onCheck:()=>l.onValueChange(s.value),onKeyDown:Ar(x=>{x.key==="Enter"&&x.preventDefault()}),onFocus:Ar(s.onFocus,()=>{v.current&&h.current?.click()})})})});zL.displayName=DL;var r0e="RadioGroupIndicator",$L=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...i}=e,s=kL(r);return k.jsx(OL,{...s,...i,ref:t})});$L.displayName=r0e;var a0e=NL,i0e=zL,o0e=$L;function s0e({className:e,...t}){return k.jsx(a0e,{"data-slot":"radio-group",className:fn("grid gap-3",e),...t})}function l0e({className:e,...t}){return k.jsx(i0e,{"data-slot":"radio-group-item",className:fn("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(o0e,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:k.jsx(mge,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function c0e({id:e,options:t,value:r,required:i,disabled:s,readonly:l,onChange:u,onBlur:f,onFocus:d,className:h}){const{enumOptions:m,enumDisabled:g,emptyValue:v}=t,x=_=>u($a(_,m,v)),b=({target:_})=>f(e,$a(_&&_.value,m,v)),w=({target:_})=>d(e,$a(_&&_.value,m,v)),S=!!(t&&t.inline);return k.jsx("div",{className:"mb-0",children:k.jsx(s0e,{defaultValue:r?.toString(),required:i,disabled:s||l,onValueChange:_=>{x(_)},onBlur:b,onFocus:w,"aria-describedby":So(e),orientation:S?"horizontal":"vertical",className:fn("flex flex-wrap",{"flex-col":!S},h),children:Array.isArray(m)&&m.map((_,E)=>{const O=Array.isArray(g)&&g.indexOf(_.value)!==-1,T=eS(_.value,r);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(l0e,{checked:T,value:E.toString(),id:Op(e,E),disabled:O}),k.jsx(jM,{className:"leading-tight",htmlFor:Op(e,E),children:_.label})]},Op(e,E))})})})}function PL(e,[t,r]){return Math.min(r,Math.max(t,e))}var IL=["PageUp","PageDown"],LL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],UL={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ug="Slider",[NR,u0e,f0e]=vL(Ug),[VL]=am(Ug,[f0e]),[d0e,jx]=VL(Ug),qL=j.forwardRef((e,t)=>{const{name:r,min:i=0,max:s=100,step:l=1,orientation:u="horizontal",disabled:f=!1,minStepsBetweenThumbs:d=0,defaultValue:h=[i],value:m,onValueChange:g=()=>{},onValueCommit:v=()=>{},inverted:x=!1,form:b,...w}=e,S=j.useRef(new Set),_=j.useRef(0),O=u==="horizontal"?h0e:p0e,[T=[],C]=rS({prop:m,defaultProp:h,onChange:V=>{[...S.current][_.current]?.focus(),g(V)}}),R=j.useRef(T);function M(V){const F=b0e(T,V);B(V,F)}function D(V){B(V,_.current)}function I(){const V=R.current[_.current];T[_.current]!==V&&v(T)}function B(V,F,{commit:G}={commit:!1}){const W=x0e(l),te=_0e(Math.round((V-i)/l)*l+i,W),H=PL(te,[i,s]);C((J=[])=>{const re=y0e(J,H,F);if(E0e(re,d*l)){_.current=re.indexOf(H);const le=String(re)!==String(J);return le&&G&&v(re),le?re:J}else return J})}return k.jsx(d0e,{scope:e.__scopeSlider,name:r,disabled:f,min:i,max:s,valueIndexToChangeRef:_,thumbs:S.current,values:T,orientation:u,form:b,children:k.jsx(NR.Provider,{scope:e.__scopeSlider,children:k.jsx(NR.Slot,{scope:e.__scopeSlider,children:k.jsx(O,{"aria-disabled":f,"data-disabled":f?"":void 0,...w,ref:t,onPointerDown:Ar(w.onPointerDown,()=>{f||(R.current=T)}),min:i,max:s,inverted:x,onSlideStart:f?void 0:M,onSlideMove:f?void 0:D,onSlideEnd:f?void 0:I,onHomeKeyDown:()=>!f&&B(i,0,{commit:!0}),onEndKeyDown:()=>!f&&B(s,T.length-1,{commit:!0}),onStepKeyDown:({event:V,direction:F})=>{if(!f){const te=IL.includes(V.key)||V.shiftKey&&LL.includes(V.key)?10:1,H=_.current,J=T[H],re=l*te*F;B(J+re,H,{commit:!0})}}})})})})});qL.displayName=Ug;var[FL,BL]=VL(Ug,{startEdge:"left",endEdge:"right",size:"width",direction:1}),h0e=j.forwardRef((e,t)=>{const{min:r,max:i,dir:s,inverted:l,onSlideStart:u,onSlideMove:f,onSlideEnd:d,onStepKeyDown:h,...m}=e,[g,v]=j.useState(null),x=sa(t,O=>v(O)),b=j.useRef(void 0),w=kM(s),S=w==="ltr",_=S&&!l||!S&&l;function E(O){const T=b.current||g.getBoundingClientRect(),C=[0,T.width],M=DM(C,_?[r,i]:[i,r]);return b.current=T,M(O-T.left)}return k.jsx(FL,{scope:e.__scopeSlider,startEdge:_?"left":"right",endEdge:_?"right":"left",direction:_?1:-1,size:"width",children:k.jsx(HL,{dir:w,"data-orientation":"horizontal",...m,ref:x,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:O=>{const T=E(O.clientX);u?.(T)},onSlideMove:O=>{const T=E(O.clientX);f?.(T)},onSlideEnd:()=>{b.current=void 0,d?.()},onStepKeyDown:O=>{const C=UL[_?"from-left":"from-right"].includes(O.key);h?.({event:O,direction:C?-1:1})}})})}),p0e=j.forwardRef((e,t)=>{const{min:r,max:i,inverted:s,onSlideStart:l,onSlideMove:u,onSlideEnd:f,onStepKeyDown:d,...h}=e,m=j.useRef(null),g=sa(t,m),v=j.useRef(void 0),x=!s;function b(w){const S=v.current||m.current.getBoundingClientRect(),_=[0,S.height],O=DM(_,x?[i,r]:[r,i]);return v.current=S,O(w-S.top)}return k.jsx(FL,{scope:e.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:k.jsx(HL,{"data-orientation":"vertical",...h,ref:g,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const S=b(w.clientY);l?.(S)},onSlideMove:w=>{const S=b(w.clientY);u?.(S)},onSlideEnd:()=>{v.current=void 0,f?.()},onStepKeyDown:w=>{const _=UL[x?"from-bottom":"from-top"].includes(w.key);d?.({event:w,direction:_?-1:1})}})})}),HL=j.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onHomeKeyDown:u,onEndKeyDown:f,onStepKeyDown:d,...h}=e,m=jx(Ug,r);return k.jsx(Hr.span,{...h,ref:t,onKeyDown:Ar(e.onKeyDown,g=>{g.key==="Home"?(u(g),g.preventDefault()):g.key==="End"?(f(g),g.preventDefault()):IL.concat(LL).includes(g.key)&&(d(g),g.preventDefault())}),onPointerDown:Ar(e.onPointerDown,g=>{const v=g.target;v.setPointerCapture(g.pointerId),g.preventDefault(),m.thumbs.has(v)?v.focus():i(g)}),onPointerMove:Ar(e.onPointerMove,g=>{g.target.hasPointerCapture(g.pointerId)&&s(g)}),onPointerUp:Ar(e.onPointerUp,g=>{const v=g.target;v.hasPointerCapture(g.pointerId)&&(v.releasePointerCapture(g.pointerId),l(g))})})}),GL="SliderTrack",KL=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=jx(GL,r);return k.jsx(Hr.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...i,ref:t})});KL.displayName=GL;var DR="SliderRange",YL=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=jx(DR,r),l=BL(DR,r),u=j.useRef(null),f=sa(t,u),d=s.values.length,h=s.values.map(v=>QL(v,s.min,s.max)),m=d>1?Math.min(...h):0,g=100-Math.max(...h);return k.jsx(Hr.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...i,ref:f,style:{...e.style,[l.startEdge]:m+"%",[l.endEdge]:g+"%"}})});YL.displayName=DR;var zR="SliderThumb",ZL=j.forwardRef((e,t)=>{const r=u0e(e.__scopeSlider),[i,s]=j.useState(null),l=sa(t,f=>s(f)),u=j.useMemo(()=>i?r().findIndex(f=>f.ref.current===i):-1,[r,i]);return k.jsx(m0e,{...e,ref:l,index:u})}),m0e=j.forwardRef((e,t)=>{const{__scopeSlider:r,index:i,name:s,...l}=e,u=jx(zR,r),f=BL(zR,r),[d,h]=j.useState(null),m=sa(t,E=>h(E)),g=d?u.form||!!d.closest("form"):!0,v=AM(d),x=u.values[i],b=x===void 0?0:QL(x,u.min,u.max),w=v0e(i,u.values.length),S=v?.[f.size],_=S?S0e(S,b,f.direction):0;return j.useEffect(()=>{if(d)return u.thumbs.add(d),()=>{u.thumbs.delete(d)}},[d,u.thumbs]),k.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${b}% + ${_}px)`},children:[k.jsx(NR.ItemSlot,{scope:e.__scopeSlider,children:k.jsx(Hr.span,{role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":u.min,"aria-valuenow":x,"aria-valuemax":u.max,"aria-orientation":u.orientation,"data-orientation":u.orientation,"data-disabled":u.disabled?"":void 0,tabIndex:u.disabled?void 0:0,...l,ref:m,style:x===void 0?{display:"none"}:e.style,onFocus:Ar(e.onFocus,()=>{u.valueIndexToChangeRef.current=i})})}),g&&k.jsx(XL,{name:s??(u.name?u.name+(u.values.length>1?"[]":""):void 0),form:u.form,value:x},i)]})});ZL.displayName=zR;var g0e="RadioBubbleInput",XL=j.forwardRef(({__scopeSlider:e,value:t,...r},i)=>{const s=j.useRef(null),l=sa(s,i),u=OM(t);return j.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&m){const g=new Event("input",{bubbles:!0});m.call(f,t),f.dispatchEvent(g)}},[u,t]),k.jsx(Hr.input,{style:{display:"none"},...r,ref:l,defaultValue:t})});XL.displayName=g0e;function y0e(e=[],t,r){const i=[...e];return i[r]=t,i.sort((s,l)=>s-l)}function QL(e,t,r){const l=100/(r-t)*(e-t);return PL(l,[0,100])}function v0e(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function b0e(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 S0e(e,t,r){const i=e/2,l=DM([0,50],[0,i]);return(i-l(t)*r)*r}function w0e(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function E0e(e,t){if(t>0){const r=w0e(e);return Math.min(...r)>=t}return!0}function DM(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 x0e(e){return(String(e).split(".")[1]||"").length}function _0e(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var T0e=qL,C0e=KL,R0e=YL,O0e=ZL;function A0e({className:e,defaultValue:t,value:r,min:i=0,max:s=100,...l}){const u=j.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[i,s],[r,t,i,s]);return k.jsxs(T0e,{"data-slot":"slider",defaultValue:t,value:r,min:i,max:s,className:fn("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(C0e,{"data-slot":"slider-track",className:fn("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(R0e,{"data-slot":"slider-range",className:fn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:u.length},(f,d)=>k.jsx(O0e,{"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 M0e=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function j0e({value:e,readonly:t,disabled:r,options:i,schema:s,onChange:l,label:u,id:f}){const d=g=>l(g[0]),h={...OI(s)},m={id:f,...hA(i.props||{},M0e)};return k.jsxs(k.Fragment,{children:[k.jsx(A0e,{disabled:r||t,min:h.min,max:h.max,step:h.step,value:[e],onValueChange:d,...m,"aria-describedby":So(f)}),e]})}var JN=1,k0e=.9,N0e=.8,D0e=.17,NT=.1,DT=.999,z0e=.9999,$0e=.99,P0e=/[\\\/_+.#"@\[\(\{&]/,I0e=/[\\\/_+.#"@\[\(\{&]/g,L0e=/[\s-]/,WL=/[\s-]/g;function $R(e,t,r,i,s,l,u){if(l===t.length)return s===e.length?JN:$0e;var f=`${s},${l}`;if(u[f]!==void 0)return u[f];for(var d=i.charAt(l),h=r.indexOf(d,s),m=0,g,v,x,b;h>=0;)g=$R(e,t,r,i,h+1,l+1,u),g>m&&(h===s?g*=JN:P0e.test(e.charAt(h-1))?(g*=N0e,x=e.slice(s,h-1).match(I0e),x&&s>0&&(g*=Math.pow(DT,x.length))):L0e.test(e.charAt(h-1))?(g*=k0e,b=e.slice(s,h-1).match(WL),b&&s>0&&(g*=Math.pow(DT,b.length))):(g*=D0e,s>0&&(g*=Math.pow(DT,h-s))),e.charAt(h)!==t.charAt(l)&&(g*=z0e)),(g<NT&&r.charAt(h-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&r.charAt(h-1)!==i.charAt(l))&&(v=$R(e,t,r,i,h+1,l+2,u),v*NT>g&&(g=v*NT)),g>m&&(m=g),h=r.indexOf(d,h+1);return u[f]=m,m}function eD(e){return e.toLowerCase().replace(WL," ")}function U0e(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,$R(e,t,eD(e),eD(t),0,0,{})}function V0e(e,t=globalThis?.document){const r=bg(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 q0e="DismissableLayer",PR="dismissableLayer.update",F0e="dismissableLayer.pointerDownOutside",B0e="dismissableLayer.focusOutside",tD,JL=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eU=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:u,onDismiss:f,...d}=e,h=j.useContext(JL),[m,g]=j.useState(null),v=m?.ownerDocument??globalThis?.document,[,x]=j.useState({}),b=sa(t,M=>g(M)),w=Array.from(h.layers),[S]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(S),E=m?w.indexOf(m):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,T=E>=_,C=K0e(M=>{const D=M.target,I=[...h.branches].some(B=>B.contains(D));!T||I||(s?.(M),u?.(M),M.defaultPrevented||f?.())},v),R=Y0e(M=>{const D=M.target;[...h.branches].some(B=>B.contains(D))||(l?.(M),u?.(M),M.defaultPrevented||f?.())},v);return V0e(M=>{E===h.layers.size-1&&(i?.(M),!M.defaultPrevented&&f&&(M.preventDefault(),f()))},v),j.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tD=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),nD(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tD)}},[m,v,r,h]),j.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),nD())},[m,h]),j.useEffect(()=>{const M=()=>x({});return document.addEventListener(PR,M),()=>document.removeEventListener(PR,M)},[]),k.jsx(Hr.div,{...d,ref:b,style:{pointerEvents:O?T?"auto":"none":void 0,...e.style},onFocusCapture:Ar(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ar(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ar(e.onPointerDownCapture,C.onPointerDownCapture)})});eU.displayName=q0e;var H0e="DismissableLayerBranch",G0e=j.forwardRef((e,t)=>{const r=j.useContext(JL),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(Hr.div,{...e,ref:s})});G0e.displayName=H0e;function K0e(e,t=globalThis?.document){const r=bg(e),i=j.useRef(!1),s=j.useRef(()=>{});return j.useEffect(()=>{const l=f=>{if(f.target&&!i.current){let d=function(){tU(F0e,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},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}function Y0e(e,t=globalThis?.document){const r=bg(e),i=j.useRef(!1);return j.useEffect(()=>{const s=l=>{l.target&&!i.current&&tU(B0e,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 nD(){const e=new CustomEvent(PR);document.dispatchEvent(e)}function tU(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?Eye(s,l):s.dispatchEvent(l)}var zT="focusScope.autoFocusOnMount",$T="focusScope.autoFocusOnUnmount",rD={bubbles:!1,cancelable:!0},Z0e="FocusScope",nU=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...u}=e,[f,d]=j.useState(null),h=bg(s),m=bg(l),g=j.useRef(null),v=sa(t,w=>d(w)),x=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(i){let w=function(O){if(x.paused||!f)return;const T=O.target;f.contains(T)?g.current=T:df(g.current,{select:!0})},S=function(O){if(x.paused||!f)return;const T=O.relatedTarget;T!==null&&(f.contains(T)||df(g.current,{select:!0}))},_=function(O){if(document.activeElement===document.body)for(const C of O)C.removedNodes.length>0&&df(f)};document.addEventListener("focusin",w),document.addEventListener("focusout",S);const E=new MutationObserver(_);return f&&E.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",S),E.disconnect()}}},[i,f,x.paused]),j.useEffect(()=>{if(f){iD.add(x);const w=document.activeElement;if(!f.contains(w)){const _=new CustomEvent(zT,rD);f.addEventListener(zT,h),f.dispatchEvent(_),_.defaultPrevented||(X0e(tve(rU(f)),{select:!0}),document.activeElement===w&&df(f))}return()=>{f.removeEventListener(zT,h),setTimeout(()=>{const _=new CustomEvent($T,rD);f.addEventListener($T,m),f.dispatchEvent(_),_.defaultPrevented||df(w??document.body,{select:!0}),f.removeEventListener($T,m),iD.remove(x)},0)}}},[f,h,m,x]);const b=j.useCallback(w=>{if(!r&&!i||x.paused)return;const S=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,_=document.activeElement;if(S&&_){const E=w.currentTarget,[O,T]=Q0e(E);O&&T?!w.shiftKey&&_===T?(w.preventDefault(),r&&df(O,{select:!0})):w.shiftKey&&_===O&&(w.preventDefault(),r&&df(T,{select:!0})):_===E&&w.preventDefault()}},[r,i,x.paused]);return k.jsx(Hr.div,{tabIndex:-1,...u,ref:v,onKeyDown:b})});nU.displayName=Z0e;function X0e(e,{select:t=!1}={}){const r=document.activeElement;for(const i of e)if(df(i,{select:t}),document.activeElement!==r)return}function Q0e(e){const t=rU(e),r=aD(t,e),i=aD(t.reverse(),e);return[r,i]}function rU(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 aD(e,t){for(const r of e)if(!W0e(r,{upTo:t}))return r}function W0e(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 J0e(e){return e instanceof HTMLInputElement&&"select"in e}function df(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&J0e(e)&&t&&e.select()}}var iD=eve();function eve(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=oD(e,t),e.unshift(t)},remove(t){e=oD(e,t),e[0]?.resume()}}}function oD(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function tve(e){return e.filter(t=>t.tagName!=="A")}var nve="Portal",aU=j.forwardRef((e,t)=>{const{container:r,...i}=e,[s,l]=j.useState(!1);vg(()=>l(!0),[]);const u=r||s&&globalThis?.document?.body;return u?Jge.createPortal(k.jsx(Hr.div,{...i,ref:t}),u):null});aU.displayName=nve;var PT=0;function rve(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sD()),document.body.insertAdjacentElement("beforeend",e[1]??sD()),PT++,()=>{PT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),PT--}},[])}function sD(){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 Kl=function(){return Kl=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},Kl.apply(this,arguments)};function iU(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 IR(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 ave(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 eE="right-scroll-bar-position",tE="width-before-scroll-bar",ive="with-scroll-bars-hidden",ove="--removed-body-scroll-bar-size";function IT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sve(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 lve=typeof window<"u"?j.useLayoutEffect:j.useEffect,lD=new WeakMap;function cve(e,t){var r=sve(null,function(i){return e.forEach(function(s){return IT(s,i)})});return lve(function(){var i=lD.get(r);if(i){var s=new Set(i),l=new Set(e),u=r.current;s.forEach(function(f){l.has(f)||IT(f,null)}),l.forEach(function(f){s.has(f)||IT(f,u)})}lD.set(r,e)},[e]),r}function uve(e){return e}function fve(e,t){t===void 0&&(t=uve);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 u=t(l,i);return r.push(u),function(){r=r.filter(function(f){return f!==u})}},assignSyncMedium:function(l){for(i=!0;r.length;){var u=r;r=[],u.forEach(l)}r={push:function(f){return l(f)},filter:function(){return r}}},assignMedium:function(l){i=!0;var u=[];if(r.length){var f=r;r=[],f.forEach(l),u=r}var d=function(){var m=u;u=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(m){u.push(m),h()},filter:function(m){return u=u.filter(m),r}}}};return s}function dve(e){e===void 0&&(e={});var t=fve(null);return t.options=Kl({async:!0,ssr:!1},e),t}var oU=function(e){var t=e.sideCar,r=iU(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,Kl({},r))};oU.isSideCarExport=!0;function hve(e,t){return e.useMedium(t),oU}var sU=dve(),LT=function(){},kx=j.forwardRef(function(e,t){var r=j.useRef(null),i=j.useState({onScrollCapture:LT,onWheelCapture:LT,onTouchMoveCapture:LT}),s=i[0],l=i[1],u=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,x=e.noRelative,b=e.noIsolation,w=e.inert,S=e.allowPinchZoom,_=e.as,E=_===void 0?"div":_,O=e.gapMode,T=iU(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,R=cve([r,t]),M=Kl(Kl({},T),s);return j.createElement(j.Fragment,null,m&&j.createElement(C,{sideCar:sU,removeScrollBar:h,shards:g,noRelative:x,noIsolation:b,inert:w,setCallbacks:l,allowPinchZoom:!!S,lockRef:r,gapMode:O}),u?j.cloneElement(j.Children.only(f),Kl(Kl({},M),{ref:R})):j.createElement(E,Kl({},M,{className:d,ref:R}),f))});kx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kx.classNames={fullWidth:tE,zeroRight:eE};var pve=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mve(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pve();return t&&e.setAttribute("nonce",t),e}function gve(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yve(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vve=function(){var e=0,t=null;return{add:function(r){e==0&&(t=mve())&&(gve(t,r),yve(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bve=function(){var e=vve();return function(t,r){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},lU=function(){var e=bve(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},Sve={left:0,top:0,right:0,gap:0},UT=function(e){return parseInt(e||"",10)||0},wve=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[UT(r),UT(i),UT(s)]},Eve=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sve;var t=wve(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])}},xve=lU(),tg="data-scroll-locked",_ve=function(e,t,r,i){var s=e.left,l=e.top,u=e.right,f=e.gap;return r===void 0&&(r="margin"),`
84
+ .`.concat(ive,` {
85
+ overflow: hidden `).concat(i,`;
86
+ padding-right: `).concat(f,"px ").concat(i,`;
87
+ }
88
+ body[`).concat(tg,`] {
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(u,`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(eE,` {
102
+ right: `).concat(f,"px ").concat(i,`;
103
+ }
104
+
105
+ .`).concat(tE,` {
106
+ margin-right: `).concat(f,"px ").concat(i,`;
107
+ }
108
+
109
+ .`).concat(eE," .").concat(eE,` {
110
+ right: 0 `).concat(i,`;
111
+ }
112
+
113
+ .`).concat(tE," .").concat(tE,` {
114
+ margin-right: 0 `).concat(i,`;
115
+ }
116
+
117
+ body[`).concat(tg,`] {
118
+ `).concat(ove,": ").concat(f,`px;
119
+ }
120
+ `)},cD=function(){var e=parseInt(document.body.getAttribute(tg)||"0",10);return isFinite(e)?e:0},Tve=function(){j.useEffect(function(){return document.body.setAttribute(tg,(cD()+1).toString()),function(){var e=cD()-1;e<=0?document.body.removeAttribute(tg):document.body.setAttribute(tg,e.toString())}},[])},Cve=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;Tve();var l=j.useMemo(function(){return Eve(s)},[s]);return j.createElement(xve,{styles:_ve(l,!t,s,r?"":"!important")})},LR=!1;if(typeof window<"u")try{var vw=Object.defineProperty({},"passive",{get:function(){return LR=!0,!0}});window.addEventListener("test",vw,vw),window.removeEventListener("test",vw,vw)}catch{LR=!1}var Om=LR?{passive:!1}:!1,Rve=function(e){return e.tagName==="TEXTAREA"},cU=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Rve(e)&&r[t]==="visible")},Ove=function(e){return cU(e,"overflowY")},Ave=function(e){return cU(e,"overflowX")},uD=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=uU(e,i);if(s){var l=fU(e,i),u=l[1],f=l[2];if(u>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},Mve=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},jve=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},uU=function(e,t){return e==="v"?Ove(t):Ave(t)},fU=function(e,t){return e==="v"?Mve(t):jve(t)},kve=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nve=function(e,t,r,i,s){var l=kve(e,window.getComputedStyle(t).direction),u=l*i,f=r.target,d=t.contains(f),h=!1,m=u>0,g=0,v=0;do{if(!f)break;var x=fU(e,f),b=x[0],w=x[1],S=x[2],_=w-S-l*b;(b||_)&&uU(e,f)&&(g+=_,v+=b);var E=f.parentNode;f=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}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},bw=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fD=function(e){return[e.deltaX,e.deltaY]},dD=function(e){return e&&"current"in e?e.current:e},Dve=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zve=function(e){return`
121
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
122
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
123
+ `)},$ve=0,Am=[];function Pve(e){var t=j.useRef([]),r=j.useRef([0,0]),i=j.useRef(),s=j.useState($ve++)[0],l=j.useState(lU)[0],u=j.useRef(e);j.useEffect(function(){u.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var w=ave([e.lockRef.current],(e.shards||[]).map(dD),!0).filter(Boolean);return w.forEach(function(S){return S.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),w.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=j.useCallback(function(w,S){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var _=bw(w),E=r.current,O="deltaX"in w?w.deltaX:E[0]-_[0],T="deltaY"in w?w.deltaY:E[1]-_[1],C,R=w.target,M=Math.abs(O)>Math.abs(T)?"h":"v";if("touches"in w&&M==="h"&&R.type==="range")return!1;var D=window.getSelection(),I=D&&D.anchorNode,B=I?I===R||I.contains(R):!1;if(B)return!1;var V=uD(M,R);if(!V)return!0;if(V?C=M:(C=M==="v"?"h":"v",V=uD(M,R)),!V)return!1;if(!i.current&&"changedTouches"in w&&(O||T)&&(i.current=C),!C)return!0;var F=i.current||C;return Nve(F,S,w,F==="h"?O:T)},[]),d=j.useCallback(function(w){var S=w;if(!(!Am.length||Am[Am.length-1]!==l)){var _="deltaY"in S?fD(S):bw(S),E=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&Dve(C.delta,_)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var O=(u.current.shards||[]).map(dD).filter(Boolean).filter(function(C){return C.contains(S.target)}),T=O.length>0?f(S,O[0]):!u.current.noIsolation;T&&S.cancelable&&S.preventDefault()}}},[]),h=j.useCallback(function(w,S,_,E){var O={name:w,delta:S,target:_,should:E,shadowParent:Ive(_)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(T){return T!==O})},1)},[]),m=j.useCallback(function(w){r.current=bw(w),i.current=void 0},[]),g=j.useCallback(function(w){h(w.type,fD(w),w.target,f(w,e.lockRef.current))},[]),v=j.useCallback(function(w){h(w.type,bw(w),w.target,f(w,e.lockRef.current))},[]);j.useEffect(function(){return Am.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Om),document.addEventListener("touchmove",d,Om),document.addEventListener("touchstart",m,Om),function(){Am=Am.filter(function(w){return w!==l}),document.removeEventListener("wheel",d,Om),document.removeEventListener("touchmove",d,Om),document.removeEventListener("touchstart",m,Om)}},[]);var x=e.removeScrollBar,b=e.inert;return j.createElement(j.Fragment,null,b?j.createElement(l,{styles:zve(s)}):null,x?j.createElement(Cve,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ive(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lve=hve(sU,Pve);var dU=j.forwardRef(function(e,t){return j.createElement(kx,Kl({},e,{ref:t,sideCar:Lve}))});dU.classNames=kx.classNames;var Uve=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mm=new WeakMap,Sw=new WeakMap,ww={},VT=0,hU=function(e){return e&&(e.host||hU(e.parentNode))},Vve=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=hU(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})},qve=function(e,t,r,i){var s=Vve(t,Array.isArray(e)?e:[e]);ww[r]||(ww[r]=new WeakMap);var l=ww[r],u=[],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 x=v.getAttribute(i),b=x!==null&&x!=="false",w=(Mm.get(v)||0)+1,S=(l.get(v)||0)+1;Mm.set(v,w),l.set(v,S),u.push(v),w===1&&b&&Sw.set(v,!0),S===1&&v.setAttribute(r,"true"),b||v.setAttribute(i,"true")}catch(_){console.error("aria-hidden: cannot operate on ",v,_)}})};return m(t),f.clear(),VT++,function(){u.forEach(function(g){var v=Mm.get(g)-1,x=l.get(g)-1;Mm.set(g,v),l.set(g,x),v||(Sw.has(g)||g.removeAttribute(i),Sw.delete(g)),x||g.removeAttribute(r)}),VT--,VT||(Mm=new WeakMap,Mm=new WeakMap,Sw=new WeakMap,ww={})}},Fve=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=Uve(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),qve(i,s,r,"aria-hidden")):function(){return null}},Nx="Dialog",[pU]=am(Nx),[Bve,Al]=pU(Nx),mU=e=>{const{__scopeDialog:t,children:r,open:i,defaultOpen:s,onOpenChange:l,modal:u=!0}=e,f=j.useRef(null),d=j.useRef(null),[h,m]=rS({prop:i,defaultProp:s??!1,onChange:l,caller:Nx});return k.jsx(Bve,{scope:t,triggerRef:f,contentRef:d,contentId:ec(),titleId:ec(),descriptionId:ec(),open:h,onOpenChange:m,onOpenToggle:j.useCallback(()=>m(g=>!g),[m]),modal:u,children:r})};mU.displayName=Nx;var gU="DialogTrigger",Hve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Al(gU,r),l=sa(t,s.triggerRef);return k.jsx(Hr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":PM(s.open),...i,ref:l,onClick:Ar(e.onClick,s.onOpenToggle)})});Hve.displayName=gU;var zM="DialogPortal",[Gve,yU]=pU(zM,{forceMount:void 0}),vU=e=>{const{__scopeDialog:t,forceMount:r,children:i,container:s}=e,l=Al(zM,t);return k.jsx(Gve,{scope:t,forceMount:r,children:j.Children.map(i,u=>k.jsx(Lg,{present:r||l.open,children:k.jsx(aU,{asChild:!0,container:s,children:u})}))})};vU.displayName=zM;var PE="DialogOverlay",bU=j.forwardRef((e,t)=>{const r=yU(PE,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=Al(PE,e.__scopeDialog);return l.modal?k.jsx(Lg,{present:i||l.open,children:k.jsx(Yve,{...s,ref:t})}):null});bU.displayName=PE;var Kve=$E("DialogOverlay.RemoveScroll"),Yve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Al(PE,r);return k.jsx(dU,{as:Kve,allowPinchZoom:!0,shards:[s.contentRef],children:k.jsx(Hr.div,{"data-state":PM(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Up="DialogContent",SU=j.forwardRef((e,t)=>{const r=yU(Up,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=Al(Up,e.__scopeDialog);return k.jsx(Lg,{present:i||l.open,children:l.modal?k.jsx(Zve,{...s,ref:t}):k.jsx(Xve,{...s,ref:t})})});SU.displayName=Up;var Zve=j.forwardRef((e,t)=>{const r=Al(Up,e.__scopeDialog),i=j.useRef(null),s=sa(t,r.contentRef,i);return j.useEffect(()=>{const l=i.current;if(l)return Fve(l)},[]),k.jsx(wU,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ar(e.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Ar(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&l.preventDefault()}),onFocusOutside:Ar(e.onFocusOutside,l=>l.preventDefault())})}),Xve=j.forwardRef((e,t)=>{const r=Al(Up,e.__scopeDialog),i=j.useRef(!1),s=j.useRef(!1);return k.jsx(wU,{...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 u=l.target;r.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),wU=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...u}=e,f=Al(Up,r),d=j.useRef(null),h=sa(t,d);return rve(),k.jsxs(k.Fragment,{children:[k.jsx(nU,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:k.jsx(eU,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":PM(f.open),...u,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(ebe,{titleId:f.titleId}),k.jsx(nbe,{contentRef:d,descriptionId:f.descriptionId})]})]})}),$M="DialogTitle",Qve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Al($M,r);return k.jsx(Hr.h2,{id:s.titleId,...i,ref:t})});Qve.displayName=$M;var EU="DialogDescription",Wve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Al(EU,r);return k.jsx(Hr.p,{id:s.descriptionId,...i,ref:t})});Wve.displayName=EU;var xU="DialogClose",Jve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Al(xU,r);return k.jsx(Hr.button,{type:"button",...i,ref:t,onClick:Ar(e.onClick,()=>s.onOpenChange(!1))})});Jve.displayName=xU;function PM(e){return e?"open":"closed"}var _U="DialogTitleWarning",[P2e,TU]=lye(_U,{contentName:Up,titleName:$M,docsSlug:"dialog"}),ebe=({titleId:e})=>{const t=TU(_U),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},tbe="DialogDescriptionWarning",nbe=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${TU(tbe).contentName}}.`;return j.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},rbe=mU,abe=vU,ibe=bU,obe=SU,_b='[cmdk-group=""]',qT='[cmdk-group-items=""]',sbe='[cmdk-group-heading=""]',CU='[cmdk-item=""]',hD=`${CU}:not([aria-disabled="true"])`,UR="cmdk-item-select",Dm="data-value",lbe=(e,t,r)=>U0e(e,t,r),RU=j.createContext(void 0),iS=()=>j.useContext(RU),OU=j.createContext(void 0),IM=()=>j.useContext(OU),AU=j.createContext(void 0),MU=j.forwardRef((e,t)=>{let r=zm(()=>{var U,X;return{search:"",value:(X=(U=e.value)!=null?U:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=zm(()=>new Set),s=zm(()=>new Map),l=zm(()=>new Map),u=zm(()=>new Set),f=jU(e),{label:d,children:h,value:m,onValueChange:g,filter:v,shouldFilter:x,loop:b,disablePointerSelection:w=!1,vimBindings:S=!0,..._}=e,E=ec(),O=ec(),T=ec(),C=j.useRef(null),R=bbe();Vp(()=>{if(m!==void 0){let U=m.trim();r.current.value=U,M.emit()}},[m]),Vp(()=>{R(6,G)},[]);let M=j.useMemo(()=>({subscribe:U=>(u.current.add(U),()=>u.current.delete(U)),snapshot:()=>r.current,setState:(U,X,L)=>{var Z,ee,de,ye;if(!Object.is(r.current[U],X)){if(r.current[U]=X,U==="search")F(),B(),R(1,V);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Te=document.getElementById(T);Te?Te.focus():(Z=document.getElementById(E))==null||Z.focus()}if(R(7,()=>{var Te;r.current.selectedItemId=(Te=W())==null?void 0:Te.id,M.emit()}),L||R(5,G),((ee=f.current)==null?void 0:ee.value)!==void 0){let Te=X??"";(ye=(de=f.current).onValueChange)==null||ye.call(de,Te);return}}M.emit()}},emit:()=>{u.current.forEach(U=>U())}}),[]),D=j.useMemo(()=>({value:(U,X,L)=>{var Z;X!==((Z=l.current.get(U))==null?void 0:Z.value)&&(l.current.set(U,{value:X,keywords:L}),r.current.filtered.items.set(U,I(X,L)),R(2,()=>{B(),M.emit()}))},item:(U,X)=>(i.current.add(U),X&&(s.current.has(X)?s.current.get(X).add(U):s.current.set(X,new Set([U]))),R(3,()=>{F(),B(),r.current.value||V(),M.emit()}),()=>{l.current.delete(U),i.current.delete(U),r.current.filtered.items.delete(U);let L=W();R(4,()=>{F(),L?.getAttribute("id")===U&&V(),M.emit()})}),group:U=>(s.current.has(U)||s.current.set(U,new Set),()=>{l.current.delete(U),s.current.delete(U)}),filter:()=>f.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:E,inputId:T,labelId:O,listInnerRef:C}),[]);function I(U,X){var L,Z;let ee=(Z=(L=f.current)==null?void 0:L.filter)!=null?Z:lbe;return U?ee(U,r.current.search,X):0}function B(){if(!r.current.search||f.current.shouldFilter===!1)return;let U=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(Z=>{let ee=s.current.get(Z),de=0;ee.forEach(ye=>{let Te=U.get(ye);de=Math.max(Te,de)}),X.push([Z,de])});let L=C.current;te().sort((Z,ee)=>{var de,ye;let Te=Z.getAttribute("id"),Ae=ee.getAttribute("id");return((de=U.get(Ae))!=null?de:0)-((ye=U.get(Te))!=null?ye:0)}).forEach(Z=>{let ee=Z.closest(qT);ee?ee.appendChild(Z.parentElement===ee?Z:Z.closest(`${qT} > *`)):L.appendChild(Z.parentElement===L?Z:Z.closest(`${qT} > *`))}),X.sort((Z,ee)=>ee[1]-Z[1]).forEach(Z=>{var ee;let de=(ee=C.current)==null?void 0:ee.querySelector(`${_b}[${Dm}="${encodeURIComponent(Z[0])}"]`);de?.parentElement.appendChild(de)})}function V(){let U=te().find(L=>L.getAttribute("aria-disabled")!=="true"),X=U?.getAttribute(Dm);M.setState("value",X||void 0)}function F(){var U,X,L,Z;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 de of i.current){let ye=(X=(U=l.current.get(de))==null?void 0:U.value)!=null?X:"",Te=(Z=(L=l.current.get(de))==null?void 0:L.keywords)!=null?Z:[],Ae=I(ye,Te);r.current.filtered.items.set(de,Ae),Ae>0&&ee++}for(let[de,ye]of s.current)for(let Te of ye)if(r.current.filtered.items.get(Te)>0){r.current.filtered.groups.add(de);break}r.current.filtered.count=ee}function G(){var U,X,L;let Z=W();Z&&(((U=Z.parentElement)==null?void 0:U.firstChild)===Z&&((L=(X=Z.closest(_b))==null?void 0:X.querySelector(sbe))==null||L.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function W(){var U;return(U=C.current)==null?void 0:U.querySelector(`${CU}[aria-selected="true"]`)}function te(){var U;return Array.from(((U=C.current)==null?void 0:U.querySelectorAll(hD))||[])}function H(U){let X=te()[U];X&&M.setState("value",X.getAttribute(Dm))}function J(U){var X;let L=W(),Z=te(),ee=Z.findIndex(ye=>ye===L),de=Z[ee+U];(X=f.current)!=null&&X.loop&&(de=ee+U<0?Z[Z.length-1]:ee+U===Z.length?Z[0]:Z[ee+U]),de&&M.setState("value",de.getAttribute(Dm))}function re(U){let X=W(),L=X?.closest(_b),Z;for(;L&&!Z;)L=U>0?ybe(L,_b):vbe(L,_b),Z=L?.querySelector(hD);Z?M.setState("value",Z.getAttribute(Dm)):J(U)}let le=()=>H(te().length-1),ae=U=>{U.preventDefault(),U.metaKey?le():U.altKey?re(1):J(1)},N=U=>{U.preventDefault(),U.metaKey?H(0):U.altKey?re(-1):J(-1)};return j.createElement(cc.div,{ref:t,tabIndex:-1,..._,"cmdk-root":"",onKeyDown:U=>{var X;(X=_.onKeyDown)==null||X.call(_,U);let L=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||L))switch(U.key){case"n":case"j":{S&&U.ctrlKey&&ae(U);break}case"ArrowDown":{ae(U);break}case"p":case"k":{S&&U.ctrlKey&&N(U);break}case"ArrowUp":{N(U);break}case"Home":{U.preventDefault(),H(0);break}case"End":{U.preventDefault(),le();break}case"Enter":{U.preventDefault();let Z=W();if(Z){let ee=new Event(UR);Z.dispatchEvent(ee)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:wbe},d),Dx(e,U=>j.createElement(OU.Provider,{value:M},j.createElement(RU.Provider,{value:D},U))))}),cbe=j.forwardRef((e,t)=>{var r,i;let s=ec(),l=j.useRef(null),u=j.useContext(AU),f=iS(),d=jU(e),h=(i=(r=d.current)==null?void 0:r.forceMount)!=null?i:u?.forceMount;Vp(()=>{if(!h)return f.item(s,u?.id)},[h]);let m=kU(s,l,[e.value,e.children,l],e.keywords),g=IM(),v=Df(R=>R.value&&R.value===m.current),x=Df(R=>h||f.filter()===!1?!0:R.search?R.filtered.items.get(s)>0:!0);j.useEffect(()=>{let R=l.current;if(!(!R||e.disabled))return R.addEventListener(UR,b),()=>R.removeEventListener(UR,b)},[x,e.onSelect,e.disabled]);function b(){var R,M;w(),(M=(R=d.current).onSelect)==null||M.call(R,m.current)}function w(){g.setState("value",m.current,!0)}if(!x)return null;let{disabled:S,value:_,onSelect:E,forceMount:O,keywords:T,...C}=e;return j.createElement(cc.div,{ref:Nf(l,t),...C,id:s,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||f.getDisablePointerSelection()?void 0:w,onClick:S?void 0:b},e.children)}),ube=j.forwardRef((e,t)=>{let{heading:r,children:i,forceMount:s,...l}=e,u=ec(),f=j.useRef(null),d=j.useRef(null),h=ec(),m=iS(),g=Df(x=>s||m.filter()===!1?!0:x.search?x.filtered.groups.has(u):!0);Vp(()=>m.group(u),[]),kU(u,f,[e.value,e.heading,d]);let v=j.useMemo(()=>({id:u,forceMount:s}),[s]);return j.createElement(cc.div,{ref:Nf(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),Dx(e,x=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},j.createElement(AU.Provider,{value:v},x))))}),fbe=j.forwardRef((e,t)=>{let{alwaysRender:r,...i}=e,s=j.useRef(null),l=Df(u=>!u.search);return!r&&!l?null:j.createElement(cc.div,{ref:Nf(s,t),...i,"cmdk-separator":"",role:"separator"})}),dbe=j.forwardRef((e,t)=>{let{onValueChange:r,...i}=e,s=e.value!=null,l=IM(),u=Df(h=>h.search),f=Df(h=>h.selectedItemId),d=iS();return j.useEffect(()=>{e.value!=null&&l.setState("search",e.value)},[e.value]),j.createElement(cc.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:u,onChange:h=>{s||l.setState("search",h.target.value),r?.(h.target.value)}})}),hbe=j.forwardRef((e,t)=>{let{children:r,label:i="Suggestions",...s}=e,l=j.useRef(null),u=j.useRef(null),f=Df(h=>h.selectedItemId),d=iS();return j.useEffect(()=>{if(u.current&&l.current){let h=u.current,m=l.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let x=h.offsetHeight;m.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),j.createElement(cc.div,{ref:Nf(l,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":i,id:d.listId},Dx(e,h=>j.createElement("div",{ref:Nf(u,d.listInnerRef),"cmdk-list-sizer":""},h)))}),pbe=j.forwardRef((e,t)=>{let{open:r,onOpenChange:i,overlayClassName:s,contentClassName:l,container:u,...f}=e;return j.createElement(rbe,{open:r,onOpenChange:i},j.createElement(abe,{container:u},j.createElement(ibe,{"cmdk-overlay":"",className:s}),j.createElement(obe,{"aria-label":e.label,"cmdk-dialog":"",className:l},j.createElement(MU,{ref:t,...f}))))}),mbe=j.forwardRef((e,t)=>Df(r=>r.filtered.count===0)?j.createElement(cc.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),gbe=j.forwardRef((e,t)=>{let{progress:r,children:i,label:s="Loading...",...l}=e;return j.createElement(cc.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Dx(e,u=>j.createElement("div",{"aria-hidden":!0},u)))}),us=Object.assign(MU,{List:hbe,Item:cbe,Input:dbe,Group:ube,Separator:fbe,Dialog:pbe,Empty:mbe,Loading:gbe});function ybe(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function vbe(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function jU(e){let t=j.useRef(e);return Vp(()=>{t.current=e}),t}var Vp=typeof window>"u"?j.useEffect:j.useLayoutEffect;function zm(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function Df(e){let t=IM(),r=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,r,r)}function kU(e,t,r,i=[]){let s=j.useRef(),l=iS();return Vp(()=>{var u;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),(u=t.current)==null||u.setAttribute(Dm,f),s.current=f}),s}var bbe=()=>{let[e,t]=j.useState(),r=zm(()=>new Map);return Vp(()=>{r.current.forEach(i=>i()),r.current=new Map},[e]),(i,s)=>{r.current.set(i,s),t({})}};function Sbe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Dx({asChild:e,children:t},r){return e&&j.isValidElement(t)?j.cloneElement(Sbe(t),{ref:t.ref},r(t.props.children)):r(t)}var wbe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ebe=Hu("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 xbe({className:e,variant:t,asChild:r=!1,...i}){const s=r?rL:"span";return k.jsx(s,{"data-slot":"badge",className:fn(Ebe({variant:t}),e),...i})}const NU=j.forwardRef(({className:e,...t},r)=>k.jsx(us,{ref:r,"data-slot":"command",className:fn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),_be=j.forwardRef(({className:e,...t},r)=>k.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[k.jsx(bge,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),k.jsx(us.Input,{ref:r,className:fn("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})]}));_be.displayName=us.Input.displayName;function DU({className:e,...t}){return k.jsx(us.List,{"data-slot":"command-list",className:fn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function zU({className:e,...t}){return k.jsx(us.Group,{"data-slot":"command-group",className:fn("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 $U({className:e,...t}){return k.jsx(us.Item,{"data-slot":"command-item",className:fn("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 Tbe({multiple:e,items:t=[],selected:r,onValueChange:i,autoFocus:s=!1,disabled:l=!1,ariaDescribedby:u,ariaPlaceholder:f,onFocus:d,onBlur:h,className:m,id:g}){const v=j.useRef(null),[x,b]=j.useState(!1),[w,S]=j.useState(""),_=j.useMemo(()=>t.filter(M=>r.some(D=>bf(M.value,D))),[t,r]),E=j.useMemo(()=>t.filter(M=>!_.some(D=>bf(D.value,M.value))),[t,_]),O=j.useCallback(M=>{if(l)return;const D=_.filter(I=>!bf(I.value,M.value));i?.(D.map(I=>I.index))},[_,i,l]),T=j.useCallback(M=>{if(!(l||!v.current||v.current.value!==""))if(M.key==="Delete"||M.key==="Backspace"){const D=_.slice(0,-1);i?.(D.map(I=>I.index))}else M.key==="Escape"&&v.current.blur()},[_,i,l]),C=j.useCallback(M=>{if(l)return;S("");const D=e?[..._,M]:[M];i?.(D.map(I=>I.index))},[e,_,i,l]),R=j.useCallback(M=>{l||b(!0),d?.(M)},[l,d]);return k.jsxs(NU,{onKeyDown:T,className:fn("overflow-visible bg-transparent",m),autoFocus:s,"aria-disabled":l,onBlur:h,onFocus:R,"aria-describedby":u,"aria-placeholder":f,children:[k.jsx("div",{className:fn("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:[_.map(M=>k.jsxs(xbe,{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&&O(M),onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:()=>O(M),disabled:l,children:k.jsx(eL,{className:fn("h-3 w-3 text-muted-foreground hover:text-foreground",l&&"pointer-events-none")})})]},M.value)),k.jsx(us.Input,{ref:v,value:w,onValueChange:S,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}`})]})}),x&&!l&&E.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(zU,{className:"h-full overflow-auto",children:k.jsx(DU,{children:E.map(M=>k.jsx($U,{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:()=>C(M),className:"cursor-pointer",children:M.label},`${M.value}-command-item`))})})})})]})}function Cbe({items:e,selected:t,onValueChange:r,autoFocus:i=!1,disabled:s=!1,required:l=!1,placeholder:u="Select...",ariaDescribedby:f,ariaPlaceholder:d,onFocus:h,onBlur:m,className:g}){const[v,x]=j.useState(!1),b=e?.find(E=>E.value===t),w=j.useRef(null),S=j.useRef(null);j.useEffect(()=>{v&&w.current&&requestAnimationFrame(()=>{var E;(E=w.current)===null||E===void 0||E.scrollIntoView({block:"nearest"})})},[v]);const _=E=>{S.current&&!S.current.contains(E.relatedTarget)&&x(!1),m?.(E)};return k.jsxs(NU,{ref:S,className:fn("overflow-visible bg-transparent",g),autoFocus:i,"aria-disabled":s,onBlur:_,onFocus:h,"aria-describedby":f,"aria-placeholder":d,children:[k.jsxs("div",{onClick:()=>!s&&x(!v),className:fn("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:fn("flex-1 line-clamp-1",!b&&"text-muted-foreground"),children:b?.label||u}),k.jsx(WI,{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(zU,{className:"h-full overflow-auto",children:k.jsx(DU,{children:e.map(E=>k.jsxs($U,{ref:E.value===t?w:void 0,onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},onSelect:()=>{E.disabled||(r?.(E.value),x(!1))},className:fn("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",E.value===t&&"font-semibold",E.disabled&&"opacity-50 cursor-not-allowed"),children:[k.jsx("span",{children:E.label}),k.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:E.value===t&&k.jsx(sge,{className:"h-4 w-4"})})]},E.value))})})}):null})]})}function Rbe({id:e,options:t,required:r,disabled:i,readonly:s,value:l,multiple:u,autofocus:f,onChange:d,onBlur:h,onFocus:m,defaultValue:g,placeholder:v,rawErrors:x=[],className:b}){const{enumOptions:w,enumDisabled:S,emptyValue:_}=t,E=()=>{m(e,$a(l,w,_))},O=()=>{h(e,$a(l,w,_))},T=w?.map(({value:R,label:M},D)=>({value:u?R:D.toString(),label:M,index:D,disabled:Array.isArray(S)&&S.includes(R)})),C=fn({"border-destructive":x.length>0},b);return k.jsx("div",{className:"p-0.5",children:u?k.jsx(Tbe,{id:e,autoFocus:f,disabled:i||s,multiple:!0,className:C,items:T,selected:l,onValueChange:R=>{d($a(R,w,_))},onFocus:E,onBlur:O}):k.jsx(Cbe,{items:T,selected:TI(l??g,w,!1),onValueChange:R=>{d($a(R,w,_))},autoFocus:f,disabled:i||s,required:r,placeholder:v,className:C,onFocus:E,onBlur:O,ariaDescribedby:So(e)})})}function Obe({className:e,...t}){return k.jsx("textarea",{"data-slot":"textarea",className:fn("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 Abe({id:e,htmlName:t,placeholder:r,value:i,required:s,disabled:l,autofocus:u,readonly:f,onBlur:d,onFocus:h,onChange:m,options:g,className:v}){const x=({target:{value:S}})=>m(S===""?g.emptyValue:S),b=({target:S})=>d(e,S&&S.value),w=({target:S})=>h(e,S&&S.value);return k.jsx("div",{className:"flex p-0.5",children:k.jsx(Obe,{id:e,name:t||e,placeholder:r,disabled:l,readOnly:f,value:i??"",required:s,autoFocus:u,rows:g.rows||5,onChange:x,onBlur:b,onFocus:w,"aria-describedby":So(e),className:v})})}function Mbe(){return{CheckboxWidget:kye,CheckboxesWidget:Nye,RadioWidget:c0e,RangeWidget:j0e,SelectWidget:Rbe,TextareaWidget:Abe}}function jbe(){return{templates:sye(),widgets:Mbe()}}function kbe(){return Vme(jbe())}const Nbe=kbe();function x1({controlled:e,default:t,name:r,state:i="value"}){const{current:s}=j.useRef(e!==void 0),[l,u]=j.useState(t),f=s?e:l,d=j.useCallback(h=>{s||u(h)},[]);return[f,d]}const PU=j.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Dbe(){return j.useContext(PU)}function LM(e){const{children:t,elementsRef:r,labelsRef:i,onMapChange:s}=e,l=ot(s),u=j.useRef(0),f=Ni($be).current,d=Ni(zbe).current,[h,m]=j.useState(0),g=j.useRef(h),v=ot((_,E)=>{d.set(_,E??null),g.current+=1,m(g.current)}),x=ot(_=>{d.delete(_),g.current+=1,m(g.current)}),b=j.useMemo(()=>{const _=new Map;return Array.from(d.keys()).filter(O=>O.isConnected).sort(Pbe).forEach((O,T)=>{const C=d.get(O)??{};_.set(O,{...C,index:T})}),_},[d,h]);at(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const _=new MutationObserver(E=>{const O=new Set,T=C=>O.has(C)?O.delete(C):O.add(C);E.forEach(C=>{C.removedNodes.forEach(T),C.addedNodes.forEach(T)}),O.size===0&&(g.current+=1,m(g.current))});return b.forEach((E,O)=>{O.parentElement&&_.observe(O.parentElement,{childList:!0})}),()=>{_.disconnect()}},[b]),at(()=>{g.current===h&&(r.current.length!==b.size&&(r.current.length=b.size),i&&i.current.length!==b.size&&(i.current.length=b.size),u.current=b.size),l(b)},[l,b,r,i,h]),at(()=>()=>{r.current=[]},[r]),at(()=>()=>{i&&(i.current=[])},[i]);const w=ot(_=>(f.add(_),()=>{f.delete(_)}));at(()=>{f.forEach(_=>_(b))},[f,b]);const S=j.useMemo(()=>({register:v,unregister:x,subscribeMapChange:w,elementsRef:r,labelsRef:i,nextIndexRef:u}),[v,x,w,r,i,u]);return k.jsx(PU.Provider,{value:S,children:t})}function zbe(){return new Map}function $be(){return new Set}function Pbe(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 Ibe=j.createContext(void 0);function UM(){return j.useContext(Ibe)?.direction??"ltr"}const IU=j.createContext(void 0);function VM(){const e=j.useContext(IU);if(e===void 0)throw new Error(Ti(64));return e}let Lbe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const qM={tabActivationDirection:e=>({[Lbe.activationDirection]:e})},Ube=j.forwardRef(function(t,r){const{className:i,defaultValue:s=0,onValueChange:l,orientation:u="horizontal",render:f,value:d,...h}=t,m=UM(),g=Object.hasOwn(t,"defaultValue"),v=j.useRef([]),[x,b]=j.useState(()=>new Map),[w,S]=x1({controlled:d,default:s,name:"Tabs",state:"value"}),_=d!==void 0,[E,O]=j.useState(()=>new Map),[T,C]=j.useState("none"),R=ot((J,re)=>{l?.(J,re),!re.isCanceled&&(S(J),C(re.activationDirection))}),M=ot((J,re)=>{b(le=>{if(le.get(J)===re)return le;const ae=new Map(le);return ae.set(J,re),ae})}),D=ot((J,re)=>{b(le=>{if(!le.has(J)||le.get(J)!==re)return le;const ae=new Map(le);return ae.delete(J),ae})}),I=j.useCallback(J=>x.get(J),[x]),B=j.useCallback(J=>{for(const re of E.values())if(J===re?.value)return re?.id},[E]),V=j.useCallback(J=>{if(J===void 0)return null;for(const[re,le]of E.entries())if(le!=null&&J===(le.value??le.index))return re;return null},[E]),F=j.useMemo(()=>({direction:m,getTabElementBySelectedValue:V,getTabIdByPanelValue:B,getTabPanelIdByValue:I,onValueChange:R,orientation:u,registerMountedTabPanel:M,setTabMap:O,unregisterMountedTabPanel:D,tabActivationDirection:T,value:w}),[m,V,B,I,R,u,M,O,D,T,w]),G=j.useMemo(()=>{for(const J of E.values())if(J!=null&&J.value===w)return J},[E,w]),W=j.useMemo(()=>{for(const J of E.values())if(J!=null&&!J.disabled)return J.value},[E]);at(()=>{if(_||E.size===0)return;const J=G?.disabled,re=G==null&&w!==null;if(g&&J&&w===s||!J&&!re)return;const ae=W??null;w!==ae&&(S(ae),C("none"))},[s,W,g,_,G,C,S,E,w]);const H=dr("div",t,{state:{orientation:u,tabActivationDirection:T},ref:r,props:h,stateAttributesMapping:qM});return k.jsx(IU.Provider,{value:F,children:k.jsx(LM,{elementsRef:v,children:H})})});function kn(e){return e?.ownerDocument||document}let pD=0;function Vbe(e,t="mui"){const[r,i]=j.useState(e),s=e||r;return j.useEffect(()=>{r==null&&(pD+=1,i(`${t}-${pD}`))},[r,t]),s}const mD=Wae.useId;function Vg(e,t){if(mD!==void 0){const r=mD();return e??(t?`${t}-${r}`:r)}return Vbe(e,t)}function im(e){return Vg(e,"base-ui")}const LU="data-composite-item-active";let UU=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function FM(e={}){const{label:t,metadata:r,textRef:i,indexGuessBehavior:s,index:l}=e,{register:u,unregister:f,subscribeMapChange:d,elementsRef:h,labelsRef:m,nextIndexRef:g}=Dbe(),v=j.useRef(-1),[x,b]=j.useState(l??(s===UU.GuessFromOrder?()=>{if(v.current===-1){const _=g.current;g.current+=1,v.current=_}return v.current}:-1)),w=j.useRef(null),S=j.useCallback(_=>{if(w.current=_,x!==-1&&_!==null&&(h.current[x]=_,m)){const E=t!==void 0;m.current[x]=E?t:i?.current?.textContent??_.textContent}},[x,h,m,t,i]);return at(()=>{if(l!=null)return;const _=w.current;if(_)return u(_,r),()=>{f(_)}},[l,u,f,r]),at(()=>{if(l==null)return d(_=>{const E=w.current?_.get(w.current)?.index:null;E!=null&&b(E)})},[l,d,b]),j.useMemo(()=>({ref:S,index:x}),[x,S])}function qbe(e={}){const{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:i}=G$(),{ref:s,index:l}=FM(e),u=r===l,f=j.useRef(null),d=Pu(s,f);return{compositeProps:j.useMemo(()=>({tabIndex:u?0:-1,onFocus(){i(l)},onMouseMove(){const m=f.current;if(!t||!m)return;const g=m.hasAttribute("disabled")||m.ariaDisabled==="true";!u&&!g&&m.focus()}}),[u,i,l,t]),compositeRef:d,index:l}}const VU=j.createContext(void 0);function Fbe(){const e=j.useContext(VU);if(e===void 0)throw new Error(Ti(65));return e}const qp="none",Sg="trigger-press",ts="trigger-hover",BM="outside-press",FT="item-press",Bbe="close-press",Fp="focus-out",qU="escape-key",BT="list-navigation",Hbe="cancel-open",FU="imperative-action",Gbe="window-resize";function un(e,t,r,i){let s=!1,l=!1;const u=i??za;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,...u}}const qg=typeof navigator<"u",HT=Zbe(),BU=Qbe(),HU=Xbe(),HM=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),GU=HT.platform==="MacIntel"&&HT.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(HT.platform),Kbe=qg&&/apple/i.test(navigator.vendor),VR=qg&&/android/i.test(BU)||/android/i.test(HU);qg&&BU.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Ybe=HU.includes("jsdom/");function Zbe(){if(!qg)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 Xbe(){if(!qg)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function Qbe(){if(!qg)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const qR="data-base-ui-focusable",KU="active",YU="selected",ZU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",_f="ArrowLeft",Tf="ArrowRight",GM="ArrowUp",oS="ArrowDown";function ms(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Zt(e,t){if(!e||!t)return!1;const r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&h1(r)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function XU(e,t){if(!nr(e))return!1;const r=e;if(t.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,i]of t.entries())if(Zt(i,r))return!i.hasAttribute("data-trigger-disabled");return!1}function ns(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Sl(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 Wbe(e){return e.matches("html,body")}function KM(e){return Ur(e)&&e.matches(ZU)}function FR(e){return e?e.getAttribute("role")==="combobox"&&KM(e):!1}function _1(e){return e?e.hasAttribute(qR)?e:e.querySelector(`[${qR}]`)||e:null}function Nu(e,t,r=!0){return e.filter(s=>s.parentId===t&&(!r||s.context?.open)).flatMap(s=>[s,...Nu(e,s.id,r)])}function gD(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 es(e){e.preventDefault(),e.stopPropagation()}function Jbe(e){return"nativeEvent"in e}function QU(e){return e.pointerType===""&&e.isTrusted?!0:VR&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function WU(e){return Ybe?!1:!VR&&e.width===0&&e.height===0||VR&&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 T1(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function JU(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const e1e=["top","right","bottom","left"],wg=Math.min,rs=Math.max,IE=Math.round,xp=Math.floor,tc=e=>({x:e,y:e}),t1e={left:"right",right:"left",bottom:"top",top:"bottom"};function BR(e,t,r){return rs(e,wg(t,r))}function Uu(e,t){return typeof e=="function"?e(t):e}function vo(e){return e.split("-")[0]}function Hf(e){return e.split("-")[1]}function YM(e){return e==="x"?"y":"x"}function ZM(e){return e==="y"?"height":"width"}function vs(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function XM(e){return YM(vs(e))}function n1e(e,t,r){r===void 0&&(r=!1);const i=Hf(e),s=XM(e),l=ZM(s);let u=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=LE(u)),[u,LE(u)]}function r1e(e){const t=LE(e);return[HR(e),t,HR(t)]}function HR(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const yD=["left","right"],vD=["right","left"],a1e=["top","bottom"],i1e=["bottom","top"];function o1e(e,t,r){switch(e){case"top":case"bottom":return r?t?vD:yD:t?yD:vD;case"left":case"right":return t?a1e:i1e;default:return[]}}function s1e(e,t,r,i){const s=Hf(e);let l=o1e(vo(e),r==="start",i);return s&&(l=l.map(u=>u+"-"+s),t&&(l=l.concat(l.map(HR)))),l}function LE(e){const t=vo(e);return t1e[t]+e.slice(t.length)}function l1e(e){return{top:0,right:0,bottom:0,left:0,...e}}function e7(e){return typeof e!="number"?l1e(e):{top:e,right:e,bottom:e,left:e}}function C1(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 Ew(e,t,r){return Math.floor(e/t)!==r}function R1(e,t){return t<0||t>=e.current.length}function nE(e,t){return ki(e,{disabledIndices:t})}function GR(e,t){return ki(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ki(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&&Du(e,l,i));return l}function t7(e,{event:t,orientation:r,loopFocus:i,rtl:s,cols:l,disabledIndices:u,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}){let g=h,v;if(t.key===GM?v="up":t.key===oS&&(v="down"),v){const x=[],b=[];let w=!1,S=0;{let D=null,I=-1;e.current.forEach((B,V)=>{if(B==null)return;S+=1;const F=B.closest('[role="row"]');F&&(w=!0),(F!==D||I===-1)&&(D=F,I+=1,x[I]=[]),x[I].push(V),b[V]=I})}let _=!1,E=0;if(w)for(const D of x){const I=D.length;I>E&&(E=I),I!==l&&(_=!0)}const O=_&&S<e.current.length,T=E||l,C=D=>{if(!_||h===-1)return;const I=b[h];if(I==null)return;const B=x[I].indexOf(h),V=D==="up"?-1:1;for(let F=I+V,G=0;G<x.length;G+=1,F+=V){if(F<0||F>=x.length){if(!i||O)return;F=F<0?x.length-1:0}const W=x[F];for(let te=Math.min(B,W.length-1);te>=0;te-=1){const H=W[te];if(!Du(e,H,u))return H}}},R=D=>{if(!O||h===-1)return;const I=h%T,B=D==="up"?-T:T,V=d-d%T,F=xp(d/T)+1;for(let G=h-I+B,W=0;W<F;W+=1,G+=B){if(G<0||G>d){if(!i)return;G=G<0?V:0}const te=Math.min(G+T-1,d);for(let H=Math.min(G+I,te);H>=G;H-=1)if(!Du(e,H,u))return H}};m&&es(t);const M=C(v)??R(v);if(M!==void 0)g=M;else if(h===-1)g=v==="up"?d:f;else if(g=ki(e,{startingIndex:h,amount:T,decrement:v==="up",disabledIndices:u}),i){if(v==="up"&&(h-T<f||g<0)){const D=h%T,I=d%T,B=d-(I-D);I===D?g=d:g=I>D?B:B-T}v==="down"&&h+T>d&&(g=ki(e,{startingIndex:h%T-T,amount:T,disabledIndices:u}))}R1(e,g)&&(g=h)}if(r==="both"){const x=xp(h/l);t.key===(s?_f:Tf)&&(m&&es(t),h%l!==l-1?(g=ki(e,{startingIndex:h,disabledIndices:u}),i&&Ew(g,l,x)&&(g=ki(e,{startingIndex:h-h%l-1,disabledIndices:u}))):i&&(g=ki(e,{startingIndex:h-h%l-1,disabledIndices:u})),Ew(g,l,x)&&(g=h)),t.key===(s?Tf:_f)&&(m&&es(t),h%l!==0?(g=ki(e,{startingIndex:h,decrement:!0,disabledIndices:u}),i&&Ew(g,l,x)&&(g=ki(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:u}))):i&&(g=ki(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:u})),Ew(g,l,x)&&(g=h));const b=xp(d/l)===x;R1(e,g)&&(i&&b?g=t.key===(s?Tf:_f)?d:ki(e,{startingIndex:h-h%l-1,disabledIndices:u}):g=h)}return g}function n7(e,t,r){const i=[];let s=0;return e.forEach(({width:l,height:u},f)=>{let d=!1;for(r&&(s=0);!d;){const h=[];for(let m=0;m<l;m+=1)for(let g=0;g<u;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 r7(e,t,r,i,s){if(e===-1)return-1;const l=r.indexOf(e),u=t[e];switch(s){case"tl":return l;case"tr":return u?l+u.width-1:l;case"bl":return u?l+(u.height-1)*i:l;case"br":return r.lastIndexOf(e);default:return-1}}function a7(e,t){return t.flatMap((r,i)=>e.includes(r)?[i]:[])}function Du(e,t,r){if(typeof r=="function"?r(t):r?.includes(t)??!1)return!0;const s=e.current[t];return s?QM(s)?!r&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function QM(e){return ss(e).display!=="none"}var c1e=["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] *)"],UE=c1e.join(","),i7=typeof Element>"u",Eg=i7?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,VE=!i7&&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},qE=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",u=l||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):qE(t.parentNode));return u},u1e=function(t){var r,i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return i===""||i==="true"},o7=function(t,r,i){if(qE(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(UE));return r&&Eg.call(t,UE)&&s.unshift(t),s=s.filter(i),s},FE=function(t,r,i){for(var s=[],l=Array.from(t);l.length;){var u=l.shift();if(!qE(u,!1))if(u.tagName==="SLOT"){var f=u.assignedElements(),d=f.length?f:u.children,h=FE(d,!0,i);i.flatten?s.push.apply(s,h):s.push({scopeParent:u,candidates:h})}else{var m=Eg.call(u,UE);m&&i.filter(u)&&(r||!t.includes(u))&&s.push(u);var g=u.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(u),v=!qE(g,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(u));if(g&&v){var x=FE(g===!0?u.children:g.children,!0,i);i.flatten?s.push.apply(s,x):s.push({scopeParent:u,candidates:x})}else l.unshift.apply(l,u.children)}}return s},s7=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},l7=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||u1e(t))&&!s7(t)?0:t.tabIndex},f1e=function(t,r){var i=l7(t);return i<0&&r&&!s7(t)?0:i},d1e=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},c7=function(t){return t.tagName==="INPUT"},h1e=function(t){return c7(t)&&t.type==="hidden"},p1e=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},m1e=function(t,r){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===r)return t[i]},g1e=function(t){if(!t.name)return!0;var r=t.form||VE(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(u){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",u.message),!1}var l=m1e(s,t.form);return!l||l===t},y1e=function(t){return c7(t)&&t.type==="radio"},v1e=function(t){return y1e(t)&&!g1e(t)},b1e=function(t){var r,i=t&&VE(t),s=(r=i)===null||r===void 0?void 0:r.host,l=!1;if(i&&i!==t){var u,f,d;for(l=!!((u=s)!==null&&u!==void 0&&(f=u.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=VE(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},bD=function(t){var r=t.getBoundingClientRect(),i=r.width,s=r.height;return i===0&&s===0},S1e=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 u=Eg.call(t,"details>summary:first-of-type"),f=u?t.parentElement:t;if(Eg.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=VE(t);if(h&&!h.shadowRoot&&s(h)===!0)return bD(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=d}if(b1e(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return bD(t);return!1},w1e=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 Eg.call(r,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}r=r.parentElement}return!1},KR=function(t,r){return!(r.disabled||h1e(r)||S1e(r,t)||p1e(r)||w1e(r))},YR=function(t,r){return!(v1e(r)||l7(r)<0||!KR(t,r))},E1e=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},u7=function(t){var r=[],i=[];return t.forEach(function(s,l){var u=!!s.scopeParent,f=u?s.scopeParent:s,d=f1e(f,u),h=u?u7(s.candidates):f;d===0?u?r.push.apply(r,h):r.push(f):i.push({documentOrder:l,tabIndex:d,item:s,isScope:u,content:h})}),i.sort(d1e).reduce(function(s,l){return l.isScope?s.push.apply(s,l.content):s.push(l.content),s},[]).concat(r)},sS=function(t,r){r=r||{};var i;return r.getShadowRoot?i=FE([t],r.includeContainer,{filter:YR.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:E1e}):i=o7(t,r.includeContainer,YR.bind(null,r)),u7(i)},x1e=function(t,r){r=r||{};var i;return r.getShadowRoot?i=FE([t],r.includeContainer,{filter:KR.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=o7(t,r.includeContainer,KR.bind(null,r)),i},f7=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Eg.call(t,UE)===!1?!1:YR(r,t)};const Fg=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function d7(e,t){const r=sS(e,Fg()),i=r.length;if(i===0)return;const s=ms(kn(e)),l=r.indexOf(s),u=l===-1?t===1?0:i-1:l+t;return r[u]}function WM(e){return d7(kn(e).body,1)||e}function h7(e){return d7(kn(e).body,-1)||e}function p7(e,t){if(!e)return null;const r=sS(kn(e).body,Fg()),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 _1e(e){return p7(e,1)}function T1e(e){return p7(e,-1)}function ng(e,t){const r=t||e.currentTarget,i=e.relatedTarget;return!i||!Zt(r,i)}function C1e(e){sS(e,Fg()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function SD(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const i=r.dataset.tabindex;delete r.dataset.tabindex,i?r.setAttribute("tabindex",i):r.removeAttribute("tabindex")})}const R1e=j.forwardRef(function(t,r){const{className:i,disabled:s=!1,render:l,value:u,id:f,nativeButton:d=!0,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:v}=VM(),{activateOnFocus:x,highlightedTabIndex:b,onTabActivation:w,registerTabResizeObserverElement:S,setHighlightedTabIndex:_,tabsListElement:E}=Fbe(),O=im(f),T=j.useMemo(()=>({disabled:s,id:O,value:u}),[s,O,u]),{compositeProps:C,compositeRef:R,index:M}=qbe({metadata:T}),D=u===m,I=j.useRef(!1),B=j.useRef(null);j.useEffect(()=>{const N=B.current;if(N)return S(N)},[S]),at(()=>{if(I.current){I.current=!1;return}if(!(D&&M>-1&&b!==M))return;const N=E;if(N!=null){const U=ms(kn(N));if(U&&Zt(N,U))return}s||_(M)},[D,M,b,_,s,E]);const{getButtonProps:V,buttonRef:F}=Jp({disabled:s,native:d,focusableWhenDisabled:!0}),G=g(u),W=j.useRef(!1),te=j.useRef(!1);function H(N){D||s||w(u,un(qp,N.nativeEvent,void 0,{activationDirection:"none"}))}function J(N){D||(M>-1&&!s&&_(M),!s&&x&&(!W.current||W.current&&te.current)&&w(u,un(qp,N.nativeEvent,void 0,{activationDirection:"none"})))}function re(N){if(D||s)return;W.current=!0;function U(){W.current=!1,te.current=!1}(!N.button||N.button===0)&&(te.current=!0,kn(N.currentTarget).addEventListener("pointerup",U,{once:!0}))}return dr("button",t,{state:{disabled:s,active:D,orientation:v},ref:[r,F,R,B],props:[C,{role:"tab","aria-controls":G,"aria-selected":D,id:O,onClick:H,onFocus:J,onPointerDown:re,[LU]:D?"":void 0,onKeyDownCapture(){I.current=!0}},h,V]})}),O1e=[];function zx(e){j.useEffect(e,O1e)}const A1e=j.createContext(void 0),M1e={disableStyleElements:!1};function j1e(){return j.useContext(A1e)??M1e}function $x(e){return _A(19)?e:e?"true":void 0}let Bp=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const k1e={[Bp.startingStyle]:""},N1e={[Bp.endingStyle]:""},Bg={transitionStatus(e){return e==="starting"?k1e:e==="ending"?N1e:null}},xw=null;class D1e{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 _w=new D1e;class Gl{static create(){return new Gl}static request(t){return _w.request(t)}static cancel(t){return _w.cancel(t)}currentId=xw;request(t){this.cancel(),this.currentId=_w.request(()=>{this.currentId=xw,t()})}cancel=()=>{this.currentId!==xw&&(_w.cancel(this.currentId),this.currentId=xw)};disposeEffect=()=>this.cancel}function Px(){const e=Ni(Gl.create).current;return zx(e.disposeEffect),e}function Ou(e){return e==null?e:"current"in e?e.current:e}function m7(e,t=!1,r=!0){const i=Px();return ot((s,l=null)=>{i.cancel();function u(){_s.flushSync(s)}const f=Ou(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let g=function(){const x=Bp.startingStyle;if(!d.hasAttribute(x)){i.request(v);return}const b=new MutationObserver(()=>{d.hasAttribute(x)||(b.disconnect(),v())});b.observe(d,{attributes:!0,attributeFilter:[x]}),l?.addEventListener("abort",()=>b.disconnect(),{once:!0})},v=function(){Promise.all(d.getAnimations().map(x=>x.finished)).then(()=>{l?.aborted||u()}).catch(()=>{const x=d.getAnimations();if(r){if(l?.aborted)return;u()}else x.length>0&&x.some(b=>b.pending||b.playState!=="finished")&&v()})};var h=g,m=v;if(t){g();return}i.request(v)}})}function Gf(e){const{enabled:t=!0,open:r,ref:i,onComplete:s}=e,l=ot(s),u=m7(i,r,!1);j.useEffect(()=>{if(!t)return;const f=new AbortController;return u(l,f.signal),()=>{f.abort()}},[t,r,l,u])}function lS(e,t=!1,r=!1){const[i,s]=j.useState(e&&t?"idle":void 0),[l,u]=j.useState(e);return e&&!l&&(u(!0),s("starting")),!e&&l&&i!=="ending"&&!r&&s("ending"),!e&&!l&&i==="ending"&&s(void 0),at(()=>{if(!e&&l&&i!=="ending"&&r){const f=Gl.request(()=>{s("ending")});return()=>{Gl.cancel(f)}}},[e,l,i,r]),at(()=>{if(!e||t)return;const f=Gl.request(()=>{s(void 0)});return()=>{Gl.cancel(f)}},[t,e]),at(()=>{if(!e||!t)return;e&&l&&i!=="idle"&&s("starting");const f=Gl.request(()=>{s("idle")});return()=>{Gl.cancel(f)}},[t,e,l,s,i]),j.useMemo(()=>({mounted:l,setMounted:u,transitionStatus:i}),[l,i])}let z1e=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=Bp.startingStyle]="startingStyle",e[e.endingStyle=Bp.endingStyle]="endingStyle",e})({});const $1e={...qM,...Bg},P1e=j.forwardRef(function(t,r){const{className:i,value:s,render:l,keepMounted:u=!1,...f}=t,{value:d,getTabIdByPanelValue:h,orientation:m,tabActivationDirection:g,registerMountedTabPanel:v,unregisterMountedTabPanel:x}=VM(),b=im(),w=j.useMemo(()=>({id:b,value:s}),[b,s]),{ref:S,index:_}=FM({metadata:w}),E=s===d,{mounted:O,transitionStatus:T,setMounted:C}=lS(E),R=!O,M=h(s),D={hidden:R,orientation:m,tabActivationDirection:g,transitionStatus:T},I=j.useRef(null),B=dr("div",t,{state:D,ref:[r,S,I],props:[{"aria-labelledby":M,hidden:R,id:b,role:"tabpanel",tabIndex:E?0:-1,inert:$x(!E),[z1e.index]:_},f],stateAttributesMapping:$1e});return Gf({open:E,ref:I,onComplete(){E||C(!1)}}),at(()=>{if(!(R&&!u)&&b!=null)return v(s,b),()=>{x(s,b)}},[R,u,s,b,v,x]),u||O?B:null});function I1e(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const rg="ArrowUp",_p="ArrowDown",O1="ArrowLeft",ag="ArrowRight",cS="Home",uS="End",g7=new Set([O1,ag]),L1e=new Set([O1,ag,cS,uS]),y7=new Set([rg,_p]),U1e=new Set([rg,_p,cS,uS]),v7=new Set([...g7,...y7]),V1e=new Set([...v7,cS,uS]),JM=new Set([rg,_p,O1,ag,cS,uS]),q1e="Shift",F1e="Control",B1e="Alt",H1e="Meta",G1e=new Set([q1e,F1e,B1e,H1e]);function K1e(e){return Ur(e)&&e.tagName==="INPUT"}function wD(e){return!!(K1e(e)&&e.selectionStart!=null||Ur(e)&&e.tagName==="TEXTAREA")}function ED(e,t,r,i){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,l=e.scrollTop;const u=e.clientWidth<e.scrollWidth,f=e.clientHeight<e.scrollHeight;if(u&&i!=="vertical"){const d=xD(e,t,"left"),h=Tw(e),m=Tw(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=xD(e,t,"top"),h=Tw(e),m=Tw(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 xD(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 Tw(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 Y1e=[];function Z1e(e){const{itemSizes:t,cols:r=1,loopFocus:i=!0,dense:s=!1,orientation:l="both",direction:u,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:v,modifierKeys:x=Y1e}=e,[b,w]=j.useState(0),S=r>1,_=j.useRef(null),E=Pu(_,h),O=j.useRef([]),T=j.useRef(!1),C=f??b,R=ot((I,B=!1)=>{if((d??w)(I),B){const V=O.current[I];ED(_.current,V,u,l)}}),M=ot(I=>{if(I.size===0||T.current)return;T.current=!0;const B=Array.from(I.keys()),V=B.find(G=>G?.hasAttribute(LU))??null,F=V?B.indexOf(V):-1;F!==-1&&R(F),ED(_.current,V,u,l)}),D=j.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:E,onFocus(I){!_.current||!wD(I.target)||I.target.setSelectionRange(0,I.target.value.length??0)},onKeyDown(I){const B=m?V1e:v7;if(!B.has(I.key)||X1e(I,x)||!_.current)return;const F=u==="rtl",G=F?O1:ag,W={horizontal:G,vertical:_p,both:G}[l],te=F?ag:O1,H={horizontal:te,vertical:rg,both:te}[l];if(wD(I.target)&&!I1e(I.target)){const X=I.target.selectionStart,L=I.target.selectionEnd,Z=I.target.value??"";if(X==null||I.shiftKey||X!==L||I.key!==H&&X<Z.length||I.key!==W&&X>0)return}let J=C;const re=nE(O,v),le=GR(O,v);if(S){const X=t||Array.from({length:O.current.length},()=>({width:1,height:1})),L=n7(X,r,s),Z=L.findIndex(de=>de!=null&&!Du(O,de,v)),ee=L.reduce((de,ye,Te)=>ye!=null&&!Du(O,ye,v)?Te:de,-1);J=L[t7({current:L.map(de=>de?O.current[de]:null)},{event:I,orientation:l,loopFocus:i,cols:r,disabledIndices:a7([...v||O.current.map((de,ye)=>Du(O,ye)?ye:void 0),void 0],L),minIndex:Z,maxIndex:ee,prevIndex:r7(C>le?re:C,X,L,r,I.key===_p?"bl":I.key===ag?"tr":"tl"),rtl:F})]}const ae={horizontal:[G],vertical:[_p],both:[G,_p]}[l],N={horizontal:[te],vertical:[rg],both:[te,rg]}[l],U=S?B:{horizontal:m?L1e:g7,vertical:m?U1e:y7,both:B}[l];m&&(I.key===cS?J=re:I.key===uS&&(J=le)),J===C&&(ae.includes(I.key)||N.includes(I.key))&&(i&&J===le&&ae.includes(I.key)?J=re:i&&J===re&&N.includes(I.key)?J=le:J=ki(O,{startingIndex:J,decrement:N.includes(I.key),disabledIndices:v})),J!==C&&!R1(O,J)&&(g&&I.stopPropagation(),U.has(I.key)&&I.preventDefault(),R(J,!0),queueMicrotask(()=>{O.current[J]?.focus()}))}}),[r,s,u,v,O,m,C,S,t,i,E,x,R,l,g]);return j.useMemo(()=>({props:D,highlightedIndex:C,onHighlightedIndexChange:R,elementsRef:O,disabledIndices:v,onMapChange:M,relayKeyboardEvent:D.onKeyDown}),[D,C,R,O,v,M])}function X1e(e,t){for(const r of G1e.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}function Q1e(e){const{render:t,className:r,refs:i=m1,props:s=m1,state:l=za,stateAttributesMapping:u,highlightedIndex:f,onHighlightedIndexChange:d,orientation:h,dense:m,itemSizes:g,loopFocus:v,cols:x,enableHomeAndEndKeys:b,onMapChange:w,stopEventPropagation:S=!0,rootRef:_,disabledIndices:E,modifierKeys:O,highlightItemOnHover:T=!1,tag:C="div",...R}=e,M=UM(),{props:D,highlightedIndex:I,onHighlightedIndexChange:B,elementsRef:V,onMapChange:F,relayKeyboardEvent:G}=Z1e({itemSizes:g,cols:x,loopFocus:v,dense:m,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:_,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:M,disabledIndices:E,modifierKeys:O}),W=dr(C,e,{state:l,ref:i,props:[D,...s,R],stateAttributesMapping:u}),te=j.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:B,highlightItemOnHover:T,relayKeyboardEvent:G}),[I,B,T,G]);return k.jsx(H$.Provider,{value:te,children:k.jsx(LM,{elementsRef:V,onMapChange:H=>{w?.(H),F(H)},children:W})})}const W1e=j.forwardRef(function(t,r){const{activateOnFocus:i=!1,className:s,loopFocus:l=!0,render:u,...f}=t,{getTabElementBySelectedValue:d,onValueChange:h,orientation:m,value:g,setTabMap:v,tabActivationDirection:x}=VM(),[b,w]=j.useState(0),[S,_]=j.useState(null),E=j.useRef(new Set),O=j.useRef(new Set),T=j.useRef(null),C=ot(()=>{E.current.forEach(G=>{G()})});j.useEffect(()=>{if(typeof ResizeObserver>"u")return;const G=new ResizeObserver(()=>{E.current.size&&C()});return T.current=G,S&&G.observe(S),O.current.forEach(W=>{G.observe(W)}),()=>{G.disconnect(),T.current=null}},[S,C]);const R=ot(G=>(E.current.add(G),()=>{E.current.delete(G)})),M=ot(G=>(O.current.add(G),T.current?.observe(G),()=>{O.current.delete(G),T.current?.unobserve(G)})),D=J1e(g,m,S,d),I=ot((G,W)=>{if(G!==g){const te=D(G);W.activationDirection=te,h(G,W)}}),B={orientation:m,tabActivationDirection:x},V={"aria-orientation":m==="vertical"?"vertical":void 0,role:"tablist"},F=j.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:b,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:M,onTabActivation:I,setHighlightedTabIndex:w,tabsListElement:S}),[i,b,R,M,I,w,S]);return k.jsx(VU.Provider,{value:F,children:k.jsx(Q1e,{render:u,className:s,state:B,refs:[r,_],props:[V,f],stateAttributesMapping:qM,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:l,orientation:m,onHighlightedIndexChange:w,onMapChange:v,disabledIndices:m1})})});function _D(e,t){const{left:r,top:i}=e.getBoundingClientRect(),{left:s,top:l}=t.getBoundingClientRect(),u=r-s,f=i-l;return{left:u,top:f}}function J1e(e,t,r,i){const[s,l]=j.useState(null);return at(()=>{if(e==null||r==null){l(null);return}const u=i(e);if(u==null){l(null);return}const{left:f,top:d}=_D(u,r);l(t==="horizontal"?f:d)},[t,i,r,e]),j.useCallback(u=>{if(u===e)return"none";if(u==null)return l(null),"none";if(u!=null&&r!=null){const f=i(u);if(f!=null){const{left:d,top:h}=_D(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 b7({className:e,orientation:t="horizontal",...r}){return k.jsx(Ube,{"data-slot":"tabs","data-orientation":t,className:Vt("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...r})}const eSe=Hu("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 S7({className:e,variant:t="default",...r}){return k.jsx(W1e,{"data-slot":"tabs-list","data-variant":t,className:Vt(eSe({variant:t}),e),...r})}function Jb({className:e,...t}){return k.jsx(R1e,{"data-slot":"tabs-trigger",className:Vt("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 e1({className:e,...t}){return k.jsx(P1e,{"data-slot":"tabs-content",className:Vt("text-xs/relaxed flex-1 outline-none",e),...t})}function tSe({className:e,size:t="default",...r}){return k.jsx("div",{"data-slot":"card","data-size":t,className:Vt("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 nSe({className:e,...t}){return k.jsx("div",{"data-slot":"card-content",className:Vt("px-4 group-data-[size=sm]/card:px-3",e),...t})}var w7=function(e){return typeof e=="function"},rSe=function(e){return typeof e=="string"},E7=function(e){return typeof e=="number"};function TD(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 ZR(e){var t=j.useRef(e);return t.current=e,t}var aSe=function(e){var t=ZR(e);j.useEffect(function(){return function(){t.current()}},[])},iSe=!!(typeof window<"u"&&window.document&&window.document.createElement);function x7(e,t){if(iSe){if(!e)return t;var r;return w7(e)?r=e():"current"in e?r=e.current:r=e,r}}var oSe=function(e){var t=function(r,i,s){var l=j.useRef(!1),u=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 x7(v)});if(!l.current){l.current=!0,u.current=g,f.current=i,d.current=r();return}(g.length!==u.current.length||!TD(u.current,g)||!TD(f.current,i))&&((h=d.current)===null||h===void 0||h.call(d),u.current=g,f.current=i,d.current=r())}),aSe(function(){var h;(h=d.current)===null||h===void 0||h.call(d),l.current=!1})};return t},sSe=oSe(j.useEffect),GT,CD;function lSe(){if(CD)return GT;CD=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(l,u){if(l===u)return!0;if(l&&u&&typeof l=="object"&&typeof u=="object"){if(l.constructor!==u.constructor)return!1;var f,d,h;if(Array.isArray(l)){if(f=l.length,f!=u.length)return!1;for(d=f;d--!==0;)if(!s(l[d],u[d]))return!1;return!0}var m;if(t&&l instanceof Map&&u instanceof Map){if(l.size!==u.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!u.has(d.value[0]))return!1;for(m=l.entries();!(d=m.next()).done;)if(!s(d.value[1],u.get(d.value[0])))return!1;return!0}if(r&&l instanceof Set&&u instanceof Set){if(l.size!==u.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!u.has(d.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(l)&&ArrayBuffer.isView(u)){if(f=l.length,f!=u.length)return!1;for(d=f;d--!==0;)if(l[d]!==u[d])return!1;return!0}if(l.constructor===RegExp)return l.source===u.source&&l.flags===u.flags;if(l.valueOf!==Object.prototype.valueOf&&typeof l.valueOf=="function"&&typeof u.valueOf=="function")return l.valueOf()===u.valueOf();if(l.toString!==Object.prototype.toString&&typeof l.toString=="function"&&typeof u.toString=="function")return l.toString()===u.toString();if(h=Object.keys(l),f=h.length,f!==Object.keys(u).length)return!1;for(d=f;d--!==0;)if(!Object.prototype.hasOwnProperty.call(u,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]],u[h[d]]))return!1;return!0}return l!==l&&u!==u}return GT=function(u,f){try{return s(u,f)}catch(d){if((d.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw d}},GT}var cSe=lSe();const uSe=ic(cSe);var fSe=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),uSe(e,t)},dSe=function(e,t,r){var i=j.useRef(void 0),s=j.useRef(0);fSe(t,i.current)||(s.current+=1),i.current=t,sSe(e,[s.current],r)},hSe=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),_7={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:hSe?[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},XR={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"?_7.meta.includes(e.keyCode):e.metaKey}};function T7(e){return rSe(e)||E7(e)}function pSe(e){var t=Object.keys(XR).reduce(function(r,i){return XR[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(E7(t))return e.keyCode===t?t:!1;var l=t.split("."),u=0;try{for(var f=IR(l),d=f.next();!d.done;d=f.next()){var h=d.value,m=XR[h],g=_7[h.toLowerCase()];(m&&m(e)||g&&g===e.keyCode)&&u++}}catch(v){i={error:v}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return r?u===l.length&&pSe(e)===l.length?t:!1:u===l.length?t:!1}function mSe(e,t){return w7(e)?e:T7(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 gSe=["keydown"];function ySe(e,t,r){var i={},s=i.events,l=s===void 0?gSe:s,u=i.target,f=i.exactMatch,d=f===void 0?!1:f,h=i.useCapture,m=h===void 0?!1:h,g=ZR(t),v=ZR(e);dSe(function(){var x,b,w,S=x7(u,window);if(S){var _=function(C){var R,M=C,D=mSe(v.current,d),I=D(M),B=T7(I)?I:M.key;if(I)return(R=g.current)===null||R===void 0?void 0:R.call(g,M,B)};try{for(var E=IR(l),O=E.next();!O.done;O=E.next()){var T=O.value;(w=S?.addEventListener)===null||w===void 0||w.call(S,T,_,m)}}catch(C){x={error:C}}finally{try{O&&!O.done&&(b=E.return)&&b.call(E)}finally{if(x)throw x.error}}return function(){var C,R,M;try{for(var D=IR(l),I=D.next();!I.done;I=D.next()){var B=I.value;(M=S?.removeEventListener)===null||M===void 0||M.call(S,B,_,m)}}catch(V){C={error:V}}finally{try{I&&!I.done&&(R=D.return)&&R.call(D)}finally{if(C)throw C.error}}}}},[l],u)}const vSe=({validateForm:e,formData:t})=>{const r=Uf(),{mutateAsync:i,isPending:s}=Bae(),l=async()=>{e&&!await e()||t&&await i({toolName:r.name,args:t})};return ySe("Enter",l),k.jsx("div",{className:"flex flex-col items-end gap-1",children:k.jsxs(_l,{onClick:l,variant:"default",disabled:s,children:[s?k.jsx(xF,{className:"h-4 w-4 animate-spin"}):k.jsx(AF,{className:"h-4 w-4"}),"Call Tool"]})})};var rE={exports:{}},bSe=rE.exports,OD;function SSe(){return OD||(OD=1,(function(e,t){(function(r,i){e.exports=i(Cg())})(bSe,r=>(()=>{var i={165(f,d,h){const m=h(877),g={};for(const b of Object.keys(m))g[m[b]]=b;const v={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"]}};f.exports=v;for(const b of Object.keys(v)){if(!("channels"in v[b]))throw new Error("missing channels property: "+b);if(!("labels"in v[b]))throw new Error("missing channel labels property: "+b);if(v[b].labels.length!==v[b].channels)throw new Error("channel and label counts mismatch: "+b);const{channels:w,labels:S}=v[b];delete v[b].channels,delete v[b].labels,Object.defineProperty(v[b],"channels",{value:w}),Object.defineProperty(v[b],"labels",{value:S})}function x(b,w){return(b[0]-w[0])**2+(b[1]-w[1])**2+(b[2]-w[2])**2}v.rgb.hsl=function(b){const w=b[0]/255,S=b[1]/255,_=b[2]/255,E=Math.min(w,S,_),O=Math.max(w,S,_),T=O-E;let C,R;O===E?C=0:w===O?C=(S-_)/T:S===O?C=2+(_-w)/T:_===O&&(C=4+(w-S)/T),C=Math.min(60*C,360),C<0&&(C+=360);const M=(E+O)/2;return R=O===E?0:M<=.5?T/(O+E):T/(2-O-E),[C,100*R,100*M]},v.rgb.hsv=function(b){let w,S,_,E,O;const T=b[0]/255,C=b[1]/255,R=b[2]/255,M=Math.max(T,C,R),D=M-Math.min(T,C,R),I=function(B){return(M-B)/6/D+.5};return D===0?(E=0,O=0):(O=D/M,w=I(T),S=I(C),_=I(R),T===M?E=_-S:C===M?E=.3333333333333333+w-_:R===M&&(E=.6666666666666666+S-w),E<0?E+=1:E>1&&(E-=1)),[360*E,100*O,100*M]},v.rgb.hwb=function(b){const w=b[0],S=b[1];let _=b[2];const E=v.rgb.hsl(b)[0],O=1/255*Math.min(w,Math.min(S,_));return _=1-.00392156862745098*Math.max(w,Math.max(S,_)),[E,100*O,100*_]},v.rgb.cmyk=function(b){const w=b[0]/255,S=b[1]/255,_=b[2]/255,E=Math.min(1-w,1-S,1-_);return[100*((1-w-E)/(1-E)||0),100*((1-S-E)/(1-E)||0),100*((1-_-E)/(1-E)||0),100*E]},v.rgb.keyword=function(b){const w=g[b];if(w)return w;let S,_=1/0;for(const E of Object.keys(m)){const O=x(b,m[E]);O<_&&(_=O,S=E)}return S},v.keyword.rgb=function(b){return m[b]},v.rgb.xyz=function(b){let w=b[0]/255,S=b[1]/255,_=b[2]/255;return w=w>.04045?((w+.055)/1.055)**2.4:w/12.92,S=S>.04045?((S+.055)/1.055)**2.4:S/12.92,_=_>.04045?((_+.055)/1.055)**2.4:_/12.92,[100*(.4124*w+.3576*S+.1805*_),100*(.2126*w+.7152*S+.0722*_),100*(.0193*w+.1192*S+.9505*_)]},v.rgb.lab=function(b){const w=v.rgb.xyz(b);let S=w[0],_=w[1],E=w[2];return S/=95.047,_/=100,E/=108.883,S=S>.008856?S**.3333333333333333:7.787*S+.13793103448275862,_=_>.008856?_**.3333333333333333:7.787*_+.13793103448275862,E=E>.008856?E**.3333333333333333:7.787*E+.13793103448275862,[116*_-16,500*(S-_),200*(_-E)]},v.hsl.rgb=function(b){const w=b[0]/360,S=b[1]/100,_=b[2]/100;let E,O,T;if(S===0)return T=255*_,[T,T,T];E=_<.5?_*(1+S):_+S-_*S;const C=2*_-E,R=[0,0,0];for(let M=0;M<3;M++)O=w+.3333333333333333*-(M-1),O<0&&O++,O>1&&O--,T=6*O<1?C+6*(E-C)*O:2*O<1?E:3*O<2?C+(E-C)*(.6666666666666666-O)*6:C,R[M]=255*T;return R},v.hsl.hsv=function(b){const w=b[0];let S=b[1]/100,_=b[2]/100,E=S;const O=Math.max(_,.01);return _*=2,S*=_<=1?_:2-_,E*=O<=1?O:2-O,[w,100*(_===0?2*E/(O+E):2*S/(_+S)),100*((_+S)/2)]},v.hsv.rgb=function(b){const w=b[0]/60,S=b[1]/100;let _=b[2]/100;const E=Math.floor(w)%6,O=w-Math.floor(w),T=255*_*(1-S),C=255*_*(1-S*O),R=255*_*(1-S*(1-O));switch(_*=255,E){case 0:return[_,R,T];case 1:return[C,_,T];case 2:return[T,_,R];case 3:return[T,C,_];case 4:return[R,T,_];case 5:return[_,T,C]}},v.hsv.hsl=function(b){const w=b[0],S=b[1]/100,_=b[2]/100,E=Math.max(_,.01);let O,T;T=(2-S)*_;const C=(2-S)*E;return O=S*E,O/=C<=1?C:2-C,O=O||0,T/=2,[w,100*O,100*T]},v.hwb.rgb=function(b){const w=b[0]/360;let S=b[1]/100,_=b[2]/100;const E=S+_;let O;E>1&&(S/=E,_/=E);const T=Math.floor(6*w),C=1-_;O=6*w-T,1&T&&(O=1-O);const R=S+O*(C-S);let M,D,I;switch(T){default:case 6:case 0:M=C,D=R,I=S;break;case 1:M=R,D=C,I=S;break;case 2:M=S,D=C,I=R;break;case 3:M=S,D=R,I=C;break;case 4:M=R,D=S,I=C;break;case 5:M=C,D=S,I=R}return[255*M,255*D,255*I]},v.cmyk.rgb=function(b){const w=b[0]/100,S=b[1]/100,_=b[2]/100,E=b[3]/100;return[255*(1-Math.min(1,w*(1-E)+E)),255*(1-Math.min(1,S*(1-E)+E)),255*(1-Math.min(1,_*(1-E)+E))]},v.xyz.rgb=function(b){const w=b[0]/100,S=b[1]/100,_=b[2]/100;let E,O,T;return E=3.2406*w+-1.5372*S+-.4986*_,O=-.9689*w+1.8758*S+.0415*_,T=.0557*w+-.204*S+1.057*_,E=E>.0031308?1.055*E**.4166666666666667-.055:12.92*E,O=O>.0031308?1.055*O**.4166666666666667-.055:12.92*O,T=T>.0031308?1.055*T**.4166666666666667-.055:12.92*T,E=Math.min(Math.max(0,E),1),O=Math.min(Math.max(0,O),1),T=Math.min(Math.max(0,T),1),[255*E,255*O,255*T]},v.xyz.lab=function(b){let w=b[0],S=b[1],_=b[2];return w/=95.047,S/=100,_/=108.883,w=w>.008856?w**.3333333333333333:7.787*w+.13793103448275862,S=S>.008856?S**.3333333333333333:7.787*S+.13793103448275862,_=_>.008856?_**.3333333333333333:7.787*_+.13793103448275862,[116*S-16,500*(w-S),200*(S-_)]},v.lab.xyz=function(b){let w,S,_;S=(b[0]+16)/116,w=b[1]/500+S,_=S-b[2]/200;const E=S**3,O=w**3,T=_**3;return S=E>.008856?E:(S-.13793103448275862)/7.787,w=O>.008856?O:(w-.13793103448275862)/7.787,_=T>.008856?T:(_-.13793103448275862)/7.787,w*=95.047,S*=100,_*=108.883,[w,S,_]},v.lab.lch=function(b){const w=b[0],S=b[1],_=b[2];let E;return E=360*Math.atan2(_,S)/2/Math.PI,E<0&&(E+=360),[w,Math.sqrt(S*S+_*_),E]},v.lch.lab=function(b){const w=b[0],S=b[1],_=b[2]/360*2*Math.PI;return[w,S*Math.cos(_),S*Math.sin(_)]},v.rgb.ansi16=function(b,w=null){const[S,_,E]=b;let O=w===null?v.rgb.hsv(b)[2]:w;if(O=Math.round(O/50),O===0)return 30;let T=30+(Math.round(E/255)<<2|Math.round(_/255)<<1|Math.round(S/255));return O===2&&(T+=60),T},v.hsv.ansi16=function(b){return v.rgb.ansi16(v.hsv.rgb(b),b[2])},v.rgb.ansi256=function(b){const w=b[0],S=b[1],_=b[2];return w===S&&S===_?w<8?16:w>248?231:Math.round((w-8)/247*24)+232:16+36*Math.round(w/255*5)+6*Math.round(S/255*5)+Math.round(_/255*5)},v.ansi16.rgb=function(b){let w=b%10;if(w===0||w===7)return b>50&&(w+=3.5),w=w/10.5*255,[w,w,w];const S=.5*(1+~~(b>50));return[(1&w)*S*255,(w>>1&1)*S*255,(w>>2&1)*S*255]},v.ansi256.rgb=function(b){if(b>=232){const S=10*(b-232)+8;return[S,S,S]}let w;return b-=16,[Math.floor(b/36)/5*255,Math.floor((w=b%36)/6)/5*255,w%6/5*255]},v.rgb.hex=function(b){const w=(((255&Math.round(b[0]))<<16)+((255&Math.round(b[1]))<<8)+(255&Math.round(b[2]))).toString(16).toUpperCase();return"000000".substring(w.length)+w},v.hex.rgb=function(b){const w=b.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!w)return[0,0,0];let S=w[0];w[0].length===3&&(S=S.split("").map(E=>E+E).join(""));const _=parseInt(S,16);return[_>>16&255,_>>8&255,255&_]},v.rgb.hcg=function(b){const w=b[0]/255,S=b[1]/255,_=b[2]/255,E=Math.max(Math.max(w,S),_),O=Math.min(Math.min(w,S),_),T=E-O;let C,R;return C=T<1?O/(1-T):0,R=T<=0?0:E===w?(S-_)/T%6:E===S?2+(_-w)/T:4+(w-S)/T,R/=6,R%=1,[360*R,100*T,100*C]},v.hsl.hcg=function(b){const w=b[1]/100,S=b[2]/100,_=S<.5?2*w*S:2*w*(1-S);let E=0;return _<1&&(E=(S-.5*_)/(1-_)),[b[0],100*_,100*E]},v.hsv.hcg=function(b){const w=b[1]/100,S=b[2]/100,_=w*S;let E=0;return _<1&&(E=(S-_)/(1-_)),[b[0],100*_,100*E]},v.hcg.rgb=function(b){const w=b[0]/360,S=b[1]/100,_=b[2]/100;if(S===0)return[255*_,255*_,255*_];const E=[0,0,0],O=w%1*6,T=O%1,C=1-T;let R=0;switch(Math.floor(O)){case 0:E[0]=1,E[1]=T,E[2]=0;break;case 1:E[0]=C,E[1]=1,E[2]=0;break;case 2:E[0]=0,E[1]=1,E[2]=T;break;case 3:E[0]=0,E[1]=C,E[2]=1;break;case 4:E[0]=T,E[1]=0,E[2]=1;break;default:E[0]=1,E[1]=0,E[2]=C}return R=(1-S)*_,[255*(S*E[0]+R),255*(S*E[1]+R),255*(S*E[2]+R)]},v.hcg.hsv=function(b){const w=b[1]/100,S=w+b[2]/100*(1-w);let _=0;return S>0&&(_=w/S),[b[0],100*_,100*S]},v.hcg.hsl=function(b){const w=b[1]/100,S=b[2]/100*(1-w)+.5*w;let _=0;return S>0&&S<.5?_=w/(2*S):S>=.5&&S<1&&(_=w/(2*(1-S))),[b[0],100*_,100*S]},v.hcg.hwb=function(b){const w=b[1]/100,S=w+b[2]/100*(1-w);return[b[0],100*(S-w),100*(1-S)]},v.hwb.hcg=function(b){const w=b[1]/100,S=1-b[2]/100,_=S-w;let E=0;return _<1&&(E=(S-_)/(1-_)),[b[0],100*_,100*E]},v.apple.rgb=function(b){return[b[0]/65535*255,b[1]/65535*255,b[2]/65535*255]},v.rgb.apple=function(b){return[b[0]/255*65535,b[1]/255*65535,b[2]/255*65535]},v.gray.rgb=function(b){return[b[0]/100*255,b[0]/100*255,b[0]/100*255]},v.gray.hsl=function(b){return[0,0,b[0]]},v.gray.hsv=v.gray.hsl,v.gray.hwb=function(b){return[0,100,b[0]]},v.gray.cmyk=function(b){return[0,0,0,b[0]]},v.gray.lab=function(b){return[b[0],0,0]},v.gray.hex=function(b){const w=255&Math.round(b[0]/100*255),S=((w<<16)+(w<<8)+w).toString(16).toUpperCase();return"000000".substring(S.length)+S},v.rgb.gray=function(b){return[(b[0]+b[1]+b[2])/3/255*100]}},880(f,d,h){const m=h(165),g=h(985),v={};Object.keys(m).forEach(x=>{v[x]={},Object.defineProperty(v[x],"channels",{value:m[x].channels}),Object.defineProperty(v[x],"labels",{value:m[x].labels});const b=g(x);Object.keys(b).forEach(w=>{const S=b[w];v[x][w]=(function(_){const E=function(...O){const T=O[0];if(T==null)return T;T.length>1&&(O=T);const C=_(O);if(typeof C=="object")for(let R=C.length,M=0;M<R;M++)C[M]=Math.round(C[M]);return C};return"conversion"in _&&(E.conversion=_.conversion),E})(S),v[x][w].raw=(function(_){const E=function(...O){const T=O[0];return T==null?T:(T.length>1&&(O=T),_(O))};return"conversion"in _&&(E.conversion=_.conversion),E})(S)})}),f.exports=v},985(f,d,h){const m=h(165);function g(b){const w=(function(){const _={},E=Object.keys(m);for(let O=E.length,T=0;T<O;T++)_[E[T]]={distance:-1,parent:null};return _})(),S=[b];for(w[b].distance=0;S.length;){const _=S.pop(),E=Object.keys(m[_]);for(let O=E.length,T=0;T<O;T++){const C=E[T],R=w[C];R.distance===-1&&(R.distance=w[_].distance+1,R.parent=_,S.unshift(C))}}return w}function v(b,w){return function(S){return w(b(S))}}function x(b,w){const S=[w[b].parent,b];let _=m[w[b].parent][b],E=w[b].parent;for(;w[E].parent;)S.unshift(w[E].parent),_=v(m[w[E].parent][E],_),E=w[E].parent;return _.conversion=S,_}f.exports=function(b){const w=g(b),S={},_=Object.keys(w);for(let E=_.length,O=0;O<E;O++){const T=_[O];w[T].parent!==null&&(S[T]=x(T,w))}return S}},877(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]}},138(f,d,h){var m=h(877),g=h(403),v=Object.hasOwnProperty,x=Object.create(null);for(var b in m)v.call(m,b)&&(x[m[b]]=b);var w=f.exports={to:{},get:{}};function S(E,O,T){return Math.min(Math.max(O,E),T)}function _(E){var O=Math.round(E).toString(16).toUpperCase();return O.length<2?"0"+O:O}w.get=function(E){var O,T;switch(E.substring(0,3).toLowerCase()){case"hsl":O=w.get.hsl(E),T="hsl";break;case"hwb":O=w.get.hwb(E),T="hwb";break;default:O=w.get.rgb(E),T="rgb"}return O?{model:T,value:O}:null},w.get.rgb=function(E){if(!E)return null;var O,T,C,R=[0,0,0,1];if(O=E.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(C=O[2],O=O[1],T=0;T<3;T++){var M=2*T;R[T]=parseInt(O.slice(M,M+2),16)}C&&(R[3]=parseInt(C,16)/255)}else if(O=E.match(/^#([a-f0-9]{3,4})$/i)){for(C=(O=O[1])[3],T=0;T<3;T++)R[T]=parseInt(O[T]+O[T],16);C&&(R[3]=parseInt(C+C,16)/255)}else if(O=E.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(T=0;T<3;T++)R[T]=parseInt(O[T+1],0);O[4]&&(O[5]?R[3]=.01*parseFloat(O[4]):R[3]=parseFloat(O[4]))}else{if(!(O=E.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(O=E.match(/^(\w+)$/))?O[1]==="transparent"?[0,0,0,0]:v.call(m,O[1])?((R=m[O[1]])[3]=1,R):null:null;for(T=0;T<3;T++)R[T]=Math.round(2.55*parseFloat(O[T+1]));O[4]&&(O[5]?R[3]=.01*parseFloat(O[4]):R[3]=parseFloat(O[4]))}for(T=0;T<3;T++)R[T]=S(R[T],0,255);return R[3]=S(R[3],0,1),R},w.get.hsl=function(E){if(!E)return null;var O=E.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(O){var T=parseFloat(O[4]);return[(parseFloat(O[1])%360+360)%360,S(parseFloat(O[2]),0,100),S(parseFloat(O[3]),0,100),S(isNaN(T)?1:T,0,1)]}return null},w.get.hwb=function(E){if(!E)return null;var O=E.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(O){var T=parseFloat(O[4]);return[(parseFloat(O[1])%360+360)%360,S(parseFloat(O[2]),0,100),S(parseFloat(O[3]),0,100),S(isNaN(T)?1:T,0,1)]}return null},w.to.hex=function(){var E=g(arguments);return"#"+_(E[0])+_(E[1])+_(E[2])+(E[3]<1?_(Math.round(255*E[3])):"")},w.to.rgb=function(){var E=g(arguments);return E.length<4||E[3]===1?"rgb("+Math.round(E[0])+", "+Math.round(E[1])+", "+Math.round(E[2])+")":"rgba("+Math.round(E[0])+", "+Math.round(E[1])+", "+Math.round(E[2])+", "+E[3]+")"},w.to.rgb.percent=function(){var E=g(arguments),O=Math.round(E[0]/255*100),T=Math.round(E[1]/255*100),C=Math.round(E[2]/255*100);return E.length<4||E[3]===1?"rgb("+O+"%, "+T+"%, "+C+"%)":"rgba("+O+"%, "+T+"%, "+C+"%, "+E[3]+")"},w.to.hsl=function(){var E=g(arguments);return E.length<4||E[3]===1?"hsl("+E[0]+", "+E[1]+"%, "+E[2]+"%)":"hsla("+E[0]+", "+E[1]+"%, "+E[2]+"%, "+E[3]+")"},w.to.hwb=function(){var E=g(arguments),O="";return E.length>=4&&E[3]!==1&&(O=", "+E[3]),"hwb("+E[0]+", "+E[1]+"%, "+E[2]+"%"+O+")"},w.to.keyword=function(E){return x[E.slice(0,3)]}},742(f,d,h){const m=h(138),g=h(880),v=["keyword","gray","hex"],x={};for(const T of Object.keys(g))x[[...g[T].labels].sort().join("")]=T;const b={};function w(T,C){if(!(this instanceof w))return new w(T,C);if(C&&C in v&&(C=null),C&&!(C in g))throw new Error("Unknown model: "+C);let R,M;if(T==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(T instanceof w)this.model=T.model,this.color=[...T.color],this.valpha=T.valpha;else if(typeof T=="string"){const D=m.get(T);if(D===null)throw new Error("Unable to parse color from string: "+T);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(T.length>0){this.model=C||"rgb",M=g[this.model].channels;const D=Array.prototype.slice.call(T,0,M);this.color=O(D,M),this.valpha=typeof T[M]=="number"?T[M]:1}else if(typeof T=="number")this.model="rgb",this.color=[T>>16&255,T>>8&255,255&T],this.valpha=1;else{this.valpha=1;const D=Object.keys(T);"alpha"in T&&(D.splice(D.indexOf("alpha"),1),this.valpha=typeof T.alpha=="number"?T.alpha:0);const I=D.sort().join("");if(!(I in x))throw new Error("Unable to parse color from object: "+JSON.stringify(T));this.model=x[I];const{labels:B}=g[this.model],V=[];for(R=0;R<B.length;R++)V.push(T[B[R]]);this.color=O(V)}if(b[this.model])for(M=g[this.model].channels,R=0;R<M;R++){const D=b[this.model][R];D&&(this.color[R]=D(this.color[R]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}w.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(T){let C=this.model in m.to?this:this.rgb();C=C.round(typeof T=="number"?T:1);const R=C.valpha===1?C.color:[...C.color,this.valpha];return m.to[C.model](R)},percentString(T){const C=this.rgb().round(typeof T=="number"?T:1),R=C.valpha===1?C.color:[...C.color,this.valpha];return m.to.rgb.percent(R)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const T={},{channels:C}=g[this.model],{labels:R}=g[this.model];for(let M=0;M<C;M++)T[R[M]]=this.color[M];return this.valpha!==1&&(T.alpha=this.valpha),T},unitArray(){const T=this.rgb().color;return T[0]/=255,T[1]/=255,T[2]/=255,this.valpha!==1&&T.push(this.valpha),T},unitObject(){const T=this.rgb().object();return T.r/=255,T.g/=255,T.b/=255,this.valpha!==1&&(T.alpha=this.valpha),T},round(T){return T=Math.max(T||0,0),new w([...this.color.map(S(T)),this.valpha],this.model)},alpha(T){return T!==void 0?new w([...this.color,Math.max(0,Math.min(1,T))],this.model):this.valpha},red:_("rgb",0,E(255)),green:_("rgb",1,E(255)),blue:_("rgb",2,E(255)),hue:_(["hsl","hsv","hsl","hwb","hcg"],0,T=>(T%360+360)%360),saturationl:_("hsl",1,E(100)),lightness:_("hsl",2,E(100)),saturationv:_("hsv",1,E(100)),value:_("hsv",2,E(100)),chroma:_("hcg",1,E(100)),gray:_("hcg",2,E(100)),white:_("hwb",1,E(100)),wblack:_("hwb",2,E(100)),cyan:_("cmyk",0,E(100)),magenta:_("cmyk",1,E(100)),yellow:_("cmyk",2,E(100)),black:_("cmyk",3,E(100)),x:_("xyz",0,E(95.047)),y:_("xyz",1,E(100)),z:_("xyz",2,E(108.833)),l:_("lab",0,E(100)),a:_("lab",1),b:_("lab",2),keyword(T){return T!==void 0?new w(T):g[this.model].keyword(this.color)},hex(T){return T!==void 0?new w(T):m.to.hex(this.rgb().round().color)},hexa(T){if(T!==void 0)return new w(T);const C=this.rgb().round().color;let R=Math.round(255*this.valpha).toString(16).toUpperCase();return R.length===1&&(R="0"+R),m.to.hex(C)+R},rgbNumber(){const T=this.rgb().color;return(255&T[0])<<16|(255&T[1])<<8|255&T[2]},luminosity(){const T=this.rgb().color,C=[];for(const[R,M]of T.entries()){const D=M/255;C[R]=D<=.04045?D/12.92:((D+.055)/1.055)**2.4}return .2126*C[0]+.7152*C[1]+.0722*C[2]},contrast(T){const C=this.luminosity(),R=T.luminosity();return C>R?(C+.05)/(R+.05):(R+.05)/(C+.05)},level(T){const C=this.contrast(T);return C>=7?"AAA":C>=4.5?"AA":""},isDark(){const T=this.rgb().color;return(2126*T[0]+7152*T[1]+722*T[2])/1e4<128},isLight(){return!this.isDark()},negate(){const T=this.rgb();for(let C=0;C<3;C++)T.color[C]=255-T.color[C];return T},lighten(T){const C=this.hsl();return C.color[2]+=C.color[2]*T,C},darken(T){const C=this.hsl();return C.color[2]-=C.color[2]*T,C},saturate(T){const C=this.hsl();return C.color[1]+=C.color[1]*T,C},desaturate(T){const C=this.hsl();return C.color[1]-=C.color[1]*T,C},whiten(T){const C=this.hwb();return C.color[1]+=C.color[1]*T,C},blacken(T){const C=this.hwb();return C.color[2]+=C.color[2]*T,C},grayscale(){const T=this.rgb().color,C=.3*T[0]+.59*T[1]+.11*T[2];return w.rgb(C,C,C)},fade(T){return this.alpha(this.valpha-this.valpha*T)},opaquer(T){return this.alpha(this.valpha+this.valpha*T)},rotate(T){const C=this.hsl();let R=C.color[0];return R=(R+T)%360,R=R<0?360+R:R,C.color[0]=R,C},mix(T,C){if(!T||!T.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof T);const R=T.rgb(),M=this.rgb(),D=C===void 0?.5:C,I=2*D-1,B=R.alpha()-M.alpha(),V=((I*B===-1?I:(I+B)/(1+I*B))+1)/2,F=1-V;return w.rgb(V*R.red()+F*M.red(),V*R.green()+F*M.green(),V*R.blue()+F*M.blue(),R.alpha()*D+M.alpha()*(1-D))}};for(const T of Object.keys(g)){if(v.includes(T))continue;const{channels:C}=g[T];w.prototype[T]=function(...R){return this.model===T?new w(this):R.length>0?new w(R,T):new w([...(M=g[this.model][T].raw(this.color),Array.isArray(M)?M:[M]),this.valpha],T);var M},w[T]=function(...R){let M=R[0];return typeof M=="number"&&(M=O(R,C)),new w(M,T)}}function S(T){return function(C){return(function(R,M){return Number(R.toFixed(M))})(C,T)}}function _(T,C,R){T=Array.isArray(T)?T:[T];for(const M of T)(b[M]||(b[M]=[]))[C]=R;return T=T[0],function(M){let D;return M!==void 0?(R&&(M=R(M)),D=this[T](),D.color[C]=M,D):(D=this[T]().color[C],R&&(D=R(D)),D)}}function E(T){return function(C){return Math.max(0,Math.min(T,C))}}function O(T,C){for(let R=0;R<C;R++)typeof T[R]!="number"&&(T[R]=0);return T}f.exports=w},784(f){var d,h=typeof Reflect=="object"?Reflect:null,m=h&&typeof h.apply=="function"?h.apply:function(M,D,I){return Function.prototype.apply.call(M,D,I)};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(I,B){function V(G){M.removeListener(D,F),B(G)}function F(){typeof M.removeListener=="function"&&M.removeListener("error",V),I([].slice.call(arguments))}R(M,D,F,{once:!0}),D!=="error"&&(function(G,W,te){typeof G.on=="function"&&R(G,"error",W,te)})(M,V,{once:!0})})},v.EventEmitter=v,v.prototype._events=void 0,v.prototype._eventsCount=0,v.prototype._maxListeners=void 0;var x=10;function b(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}function w(M){return M._maxListeners===void 0?v.defaultMaxListeners:M._maxListeners}function S(M,D,I,B){var V,F,G,W;if(b(I),(F=M._events)===void 0?(F=M._events=Object.create(null),M._eventsCount=0):(F.newListener!==void 0&&(M.emit("newListener",D,I.listener?I.listener:I),F=M._events),G=F[D]),G===void 0)G=F[D]=I,++M._eventsCount;else if(typeof G=="function"?G=F[D]=B?[I,G]:[G,I]:B?G.unshift(I):G.push(I),(V=w(M))>0&&G.length>V&&!G.warned){G.warned=!0;var te=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");te.name="MaxListenersExceededWarning",te.emitter=M,te.type=D,te.count=G.length,W=te,console&&console.warn&&console.warn(W)}return M}function _(){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 E(M,D,I){var B={fired:!1,wrapFn:void 0,target:M,type:D,listener:I},V=_.bind(B);return V.listener=I,B.wrapFn=V,V}function O(M,D,I){var B=M._events;if(B===void 0)return[];var V=B[D];return V===void 0?[]:typeof V=="function"?I?[V.listener||V]:[V]:I?(function(F){for(var G=new Array(F.length),W=0;W<G.length;++W)G[W]=F[W].listener||F[W];return G})(V):C(V,V.length)}function T(M){var D=this._events;if(D!==void 0){var I=D[M];if(typeof I=="function")return 1;if(I!==void 0)return I.length}return 0}function C(M,D){for(var I=new Array(D),B=0;B<D;++B)I[B]=M[B];return I}function R(M,D,I,B){if(typeof M.on=="function")B.once?M.once(D,I):M.on(D,I);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 V(F){B.once&&M.removeEventListener(D,V),I(F)})}}Object.defineProperty(v,"defaultMaxListeners",{enumerable:!0,get:function(){return x},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+".");x=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 w(this)},v.prototype.emit=function(M){for(var D=[],I=1;I<arguments.length;I++)D.push(arguments[I]);var B=M==="error",V=this._events;if(V!==void 0)B=B&&V.error===void 0;else if(!B)return!1;if(B){var F;if(D.length>0&&(F=D[0]),F instanceof Error)throw F;var G=new Error("Unhandled error."+(F?" ("+F.message+")":""));throw G.context=F,G}var W=V[M];if(W===void 0)return!1;if(typeof W=="function")m(W,this,D);else{var te=W.length,H=C(W,te);for(I=0;I<te;++I)m(H[I],this,D)}return!0},v.prototype.addListener=function(M,D){return S(this,M,D,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(M,D){return S(this,M,D,!0)},v.prototype.once=function(M,D){return b(D),this.on(M,E(this,M,D)),this},v.prototype.prependOnceListener=function(M,D){return b(D),this.prependListener(M,E(this,M,D)),this},v.prototype.removeListener=function(M,D){var I,B,V,F,G;if(b(D),(B=this._events)===void 0)return this;if((I=B[M])===void 0)return this;if(I===D||I.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete B[M],B.removeListener&&this.emit("removeListener",M,I.listener||D));else if(typeof I!="function"){for(V=-1,F=I.length-1;F>=0;F--)if(I[F]===D||I[F].listener===D){G=I[F].listener,V=F;break}if(V<0)return this;V===0?I.shift():(function(W,te){for(;te+1<W.length;te++)W[te]=W[te+1];W.pop()})(I,V),I.length===1&&(B[M]=I[0]),B.removeListener!==void 0&&this.emit("removeListener",M,G||D)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(M){var D,I,B;if((I=this._events)===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[M]),this;if(arguments.length===0){var V,F=Object.keys(I);for(B=0;B<F.length;++B)(V=F[B])!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(D=I[M])=="function")this.removeListener(M,D);else if(D!==void 0)for(B=D.length-1;B>=0;B--)this.removeListener(M,D[B]);return this},v.prototype.listeners=function(M){return O(this,M,!0)},v.prototype.rawListeners=function(M){return O(this,M,!1)},v.listenerCount=function(M,D){return typeof M.listenerCount=="function"?M.listenerCount(D):T.call(M,D)},v.prototype.listenerCount=T,v.prototype.eventNames=function(){return this._eventsCount>0?d(this._events):[]}},94(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"))}},403(f,d,h){var m=h(94),g=Array.prototype.concat,v=Array.prototype.slice,x=f.exports=function(b){for(var w=[],S=0,_=b.length;S<_;S++){var E=b[S];m(E)?w=g.call(w,v.call(E)):w.push(E)}return w};x.wrap=function(b){return function(){return b(x(arguments))}}},119(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 u={};return(()=>{function f(P){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},f(P)}function d(P){var $=(function(q,Y){if(f(q)!="object"||!q)return q;var fe=q[Symbol.toPrimitive];if(fe!==void 0){var ve=fe.call(q,Y);if(f(ve)!="object")return ve;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)(q)})(P,"string");return f($)=="symbol"?$:$+""}function h(P,$,q){return($=d($))in P?Object.defineProperty(P,$,{value:q,enumerable:!0,configurable:!0,writable:!0}):P[$]=q,P}function m(P,$){var q=Object.keys(P);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(P);$&&(Y=Y.filter(function(fe){return Object.getOwnPropertyDescriptor(P,fe).enumerable})),q.push.apply(q,Y)}return q}function g(P){for(var $=1;$<arguments.length;$++){var q=arguments[$]!=null?arguments[$]:{};$%2?m(Object(q),!0).forEach(function(Y){h(P,Y,q[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(q)):m(Object(q)).forEach(function(Y){Object.defineProperty(P,Y,Object.getOwnPropertyDescriptor(q,Y))})}return P}function v(P,$){if(!(P instanceof $))throw new TypeError("Cannot call a class as a function")}function x(P,$){for(var q=0;q<$.length;q++){var Y=$[q];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(P,d(Y.key),Y)}}function b(P,$,q){return $&&x(P.prototype,$),q&&x(P,q),Object.defineProperty(P,"prototype",{writable:!1}),P}function w(P){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},w(P)}function S(){try{var P=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S=function(){return!!P})()}function _(P,$){if($&&(f($)=="object"||typeof $=="function"))return $;if($!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(q){if(q===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q})(P)}function E(P,$,q){return $=w($),_(P,S()?Reflect.construct($,q||[],w(P).constructor):$.apply(P,q))}function O(P,$){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,Y){return q.__proto__=Y,q},O(P,$)}function T(P,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create($&&$.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),$&&O(P,$)}l.r(u),l.d(u,{default:()=>Bi});var C=l(119),R=l.n(C);function M(){var P=this.constructor.getDerivedStateFromProps(this.props,this.state);P!=null&&this.setState(P)}function D(P){this.setState((function($){var q=this.constructor.getDerivedStateFromProps(P,$);return q??null}).bind(this))}function I(P,$){try{var q=this.props,Y=this.state;this.props=P,this.state=$,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(q,Y)}finally{this.props=q,this.state=Y}}function B(P){var $=P.prototype;if(!$||!$.isReactComponent)throw new Error("Can only polyfill class components");if(typeof P.getDerivedStateFromProps!="function"&&typeof $.getSnapshotBeforeUpdate!="function")return P;var q=null,Y=null,fe=null;if(typeof $.componentWillMount=="function"?q="componentWillMount":typeof $.UNSAFE_componentWillMount=="function"&&(q="UNSAFE_componentWillMount"),typeof $.componentWillReceiveProps=="function"?Y="componentWillReceiveProps":typeof $.UNSAFE_componentWillReceiveProps=="function"&&(Y="UNSAFE_componentWillReceiveProps"),typeof $.componentWillUpdate=="function"?fe="componentWillUpdate":typeof $.UNSAFE_componentWillUpdate=="function"&&(fe="UNSAFE_componentWillUpdate"),q!==null||Y!==null||fe!==null){var ve=P.displayName||P.name,_e=typeof P.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
128
+
129
+ `+ve+" uses "+_e+" but also contains the following legacy lifecycles:"+(q!==null?`
130
+ `+q:"")+(Y!==null?`
131
+ `+Y:"")+(fe!==null?`
132
+ `+fe:"")+`
133
+
134
+ The above lifecycles should be removed. Learn more about this warning here:
135
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof P.getDerivedStateFromProps=="function"&&($.componentWillMount=M,$.componentWillReceiveProps=D),typeof $.getSnapshotBeforeUpdate=="function"){if(typeof $.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");$.componentWillUpdate=I;var pe=$.componentDidUpdate;$.componentDidUpdate=function(Ce,Re,Ue){var He=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Ue;pe.call(this,Ce,Re,He)}}return P}function V(P,$){if(P==null)return{};var q={};for(var Y in P)if({}.hasOwnProperty.call(P,Y)){if($.indexOf(Y)!==-1)continue;q[Y]=P[Y]}return q}function F(P,$){if(P==null)return{};var q,Y,fe=V(P,$);if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(P);for(Y=0;Y<ve.length;Y++)q=ve[Y],$.indexOf(q)===-1&&{}.propertyIsEnumerable.call(P,q)&&(fe[q]=P[q])}return fe}function G(P,$){($==null||$>P.length)&&($=P.length);for(var q=0,Y=Array($);q<$;q++)Y[q]=P[q];return Y}function W(P,$){if(P){if(typeof P=="string")return G(P,$);var q={}.toString.call(P).slice(8,-1);return q==="Object"&&P.constructor&&(q=P.constructor.name),q==="Map"||q==="Set"?Array.from(P):q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q)?G(P,$):void 0}}function te(P){return(function($){if(Array.isArray($))return G($)})(P)||(function($){if(typeof Symbol<"u"&&$[Symbol.iterator]!=null||$["@@iterator"]!=null)return Array.from($)})(P)||W(P)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function H(P,$){if($&&P?.constructor===$)return"bigNumber";var q=(function(Y){return{}.toString.call(Y).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(P);return q==="number"&&(q=isNaN(P)?"nan":(0|P)!==P?"float":"integer"),q}function J(P){return P.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}M.__suppressDeprecationWarning=!0,D.__suppressDeprecationWarning=!0,I.__suppressDeprecationWarning=!0;var re=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=(q.parent_type,q.namespace),fe=q.quotesOnKeys,ve=q.indentWidth,_e=q.theme,pe=q.singleIndent,Ce=q.showComma,Re=q.isLast,Ue=q.jsvRoot,He=q.name?q.name:"";return R().createElement("div",{className:"variable-row"},R().createElement("span",Object.assign({},Fe(_e,"object-name"),{key:Y},Fe(_e,"objectKeyVal",{paddingLeft:ve*pe})),R().createElement("span",{className:"object-key"},fe&&R().createElement("span",{style:{verticalAlign:"top"}},'"'),R().createElement("span",null,He),fe&&R().createElement("span",{style:{verticalAlign:"top"}},'"')),R().createElement("span",Fe(_e,"colon"),":")),R().createElement("span",Fe(_e,"circularReference"),"[CIRCULAR REFERENCE]"),Ce&&!Re&&!Ue&&R().createElement("span",Fe(_e,"comma"),","))}}])})(R().PureComponent),le={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"},ae={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 N={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"};var U=l(742);const X=function(P){return P},L=typeof dS=="object"&&dS&&dS.Object===Object&&dS;var Z=typeof self=="object"&&self&&self.Object===Object&&self;const ee=L||Z||Function("return this")(),de=ee.Symbol;var ye=Object.prototype,Te=ye.hasOwnProperty,Ae=ye.toString,ue=de?de.toStringTag:void 0;const be=function(P){var $=Te.call(P,ue),q=P[ue];try{P[ue]=void 0;var Y=!0}catch{}var fe=Ae.call(P);return Y&&($?P[ue]=q:delete P[ue]),fe};var Ee=Object.prototype.toString;const xe=function(P){return Ee.call(P)};var Me=de?de.toStringTag:void 0;const Ve=function(P){return P==null?P===void 0?"[object Undefined]":"[object Null]":Me&&Me in Object(P)?be(P):xe(P)},Ie=function(P){var $=typeof P;return P!=null&&($=="object"||$=="function")},Be=function(P){if(!Ie(P))return!1;var $=Ve(P);return $=="[object Function]"||$=="[object GeneratorFunction]"||$=="[object AsyncFunction]"||$=="[object Proxy]"},ke=ee["__core-js_shared__"];var je,Se=(je=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+je:"";const ze=function(P){return!!Se&&Se in P};var $e=Function.prototype.toString;const Ze=function(P){if(P!=null){try{return $e.call(P)}catch{}try{return P+""}catch{}}return""};var hn=/^\[object .+?Constructor\]$/,vn=Function.prototype,bn=Object.prototype,dn=vn.toString,xt=bn.hasOwnProperty,jt=RegExp("^"+dn.call(xt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const pn=function(P){return!(!Ie(P)||ze(P))&&(Be(P)?jt:hn).test(Ze(P))},yr=function(P,$){return P?.[$]},vr=function(P,$){var q=yr(P,$);return pn(q)?q:void 0};var Gt=vr(ee,"WeakMap");const An=Gt&&new Gt,Dt=An?function(P,$){return An.set(P,$),P}:X;var Kt=Object.create;const Wn=(function(){function P(){}return function($){if(!Ie($))return{};if(Kt)return Kt($);P.prototype=$;var q=new P;return P.prototype=void 0,q}})(),ir=function(P){return function(){var $=arguments;switch($.length){case 0:return new P;case 1:return new P($[0]);case 2:return new P($[0],$[1]);case 3:return new P($[0],$[1],$[2]);case 4:return new P($[0],$[1],$[2],$[3]);case 5:return new P($[0],$[1],$[2],$[3],$[4]);case 6:return new P($[0],$[1],$[2],$[3],$[4],$[5]);case 7:return new P($[0],$[1],$[2],$[3],$[4],$[5],$[6])}var q=Wn(P.prototype),Y=P.apply(q,$);return Ie(Y)?Y:q}},Pn=function(P,$,q){var Y=1&$,fe=ir(P);return function ve(){return(this&&this!==ee&&this instanceof ve?fe:P).apply(Y?q:this,arguments)}},Rn=function(P,$,q){switch(q.length){case 0:return P.call($);case 1:return P.call($,q[0]);case 2:return P.call($,q[0],q[1]);case 3:return P.call($,q[0],q[1],q[2])}return P.apply($,q)};var Bn=Math.max;const Mn=function(P,$,q,Y){for(var fe=-1,ve=P.length,_e=q.length,pe=-1,Ce=$.length,Re=Bn(ve-_e,0),Ue=Array(Ce+Re),He=!Y;++pe<Ce;)Ue[pe]=$[pe];for(;++fe<_e;)(He||fe<ve)&&(Ue[q[fe]]=P[fe]);for(;Re--;)Ue[pe++]=P[fe++];return Ue};var br=Math.max;const zr=function(P,$,q,Y){for(var fe=-1,ve=P.length,_e=-1,pe=q.length,Ce=-1,Re=$.length,Ue=br(ve-pe,0),He=Array(Ue+Re),Ye=!Y;++fe<Ue;)He[fe]=P[fe];for(var et=fe;++Ce<Re;)He[et+Ce]=$[Ce];for(;++_e<pe;)(Ye||fe<ve)&&(He[et+q[_e]]=P[fe++]);return He},wo=function(P,$){for(var q=P.length,Y=0;q--;)P[q]===$&&++Y;return Y},Ia=function(){};function Gr(P){this.__wrapped__=P,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Gr.prototype=Wn(Ia.prototype),Gr.prototype.constructor=Gr;const ea=Gr,qt=An?function(P){return An.get(P)}:function(){},mn={};var $r=Object.prototype.hasOwnProperty;const Kr=function(P){for(var $=P.name+"",q=mn[$],Y=$r.call(mn,$)?q.length:0;Y--;){var fe=q[Y],ve=fe.func;if(ve==null||ve==P)return fe.name}return $};function jn(P,$){this.__wrapped__=P,this.__actions__=[],this.__chain__=!!$,this.__index__=0,this.__values__=void 0}jn.prototype=Wn(Ia.prototype),jn.prototype.constructor=jn;const Yr=jn,Ml=Array.isArray,jl=function(P){return P!=null&&typeof P=="object"},la=function(P,$){var q=-1,Y=P.length;for($||($=Array(Y));++q<Y;)$[q]=P[q];return $},gn=function(P){if(P instanceof ea)return P.clone();var $=new Yr(P.__wrapped__,P.__chain__);return $.__actions__=la(P.__actions__),$.__index__=P.__index__,$.__values__=P.__values__,$};var Dn=Object.prototype.hasOwnProperty;function La(P){if(jl(P)&&!Ml(P)&&!(P instanceof ea)){if(P instanceof Yr)return P;if(Dn.call(P,"__wrapped__"))return gn(P)}return new Yr(P)}La.prototype=Ia.prototype,La.prototype.constructor=La;const fc=La,Yg=function(P){var $=Kr(P),q=fc[$];if(typeof q!="function"||!($ in ea.prototype))return!1;if(P===q)return!0;var Y=qt(q);return!!Y&&P===Y[0]};var Zg=Date.now;const Gu=function(P){var $=0,q=0;return function(){var Y=Zg(),fe=16-(Y-q);if(q=Y,fe>0){if(++$>=800)return arguments[0]}else $=0;return P.apply(void 0,arguments)}},co=Gu(Dt);var dc=/\{\n\/\* \[wrapped with (.+)\] \*/,zi=/,? & /;const $i=function(P){var $=P.match(dc);return $?$[1].split(zi):[]};var Eo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;const Pi=function(P,$){var q=$.length;if(!q)return P;var Y=q-1;return $[Y]=(q>1?"& ":"")+$[Y],$=$.join(q>2?", ":" "),P.replace(Eo,`{
137
+ /* [wrapped with `+$+`] */
138
+ `)},rn=function(P){return function(){return P}},Ku=(function(){try{var P=vr(Object,"defineProperty");return P({},"",{}),P}catch{}})(),Yf=Gu(Ku?function(P,$){return Ku(P,"toString",{configurable:!0,enumerable:!1,value:rn($),writable:!0})}:X),Ba=function(P,$){for(var q=-1,Y=P==null?0:P.length;++q<Y&&$(P[q],q,P)!==!1;);return P},Ii=function(P,$,q,Y){for(var fe=P.length,ve=q+-1;++ve<fe;)if($(P[ve],ve,P))return ve;return-1},Xg=function(P){return P!=P},Zf=function(P,$,q){for(var Y=q-1,fe=P.length;++Y<fe;)if(P[Y]===$)return Y;return-1},Xf=function(P,$,q){return $==$?Zf(P,$,q):Ii(P,Xg,q)},Qg=function(P,$){return!!(P!=null&&P.length)&&Xf(P,$,0)>-1};var Os=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];const As=function(P,$){return Ba(Os,function(q){var Y="_."+q[0];$&q[1]&&!Qg(P,Y)&&P.push(Y)}),P.sort()},Zr=function(P,$,q){var Y=$+"";return Yf(P,Pi(Y,As($i(Y),q)))},Jn=function(P,$,q,Y,fe,ve,_e,pe,Ce,Re){var Ue=8&$;$|=Ue?32:64,4&($&=~(Ue?64:32))||($&=-4);var He=[P,$,fe,Ue?ve:void 0,Ue?_e:void 0,Ue?void 0:ve,Ue?void 0:_e,pe,Ce,Re],Ye=q.apply(void 0,He);return Yg(P)&&co(Ye,He),Ye.placeholder=Y,Zr(Ye,P,$)},Yu=function(P){return P.placeholder};var Wg=/^(?:0|[1-9]\d*)$/;const hc=function(P,$){var q=typeof P;return!!($=$??9007199254740991)&&(q=="number"||q!="symbol"&&Wg.test(P))&&P>-1&&P%1==0&&P<$};var Qf=Math.min;const Ms=function(P,$){for(var q=P.length,Y=Qf($.length,q),fe=la(P);Y--;){var ve=$[Y];P[Y]=hc(ve,q)?fe[ve]:void 0}return P};var sm="__lodash_placeholder__";const In=function(P,$){for(var q=-1,Y=P.length,fe=0,ve=[];++q<Y;){var _e=P[q];_e!==$&&_e!==sm||(P[q]=sm,ve[fe++]=q)}return ve},kl=function P($,q,Y,fe,ve,_e,pe,Ce,Re,Ue){var He=128&q,Ye=1&q,et=2&q,ht=24&q,Ft=512&q,mt=et?void 0:ir($);return function Nt(){for(var an=arguments.length,zt=Array(an),Hn=an;Hn--;)zt[Hn]=arguments[Hn];if(ht)var da=Yu(Nt),Ga=wo(zt,da);if(fe&&(zt=Mn(zt,fe,ve,ht)),_e&&(zt=zr(zt,_e,pe,ht)),an-=Ga,ht&&an<Ue){var Qr=In(zt,da);return Jn($,q,P,Nt.placeholder,Y,zt,Qr,Ce,Re,Ue-an)}var Ro=Ye?Y:this,Yt=et?Ro[$]:$;return an=zt.length,Ce?zt=Ms(zt,Ce):Ft&&an>1&&zt.reverse(),He&&Re<an&&(zt.length=Re),this&&this!==ee&&this instanceof Nt&&(Yt=mt||ir(Yt)),Yt.apply(Ro,zt)}},Wf=function(P,$,q){var Y=ir(P);return function fe(){for(var ve=arguments.length,_e=Array(ve),pe=ve,Ce=Yu(fe);pe--;)_e[pe]=arguments[pe];var Re=ve<3&&_e[0]!==Ce&&_e[ve-1]!==Ce?[]:In(_e,Ce);return(ve-=Re.length)<q?Jn(P,$,kl,fe.placeholder,void 0,_e,Re,void 0,void 0,q-ve):Rn(this&&this!==ee&&this instanceof fe?Y:P,this,_e)}},pc=function(P,$,q,Y){var fe=1&$,ve=ir(P);return function _e(){for(var pe=-1,Ce=arguments.length,Re=-1,Ue=Y.length,He=Array(Ue+Ce),Ye=this&&this!==ee&&this instanceof _e?ve:P;++Re<Ue;)He[Re]=Y[Re];for(;Ce--;)He[Re++]=arguments[++pe];return Rn(Ye,fe?q:this,He)}};var Ci="__lodash_placeholder__",mc=128,Jf=Math.min;const Li=function(P,$){var q=P[1],Y=$[1],fe=q|Y,ve=fe<131,_e=Y==mc&&q==8||Y==mc&&q==256&&P[7].length<=$[8]||Y==384&&$[7].length<=$[8]&&q==8;if(!ve&&!_e)return P;1&Y&&(P[2]=$[2],fe|=1&q?0:4);var pe=$[3];if(pe){var Ce=P[3];P[3]=Ce?Mn(Ce,pe,$[4]):pe,P[4]=Ce?In(P[3],Ci):$[4]}return(pe=$[5])&&(Ce=P[5],P[5]=Ce?zr(Ce,pe,$[6]):pe,P[6]=Ce?In(P[5],Ci):$[6]),(pe=$[7])&&(P[7]=pe),Y&mc&&(P[8]=P[8]==null?$[8]:Jf(P[8],$[8])),P[9]==null&&(P[9]=$[9]),P[0]=$[0],P[1]=fe,P};var Jg=/\s/;const ed=function(P){for(var $=P.length;$--&&Jg.test(P.charAt($)););return $};var td=/^\s+/;const gc=function(P){return P&&P.slice(0,ed(P)+1).replace(td,"")},ey=function(P){return typeof P=="symbol"||jl(P)&&Ve(P)=="[object Symbol]"};var ty=/^[-+]0x[0-9a-f]+$/i,js=/^0b[01]+$/i,ta=/^0o[0-7]+$/i,yc=parseInt;const vc=function(P){if(typeof P=="number")return P;if(ey(P))return NaN;if(Ie(P)){var $=typeof P.valueOf=="function"?P.valueOf():P;P=Ie($)?$+"":$}if(typeof P!="string")return P===0?P:+P;P=gc(P);var q=js.test(P);return q||ta.test(P)?yc(P.slice(2),q?2:8):ty.test(P)?NaN:+P};var Ui=1/0;const Vi=function(P){return P?(P=vc(P))===Ui||P===-1/0?17976931348623157e292*(P<0?-1:1):P==P?P:0:P===0?P:0},Zu=function(P){var $=Vi(P),q=$%1;return $==$?q?$-q:$:0};var Nl=Math.max;const nd=function(P,$,q,Y,fe,ve,_e,pe){var Ce=2&$;if(!Ce&&typeof P!="function")throw new TypeError("Expected a function");var Re=Y?Y.length:0;if(Re||($&=-97,Y=fe=void 0),_e=_e===void 0?_e:Nl(Zu(_e),0),pe=pe===void 0?pe:Zu(pe),Re-=fe?fe.length:0,64&$){var Ue=Y,He=fe;Y=fe=void 0}var Ye=Ce?void 0:qt(P),et=[P,$,q,Y,fe,Ue,He,ve,_e,pe];if(Ye&&Li(et,Ye),P=et[0],$=et[1],q=et[2],Y=et[3],fe=et[4],!(pe=et[9]=et[9]===void 0?Ce?0:P.length:Nl(et[9]-Re,0))&&24&$&&($&=-25),$&&$!=1)ht=$==8||$==16?Wf(P,$,pe):$!=32&&$!=33||fe.length?kl.apply(void 0,et):pc(P,$,q,Y);else var ht=Pn(P,$,q);return Zr((Ye?Dt:co)(ht,et),P,$)};function qi(P,$,q){var Y=nd(P,8,void 0,void 0,void 0,void 0,void 0,$=q?void 0:$);return Y.placeholder=qi.placeholder,Y}qi.placeholder={};const Xr=qi,Dl={threezerotwofour:{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"},apathy:{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"},ashes:{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"},atelierDune:{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"},atelierForest:{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"},atelierHeath:{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"},atelierLakeside:{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"},atelierSeaside:{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"},bespin:{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"},brewer:{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"},bright:{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"},chalk:{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"},codeschool:{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"},colors:{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"},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"},eighties:{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"},embers:{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"},flat:{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"},google:{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"},grayscale:{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"},greenscreen:{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"},harmonic:{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"},hopscotch:{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"},isotope:{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"},marrakesh:{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"},mocha:{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"},monokai:{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"},nicinabox:{scheme:"nicinabox",author:"nicinabox (http://github.com/nicinabox)",base00:"#2A2F3A",base01:"#3C444F",base02:"#4F5A65",base03:"#BEBEBE",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#FFFFFF",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#FC6D24",base0A:"#ddb26f",base0B:"#A1C659",base0C:"#12cfc0",base0D:"#6FB3D2",base0E:"#D381C3",base0F:"#deaf8f"},ocean:{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"},paraiso:{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"},pop:{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"},railscasts:{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"},shapeshifter:{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"},solarized:{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"},summerfruit:{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"},tomorrow:{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"},tube:{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"},twilight:{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"}},uo=Dl.default,ca=Object.keys(uo),bc=P=>{const $=U(P),[q,Y,fe]=(function(pe){const Ce=pe[0]/255,Re=pe[1]/255,Ue=pe[2]/255;return[.299*Ce+.587*Re+.114*Ue,-.14713*Ce+-.28886*Re+.436*Ue,.615*Ce+-.51499*Re+-.10001*Ue]})($.array());var ve;const _e=(function(pe){const Ce=pe[0],Re=pe[1],Ue=pe[2];let He,Ye,et;return He=1*Ce+0*Re+1.13983*Ue,Ye=1*Ce+-.39465*Re+-.5806*Ue,et=1*Ce+2.02311*Re+0*Ue,He=Math.min(Math.max(0,He),1),Ye=Math.min(Math.max(0,Ye),1),et=Math.min(Math.max(0,et),1),[255*He,255*Ye,255*et]})([(ve=q,ve<.25?1:ve<.5?.9-ve:1.1-ve),Y,fe]);return U.rgb(_e).hex()},Ri=P=>$=>({className:[$.className,P.className].filter(Boolean).join(" "),style:{...$.style||{},...P.style||{}}}),rd=(P,$)=>{const q=Object.keys($);for(const Y in P)q.indexOf(Y)===-1&&q.push(Y);return q.reduce((Y,fe)=>(Y[fe]=((ve,_e)=>{if(ve===void 0)return _e;if(_e===void 0)return ve;const pe=typeof _e;switch(typeof ve){case"string":switch(pe){case"string":return[_e,ve].filter(Boolean).join(" ");case"object":return Ri({className:ve,style:_e});case"function":return(Ce,...Re)=>Ri({className:ve})(_e(Ce,...Re))}break;case"object":switch(pe){case"string":return Ri({className:_e,style:ve});case"object":return{..._e,...ve};case"function":return(Ce,...Re)=>Ri({style:ve})(_e(Ce,...Re))}break;case"function":switch(pe){case"string":return(Ce,...Re)=>ve(Ri(Ce)({className:_e}),...Re);case"object":return(Ce,...Re)=>ve(Ri(Ce)({style:_e}),...Re);case"function":return(Ce,...Re)=>ve(_e(Ce,...Re),...Re)}}})(P[fe],$[fe]),Y),{})},ks=(P,$,...q)=>{if($===null)return P;Array.isArray($)||($=[$]);const Y=$.map(fe=>P[fe]).filter(Boolean).reduce((fe,ve)=>(typeof ve=="string"?fe.className=[fe.className,ve].filter(Boolean).join(" "):typeof ve=="object"?fe.style={...fe.style,...ve}:typeof ve=="function"&&(fe={...fe,...ve(fe,...q)}),fe),{className:"",style:{}});return Y.className||delete Y.className,Object.keys(Y.style).length===0&&delete Y.style,Y},Ns=P=>Object.keys(P).reduce(($,q)=>($[q]=/^base/.test(q)?bc(P[q]):q==="scheme"?P[q]+":inverted":P[q],$),{}),ad=Xr((P,$={},q={},...Y)=>{const{defaultBase16:fe=uo,base16Themes:ve=null}=$,_e=Ha(q,ve);_e&&(q={..._e,...q});const pe=ca.reduce((He,Ye)=>(He[Ye]=q[Ye]||fe[Ye],He),{}),Ce=Object.keys(q).reduce((He,Ye)=>(ca.indexOf(Ye)===-1&&(He[Ye]=q[Ye]),He),{}),Re=P(pe),Ue=rd(Ce,Re);return Xr(ks,2)(Ue,...Y)},3),zn=P=>!!P.extend,Ha=(P,$)=>{if(P&&zn(P)&&P.extend&&(P=P.extend),typeof P=="string"){const[q,Y]=P.split(":");P=$?$[q]:Dl[q],Y==="inverted"&&(P=Ns(P))}return P&&Object.prototype.hasOwnProperty.call(P,"base00")?P:void 0};var Ds=function(P){var $=(function(q){return{backgroundColor:q.base00,ellipsisColor:q.base09,braceColor:q.base07,expandedIcon:q.base0D,collapsedIcon:q.base0E,keyColor:q.base07,arrayKeyColor:q.base0C,objectSize:q.base04,copyToClipboard:q.base0F,copyToClipboardCheck:q.base0D,objectBorder:q.base02,dataTypes:{boolean:q.base0E,date:q.base0D,float:q.base0B,function:q.base0D,integer:q.base0F,string:q.base09,nan:q.base08,null:q.base0A,undefined:q.base05,regexp:q.base0A,background:q.base02,bigNumber:q.base09},editVariable:{editIcon:q.base0E,cancelIcon:q.base09,removeIcon:q.base09,addIcon:q.base0E,checkIcon:q.base0E,background:q.base01,color:q.base0A,border:q.base07},addKeyModal:{background:q.base05,border:q.base04,color:q.base0A,labelColor:q.base01},validationFailure:{background:q.base09,iconColor:q.base01,fontColor:q.base01}}})(P);return{"app-container":{fontFamily:N.globalFontFamily,cursor:N.globalCursor,backgroundColor:$.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:$.ellipsisColor,fontSize:N.ellipsisFontSize,lineHeight:N.ellipsisLineHeight,cursor:N.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:N.braceCursor,fontWeight:N.braceFontWeight,color:$.braceColor},"expanded-icon":{color:$.expandedIcon},"collapsed-icon":{color:$.collapsedIcon},colon:{display:"inline-block",margin:N.keyMargin,color:$.keyColor,verticalAlign:"top"},objectKeyVal:function(q,Y){return{style:g({paddingTop:N.keyValPaddingTop,paddingRight:N.keyValPaddingRight,paddingBottom:N.keyValPaddingBottom,borderLeft:N.keyValBorderLeft+" "+$.objectBorder,":hover":{paddingLeft:Y.paddingLeft-1+"px",borderLeft:N.keyValBorderHover+" "+$.objectBorder}},Y)}},"object-key-val-no-border":{padding:N.keyValPadding},"pushed-content":{marginLeft:N.pushedContentMarginLeft},variableValue:function(q,Y){return{style:g({display:"inline-block",paddingRight:N.variableValuePaddingRight,position:"relative"},Y)}},"object-name":{display:"inline-block",color:$.keyColor,letterSpacing:N.keyLetterSpacing,fontStyle:N.keyFontStyle,verticalAlign:N.keyVerticalAlign,opacity:N.keyOpacity,":hover":{opacity:N.keyOpacityHover}},"array-key":{display:"inline-block",color:$.arrayKeyColor,letterSpacing:N.keyLetterSpacing,fontStyle:N.keyFontStyle,verticalAlign:N.keyVerticalAlign,opacity:N.keyOpacity,":hover":{opacity:N.keyOpacityHover}},"object-size":{color:$.objectSize,borderRadius:N.objectSizeBorderRadius,fontStyle:N.objectSizeFontStyle,margin:N.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:N.dataTypeFontSize,marginRight:N.dataTypeMarginRight,opacity:N.datatypeOpacity},boolean:{display:"inline-block",color:$.dataTypes.boolean},date:{display:"inline-block",color:$.dataTypes.date},"date-value":{marginLeft:N.dateValueMarginLeft},float:{display:"inline-block",color:$.dataTypes.float},function:{display:"inline-block",color:$.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:$.dataTypes.integer},bigNumber:{display:"inline-block",color:$.dataTypes.bigNumber},string:{display:"inline-block",color:$.dataTypes.string},nan:{display:"inline-block",color:$.dataTypes.nan,fontSize:N.nanFontSize,fontWeight:N.nanFontWeight,backgroundColor:$.dataTypes.background,padding:N.nanPadding,borderRadius:N.nanBorderRadius},null:{display:"inline-block",color:$.dataTypes.null,fontSize:N.nullFontSize,fontWeight:N.nullFontWeight,backgroundColor:$.dataTypes.background,padding:N.nullPadding,borderRadius:N.nullBorderRadius},undefined:{display:"inline-block",color:$.dataTypes.undefined,fontSize:N.undefinedFontSize,padding:N.undefinedPadding,borderRadius:N.undefinedBorderRadius,backgroundColor:$.dataTypes.background},circularReference:{display:"inline-block",color:$.dataTypes.null,fontSize:N.nullFontSize,fontWeight:N.nullFontWeight,backgroundColor:$.dataTypes.background,padding:N.nullPadding,borderRadius:N.nullBorderRadius},regexp:{display:"inline-block",color:$.dataTypes.regexp},"copy-to-clipboard":{cursor:N.clipboardCursor},"copy-icon":{color:$.copyToClipboard,fontSize:N.iconFontSize,marginRight:N.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:$.copyToClipboardCheck,marginLeft:N.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:N.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:N.metaDataPadding},"icon-container":{display:"inline-block",width:N.iconContainerWidth},tooltip:{padding:N.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:$.editVariable.removeIcon,cursor:N.iconCursor,fontSize:N.iconFontSize,marginRight:N.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:$.editVariable.addIcon,cursor:N.iconCursor,fontSize:N.iconFontSize,marginRight:N.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:$.editVariable.editIcon,cursor:N.iconCursor,fontSize:N.iconFontSize,marginRight:N.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:N.iconCursor,color:$.editVariable.checkIcon,fontSize:N.iconFontSize,paddingRight:N.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:N.iconCursor,color:$.editVariable.cancelIcon,fontSize:N.iconFontSize,paddingRight:N.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:N.editInputMinWidth,borderRadius:N.editInputBorderRadius,backgroundColor:$.editVariable.background,color:$.editVariable.color,padding:N.editInputPadding,marginRight:N.editInputMarginRight,fontFamily:N.editInputFontFamily},"detected-row":{paddingTop:N.detectedRowPaddingTop},"key-modal-request":{position:N.addKeyCoverPosition,top:N.addKeyCoverPositionPx,left:N.addKeyCoverPositionPx,right:N.addKeyCoverPositionPx,bottom:N.addKeyCoverPositionPx,backgroundColor:N.addKeyCoverBackground},"key-modal":{width:N.addKeyModalWidth,backgroundColor:$.addKeyModal.background,marginLeft:N.addKeyModalMargin,marginRight:N.addKeyModalMargin,padding:N.addKeyModalPadding,borderRadius:N.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:$.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:$.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:$.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:$.addKeyModal.labelColor,fontSize:N.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:$.editVariable.addIcon,fontSize:N.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:$.ellipsisColor,fontSize:N.ellipsisFontSize,lineHeight:N.ellipsisLineHeight,cursor:N.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:$.validationFailure.fontColor,backgroundColor:$.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:$.validationFailure.iconColor,fontSize:N.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:N.commaColor,fontSize:N.commaFontSize,marginRight:N.commaMarginRight,cursor:"default"}}},xo=function(P){var $=le;return P!==!1&&P!=="none"||($=ae),ad(Ds,{defaultBase16:$})(P)};function Fe(P,$,q){return P||console.error("theme has not been set"),xo(P)($,q)}var Oi=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.typeName,fe=q.displayDataTypes,ve=q.theme;return fe?R().createElement("span",Object.assign({className:"data-type-label"},Fe(ve,"data-type-label")),Y):null}}])})(R().PureComponent),zl=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props;return R().createElement("div",Fe(q.theme,"boolean"),R().createElement(Oi,Object.assign({typeName:"bool"},q)),q.value?"true":"false")}}])})(R().PureComponent),fo=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props;return R().createElement("div",Fe(q.theme,"date"),R().createElement(Oi,Object.assign({typeName:"date"},q)),R().createElement("span",Object.assign({className:"date-value"},Fe(q.theme,"date-value")),q.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(R().PureComponent),fs=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props;return R().createElement("div",Fe(q.theme,"float"),R().createElement(Oi,Object.assign({typeName:"float"},q)),this.props.value)}}])})(R().PureComponent),id=l(784),ny=(function(){return b(function P(){v(this,P),this.handler=function(){}},[{key:"register",value:function(P){this.handler=P}},{key:"dispatch",value:function(P){var $;($=this.handler)===null||$===void 0||$.call(this,P)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new ny);const ho=globalThis.__globalDispatcherInstance;var od="updated_src",zs=new((function(P){function $(){var q;v(this,$);for(var Y=arguments.length,fe=new Array(Y),ve=0;ve<Y;ve++)fe[ve]=arguments[ve];return(q=E(this,$,[].concat(fe))).objects={},q.set=function(_e,pe,Ce,Re){q.objects[_e]===void 0&&(q.objects[_e]={}),q.objects[_e][pe]===void 0&&(q.objects[_e][pe]={}),q.objects[_e][pe][Ce]=Re},q.get=function(_e,pe,Ce,Re){return q.objects[_e]===void 0||q.objects[_e][pe]===void 0||q.objects[_e][pe][Ce]===void 0?Re:q.objects[_e][pe][Ce]},q.handleAction=function(_e){var pe=_e.rjvId,Ce=_e.data;switch(_e.name){case"RESET":q.emit("reset-"+pe);break;case"VARIABLE_UPDATED":_e.data[od]=q.updateSrc(pe,Ce),q.set(pe,"action","variable-update",g(g({},Ce),{},{type:"variable-edited"})),q.emit("variable-update-"+pe);break;case"VARIABLE_REMOVED":_e.data[od]=q.updateSrc(pe,Ce),q.set(pe,"action","variable-update",g(g({},Ce),{},{type:"variable-removed"})),q.emit("variable-update-"+pe);break;case"VARIABLE_ADDED":_e.data[od]=q.updateSrc(pe,Ce),q.set(pe,"action","variable-update",g(g({},Ce),{},{type:"variable-added"})),q.emit("variable-update-"+pe);break;case"ADD_VARIABLE_KEY_REQUEST":q.set(pe,"action","new-key-request",Ce),q.emit("add-key-request-"+pe)}},q.updateSrc=function(_e,pe){var Ce=pe.name,Re=pe.namespace,Ue=pe.new_value,He=pe.variable_removed;Re.shift();var Ye,et=q.get(_e,"global","src"),ht=q.deepCopy(et,te(Re)),Ft=ht,mt=(function(Nt,an){var zt=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!zt){if(Array.isArray(Nt)||(zt=W(Nt))||an){zt&&(Nt=zt);var Hn=0,da=function(){};return{s:da,n:function(){return Hn>=Nt.length?{done:!0}:{done:!1,value:Nt[Hn++]}},e:function(Yt){throw Yt},f:da}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ga,Qr=!0,Ro=!1;return{s:function(){zt=zt.call(Nt)},n:function(){var Yt=zt.next();return Qr=Yt.done,Yt},e:function(Yt){Ro=!0,Ga=Yt},f:function(){try{Qr||zt.return==null||zt.return()}finally{if(Ro)throw Ga}}}})(Re);try{for(mt.s();!(Ye=mt.n()).done;)Ft=Ft[Ye.value]}catch(Nt){mt.e(Nt)}finally{mt.f()}return He?H(Ft)==="array"?Ft.splice(Ce,1):delete Ft[Ce]:Ce!==null?Ft[Ce]=Ue:ht=Ue,q.set(_e,"global","src",ht),ht},q.deepCopy=function(_e,pe){var Ce,Re=H(_e),Ue=pe.shift();return Re==="array"?Ce=te(_e):Re==="object"&&(Ce=g({},_e)),Ue!==void 0&&(Ce[Ue]=q.deepCopy(_e[Ue],pe)),Ce},q}return T($,P),b($)})(id.EventEmitter));ho.register(zs.handleAction.bind(zs));const Ua=zs;var lm=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).handleToggleCollapsed=function(){Y.setState({collapsed:!Y.state.collapsed},function(){Ua.set(Y.props.rjvId,Y.props.namespace,"collapsed",Y.state.collapsed)})},Y.getFunctionDisplay=function(fe){var ve=Y.props;return fe?R().createElement("span",null,Y.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),R().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},R().createElement("span",null,"{"),R().createElement("span",Fe(ve.theme,"ellipsis"),"..."),R().createElement("span",null,"}"))):Y.props.value.toString().slice(9,-1)},Y.state={collapsed:Ua.get(q.rjvId,q.namespace,"collapsed",!0)},Y}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=this.state.collapsed;return R().createElement("div",Fe(q.theme,"function"),R().createElement(Oi,Object.assign({typeName:"function"},q)),R().createElement("span",Object.assign({},Fe(q.theme,"function-value"),{className:"rjv-function-container",onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(Y)))}}])})(R().PureComponent),cm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){return R().createElement("div",Fe(this.props.theme,"nan"),"NaN")}}])})(R().PureComponent),um=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){return R().createElement("div",Fe(this.props.theme,"null"),"NULL")}}])})(R().PureComponent),fm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props;return R().createElement("div",Fe(q.theme,"integer"),R().createElement(Oi,Object.assign({typeName:"int"},q)),this.props.value)}}])})(R().PureComponent),sd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props;return R().createElement("div",Fe(q.theme,"regexp"),R().createElement(Oi,Object.assign({typeName:"regexp"},q)),this.props.value.toString())}}])})(R().PureComponent),dm=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).handleToggleCollapsed=function(){Y.setState({collapsed:!Y.state.collapsed},function(){Ua.set(Y.props.rjvId,Y.props.namespace,"collapsed",Y.state.collapsed)})},Y.state={collapsed:Ua.get(q.rjvId,q.namespace,"collapsed",!0)},Y}return T($,P),b($,[{key:"render",value:function(){var q=this.state.collapsed,Y=this.props,fe=Y.collapseStringsAfterLength,ve=Y.theme,_e=Y.escapeStrings,pe=Y.value,Ce=H(fe)==="integer",Re={style:{cursor:"default",wordBreak:"break-all"}};return _e&&(pe=J(pe)),Ce&&pe.length>fe&&(Re.style.cursor="pointer",q&&(pe=R().createElement("span",null,pe.substring(0,fe),R().createElement("span",Fe(ve,"ellipsis")," ...")))),R().createElement("div",Fe(ve,"string"),R().createElement(Oi,Object.assign({typeName:"string"},Y)),R().createElement("span",Object.assign({className:"string-value"},Re,{onClick:this.handleToggleCollapsed}),'"',pe,'"'))}}])})(R().PureComponent),hm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){return R().createElement("div",Fe(this.props.theme,"undefined"),"undefined")}}])})(R().PureComponent),pm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props;return R().createElement("div",Fe(q.theme,"bigNumber"),R().createElement(Oi,Object.assign({typeName:"bigNumber"},q)),this.props.value.toString())}}])})(R().PureComponent);function ld(){return ld=Object.assign?Object.assign.bind():function(P){for(var $=1;$<arguments.length;$++){var q=arguments[$];for(var Y in q)({}).hasOwnProperty.call(q,Y)&&(P[Y]=q[Y])}return P},ld.apply(null,arguments)}var Sc=C.useLayoutEffect,mm=function(P,$){typeof P!="function"?P.current=$:P($)},gm={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},ym=function(P){Object.keys(gm).forEach(function($){P.style.setProperty($,gm[$],"important")})},ua=null,vm=function(P,$){var q=P.scrollHeight;return $.sizingStyle.boxSizing==="border-box"?q+$.borderSize:q-$.paddingSize},bm=function(){},ry=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ay=!!document.documentElement.currentStyle,iy=function(P){var $=window.getComputedStyle(P);if($===null)return null;var q,Y=(q=$,ry.reduce(function(ve,_e){return ve[_e]=q[_e],ve},{})),fe=Y.boxSizing;return fe===""?null:(ay&&fe==="border-box"&&(Y.width=parseFloat(Y.width)+parseFloat(Y.borderRightWidth)+parseFloat(Y.borderLeftWidth)+parseFloat(Y.paddingRight)+parseFloat(Y.paddingLeft)+"px"),{sizingStyle:Y,paddingSize:parseFloat(Y.paddingBottom)+parseFloat(Y.paddingTop),borderSize:parseFloat(Y.borderBottomWidth)+parseFloat(Y.borderTopWidth)})};function cd(P,$,q){var Y,fe,ve=(Y=q,fe=R().useRef(Y),Sc(function(){fe.current=Y}),fe);C.useLayoutEffect(function(){var _e=function(pe){return ve.current(pe)};if(P)return P.addEventListener($,_e),function(){return P.removeEventListener($,_e)}},[])}var oy=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],sy=function(P,$){var q=P.cacheMeasurements,Y=P.maxRows,fe=P.minRows,ve=P.onChange,_e=ve===void 0?bm:ve,pe=P.onHeightChange,Ce=pe===void 0?bm:pe,Re=V(P,oy),Ue=Re.value!==void 0,He=C.useRef(null),Ye=(function(mt,Nt){var an=R().useRef();return R().useCallback(function(zt){mt.current=zt,an.current&&mm(an.current,null),an.current=Nt,Nt&&mm(Nt,zt)},[Nt])})(He,$),et=C.useRef(0),ht=C.useRef(),Ft=function(){var mt=He.current,Nt=q&&ht.current?ht.current:iy(mt);if(Nt){ht.current=Nt;var an=(function(da,Ga,Qr,Ro){Qr===void 0&&(Qr=1),Ro===void 0&&(Ro=1/0),ua||((ua=document.createElement("textarea")).setAttribute("tabindex","-1"),ua.setAttribute("aria-hidden","true"),ym(ua)),ua.parentNode===null&&document.body.appendChild(ua);var Yt=da.paddingSize,Il=da.borderSize,Pr=da.sizingStyle,Ju=Pr.boxSizing;Object.keys(Pr).forEach(function(_c){var ef=_c;ua.style[ef]=Pr[ef]}),ym(ua),ua.value=Ga;var Hi=vm(ua,da);ua.value=Ga,Hi=vm(ua,da),ua.value="x";var ya=ua.scrollHeight-Yt,Ls=ya*Qr;Ju==="border-box"&&(Ls=Ls+Yt+Il),Hi=Math.max(Ls,Hi);var xc=ya*Ro;return Ju==="border-box"&&(xc=xc+Yt+Il),[Hi=Math.min(xc,Hi),ya]})(Nt,mt.value||mt.placeholder||"x",fe,Y),zt=an[0],Hn=an[1];et.current!==zt&&(et.current=zt,mt.style.setProperty("height",zt+"px","important"),Ce(zt,{rowHeight:Hn}))}};return C.useLayoutEffect(Ft),(function(mt,Nt){cd(document.body,"reset",function(an){mt.current.form===an.target&&Nt(an)})})(He,function(){if(!Ue){var mt=He.current.value;requestAnimationFrame(function(){var Nt=He.current;Nt&&mt!==Nt.value&&Ft()})}}),cd(window,"resize",Ft),(function(mt){cd(document.fonts,"loadingdone",mt)})(Ft),C.createElement("textarea",ld({},Re,{onChange:function(mt){Ue||Ft(),_e(mt)},ref:Ye}))},ly=C.forwardRef(sy);function $l(P,$){P=P.trim();try{if((P=structuredClone(P))[0]==="[")return or("array",JSON.parse(P));if(P[0]==="{")return or("object",JSON.parse(P));if(P.match(/-?\d+\.\d+/)&&P.match(/-?\d+\.\d+/)[0]===P)return $&&parseFloat(P).toString()!==P?or("bigNumber",P):or("float",parseFloat(P));if(P.match(/-?\d+e-\d+/)&&P.match(/-?\d+e-\d+/)[0]===P)return or("float",Number(P));if(P.match(/-?\d+/)&&P.match(/-?\d+/)[0]===P)return $&&parseInt(P).toString()!==P?or("bigNumber",P):or("integer",parseInt(P));if(P.match(/-?\d+e\+\d+/)&&P.match(/-?\d+e\+\d+/)[0]===P)return or("integer",Number(P))}catch{}switch(P=P.toLowerCase()){case"undefined":return or("undefined",void 0);case"nan":return or("nan",NaN);case"null":return or("null",null);case"true":return or("boolean",!0);case"false":return or("boolean",!1);default:if(P=Date.parse(P))return or("date",new Date(P))}return or(!1,null)}function or(P,$){return{type:P,value:$}}var cy=["style"],ud=["style"],fd=["style"],dd=["style"],hd=["style"],pd=["style"],Fi=["style"],uy=["style"],fy=["style"],dy=["style"],md=["style"],gd=["style"],_o=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,cy);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().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"})))}}])})(R().PureComponent),To=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,ud);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().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"})))}}])})(R().PureComponent),hy=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,fd),ve=Ai(Y).style;return R().createElement("span",fe,R().createElement("svg",{fill:ve.color,width:ve.height,height:ve.width,style:ve,viewBox:"0 0 1792 1792"},R().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"})))}}])})(R().PureComponent),$s=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,dd),ve=Ai(Y).style;return R().createElement("span",fe,R().createElement("svg",{fill:ve.color,width:ve.height,height:ve.width,style:ve,viewBox:"0 0 1792 1792"},R().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"})))}}])})(R().PureComponent),yd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,hd);return R().createElement("span",fe,R().createElement("svg",{style:g(g({},Ai(Y).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},R().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(R().PureComponent),vd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,pd);return R().createElement("span",fe,R().createElement("svg",{style:g(g({},Ai(Y).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},R().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(R().PureComponent),Pl=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,Fi);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().createElement("g",null,R().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"}))))}}])})(R().PureComponent),Ps=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,uy);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().createElement("g",null,R().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"}))))}}])})(R().PureComponent),bd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,fy);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().createElement("g",null,R().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"}))))}}])})(R().PureComponent),Xu=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,dy);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().createElement("g",null,R().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(R().PureComponent),Sd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,md);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().createElement("g",null,R().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"}))))}}])})(R().PureComponent),wd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.style,fe=F(q,gd);return R().createElement("span",fe,R().createElement("svg",Object.assign({},Ai(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),R().createElement("g",null,R().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"}))))}}])})(R().PureComponent);function Ai(P){return P||(P={}),{style:g(g({verticalAlign:"middle"},P),{},{color:P.color?P.color:"#000000",height:"1em",width:"1em"})}}var Sm=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).copiedTimer=null,Y.copyToClipboardFallback=function(fe){var ve=document.createElement("textarea");ve.value=fe,document.body.appendChild(ve),ve.select(),document.execCommand("copy"),document.body.removeChild(ve)},Y.handleCopy=function(){var fe=Y.props,ve=fe.clickCallback,_e=fe.src,pe=fe.namespace,Ce=JSON.stringify(Y.clipboardValue(_e),null," ");navigator.clipboard?navigator.clipboard.writeText(Ce).catch(function(){Y.copyToClipboardFallback(Ce)}):Y.copyToClipboardFallback(Ce),Y.copiedTimer=setTimeout(function(){Y.setState({copied:!1})},5500),Y.setState({copied:!0},function(){typeof ve=="function"&&ve({src:_e,namespace:pe,name:pe[pe.length-1]})})},Y.getClippyIcon=function(){var fe=Y.props.theme;return Y.state.copied?R().createElement("span",null,R().createElement(Pl,Object.assign({className:"copy-icon"},Fe(fe,"copy-icon"))),R().createElement("span",Fe(fe,"copy-icon-copied"),"✔")):R().createElement(Pl,Object.assign({className:"copy-icon"},Fe(fe,"copy-icon")))},Y.clipboardValue=function(fe){switch(H(fe)){case"function":case"regexp":return fe.toString();default:return fe}},Y.state={copied:!1},Y}return T($,P),b($,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var q=this.props,Y=q.theme,fe=q.hidden,ve=q.rowHovered,_e=Fe(Y,"copy-to-clipboard").style,pe="inline";return fe&&(pe="none"),R().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:ve?"inline-block":"none"}},R().createElement("span",{style:g(g({},_e),{},{display:pe}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(R().PureComponent);const py=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).handleSelect=function(fe){var ve=Y.props,_e=ve.variable,pe=ve.namespace,Ce=ve.onEdit,Re=ve.onSelect,Ue=ve.keyModifier,He=te(pe);Ue(fe,"edit")&&Ce!==!1?Y.prepopInput(_e):Re!==!1&&(He.shift(),Re(g(g({},_e),{},{namespace:He})))},Y.getEditIcon=function(){var fe=Y.props,ve=fe.variable,_e=fe.theme;return R().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:Y.state.hovered?"inline-block":"none"}},R().createElement(Sd,Object.assign({className:"click-to-edit-icon"},Fe(_e,"editVarIcon"),{onClick:function(){Y.prepopInput(ve)}})))},Y.prepopInput=function(fe){if(Y.props.onEdit!==!1){var ve=(function(pe,Ce){var Re;switch(H(pe,Ce)){case"undefined":Re="undefined";break;case"nan":Re="NaN";break;case"string":Re=pe;break;case"bigNumber":case"date":case"function":case"regexp":Re=pe.toString();break;default:try{Re=JSON.stringify(pe,null," ")}catch{Re=""}}return Re})(fe.value,Y.props.bigNumber),_e=$l(ve,Y.props.bigNumber);Y.setState({editMode:!0,editValue:ve,parsedInput:{type:_e.type,value:_e.value}})}},Y.getRemoveIcon=function(){var fe=Y.props,ve=fe.variable,_e=fe.namespace,pe=fe.theme,Ce=fe.rjvId;return R().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:Y.state.hovered?"inline-block":"none"}},R().createElement(Ps,Object.assign({className:"click-to-remove-icon"},Fe(pe,"removeVarIcon"),{onClick:function(){ho.dispatch({name:"VARIABLE_REMOVED",rjvId:Ce,data:{name:ve.name,namespace:_e,existing_value:ve.value,variable_removed:!0}})}})))},Y.getValue=function(fe,ve){var _e=!ve&&fe.type,pe=Y.props;switch(_e){case!1:return Y.getEditInput();case"string":return R().createElement(dm,Object.assign({value:fe.value},pe));case"integer":return R().createElement(fm,Object.assign({value:fe.value},pe));case"float":return R().createElement(fs,Object.assign({value:fe.value},pe));case"boolean":return R().createElement(zl,Object.assign({value:fe.value},pe));case"function":return R().createElement(lm,Object.assign({value:fe.value},pe));case"null":return R().createElement(um,pe);case"nan":return R().createElement(cm,pe);case"undefined":return R().createElement(hm,pe);case"date":return R().createElement(fo,Object.assign({value:fe.value},pe));case"regexp":return R().createElement(sd,Object.assign({value:fe.value},pe));case"bigNumber":return R().createElement(pm,Object.assign({value:fe.value},pe));case"circularReference":return R().createElement(JsonCircularReference,Object.assign({value:fe.value},pe));default:var Ce="";try{Ce=JSON.stringify(fe.value)}catch{Ce=""}return R().createElement("div",{className:"object-value"},Ce)}},Y.getEditInput=function(){var fe=Y.props,ve=fe.keyModifier,_e=fe.selectOnFocus,pe=fe.theme,Ce=Y.state.editValue;return R().createElement("div",null,R().createElement(ly,Object.assign({type:"text",ref:function(Re){Re&&Re[_e?"select":"focus"]()},value:Ce,className:"variable-editor",onChange:function(Re){var Ue=Re.target.value,He=$l(Ue,Y.props.bigNumber);Y.setState({editValue:Ue,parsedInput:{type:He.type,value:He.value}})},onKeyDown:function(Re){switch(Re.key){case"Escape":Y.setState({editMode:!1,editValue:""});break;case"Enter":ve(Re,"submit")&&Y.submitEdit(!0)}Re.stopPropagation()},placeholder:"update this value",minRows:2},Fe(pe,"edit-input"))),R().createElement("div",Fe(pe,"edit-icon-container"),R().createElement(Ps,Object.assign({className:"edit-cancel"},Fe(pe,"cancel-icon"),{onClick:function(Re){Re&&Re.stopPropagation(),Y.setState({editMode:!1,editValue:""})}})),R().createElement(wd,Object.assign({className:"edit-check string-value"},Fe(pe,"check-icon"),{onClick:function(Re){Re&&Re.stopPropagation(),Y.submitEdit()}})),R().createElement("div",null,Y.showDetected())))},Y.submitEdit=function(fe){var ve=Y.props,_e=ve.variable,pe=ve.namespace,Ce=ve.rjvId,Re=ve.bigNumber,Ue=Y.state,He=Ue.editValue,Ye=Ue.parsedInput,et=He;fe&&Ye.type&&(et=Ye.value,Re&&Ye.type==="bigNumber"&&(et=new Re(et))),Y.setState({editMode:!1}),ho.dispatch({name:"VARIABLE_UPDATED",rjvId:Ce,data:{name:_e.name,namespace:pe,existing_value:_e.value,new_value:et,variable_removed:!1}})},Y.showDetected=function(){var fe=Y.props.theme,ve=Y.getDetectedInput();if(ve)return R().createElement("div",null,R().createElement("div",Fe(fe,"detected-row"),ve,R().createElement(wd,{className:"edit-check detected",style:g({verticalAlign:"top",paddingLeft:"3px"},Fe(fe,"check-icon").style),onClick:function(_e){_e&&_e.stopPropagation(),Y.submitEdit(!0)}})))},Y.getDetectedInput=function(){var fe=Y.state.parsedInput,ve=fe.type,_e=fe.value,pe=Y.props,Ce=pe.theme;if(ve!==!1)switch(ve.toLowerCase()){case"object":return R().createElement("span",null,R().createElement("span",{style:g(g({},Fe(Ce,"brace").style),{},{cursor:"default"})},"{"),R().createElement("span",{style:g(g({},Fe(Ce,"ellipsis").style),{},{cursor:"default"})},"..."),R().createElement("span",{style:g(g({},Fe(Ce,"brace").style),{},{cursor:"default"})},"}"));case"array":return R().createElement("span",null,R().createElement("span",{style:g(g({},Fe(Ce,"brace").style),{},{cursor:"default"})},"["),R().createElement("span",{style:g(g({},Fe(Ce,"ellipsis").style),{},{cursor:"default"})},"..."),R().createElement("span",{style:g(g({},Fe(Ce,"brace").style),{},{cursor:"default"})},"]"));case"string":return R().createElement(dm,Object.assign({value:_e},pe));case"integer":return R().createElement(fm,Object.assign({value:_e},pe));case"float":return R().createElement(fs,Object.assign({value:_e},pe));case"boolean":return R().createElement(zl,Object.assign({value:_e},pe));case"function":return R().createElement(lm,Object.assign({value:_e},pe));case"null":return R().createElement(um,pe);case"nan":return R().createElement(cm,pe);case"undefined":return R().createElement(hm,pe);case"date":return R().createElement(fo,Object.assign({value:new Date(_e)},pe));case"bignumber":return R().createElement(pm,Object.assign({value:_e},pe));case"circularreference":return R().createElement(JsonCircularReference,Object.assign({value:variable.value},pe))}},Y.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},Y}return T($,P),b($,[{key:"render",value:function(){var q=this,Y=this.props,fe=Y.variable,ve=Y.singleIndent,_e=Y.type,pe=Y.theme,Ce=Y.namespace,Re=Y.indentWidth,Ue=Y.enableClipboard,He=Y.onEdit,Ye=Y.onDelete,et=Y.onSelect,ht=Y.displayArrayKey,Ft=Y.quotesOnKeys,mt=Y.showComma,Nt=Y.isLast,an=this.state.editMode,zt=et!==!1||He!==!1;return R().createElement("div",Object.assign({},Fe(pe,"objectKeyVal",{paddingLeft:Re*ve}),{onMouseEnter:function(){return q.setState(g(g({},q.state),{},{hovered:!0}))},onMouseLeave:function(){return q.setState(g(g({},q.state),{},{hovered:!1}))},className:"variable-row",key:fe.name}),_e==="array"?ht?R().createElement("span",Object.assign({},Fe(pe,"array-key"),{key:fe.name+"_"+Ce}),fe.name,R().createElement("div",Fe(pe,"colon"),":")):null:R().createElement("span",null,R().createElement("span",Object.assign({},Fe(pe,"object-name"),{className:"object-key",key:fe.name+"_"+Ce,onClick:zt?this.handleSelect:null}),!!Ft&&R().createElement("span",{style:{verticalAlign:"top"}},'"'),R().createElement("span",{style:{display:"inline-block"}},J(fe.name)),!!Ft&&R().createElement("span",{style:{verticalAlign:"top"}},'"')),R().createElement("span",Fe(pe,"colon"),":")),R().createElement("div",Object.assign({className:"variable-value",onClick:zt?this.handleSelect:null},Fe(pe,"variableValue",{cursor:et===!1?"default":"pointer"})),this.getValue(fe,an)),mt&&!Nt&&R().createElement("span",Fe(pe,"comma"),","),Ue?R().createElement(Sm,{rowHovered:this.state.hovered,hidden:an,src:fe.value,clickCallback:Ue,theme:pe,namespace:[].concat(te(Ce),[fe.name])}):null,He!==!1&&an===!1?this.getEditIcon():null,Ye!==!1&&an===!1?this.getRemoveIcon():null)}}])})(R().PureComponent);var wm=(function(P){function $(){var q;v(this,$);for(var Y=arguments.length,fe=new Array(Y),ve=0;ve<Y;ve++)fe[ve]=arguments[ve];return(q=E(this,$,[].concat(fe))).getObjectSize=function(){var _e=q.props,pe=_e.size,Ce=_e.theme;if(_e.displayObjectSize)return R().createElement("span",Object.assign({className:"object-size"},Fe(Ce,"object-size")),pe," item",pe===1?"":"s")},q.getAddAttribute=function(_e){var pe=q.props,Ce=pe.theme,Re=pe.namespace,Ue=pe.name,He=pe.src,Ye=pe.rjvId,et=pe.depth;return R().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},R().createElement(bd,Object.assign({className:"click-to-add-icon"},Fe(Ce,"addVarIcon"),{onClick:function(){var ht={name:et>0?Ue:null,namespace:Re.splice(0,Re.length-1),existing_value:He,variable_removed:!1,key_name:null};H(He)==="object"?ho.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:Ye,data:ht}):ho.dispatch({name:"VARIABLE_ADDED",rjvId:Ye,data:g(g({},ht),{},{new_value:[].concat(te(He),[null])})})}})))},q.getRemoveObject=function(_e){var pe=q.props,Ce=pe.theme,Re=pe.namespace,Ue=pe.name,He=pe.src,Ye=pe.rjvId;if(Re.length!==1)return R().createElement("span",{className:"click-to-remove",style:{display:_e?"inline-block":"none"}},R().createElement(Ps,Object.assign({className:"click-to-remove-icon"},Fe(Ce,"removeVarIcon"),{onClick:function(){ho.dispatch({name:"VARIABLE_REMOVED",rjvId:Ye,data:{name:Ue,namespace:Re.splice(0,Re.length-1),existing_value:He,variable_removed:!0}})}})))},q.render=function(){var _e=q.props,pe=_e.theme,Ce=_e.onDelete,Re=_e.onAdd,Ue=_e.enableClipboard,He=_e.src,Ye=_e.namespace,et=_e.rowHovered;return R().createElement("div",Object.assign({},Fe(pe,"object-meta-data"),{className:"object-meta-data",onClick:function(ht){ht.stopPropagation()}}),q.getObjectSize(),Ue?R().createElement(Sm,{rowHovered:et,clickCallback:Ue,src:He,theme:pe,namespace:Ye}):null,Re!==!1?q.getAddAttribute(et):null,Ce!==!1?q.getRemoveObject(et):null)},q}return T($,P),b($)})(R().PureComponent);function Ln(P){var $=P.parent_type,q=P.namespace,Y=P.quotesOnKeys,fe=P.theme,ve=P.jsvRoot,_e=P.name,pe=P.displayArrayKey,Ce=P.onKeyClick,Re=P.name?P.name:"",Ue=typeof Ce=="function"?Ce:null;return!ve||_e!==!1&&_e!==null?$==="array"?pe?R().createElement("span",Object.assign({},Fe(fe,"array-key"),{key:q,onClick:Ue}),R().createElement("span",{className:"array-key"},Re),R().createElement("span",Fe(fe,"colon"),":")):R().createElement("span",null):R().createElement("span",Object.assign({},Fe(fe,"object-name"),{key:q,onClick:Ue}),R().createElement("span",{className:"object-key"},Y&&R().createElement("span",{style:{verticalAlign:"top"}},'"'),R().createElement("span",null,Re),Y&&R().createElement("span",{style:{verticalAlign:"top"}},'"')),R().createElement("span",Fe(fe,"colon"),":")):R().createElement("span",null)}function po(P){var $=P.theme;switch(P.iconStyle){case"triangle":return R().createElement(vd,Object.assign({},Fe($,"expanded-icon"),{className:"expanded-icon"}));case"square":return R().createElement(hy,Object.assign({},Fe($,"expanded-icon"),{className:"expanded-icon"}));default:return R().createElement(_o,Object.assign({},Fe($,"expanded-icon"),{className:"expanded-icon"}))}}function Qu(P){var $=P.theme;switch(P.iconStyle){case"triangle":return R().createElement(yd,Object.assign({},Fe($,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return R().createElement($s,Object.assign({},Fe($,"collapsed-icon"),{className:"collapsed-icon"}));default:return R().createElement(To,Object.assign({},Fe($,"collapsed-icon"),{className:"collapsed-icon"}))}}var Ed=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace"],Wu=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).toggleCollapsed=function(fe){for(var ve=Y.state.expanded,_e=[],pe=Math.max(ve.length||0,fe+1),Ce=0;Ce<pe;Ce++)_e[Ce]=ve[Ce]===!0;_e[fe]=!_e[fe],Y.setState({expanded:_e})},Y.handleKeySelect=function(){var fe=Y.props,ve=fe.name,_e=fe.namespace,pe=fe.onSelect,Ce=fe.src;if(typeof pe=="function"){var Re=te(_e);Re.shift(),Re.length>0&&Re.pop(),pe({name:ve,value:Ce,type:"array",namespace:Re})}},Y.state={expanded:[]},Y}return T($,P),b($,[{key:"getExpandedIcon",value:function(q){var Y=this.props,fe=Y.theme,ve=Y.iconStyle;return this.state.expanded[q]?R().createElement(po,{theme:fe,iconStyle:ve}):R().createElement(Qu,{theme:fe,iconStyle:ve})}},{key:"render",value:function(){var q=this,Y=this.props,fe=Y.src,ve=Y.groupArraysAfterLength,_e=(Y.depth,Y.name),pe=Y.theme,Ce=Y.jsvRoot,Re=Y.namespace,Ue=F(Y,Ed),He=0,Ye=5*this.props.indentWidth;Ce||(He=5*this.props.indentWidth);var et=ve,ht=Math.ceil(fe.length/et);return R().createElement("div",Object.assign({className:"object-key-val"},Fe(pe,Ce?"jsv-root":"objectKeyVal",{paddingLeft:He})),R().createElement(Ln,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),R().createElement("span",null,R().createElement(wm,Object.assign({size:fe.length},this.props))),te(Array(ht)).map(function(Ft,mt){return R().createElement("div",Object.assign({key:mt,className:"object-key-val array-group"},Fe(pe,"objectKeyVal",{marginLeft:6,paddingLeft:Ye})),R().createElement("span",Fe(pe,"brace-row"),R().createElement("div",Object.assign({className:"icon-container"},Fe(pe,"icon-container"),{onClick:function(Nt){q.toggleCollapsed(mt)}}),q.getExpandedIcon(mt)),q.state.expanded[mt]?R().createElement(Va,Object.assign({key:_e+mt,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:et,index_offset:mt*et,src:fe.slice(mt*et,mt*et+et),namespace:Re,type:"array",parent_type:"array_group",theme:pe,showComma:q.props.showComma,isLast:mt===ht-1},Ue)):R().createElement("span",Object.assign({},Fe(pe,"brace"),{onClick:function(Nt){q.toggleCollapsed(mt)},className:"array-group-brace"}),"[",R().createElement("div",Object.assign({},Fe(pe,"array-group-meta-data"),{className:"array-group-meta-data"}),R().createElement("span",Object.assign({className:"object-size"},Fe(pe,"object-size")),mt*et," - ",mt*et+et>fe.length?fe.length:mt*et+et)),"]")))}))}}])})(R().PureComponent),xd=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],Is=(function(P){function $(q){var Y;v(this,$),(Y=E(this,$,[q])).handleToggleCollapsed=function(){Y.setState({expanded:!Y.state.expanded},function(){Ua.set(Y.props.rjvId,Y.props.namespace,"expanded",Y.state.expanded)})},Y.handleKeySelect=function(){var ve=Y.props,_e=ve.name,pe=ve.namespace,Ce=ve.onSelect,Re=ve.src,Ue=Y.state.object_type;if(typeof Ce=="function"){var He=te(pe);He.shift(),He.length>0&&He.pop(),Ce({name:_e,value:Re,type:Ue,namespace:He})}},Y.getObjectContent=function(ve,_e,pe){return R().createElement("div",{className:"pushed-content object-container"},R().createElement("div",Object.assign({className:"object-content"},Fe(Y.props.theme,"pushed-content")),Y.renderObjectContents(_e,pe)))},Y.getEllipsis=function(){return Y.state.size===0?null:R().createElement("div",Object.assign({},Fe(Y.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:Y.handleToggleCollapsed}),"...")},Y.getObjectMetaData=function(ve){var _e=Y.state,pe=_e.size,Ce=_e.hovered;return R().createElement(wm,Object.assign({rowHovered:Ce,size:pe},Y.props))},Y.renderObjectContents=function(ve,_e){var pe,Ce=Y.props,Re=Ce.depth,Ue=Ce.parent_type,He=Ce.index_offset,Ye=Ce.groupArraysAfterLength,et=Ce.namespace,ht=Ce.showComma,Ft=Y.state.object_type,mt=[],Nt=Object.keys(ve||{});return Y.props.sortKeys&&Ft!=="array"&&(Nt=Nt.sort()),Nt.forEach(function(an,zt){pe=new my(an,ve[an],_e.bigNumber);var Hn=zt===Nt.length-1;if(Ue==="array_group"&&He&&(pe.name=parseInt(pe.name,10)+He),Object.prototype.hasOwnProperty.call(ve,an)&&pe.type.toLowerCase()!=="window")if(Y.isCircularReference(pe))mt.push(R().createElement(re,Object.assign({key:pe.name,depth:Re+1,name:pe.name,src:pe.value,namespace:et.concat(pe.name),type:"array",parent_type:Ft,isLast:Hn,showComma:ht,singleIndent:5,indentWidth:Y.props.indentWidth},_e)));else if(pe.type==="object")mt.push(R().createElement(Va,Object.assign({key:pe.name,depth:Re+1,name:pe.name,src:pe.value,namespace:et.concat(pe.name),parent_type:Ft,isLast:Hn,showComma:ht,listOfAncestors:Y.listOfAncestors.concat([Y.props.src])},_e)));else if(pe.type==="array"){var da=Va;Ye&&pe.value.length>Ye&&(da=Wu),mt.push(R().createElement(da,Object.assign({key:pe.name,depth:Re+1,name:pe.name,src:pe.value,namespace:et.concat(pe.name),type:"array",parent_type:Ft,isLast:Hn,showComma:ht,listOfAncestors:Y.listOfAncestors.concat([Y.props.src])},_e)))}else mt.push(R().createElement(py,Object.assign({key:pe.name+"_"+et,variable:pe,singleIndent:5,namespace:et,type:Y.props.type,isLast:Hn,showComma:ht},_e)))}),mt};var fe=$.getState(q);return Y.state=g(g({},fe),{},{prevProps:{}}),Y.listOfAncestors=Array.from(Y.props.listOfAncestors||[]),Y.listOfAncestors.push(q.src),Y}return T($,P),b($,[{key:"getBraceStart",value:function(q,Y){var fe=this.props,ve=fe.theme,_e=fe.iconStyle;if(fe.parent_type==="array_group")return R().createElement("span",null,R().createElement("span",Fe(ve,"brace"),q==="array"?"[":"{"));var pe=Y?po:Qu;return R().createElement("span",null,R().createElement("span",Object.assign({onClick:this.handleToggleCollapsed},Fe(ve,"brace-row")),R().createElement("div",Object.assign({className:"icon-container"},Fe(ve,"icon-container")),R().createElement(pe,{theme:ve,iconStyle:_e})),R().createElement(Ln,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),R().createElement("span",Fe(ve,"brace"),q==="array"?"[":"{")))}},{key:"isCircularReference",value:function(q){return this.listOfAncestors.indexOf(q.value)>-1||q.value===this.props.src}},{key:"render",value:function(){var q=this,Y=this.props,fe=Y.depth,ve=Y.src,_e=(Y.namespace,Y.name,Y.type,Y.parent_type),pe=Y.theme,Ce=Y.jsvRoot,Re=Y.iconStyle,Ue=Y.showComma,He=Y.isLast,Ye=F(Y,xd),et=this.state,ht=et.object_type,Ft=et.expanded,mt={};return Ce||_e==="array_group"?_e==="array_group"&&(mt.borderLeft=0,mt.display="inline"):mt.paddingLeft=5*this.props.indentWidth,R().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return q.setState(g(g({},q.state),{},{hovered:!0}))},onMouseLeave:function(){return q.setState(g(g({},q.state),{},{hovered:!1}))}},Fe(pe,Ce?"jsv-root":"objectKeyVal",mt)),this.getBraceStart(ht,Ft),Ft?this.getObjectContent(fe,ve,g({theme:pe,iconStyle:Re},Ye)):this.getEllipsis(),R().createElement("span",{className:"brace-row"},R().createElement("span",{style:g(g({},Fe(pe,"brace").style),{},{paddingLeft:Ft?"3px":"0px"})},ht==="array"?"]":"}")),Ue&&!He&&!Ce&&R().createElement("span",Fe(pe,"comma"),","),this.getObjectMetaData(ve))}}],[{key:"getDerivedStateFromProps",value:function(q,Y){var fe=Y.prevProps;return q.src!==fe.src||q.collapsed!==fe.collapsed||q.name!==fe.name||q.namespace!==fe.namespace||q.rjvId!==fe.rjvId?g(g({},$.getState(q)),{},{prevProps:q}):null}}])})(R().PureComponent);Is.getState=function(P){var $=Object.keys(P.src).length,q=(P.collapsed===!1||P.collapsed!==!0&&P.collapsed>P.depth)&&(!P.shouldCollapse||P.shouldCollapse({name:P.name,src:P.src,type:H(P.src),namespace:P.namespace})===!1)&&$!==0;return{expanded:Ua.get(P.rjvId,P.namespace,"expanded",q),object_type:P.type==="array"?"array":"object",parent_type:P.type==="array"?"array":"object",size:$,hovered:!1}};var my=b(function P($,q,Y){v(this,P),this.name=$,this.value=q,this.type=H(q,Y)});B(Is);const Va=Is;var wc=(function(P){function $(){var q;v(this,$);for(var Y=arguments.length,fe=new Array(Y),ve=0;ve<Y;ve++)fe[ve]=arguments[ve];return(q=E(this,$,[].concat(fe))).render=function(){var _e,pe,Ce,Re,Ue=q.props,He=[Ue.name],Ye=Va;return typeof Ue.name!="object"||Array.isArray(Ue.name)||(He=[((_e=Ue.name)===null||_e===void 0?void 0:_e.displayName)||((pe=Ue.name)===null||pe===void 0?void 0:pe.name)||((Ce=Ue.name)===null||Ce===void 0||(Re=Ce.type)===null||Re===void 0?void 0:Re.name)||"Anonymous"]),Array.isArray(Ue.src)&&Ue.groupArraysAfterLength&&Ue.src.length>Ue.groupArraysAfterLength&&(Ye=Wu),R().createElement("div",{className:"pretty-json-container object-container"},R().createElement("div",{className:"object-content"},R().createElement(Ye,Object.assign({namespace:He,depth:0,jsvRoot:!0},Ue))))},q}return T($,P),b($)})(R().PureComponent),Co=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).handleCloseModal=function(){ho.dispatch({rjvId:Y.props.rjvId,name:"RESET"})},Y.handleSubmit=function(){Y.props.submit(Y.state.input)},Y.state={input:q.input?q.input:""},Y}return T($,P),b($,[{key:"render",value:function(){var q=this,Y=this.props,fe=Y.theme,ve=Y.rjvId,_e=Y.isValid,pe=this.state.input,Ce=_e(pe);return R().createElement("div",Object.assign({className:"key-modal-request"},Fe(fe,"key-modal-request"),{onClick:this.handleCloseModal}),R().createElement("div",Object.assign({},Fe(fe,"key-modal"),{onClick:function(Re){Re.stopPropagation()}}),R().createElement("div",Fe(fe,"key-modal-label"),"Key Name:"),R().createElement("div",{style:{position:"relative"}},R().createElement("input",Object.assign({},Fe(fe,"key-modal-input"),{className:"key-modal-input",ref:function(Re){return Re&&Re.focus()},spellCheck:!1,value:pe,placeholder:"...",onChange:function(Re){q.setState({input:Re.target.value})},onKeyPress:function(Re){Ce&&Re.key==="Enter"?q.handleSubmit():Re.key==="Escape"&&q.handleCloseModal()}})),Ce?R().createElement(wd,Object.assign({},Fe(fe,"key-modal-submit"),{className:"key-modal-submit",onClick:this.handleSubmit})):null),R().createElement("span",Fe(fe,"key-modal-cancel"),R().createElement(Xu,Object.assign({},Fe(fe,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){ho.dispatch({rjvId:ve,name:"RESET"})}})))))}}])})(R().PureComponent),Ec=(function(P){function $(){var q;v(this,$);for(var Y=arguments.length,fe=new Array(Y),ve=0;ve<Y;ve++)fe[ve]=arguments[ve];return(q=E(this,$,[].concat(fe))).isValid=function(_e){var pe=q.props.rjvId,Ce=Ua.get(pe,"action","new-key-request");return _e!==""&&Object.keys(Ce.existing_value).indexOf(_e)===-1},q.submit=function(_e){var pe=q.props.rjvId,Ce=Ua.get(pe,"action","new-key-request");Ce.new_value=g({},Ce.existing_value),Ce.new_value[_e]=q.props.defaultValue,ho.dispatch({name:"VARIABLE_ADDED",rjvId:pe,data:Ce})},q}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.active,fe=q.theme,ve=q.rjvId;return Y?R().createElement(Co,{rjvId:ve,theme:fe,isValid:this.isValid,submit:this.submit}):null}}])})(R().PureComponent),_d=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var q=this.props,Y=q.message,fe=q.active,ve=q.theme,_e=q.rjvId;return fe?R().createElement("div",Object.assign({className:"validation-failure"},Fe(ve,"validation-failure"),{onClick:function(){ho.dispatch({rjvId:_e,name:"RESET"})}}),R().createElement("span",Fe(ve,"validation-failure-label"),Y),R().createElement(Xu,Fe(ve,"validation-failure-clear"))):null}}])})(R().PureComponent),fa=(function(P){function $(q){var Y;return v(this,$),(Y=E(this,$,[q])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),Y.getListeners=function(){return{reset:Y.resetState,"variable-update":Y.updateSrc,"add-key-request":Y.addKeyRequest}},Y.updateSrc=function(){var fe,ve=Ua.get(Y.rjvId,"action","variable-update"),_e=ve.name,pe=ve.namespace,Ce=ve.new_value,Re=ve.existing_value,Ue=ve.updated_src,He=ve.type,Ye=Y.props,et=Ye.onEdit,ht=Ye.onDelete,Ft=Ye.onAdd,mt={existing_src:Y.state.src,new_value:Ce,updated_src:Ue,name:_e,namespace:pe,existing_value:Re};switch(He){case"variable-added":fe=Ft(mt);break;case"variable-edited":fe=et(mt);break;case"variable-removed":fe=ht(mt)}fe!==!1?(Ua.set(Y.rjvId,"global","src",Ue),Y.setState({src:Ue})):Y.setState({validationFailure:!0})},Y.addKeyRequest=function(){Y.setState({addKeyRequest:!0})},Y.resetState=function(){Y.setState({validationFailure:!1,addKeyRequest:!1})},Y.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:$.defaultProps.src,name:$.defaultProps.name,theme:$.defaultProps.theme,validationMessage:$.defaultProps.validationMessage,prevSrc:$.defaultProps.src,prevName:$.defaultProps.name,prevTheme:$.defaultProps.theme},Y}return T($,P),b($,[{key:"componentDidMount",value:function(){Ua.set(this.rjvId,"global","src",this.state.src);var q=this.getListeners();for(var Y in q)Ua.on(Y+"-"+this.rjvId,q[Y]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(q,Y){Y.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),Y.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),q.src!==this.state.src&&Ua.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var q=this.getListeners();for(var Y in q)Ua.removeListener(Y+"-"+this.rjvId,q[Y])}},{key:"render",value:function(){var q=this.state,Y=q.validationFailure,fe=q.validationMessage,ve=q.addKeyRequest,_e=q.theme,pe=q.src,Ce=q.name,Re=this.props,Ue=Re.style,He=Re.defaultValue;return R().createElement("div",{className:"react-json-view",style:g(g({},Fe(_e,"app-container").style),Ue)},R().createElement(_d,{message:fe,active:Y,theme:_e,rjvId:this.rjvId}),R().createElement(wc,Object.assign({},this.props,{src:pe,name:Ce,theme:_e,type:H(pe),rjvId:this.rjvId})),R().createElement(Ec,{active:ve,theme:_e,rjvId:this.rjvId,defaultValue:He}))}}],[{key:"getDerivedStateFromProps",value:function(q,Y){if(q.src!==Y.prevSrc||q.name!==Y.prevName||q.theme!==Y.prevTheme){var fe={src:q.src,name:q.name,theme:q.theme,validationMessage:q.validationMessage,prevSrc:q.src,prevName:q.name,prevTheme:q.theme};return $.validateState(fe)}return null}}])})(R().PureComponent);fa.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(P){return P.metaKey||P.ctrlKey},bigNumber:null,showComma:!0},fa.validateState=function(P){var $={};return H(P.theme)!=="object"||(function(q){var Y=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(H(q)==="object"){for(var fe=0;fe<Y.length;fe++)if(!(Y[fe]in q))return!1;return!0}return!1})(P.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'),$.theme="rjv-default"),H(P.src)!=="object"&&H(P.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),$.name="ERROR",$.src={message:"src property must be a valid json object"}),g(g({},P),$)},B(fa);const Bi=fa})(),u})())})(rE)),rE.exports}var wSe=SSe();const Ix=ic(wSe),C7=j.createContext(void 0);function Hg(e){const t=j.useContext(C7);if(e===!1&&t===void 0)throw new Error(Ti(27));return t}let Tp=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Bp.startingStyle]="startingStyle",e[e.endingStyle=Bp.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),QR=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const ESe={[QR.popupOpen]:""},xSe={[QR.popupOpen]:"",[QR.pressed]:""},_Se={[Tp.open]:""},TSe={[Tp.closed]:""},CSe={[Tp.anchorHidden]:""},R7={open(e){return e?ESe:null}},O7={open(e){return e?xSe:null}},Gg={open(e){return e?_Se:TSe},anchorHidden(e){return e?CSe:null}},RSe={...Gg,...Bg},OSe=j.forwardRef(function(t,r){const{render:i,className:s,forceRender:l=!1,...u}=t,{store:f}=Hg(),d=f.useState("open"),h=f.useState("nested"),m=f.useState("mounted"),g=f.useState("transitionStatus");return dr("div",t,{state:{open:d,transitionStatus:g},ref:[f.context.backdropRef,r],stateAttributesMapping:RSe,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:l||!h})}),ASe=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:u=!0,...f}=t,{store:d}=Hg(),h=d.useState("open");function m(b){h&&d.setOpen(!1,un(Bbe,b.nativeEvent))}const{getButtonProps:g,buttonRef:v}=Jp({disabled:l,native:u});return dr("button",t,{state:{disabled:l},ref:[r,v],props:[{onClick:m},f,g]})}),Tb=0;class Rl{static create(){return new Rl}currentId=Tb;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Tb,r()},t)}isStarted(){return this.currentId!==Tb}clear=()=>{this.currentId!==Tb&&(clearTimeout(this.currentId),this.currentId=Tb)};disposeEffect=()=>this.clear}function yo(){const e=Ni(Rl.create).current;return zx(e.disposeEffect),e}function MSe(e,t){return t!=null&&!T1(t)?0:typeof e=="function"?e():e}function aE(e,t,r){const i=MSe(e,r);return typeof i=="number"?i:i?.[t]}function AD(e){return typeof e=="function"?e():e}function A7(e,t){return t||e==="click"||e==="mousedown"}function qa(e){const t=Ni(jSe,e).current;return t.next=e,at(t.effect),t}function jSe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const M7={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},e5={...M7,position:"fixed",top:0,left:0},j7={...M7,position:"absolute"},xg=j.forwardRef(function(t,r){const[i,s]=j.useState();at(()=>{Kbe&&s("button")},[]);const l={tabIndex:0,role:i};return k.jsx("span",{...t,ref:r,style:e5,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})});function BE(e){return`data-base-ui-${e}`}let MD=0;function t1(e,t={}){const{preventScroll:r=!1,cancelPrevious:i=!0,sync:s=!1}=t;i&&cancelAnimationFrame(MD);const l=()=>e?.focus({preventScroll:r});s?l():MD=requestAnimationFrame(l)}const KT={inert:new WeakMap,"aria-hidden":new WeakMap},jD="data-base-ui-inert",WR={inert:new WeakSet,"aria-hidden":new WeakSet};let Cb=new WeakMap,YT=0;function kSe(e){return WR[e]}function k7(e){return e?h1(e)?e.host:k7(e.parentNode):null}const ZT=(e,t)=>t.map(r=>{if(e.contains(r))return r;const i=k7(r);return e.contains(i)?i:null}).filter(r=>r!=null),kD=e=>{const t=new Set;return e.forEach(r=>{let i=r;for(;i&&!t.has(i);)t.add(i),i=i.parentNode}),t},ND=(e,t,r)=>{const i=[],s=l=>{!l||r.has(l)||Array.from(l.children).forEach(u=>{Vf(u)!=="script"&&(t.has(u)?s(u):i.push(u))})};return s(e),i};function NSe(e,t,r,i,{mark:s=!0,markerIgnoreElements:l=[]}){const u=i?"inert":r?"aria-hidden":null;let f=null,d=null;const h=ZT(t,e),m=s?ZT(t,l):[],g=new Set(m),v=s?ND(t,kD(h),new Set(h)).filter(w=>!g.has(w)):[],x=[],b=[];if(u){const w=KT[u],S=kSe(u);d=S,f=w;const _=ZT(t,Array.from(t.querySelectorAll("[aria-live]"))),E=h.concat(_);ND(t,kD(E),new Set(E)).forEach(T=>{const C=T.getAttribute(u),R=C!==null&&C!=="false",M=(w.get(T)||0)+1;w.set(T,M),x.push(T),M===1&&R&&S.add(T),R||T.setAttribute(u,u==="inert"?"":"true")})}return s&&v.forEach(w=>{const S=(Cb.get(w)||0)+1;Cb.set(w,S),b.push(w),S===1&&w.setAttribute(jD,"")}),YT+=1,()=>{f&&x.forEach(w=>{const _=(f.get(w)||0)-1;f.set(w,_),_||(!d?.has(w)&&u&&w.removeAttribute(u),d?.delete(w))}),s&&b.forEach(w=>{const S=(Cb.get(w)||0)-1;Cb.set(w,S),S||w.removeAttribute(jD)}),YT-=1,YT||(KT.inert=new WeakMap,KT["aria-hidden"]=new WeakMap,WR.inert=new WeakSet,WR["aria-hidden"]=new WeakSet,Cb=new WeakMap)}}function DD(e,t={}){const{ariaHidden:r=!1,inert:i=!1,mark:s=!0,markerIgnoreElements:l=[]}=t,u=kn(e[0]).body;return NSe(e,u,r,i,{mark:s,markerIgnoreElements:l})}const N7=j.createContext(null),D7=()=>j.useContext(N7),DSe=BE("portal");function zSe(e={}){const{ref:t,container:r,componentProps:i=za,elementProps:s}=e,l=Vg(),f=D7()?.portalNode,[d,h]=j.useState(null),[m,g]=j.useState(null),v=ot(S=>{S!==null&&g(S)}),x=j.useRef(null);at(()=>{if(r===null){x.current&&(x.current=null,g(null),h(null));return}if(l==null)return;const S=(r&&(EA(r)?r:r.current))??f??document.body;if(S==null){x.current&&(x.current=null,g(null),h(null));return}x.current!==S&&(x.current=S,g(null),h(S))},[r,f,l]);const b=dr("div",i,{ref:[t,v],props:[{id:l,[DSe]:""},s]});return{portalNode:m,portalSubtree:d&&b?_s.createPortal(b,d):null}}const t5=j.forwardRef(function(t,r){const{children:i,container:s,className:l,render:u,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:m}=zSe({container:s,ref:r,componentProps:t,elementProps:d}),g=j.useRef(null),v=j.useRef(null),x=j.useRef(null),b=j.useRef(null),[w,S]=j.useState(null),_=w?.modal,E=w?.open,O=typeof f=="boolean"?f:!!w&&!w.modal&&w.open&&!!h;j.useEffect(()=>{if(!h||_)return;function C(R){h&&R.relatedTarget&&ng(R)&&(R.type==="focusin"?SD:C1e)(h)}return h.addEventListener("focusin",C,!0),h.addEventListener("focusout",C,!0),()=>{h.removeEventListener("focusin",C,!0),h.removeEventListener("focusout",C,!0)}},[h,_]),j.useEffect(()=>{!h||E||SD(h)},[E,h]);const T=j.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:x,afterInsideRef:b,portalNode:h,setFocusManagerState:S}),[h]);return k.jsxs(j.Fragment,{children:[m,k.jsxs(N7.Provider,{value:T,children:[O&&h&&k.jsx(xg,{"data-type":"outside",ref:g,onFocus:C=>{if(ng(C,h))x.current?.focus();else{const R=w?w.domReference:null;h7(R)?.focus()}}}),O&&h&&k.jsx("span",{"aria-owns":h.id,style:bie}),h&&_s.createPortal(i,h),O&&h&&k.jsx(xg,{"data-type":"outside",ref:v,onFocus:C=>{if(ng(C,h))b.current?.focus();else{const R=w?w.domReference:null;WM(R)?.focus(),w?.closeOnFocusOut&&w?.onOpenChange(!1,un(Fp,C.nativeEvent))}}})]})]})});function z7(){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 $Se{nodesRef={current:[]};events=z7();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 $7=j.createContext(null),P7=j.createContext(null),Kf=()=>j.useContext($7)?.id||null,om=e=>{const t=j.useContext(P7);return e??t};function PSe(e){const t=Vg(),r=om(e),i=Kf();return at(()=>{if(!t)return;const s={id:t,parentId:i};return r?.addNode(s),()=>{r?.removeNode(s)}},[r,t,i]),t}function ISe(e){const{children:t,id:r}=e,i=Kf();return k.jsx($7.Provider,{value:j.useMemo(()=>({id:r,parentId:i}),[r,i]),children:t})}function LSe(e){const{children:t,externalTree:r}=e,i=Ni(()=>r??new $Se).current;return k.jsx(P7.Provider,{value:i,children:t})}function USe(e,t){const r=ga(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 zD=20;let gf=[];function n5(){gf=gf.filter(e=>e.deref()?.isConnected)}function VSe(e){n5(),e&&Vf(e)!=="body"&&(gf.push(new WeakRef(e)),gf.length>zD&&(gf=gf.slice(-zD)))}function XT(){return n5(),gf[gf.length-1]?.deref()}function qSe(e){if(!e)return null;const t=Fg();return f7(e,t)?e:sS(e,t)[0]||e}function FSe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():QM(e)}function $D(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=Fg(),s=x1e(e,r).filter(u=>{const f=u.getAttribute("data-tabindex")||"";return f7(u,r)||u.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 r5(e){const{context:t,children:r,disabled:i=!1,initialFocus:s=!0,returnFocus:l=!0,restoreFocus:u=!1,modal:f=!0,closeOnFocusOut:d=!0,openInteractionType:h="",nextFocusableElement:m,previousFocusableElement:g,beforeContentFocusGuardRef:v,externalTree:x,getInsideElements:b}=e,w="rootStore"in t?t.rootStore:t,S=w.useState("open"),_=w.useState("domReferenceElement"),E=w.useState("floatingElement"),{events:O,dataRef:T}=w.context,C=ot(()=>T.current.floatingContext?.nodeId),R=s===!1,M=FR(_)&&R,D=j.useRef(["content"]),I=qa(s),B=qa(l),V=qa(h),F=om(x),G=D7(),W=j.useRef(!1),te=j.useRef(!1),H=j.useRef(!1),J=j.useRef(-1),re=j.useRef(""),le=j.useRef(""),ae=j.useRef(null),N=j.useRef(null),U=Pu(ae,v,G?.beforeInsideRef),X=Pu(N,G?.afterInsideRef),L=yo(),Z=yo(),ee=Px(),de=G!=null,ye=_1(E),Te=ot((Ee=ye)=>Ee?sS(Ee,Fg()):[]),Ae=ot(()=>b?.().filter(Ee=>Ee!=null)??[]),ue=ot(Ee=>{const xe=Te(Ee);return D.current.map(()=>xe).filter(Boolean).flat()});j.useEffect(()=>{if(i||!f)return;function Ee(Me){Me.key==="Tab"&&Zt(ye,ms(kn(ye)))&&Te().length===0&&!M&&es(Me)}const xe=kn(ye);return xe.addEventListener("keydown",Ee),()=>{xe.removeEventListener("keydown",Ee)}},[i,_,ye,f,D,M,Te,ue]),j.useEffect(()=>{if(i||!S)return;const Ee=kn(ye);function xe(){H.current=!1}function Me(Ie){const Be=ns(Ie),ke=Ae(),je=Zt(E,Be)||Zt(_,Be)||Zt(G?.portalNode,Be)||ke.some(Se=>Se===Be||Zt(Se,Be));H.current=!je,le.current=Ie.pointerType||"keyboard",Be?.closest(`[${Z$}]`)&&(te.current=!0)}function Ve(){le.current="keyboard"}return Ee.addEventListener("pointerdown",Me,!0),Ee.addEventListener("pointerup",xe,!0),Ee.addEventListener("pointercancel",xe,!0),Ee.addEventListener("keydown",Ve,!0),()=>{Ee.removeEventListener("pointerdown",Me,!0),Ee.removeEventListener("pointerup",xe,!0),Ee.removeEventListener("pointercancel",xe,!0),Ee.removeEventListener("keydown",Ve,!0)}},[i,E,_,ye,S,G,Ae]),j.useEffect(()=>{if(i||!d)return;const Ee=kn(ye);function xe(){te.current=!0,Z.start(0,()=>{te.current=!1})}function Me(je){const Se=ns(je),$e=Te().indexOf(Se);$e!==-1&&(J.current=$e)}function Ve(je){const Se=je.relatedTarget,ze=je.currentTarget,$e=ns(je);queueMicrotask(()=>{const Ze=C(),hn=w.context.triggerElements,vn=Ae(),bn=Se?.hasAttribute(BE("focus-guard"))&&[ae.current,N.current,G?.beforeInsideRef.current,G?.afterInsideRef.current,G?.beforeOutsideRef.current,G?.afterOutsideRef.current,Ou(g),Ou(m)].includes(Se),dn=!(Zt(_,Se)||Zt(E,Se)||Zt(Se,E)||Zt(G?.portalNode,Se)||vn.some(xt=>xt===Se||Zt(xt,Se))||Se!=null&&hn.hasElement(Se)||hn.hasMatchingElement(xt=>Zt(xt,Se))||bn||F&&(Nu(F.nodesRef.current,Ze).find(xt=>Zt(xt.context?.elements.floating,Se)||Zt(xt.context?.elements.domReference,Se))||gD(F.nodesRef.current,Ze).find(xt=>[xt.context?.elements.floating,_1(xt.context?.elements.floating)].includes(Se)||xt.context?.elements.domReference===Se)));if(ze===_&&ye&&$D(ye,D),u&&ze!==_&&!FSe($e)&&ms(Ee)===Ee.body){if(Ur(ye)&&(ye.focus(),u==="popup")){ee.request(()=>{ye.focus()});return}const xt=J.current,jt=Te(),pn=jt[xt]||jt[jt.length-1]||ye;Ur(pn)&&pn.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(M||!f)&&Se&&dn&&!te.current&&(M||Se!==XT())&&(W.current=!0,w.setOpen(!1,un(Fp,je)))})}function Ie(){H.current||(T.current.insideReactTree=!0,L.start(0,()=>{T.current.insideReactTree=!1}))}const Be=Ur(_)?_:null,ke=[];if(!(!E&&!Be))return Be&&(Be.addEventListener("focusout",Ve),Be.addEventListener("pointerdown",xe),ke.push(()=>{Be.removeEventListener("focusout",Ve),Be.removeEventListener("pointerdown",xe)})),E&&(E.addEventListener("focusin",Me),E.addEventListener("focusout",Ve),G&&(E.addEventListener("focusout",Ie,!0),ke.push(()=>{E.removeEventListener("focusout",Ie,!0)})),ke.push(()=>{E.removeEventListener("focusin",Me),E.removeEventListener("focusout",Ve)})),()=>{ke.forEach(je=>{je()})}},[i,_,E,ye,f,F,G,w,d,u,Te,M,C,D,T,L,Z,ee,m,g,Ae]),j.useEffect(()=>{if(i||!E||!S)return;const Ee=Array.from(G?.portalNode?.querySelectorAll(`[${BE("portal")}]`)||[]),Me=(F?gD(F.nodesRef.current,C()):[]).find(Se=>FR(Se.context?.elements.domReference||null))?.context?.elements.domReference,Ie=[...[E,...Ee,ae.current,N.current,G?.beforeOutsideRef.current,G?.afterOutsideRef.current,...Ae()],Me,Ou(g),Ou(m),M?_:null].filter(Se=>Se!=null),Be=DD(Ie,{ariaHidden:f||M,mark:!1}),ke=[E,...Ee].filter(Se=>Se!=null),je=DD(ke);return()=>{je(),Be()}},[S,i,_,E,f,D,G,M,F,C,m,g,Ae]),at(()=>{if(!S||i||!Ur(ye))return;const Ee=kn(ye),xe=ms(Ee);queueMicrotask(()=>{const Me=ue(ye),Ve=I.current,Ie=typeof Ve=="function"?Ve(V.current||""):Ve;if(Ie===void 0||Ie===!1)return;let Be;Ie===!0||Ie===null?Be=Me[0]||ye:Be=Ou(Ie),Be=Be||Me[0]||ye,!Zt(ye,xe)&&t1(Be,{preventScroll:Be===ye})})},[i,S,ye,R,ue,I,V]),at(()=>{if(i||!ye)return;const Ee=kn(ye),xe=ms(Ee);VSe(xe);function Me(Ie){if(Ie.open||(re.current=USe(Ie.nativeEvent,le.current)),Ie.reason===ts&&Ie.nativeEvent.type==="mouseleave"&&(W.current=!0),Ie.reason===BM)if(Ie.nested)W.current=!1;else if(QU(Ie.nativeEvent)||WU(Ie.nativeEvent))W.current=!1;else{let Be=!1;document.createElement("div").focus({get preventScroll(){return Be=!0,!1}}),Be?W.current=!1:W.current=!0}}O.on("openchange",Me);function Ve(){const Ie=B.current;let Be=typeof Ie=="function"?Ie(re.current):Ie;if(Be===void 0||Be===!1)return null;if(Be===null&&(Be=!0),typeof Be=="boolean"){const je=_||XT();return je&&je.isConnected?je:null}const ke=_||XT();return Ou(Be)||ke||null}return()=>{O.off("openchange",Me);const Ie=ms(Ee),Be=Ae(),ke=Zt(E,Ie)||Be.some(Se=>Se===Ie||Zt(Se,Ie))||F&&Nu(F.nodesRef.current,C(),!1).some(Se=>Zt(Se.context?.elements.floating,Ie)),je=Ve();queueMicrotask(()=>{const Se=qSe(je),ze=typeof B.current!="boolean";B.current&&!W.current&&Ur(Se)&&(!(!ze&&Se!==Ie&&Ie!==Ee.body)||ke)&&Se.focus({preventScroll:!0}),W.current=!1})}},[i,E,ye,B,T,O,F,_,C,Ae]),at(()=>{if(!HM||S||!E)return;const Ee=ms(kn(E));!Ur(Ee)||!KM(Ee)||Zt(E,Ee)&&Ee.blur()},[S,E]),at(()=>{if(!(i||!G))return G.setFocusManagerState({modal:f,closeOnFocusOut:d,open:S,onOpenChange:w.setOpen,domReference:_}),()=>{G.setFocusManagerState(null)}},[i,G,f,S,w,d,_]),at(()=>{if(!(i||!ye))return $D(ye,D),()=>{queueMicrotask(n5)}},[i,ye,D]);const be=!i&&(f?!M:!0)&&(de||f);return k.jsxs(j.Fragment,{children:[be&&k.jsx(xg,{"data-type":"inside",ref:U,onFocus:Ee=>{if(f){const xe=ue();t1(xe[xe.length-1])}else G?.portalNode&&(W.current=!1,ng(Ee,G.portalNode)?WM(_)?.focus():Ou(g??G.beforeOutsideRef)?.focus())}}),r,be&&k.jsx(xg,{"data-type":"inside",ref:X,onFocus:Ee=>{f?t1(ue()[0]):G?.portalNode&&(d&&(W.current=!0),ng(Ee,G.portalNode)?h7(_)?.focus():Ou(m??G.afterOutsideRef)?.focus())}})]})}function I7(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.context.dataRef,{enabled:s=!0,event:l="click",toggle:u=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:h=0,reason:m=Sg}=t,g=j.useRef(void 0),v=Px(),x=yo(),b=j.useMemo(()=>({onPointerDown(w){g.current=w.pointerType},onMouseDown(w){const S=g.current,_=w.nativeEvent,E=r.select("open");if(w.button!==0||l==="click"||T1(S,!0)&&f)return;const O=i.current.openEvent,T=O?.type,C=r.select("domReferenceElement")!==w.currentTarget,R=E&&C||!(E&&u&&(!(O&&d)||T==="click"||T==="mousedown"));if(KM(_.target)){const D=un(m,_,_.target);R&&S==="touch"&&h>0?x.start(h,()=>{r.setOpen(!0,D)}):r.setOpen(R,D);return}const M=w.currentTarget;v.request(()=>{const D=un(m,_,M);R&&S==="touch"&&h>0?x.start(h,()=>{r.setOpen(!0,D)}):r.setOpen(R,D)})},onClick(w){if(l==="mousedown-only")return;const S=g.current;if(l==="mousedown"&&S){g.current=void 0;return}if(T1(S,!0)&&f)return;const _=r.select("open"),E=i.current.openEvent,O=r.select("domReferenceElement")!==w.currentTarget,T=_&&O||!(_&&u&&(!(E&&d)||JU(E))),C=un(m,w.nativeEvent,w.currentTarget);T&&S==="touch"&&h>0?x.start(h,()=>{r.setOpen(!0,C)}):r.setOpen(T,C)},onKeyDown(){g.current=void 0}}),[i,l,f,r,d,u,v,x,h,m]);return j.useMemo(()=>s?{reference:b}:za,[s,b])}const BSe={intentional:"onClick",sloppy:"onPointerDown"};function HSe(){return!1}function GSe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function a5(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),{dataRef:l}=r.context,{enabled:u=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:h="sloppy",referencePress:m=HSe,referencePressEvent:g="sloppy",bubbles:v,externalTree:x}=t,b=om(x),w=ot(typeof d=="function"?d:()=>!1),S=typeof d=="function"?w:d,_=S!==!1,E=ot(()=>h),O=j.useRef(!1),T=j.useRef(!1),C=j.useRef(!1),{escapeKey:R,outsidePress:M}=GSe(v),D=j.useRef(null),I=yo(),B=yo(),V=ot(()=>{B.clear(),l.current.insideReactTree=!1}),F=j.useRef(!1),G=j.useRef(""),W=ot(m),te=ot(N=>{if(!i||!u||!f||N.key!=="Escape"||F.current)return;const U=l.current.floatingContext?.nodeId,X=b?Nu(b.nodesRef.current,U):[];if(!R&&X.length>0){let ee=!0;if(X.forEach(de=>{de.context?.open&&!de.context.dataRef.current.__escapeKeyBubbles&&(ee=!1)}),!ee)return}const L=Jbe(N)?N.nativeEvent:N,Z=un(qU,L);r.setOpen(!1,Z),!R&&!Z.isPropagationAllowed&&N.stopPropagation()}),H=ot(()=>{l.current.insideReactTree=!0,B.start(0,V)});j.useEffect(()=>{if(!i||!u)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=M;const N=new Rl,U=new Rl;function X(){N.clear(),F.current=!0}function L(){N.start(vx()?5:0,()=>{F.current=!1})}function Z(){C.current=!0,U.start(0,()=>{C.current=!1})}function ee(){O.current=!1,T.current=!1}function de(){const Se=G.current,ze=Se==="pen"||!Se?"mouse":Se,$e=E(),Ze=typeof $e=="function"?$e():$e;return typeof Ze=="string"?Ze:Ze[ze]}function ye(Se){const ze=de();return ze==="intentional"&&Se.type!=="click"||ze==="sloppy"&&Se.type==="click"}function Te(Se){const ze=l.current.floatingContext?.nodeId,$e=b&&Nu(b.nodesRef.current,ze).some(Ze=>Sl(Se,Ze.context?.elements.floating));return Sl(Se,r.select("floatingElement"))||Sl(Se,r.select("domReferenceElement"))||$e}function Ae(Se){if(ye(Se)){V();return}if(l.current.insideReactTree){V();return}const ze=ns(Se),$e=`[${BE("inert")}]`;let Ze=Array.from(kn(r.select("floatingElement")).querySelectorAll($e));const hn=nr(ze)?ze.getRootNode():null;h1(hn)&&(Ze=Ze.concat(Array.from(hn.querySelectorAll($e))));const vn=r.context.triggerElements;if(ze&&(vn.hasElement(ze)||vn.hasMatchingElement(jt=>Zt(jt,ze))))return;let bn=nr(ze)?ze:null;for(;bn&&!ju(bn);){const jt=$u(bn);if(ju(jt)||!nr(jt))break;bn=jt}if(Ze.length&&nr(ze)&&!Wbe(ze)&&!Zt(ze,r.select("floatingElement"))&&Ze.every(jt=>!Zt(bn,jt)))return;if(Ur(ze)&&!("touches"in Se)){const jt=ju(ze),pn=ss(ze),yr=/auto|scroll/,vr=jt||yr.test(pn.overflowX),Gt=jt||yr.test(pn.overflowY),An=vr&&ze.clientWidth>0&&ze.scrollWidth>ze.clientWidth,Dt=Gt&&ze.clientHeight>0&&ze.scrollHeight>ze.clientHeight,Kt=pn.direction==="rtl",Wn=Dt&&(Kt?Se.offsetX<=ze.offsetWidth-ze.clientWidth:Se.offsetX>ze.clientWidth),ir=An&&Se.offsetY>ze.clientHeight;if(Wn||ir)return}if(Te(Se))return;if(de()==="intentional"&&C.current){U.clear(),C.current=!1;return}if(typeof S=="function"&&!S(Se))return;const dn=l.current.floatingContext?.nodeId,xt=b?Nu(b.nodesRef.current,dn):[];if(xt.length>0){let jt=!0;if(xt.forEach(pn=>{pn.context?.open&&!pn.context.dataRef.current.__outsidePressBubbles&&(jt=!1)}),!jt)return}r.setOpen(!1,un(BM,Se)),V()}function ue(Se){de()!=="sloppy"||Se.pointerType==="touch"||!r.select("open")||!u||Sl(Se,r.select("floatingElement"))||Sl(Se,r.select("domReferenceElement"))||Ae(Se)}function be(Se){if(de()!=="sloppy"||!r.select("open")||!u||Sl(Se,r.select("floatingElement"))||Sl(Se,r.select("domReferenceElement")))return;const ze=Se.touches[0];ze&&(D.current={startTime:Date.now(),startX:ze.clientX,startY:ze.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function Ee(Se){G.current="touch";const ze=ns(Se);function $e(){be(Se),ze?.removeEventListener(Se.type,$e)}ze?.addEventListener(Se.type,$e)}function xe(Se){if(I.clear(),Se.type==="pointerdown"&&(G.current=Se.pointerType),Se.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)return;const ze=ns(Se);function $e(){Se.type==="pointerdown"?ue(Se):Ae(Se),ze?.removeEventListener(Se.type,$e)}ze?.addEventListener(Se.type,$e)}function Me(Se){if(!O.current)return;const ze=T.current;if(ee(),de()==="intentional"){if(Se.type==="pointercancel"){ze&&Z();return}if(!Te(Se)){if(ze){Z();return}typeof S=="function"&&!S(Se)||(U.clear(),C.current=!0,V())}}}function Ve(Se){if(de()!=="sloppy"||!D.current||Sl(Se,r.select("floatingElement"))||Sl(Se,r.select("domReferenceElement")))return;const ze=Se.touches[0];if(!ze)return;const $e=Math.abs(ze.clientX-D.current.startX),Ze=Math.abs(ze.clientY-D.current.startY),hn=Math.sqrt($e*$e+Ze*Ze);hn>5&&(D.current.dismissOnTouchEnd=!0),hn>10&&(Ae(Se),I.clear(),D.current=null)}function Ie(Se){const ze=ns(Se);function $e(){Ve(Se),ze?.removeEventListener(Se.type,$e)}ze?.addEventListener(Se.type,$e)}function Be(Se){de()!=="sloppy"||!D.current||Sl(Se,r.select("floatingElement"))||Sl(Se,r.select("domReferenceElement"))||(D.current.dismissOnTouchEnd&&Ae(Se),I.clear(),D.current=null)}function ke(Se){const ze=ns(Se);function $e(){Be(Se),ze?.removeEventListener(Se.type,$e)}ze?.addEventListener(Se.type,$e)}const je=kn(s);return f&&(je.addEventListener("keydown",te),je.addEventListener("compositionstart",X),je.addEventListener("compositionend",L)),_&&(je.addEventListener("click",xe,!0),je.addEventListener("pointerdown",xe,!0),je.addEventListener("pointerup",Me,!0),je.addEventListener("pointercancel",Me,!0),je.addEventListener("mousedown",xe,!0),je.addEventListener("mouseup",Me,!0),je.addEventListener("touchstart",Ee,!0),je.addEventListener("touchmove",Ie,!0),je.addEventListener("touchend",ke,!0)),()=>{f&&(je.removeEventListener("keydown",te),je.removeEventListener("compositionstart",X),je.removeEventListener("compositionend",L)),_&&(je.removeEventListener("click",xe,!0),je.removeEventListener("pointerdown",xe,!0),je.removeEventListener("pointerup",Me,!0),je.removeEventListener("pointercancel",Me,!0),je.removeEventListener("mousedown",xe,!0),je.removeEventListener("mouseup",Me,!0),je.removeEventListener("touchstart",Ee,!0),je.removeEventListener("touchmove",Ie,!0),je.removeEventListener("touchend",ke,!0)),N.clear(),U.clear(),ee(),C.current=!1}},[l,s,f,_,S,i,u,R,M,te,V,E,b,r,I]),j.useEffect(V,[S,V]);const J=j.useMemo(()=>({onKeyDown:te,[BSe[g]]:N=>{W()&&r.setOpen(!1,un(Sg,N.nativeEvent))},...g!=="intentional"&&{onClick(N){W()&&r.setOpen(!1,un(Sg,N.nativeEvent))}}}),[te,r,g,W]),re=ot(N=>{if(!i||!u||N.button!==0)return;const U=ns(N.nativeEvent);Zt(r.select("floatingElement"),U)&&(O.current||(O.current=!0,T.current=!1))}),le=ot(N=>{!i||!u||(N.defaultPrevented||N.nativeEvent.defaultPrevented)&&O.current&&(T.current=!0)}),ae=j.useMemo(()=>({onKeyDown:te,onPointerDown:le,onMouseDown:le,onClickCapture:H,onMouseDownCapture(N){H(),re(N)},onPointerDownCapture(N){H(),re(N)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[te,H,re,le]);return j.useMemo(()=>u?{reference:J,floating:ae,trigger:J}:{},[u,J,ae])}function PD(e,t,r){let{reference:i,floating:s}=e;const l=vs(t),u=XM(t),f=ZM(u),d=vo(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 x;switch(d){case"top":x={x:m,y:i.y-s.height};break;case"bottom":x={x:m,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:g};break;case"left":x={x:i.x-s.width,y:g};break;default:x={x:i.x,y:i.y}}switch(Hf(t)){case"start":x[u]-=v*(r&&h?-1:1);break;case"end":x[u]+=v*(r&&h?-1:1);break}return x}async function KSe(e,t){var r;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:u,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:x=0}=Uu(t,e),b=e7(x),S=f[v?g==="floating"?"reference":"floating":g],_=C1(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(S)))==null||r?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),E=g==="floating"?{x:i,y:s,width:u.floating.width,height:u.floating.height}:u.reference,O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),T=await(l.isElement==null?void 0:l.isElement(O))?await(l.getScale==null?void 0:l.getScale(O))||{x:1,y:1}:{x:1,y:1},C=C1(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:O,strategy:d}):E);return{top:(_.top-C.top+b.top)/T.y,bottom:(C.bottom-_.bottom+b.bottom)/T.y,left:(_.left-C.left+b.left)/T.x,right:(C.right-_.right+b.right)/T.x}}const YSe=50,ZSe=async(e,t,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:u}=r,f=u.detectOverflow?u:{...u,detectOverflow:KSe},d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:g}=PD(h,i,d),v=i,x=0;const b={};for(let w=0;w<l.length;w++){const S=l[w];if(!S)continue;const{name:_,fn:E}=S,{x:O,y:T,data:C,reset:R}=await E({x:m,y:g,initialPlacement:i,placement:v,strategy:s,middlewareData:b,rects:h,platform:f,elements:{reference:e,floating:t}});m=O??m,g=T??g,b[_]={...b[_],...C},R&&x<YSe&&(x++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(h=R.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:m,y:g}=PD(h,v,d)),w=-1)}return{x:m,y:g,placement:v,strategy:s,middlewareData:b}},XSe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:s,middlewareData:l,rects:u,initialPlacement:f,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...S}=Uu(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const _=vo(s),E=vs(f),O=vo(f)===f,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),C=v||(O||!w?[LE(f)]:r1e(f)),R=b!=="none";!v&&R&&C.push(...s1e(f,w,b,T));const M=[f,...C],D=await d.detectOverflow(t,S),I=[];let B=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&I.push(D[_]),g){const W=n1e(s,u,T);I.push(D[W[0]],D[W[1]])}if(B=[...B,{placement:s,overflows:I}],!I.every(W=>W<=0)){var V,F;const W=(((V=l.flip)==null?void 0:V.index)||0)+1,te=M[W];if(te&&(!(g==="alignment"?E!==vs(te):!1)||B.every(re=>vs(re.placement)===E?re.overflows[0]>0:!0)))return{data:{index:W,overflows:B},reset:{placement:te}};let H=(F=B.filter(J=>J.overflows[0]<=0).sort((J,re)=>J.overflows[1]-re.overflows[1])[0])==null?void 0:F.placement;if(!H)switch(x){case"bestFit":{var G;const J=(G=B.filter(re=>{if(R){const le=vs(re.placement);return le===E||le==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(le=>le>0).reduce((le,ae)=>le+ae,0)]).sort((re,le)=>re[1]-le[1])[0])==null?void 0:G[0];J&&(H=J);break}case"initialPlacement":H=f;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function ID(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LD(e){return e1e.some(t=>e[t]>=0)}const QSe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:i}=t,{strategy:s="referenceHidden",...l}=Uu(e,t);switch(s){case"referenceHidden":{const u=await i.detectOverflow(t,{...l,elementContext:"reference"}),f=ID(u,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:LD(f)}}}case"escaped":{const u=await i.detectOverflow(t,{...l,altBoundary:!0}),f=ID(u,r.floating);return{data:{escapedOffsets:f,escaped:LD(f)}}}default:return{}}}}},L7=new Set(["left","top"]);async function WSe(e,t){const{placement:r,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),u=vo(r),f=Hf(r),d=vs(r)==="y",h=L7.has(u)?-1:1,m=l&&d?-1:1,g=Uu(t,e);let{mainAxis:v,crossAxis:x,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"&&(x=f==="end"?b*-1:b),d?{x:x*m,y:v*h}:{x:v*h,y:x*m}}const JSe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:s,y:l,placement:u,middlewareData:f}=t,d=await WSe(t,e);return u===((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:u}}}}},ewe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:s,platform:l}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:d={fn:_=>{let{x:E,y:O}=_;return{x:E,y:O}}},...h}=Uu(e,t),m={x:r,y:i},g=await l.detectOverflow(t,h),v=vs(vo(s)),x=YM(v);let b=m[x],w=m[v];if(u){const _=x==="y"?"top":"left",E=x==="y"?"bottom":"right",O=b+g[_],T=b-g[E];b=BR(O,b,T)}if(f){const _=v==="y"?"top":"left",E=v==="y"?"bottom":"right",O=w+g[_],T=w-g[E];w=BR(O,w,T)}const S=d.fn({...t,[x]:b,[v]:w});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[x]:u,[v]:f}}}}}},twe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:s,rects:l,middlewareData:u}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Uu(e,t),m={x:r,y:i},g=vs(s),v=YM(g);let x=m[v],b=m[g];const w=Uu(f,t),S=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(d){const O=v==="y"?"height":"width",T=l.reference[v]-l.floating[O]+S.mainAxis,C=l.reference[v]+l.reference[O]-S.mainAxis;x<T?x=T:x>C&&(x=C)}if(h){var _,E;const O=v==="y"?"width":"height",T=L7.has(vo(s)),C=l.reference[g]-l.floating[O]+(T&&((_=u.offset)==null?void 0:_[g])||0)+(T?0:S.crossAxis),R=l.reference[g]+l.reference[O]+(T?0:((E=u.offset)==null?void 0:E[g])||0)-(T?S.crossAxis:0);b<C?b=C:b>R&&(b=R)}return{[v]:x,[g]:b}}}},nwe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:s,rects:l,platform:u,elements:f}=t,{apply:d=()=>{},...h}=Uu(e,t),m=await u.detectOverflow(t,h),g=vo(s),v=Hf(s),x=vs(s)==="y",{width:b,height:w}=l.floating;let S,_;g==="top"||g==="bottom"?(S=g,_=v===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(_=g,S=v==="end"?"top":"bottom");const E=w-m.top-m.bottom,O=b-m.left-m.right,T=wg(w-m[S],E),C=wg(b-m[_],O),R=!t.middlewareData.shift;let M=T,D=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=O),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=E),R&&!v){const B=rs(m.left,0),V=rs(m.right,0),F=rs(m.top,0),G=rs(m.bottom,0);x?D=b-2*(B!==0||V!==0?B+V:rs(m.left,m.right)):M=w-2*(F!==0||G!==0?F+G:rs(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:M});const I=await u.getDimensions(f.floating);return b!==I.width||w!==I.height?{reset:{rects:!0}}:{}}}};function U7(e){const t=ss(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Ur(e),l=s?e.offsetWidth:r,u=s?e.offsetHeight:i,f=IE(r)!==l||IE(i)!==u;return f&&(r=l,i=u),{width:r,height:i,$:f}}function i5(e){return nr(e)?e:e.contextElement}function ig(e){const t=i5(e);if(!Ur(t))return tc(1);const r=t.getBoundingClientRect(),{width:i,height:s,$:l}=U7(t);let u=(l?IE(r.width):r.width)/i,f=(l?IE(r.height):r.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const rwe=tc(0);function V7(e){const t=ga(e);return!vx()||!t.visualViewport?rwe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function awe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ga(e)?!1:t}function Hp(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),l=i5(e);let u=tc(1);t&&(i?nr(i)&&(u=ig(i)):u=ig(e));const f=awe(l,r,i)?V7(l):tc(0);let d=(s.left+f.x)/u.x,h=(s.top+f.y)/u.y,m=s.width/u.x,g=s.height/u.y;if(l){const v=ga(l),x=i&&nr(i)?ga(i):i;let b=v,w=YC(b);for(;w&&i&&x!==b;){const S=ig(w),_=w.getBoundingClientRect(),E=ss(w),O=_.left+(w.clientLeft+parseFloat(E.paddingLeft))*S.x,T=_.top+(w.clientTop+parseFloat(E.paddingTop))*S.y;d*=S.x,h*=S.y,m*=S.x,g*=S.y,d+=O,h+=T,b=ga(w),w=YC(b)}}return C1({width:m,height:g,x:d,y:h})}function Lx(e,t){const r=bx(e).scrollLeft;return t?t.left+r:Hp(sc(e)).left+r}function q7(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Lx(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function iwe(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e;const l=s==="fixed",u=sc(i),f=t?yx(t.floating):!1;if(i===u||f&&l)return r;let d={scrollLeft:0,scrollTop:0},h=tc(1);const m=tc(0),g=Ur(i);if((g||!g&&!l)&&((Vf(i)!=="body"||qf(u))&&(d=bx(i)),g)){const x=Hp(i);h=ig(i),m.x=x.x+i.clientLeft,m.y=x.y+i.clientTop}const v=u&&!g&&!l?q7(u,d):tc(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 owe(e){return Array.from(e.getClientRects())}function swe(e){const t=sc(e),r=bx(e),i=e.ownerDocument.body,s=rs(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=rs(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-r.scrollLeft+Lx(e);const f=-r.scrollTop;return ss(i).direction==="rtl"&&(u+=rs(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:u,y:f}}const UD=25;function lwe(e,t){const r=ga(e),i=sc(e),s=r.visualViewport;let l=i.clientWidth,u=i.clientHeight,f=0,d=0;if(s){l=s.width,u=s.height;const m=vx();(!m||m&&t==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}const h=Lx(i);if(h<=0){const m=i.ownerDocument,g=m.body,v=getComputedStyle(g),x=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(i.clientWidth-g.clientWidth-x);b<=UD&&(l-=b)}else h<=UD&&(l+=h);return{width:l,height:u,x:f,y:d}}function cwe(e,t){const r=Hp(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,l=Ur(e)?ig(e):tc(1),u=e.clientWidth*l.x,f=e.clientHeight*l.y,d=s*l.x,h=i*l.y;return{width:u,height:f,x:d,y:h}}function VD(e,t,r){let i;if(t==="viewport")i=lwe(e,r);else if(t==="document")i=swe(sc(e));else if(nr(t))i=cwe(t,r);else{const s=V7(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return C1(i)}function F7(e,t){const r=$u(e);return r===t||!nr(r)||ju(r)?!1:ss(r).position==="fixed"||F7(r,t)}function uwe(e,t){const r=t.get(e);if(r)return r;let i=p1(e,[],!1).filter(f=>nr(f)&&Vf(f)!=="body"),s=null;const l=ss(e).position==="fixed";let u=l?$u(e):e;for(;nr(u)&&!ju(u);){const f=ss(u),d=xA(u);!d&&f.position==="fixed"&&(s=null),(l?!d&&!s:!d&&f.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||qf(u)&&!d&&F7(e,u))?i=i.filter(m=>m!==u):s=f,u=$u(u)}return t.set(e,i),i}function fwe(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e;const u=[...r==="clippingAncestors"?yx(t)?[]:uwe(t,this._c):[].concat(r),i],f=VD(t,u[0],s);let d=f.top,h=f.right,m=f.bottom,g=f.left;for(let v=1;v<u.length;v++){const x=VD(t,u[v],s);d=rs(x.top,d),h=wg(x.right,h),m=wg(x.bottom,m),g=rs(x.left,g)}return{width:h-g,height:m-d,x:g,y:d}}function dwe(e){const{width:t,height:r}=U7(e);return{width:t,height:r}}function hwe(e,t,r){const i=Ur(t),s=sc(t),l=r==="fixed",u=Hp(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const d=tc(0);function h(){d.x=Lx(s)}if(i||!i&&!l)if((Vf(t)!=="body"||qf(s))&&(f=bx(t)),i){const x=Hp(t,!0,l,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else s&&h();l&&!i&&s&&h();const m=s&&!i&&!l?q7(s,f):tc(0),g=u.left+f.scrollLeft-d.x-m.x,v=u.top+f.scrollTop-d.y-m.y;return{x:g,y:v,width:u.width,height:u.height}}function QT(e){return ss(e).position==="static"}function qD(e,t){if(!Ur(e)||ss(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sc(e)===r&&(r=r.ownerDocument.body),r}function B7(e,t){const r=ga(e);if(yx(e))return r;if(!Ur(e)){let s=$u(e);for(;s&&!ju(s);){if(nr(s)&&!QT(s))return s;s=$u(s)}return r}let i=qD(e,t);for(;i&&Hae(i)&&QT(i);)i=qD(i,t);return i&&ju(i)&&QT(i)&&!xA(i)?r:i||Yae(e)||r}const pwe=async function(e){const t=this.getOffsetParent||B7,r=this.getDimensions,i=await r(e.floating);return{reference:hwe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mwe(e){return ss(e).direction==="rtl"}const H7={convertOffsetParentRelativeRectToViewportRelativeRect:iwe,getDocumentElement:sc,getClippingRect:fwe,getOffsetParent:B7,getElementRects:pwe,getClientRects:owe,getDimensions:dwe,getScale:ig,isElement:nr,isRTL:mwe};function G7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gwe(e,t){let r=null,i;const s=sc(e);function l(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function u(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:m,top:g,width:v,height:x}=h;if(f||t(),!v||!x)return;const b=xp(g),w=xp(s.clientWidth-(m+v)),S=xp(s.clientHeight-(g+x)),_=xp(m),O={rootMargin:-b+"px "+-w+"px "+-S+"px "+-_+"px",threshold:rs(0,wg(1,d))||1};let T=!0;function C(R){const M=R[0].intersectionRatio;if(M!==d){if(!T)return u();M?u(!1,M):i=setTimeout(()=>{u(!1,1e-7)},1e3)}M===1&&!G7(h,e.getBoundingClientRect())&&u(),T=!1}try{r=new IntersectionObserver(C,{...O,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,O)}r.observe(e)}return u(!0),l}function FD(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=i5(e),m=s||l?[...h?p1(h):[],...t?p1(t):[]]:[];m.forEach(_=>{s&&_.addEventListener("scroll",r,{passive:!0}),l&&_.addEventListener("resize",r)});const g=h&&f?gwe(h,r):null;let v=-1,x=null;u&&(x=new ResizeObserver(_=>{let[E]=_;E&&E.target===h&&x&&t&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var O;(O=x)==null||O.observe(t)})),r()}),h&&!d&&x.observe(h),t&&x.observe(t));let b,w=d?Hp(e):null;d&&S();function S(){const _=Hp(e);w&&!G7(w,_)&&r(),w=_,b=requestAnimationFrame(S)}return r(),()=>{var _;m.forEach(E=>{s&&E.removeEventListener("scroll",r),l&&E.removeEventListener("resize",r)}),g?.(),(_=x)==null||_.disconnect(),x=null,d&&cancelAnimationFrame(b)}}const ywe=JSe,vwe=ewe,bwe=XSe,Swe=nwe,wwe=QSe,Ewe=twe,xwe=(e,t,r)=>{const i=new Map,s={platform:H7,...r},l={...s.platform,_c:i};return ZSe(e,t,{...s,platform:l})};var _we=typeof document<"u",Twe=function(){},iE=_we?j.useLayoutEffect:Twe;function HE(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(!HE(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)&&!HE(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function K7(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function BD(e,t){const r=K7(e);return Math.round(t*r)/r}function WT(e){const t=j.useRef(e);return iE(()=>{t.current=e}),t}function Cwe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:l,floating:u}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,g]=j.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=j.useState(i);HE(v,i)||x(i);const[b,w]=j.useState(null),[S,_]=j.useState(null),E=j.useCallback(re=>{re!==R.current&&(R.current=re,w(re))},[]),O=j.useCallback(re=>{re!==M.current&&(M.current=re,_(re))},[]),T=l||b,C=u||S,R=j.useRef(null),M=j.useRef(null),D=j.useRef(m),I=d!=null,B=WT(d),V=WT(s),F=WT(h),G=j.useCallback(()=>{if(!R.current||!M.current)return;const re={placement:t,strategy:r,middleware:v};V.current&&(re.platform=V.current),xwe(R.current,M.current,re).then(le=>{const ae={...le,isPositioned:F.current!==!1};W.current&&!HE(D.current,ae)&&(D.current=ae,_s.flushSync(()=>{g(ae)}))})},[v,t,r,V,F]);iE(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,g(re=>({...re,isPositioned:!1})))},[h]);const W=j.useRef(!1);iE(()=>(W.current=!0,()=>{W.current=!1}),[]),iE(()=>{if(T&&(R.current=T),C&&(M.current=C),T&&C){if(B.current)return B.current(T,C,G);G()}},[T,C,G,B,I]);const te=j.useMemo(()=>({reference:R,floating:M,setReference:E,setFloating:O}),[E,O]),H=j.useMemo(()=>({reference:T,floating:C}),[T,C]),J=j.useMemo(()=>{const re={position:r,left:0,top:0};if(!H.floating)return re;const le=BD(H.floating,m.x),ae=BD(H.floating,m.y);return f?{...re,transform:"translate("+le+"px, "+ae+"px)",...K7(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:le,top:ae}},[r,f,H.floating,m.x,m.y]);return j.useMemo(()=>({...m,update:G,refs:te,elements:H,floatingStyles:J}),[m,G,te,H,J])}const Rwe=(e,t)=>{const r=ywe(e);return{name:r.name,fn:r.fn,options:[e,t]}},Owe=(e,t)=>{const r=vwe(e);return{name:r.name,fn:r.fn,options:[e,t]}},Awe=(e,t)=>({fn:Ewe(e).fn,options:[e,t]}),Mwe=(e,t)=>{const r=bwe(e);return{name:r.name,fn:r.fn,options:[e,t]}},jwe=(e,t)=>{const r=Swe(e);return{name:r.name,fn:r.fn,options:[e,t]}},kwe=(e,t)=>{const r=wwe(e);return{name:r.name,fn:r.fn,options:[e,t]}};var GE=Symbol("NOT_FOUND");function Nwe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Dwe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function zwe(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 HD=e=>Array.isArray(e)?e:[e];function $we(e){const t=Array.isArray(e[0])?e[0]:e;return zwe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Pwe(e,t){const r=[],{length:i}=e;for(let s=0;s<i;s++)r.push(e[s].apply(null,t));return r}function Iwe(e){let t;return{get(r){return t&&e(t.key,r)?t.value:GE},put(r,i){t={key:r,value:i}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Lwe(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 GE}function s(f,d){i(f)===GE&&(r.unshift({key:f,value:d}),r.length>e&&r.pop())}function l(){return r}function u(){r=[]}return{get:i,put:s,getEntries:l,clear:u}}var Uwe=(e,t)=>e===t;function Vwe(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 qwe(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:i=Uwe,maxSize:s=1,resultEqualityCheck:l}=r,u=Vwe(i);let f=0;const d=s<=1?Iwe(u):Lwe(s,u);function h(){let m=d.get(arguments);if(m===GE){if(m=e.apply(null,arguments),f++,l){const v=d.getEntries().find(x=>l(x.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 Fwe=class{constructor(e){this.value=e}deref(){return this.value}},Bwe=typeof WeakRef<"u"?WeakRef:Fwe,Hwe=0,GD=1;function Cw(){return{s:Hwe,v:void 0,o:null,p:null}}function Y7(e,t={}){let r=Cw();const{resultEqualityCheck:i}=t;let s,l=0;function u(){let f=r;const{length:d}=arguments;for(let g=0,v=d;g<v;g++){const x=arguments[g];if(typeof x=="function"||typeof x=="object"&&x!==null){let b=f.o;b===null&&(f.o=b=new WeakMap);const w=b.get(x);w===void 0?(f=Cw(),b.set(x,f)):f=w}else{let b=f.p;b===null&&(f.p=b=new Map);const w=b.get(x);w===void 0?(f=Cw(),b.set(x,f)):f=w}}const h=f;let m;if(f.s===GD)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 Bwe(m):m}return h.s=GD,h.v=m,m}return u.clearCache=()=>{r=Cw(),u.resetResultsCount()},u.resultsCount=()=>l,u.resetResultsCount=()=>{l=0},u}function Z7(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let l=0,u=0,f,d={},h=s.pop();typeof h=="object"&&(d=h,h=s.pop()),Nwe(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:x=Y7,argsMemoizeOptions:b=[]}=m,w=HD(v),S=HD(b),_=$we(s),E=g(function(){return l++,h.apply(null,arguments)},...w),O=x(function(){u++;const C=Pwe(_,arguments);return f=E.apply(null,C),f},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:E,dependencies:_,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:g,argsMemoize:x})};return Object.assign(i,{withTypes:()=>i}),i}var Gwe=Z7(Y7),Kwe=Object.assign((e,t=Gwe)=>{Dwe(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((u,f,d)=>(u[r[d]]=f,u),{}))},{withTypes:()=>Kwe});Z7({memoize:qwe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const it=(e,t,r,i,s,l,...u)=>{if(u.length>0)throw new Error(Ti(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var JT={exports:{}},eC={};var KD;function Ywe(){if(KD)return eC;KD=1;var e=Cg();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,u=e.useDebugValue;function f(g,v){var x=v(),b=i({inst:{value:x,getSnapshot:v}}),w=b[0].inst,S=b[1];return l(function(){w.value=x,w.getSnapshot=v,d(w)&&S({inst:w})},[g,x,v]),s(function(){return d(w)&&S({inst:w}),g(function(){d(w)&&S({inst:w})})},[g]),u(x),x}function d(g){var v=g.getSnapshot;g=g.value;try{var x=v();return!r(g,x)}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 eC.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,eC}var YD;function X7(){return YD||(YD=1,JT.exports=Ywe()),JT.exports}var Zwe=X7(),tC={exports:{}},nC={};var ZD;function Xwe(){if(ZD)return nC;ZD=1;var e=Cg(),t=X7();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,u=e.useEffect,f=e.useMemo,d=e.useDebugValue;return nC.useSyncExternalStoreWithSelector=function(h,m,g,v,x){var b=l(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=f(function(){function _(R){if(!E){if(E=!0,O=R,R=v(R),x!==void 0&&w.hasValue){var M=w.value;if(x(M,R))return T=M}return T=R}if(M=T,i(O,R))return M;var D=v(R);return x!==void 0&&x(M,D)?(O=R,M):(O=R,T=D)}var E=!1,O,T,C=g===void 0?null:g;return[function(){return _(m())},C===null?void 0:function(){return _(C())}]},[m,g,v,x]);var S=s(h,b[0],b[1]);return u(function(){w.hasValue=!0,w.value=S},[S]),d(S),S},nC}var XD;function Qwe(){return XD||(XD=1,tC.exports=Xwe()),tC.exports}var Wwe=Qwe();const Jwe=_A(19),eEe=Jwe?nEe:rEe;function At(e,t,r,i,s){return eEe(e,t,r,i,s)}function tEe(e,t,r,i,s){const l=j.useCallback(()=>t(e.getSnapshot(),r,i,s),[e,t,r,i,s]);return Zwe.useSyncExternalStore(e.subscribe,l,l)}function nEe(e,t,r,i,s){return tEe(e,t,r,i,s)}function rEe(e,t,r,i,s){return Wwe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,r,i,s))}class Q7{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])){this.setState({...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||this.setState({...this.state,[t]:r})}notifyAll(){const t={...this.state};this.setState(t)}use(t,r,i,s){return At(this,t,r,i,s)}}class o5 extends Q7{constructor(t,r={},i){super(t),this.context=r,this.selectors=i}useSyncedValue(t,r){j.useDebugValue(t),at(()=>{this.state[t]!==r&&this.set(t,r)},[t,r])}useSyncedValueWithCleanup(t,r){const i=this;at(()=>(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);at(()=>{r.update(t)},[r,...i])}useControlledProp(t,r){j.useDebugValue(t);const i=r!==void 0;at(()=>{i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})},[t,r,i])}select(t,r,i,s){const l=this.selectors[t];return l(this.state,r,i,s)}useState(t,r,i,s){return j.useDebugValue(t),At(this,this.selectors[t],r,i,s)}useContextCallback(t,r){j.useDebugValue(t);const i=ot(r??mo);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 u=i(l);if(!Object.is(s,u)){const f=s;s=u,r(u,f,this)}})}}const aEe={open:it(e=>e.open),domReferenceElement:it(e=>e.domReferenceElement),referenceElement:it(e=>e.positionReference??e.referenceElement),floatingElement:it(e=>e.floatingElement),floatingId:it(e=>e.floatingId)};class s5 extends o5{constructor(t){const{nested:r,noEmit:i,onOpenChange:s,triggerElements:l,...u}=t;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:z7(),nested:r,noEmit:i,triggerElements:l},aEe)}setOpen=(t,r)=>{if((!t||!this.state.open||JU(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 iEe(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,u=i.current,f=t.context.triggerElements.getById(l);u&&f===u&&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 oEe(e,t,r,i){const s=r.useState("isMountedByTrigger",e),l=iEe(e,r),u=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 at(()=>{s&&r.update({activeTriggerElement:t.current,...i})},[s,r,t,...Object.values(i)]),{registerTrigger:u,isMountedByThisTrigger:s}}function W7(e){const t=e.useState("open");at(()=>{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 J7(e,t,r){const{mounted:i,setMounted:s,transitionStatus:l}=lS(e);t.useSyncedValues({mounted:i,transitionStatus:l});const u=ot(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return Gf({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:l}}class Ux{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,r){const i=this.idMap.get(t);i!==r&&(i!==void 0&&this.elementsSet.delete(i),this.elementsSet.add(r),this.idMap.set(t,r))}delete(t){const r=this.idMap.get(t);r&&(this.elementsSet.delete(r),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const r of this.elementsSet)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function sEe(){return new s5({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Ux,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function eV(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:sEe(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:za,inactiveTriggerProps:za,popupProps:za}}const Rw=it(e=>e.triggerIdProp??e.activeTriggerId),tV={open:it(e=>e.openProp??e.open),mounted:it(e=>e.mounted),transitionStatus:it(e=>e.transitionStatus),floatingRootContext:it(e=>e.floatingRootContext),preventUnmountingOnClose:it(e=>e.preventUnmountingOnClose),payload:it(e=>e.payload),activeTriggerId:Rw,activeTriggerElement:it(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:it((e,t)=>t!==void 0&&Rw(e)===t),isOpenedByTrigger:it((e,t)=>t!==void 0&&Rw(e)===t&&e.open),isMountedByTrigger:it((e,t)=>t!==void 0&&Rw(e)===t&&e.mounted),triggerProps:it((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:it(e=>e.popupProps),popupElement:it(e=>e.popupElement),positionerElement:it(e=>e.positionerElement)};function nV(e){const{open:t=!1,onOpenChange:r,elements:i={}}=e,s=Vg(),l=Kf()!=null,u=Ni(()=>new s5({open:t,onOpenChange:r,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new Ux,floatingId:s,nested:l,noEmit:!1})).current;return at(()=>{const f={open:t,floatingId:s};i.reference!==void 0&&(f.referenceElement=i.reference,f.domReferenceElement=nr(i.reference)?i.reference:null),i.floating!==void 0&&(f.floatingElement=i.floating),u.update(f)},[t,s,i.reference,i.floating,u]),u.context.onOpenChange=r,u.context.nested=l,u.context.noEmit=!1,u}function lEe(e={}){const{nodeId:t,externalTree:r}=e,i=nV(e),s=e.rootContext||i,l={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[u,f]=j.useState(null),d=j.useRef(null),h=om(r);at(()=>{l.domReference&&(d.current=l.domReference)},[l.domReference]);const m=Cwe({...e,elements:{...l,...u&&{reference:u}}}),g=j.useCallback(M=>{const D=nr(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;f(D),m.refs.setReference(D)},[m.refs]),[v,x]=j.useState(null),[b,w]=j.useState(null);s.useSyncedValue("referenceElement",v),s.useSyncedValue("domReferenceElement",nr(v)?v:null),s.useSyncedValue("floatingElement",b);const S=j.useCallback(M=>{(nr(M)||M===null)&&(d.current=M,x(M)),(nr(m.refs.reference.current)||m.refs.reference.current===null||M!==null&&!nr(M))&&m.refs.setReference(M)},[m.refs,x]),_=j.useCallback(M=>{w(M),m.refs.setFloating(M)},[m.refs]),E=j.useMemo(()=>({...m.refs,setReference:S,setFloating:_,setPositionReference:g,domReference:d}),[m.refs,S,_,g]),O=j.useMemo(()=>({...m.elements,domReference:l.domReference}),[m.elements,l.domReference]),T=s.useState("open"),C=s.useState("floatingId"),R=j.useMemo(()=>({...m,dataRef:s.context.dataRef,open:T,onOpenChange:s.setOpen,events:s.context.events,floatingId:C,refs:E,elements:O,nodeId:t,rootStore:s}),[m,E,O,t,s,T,C]);return at(()=>{s.context.dataRef.current.floatingContext=R;const M=h?.nodesRef.current.find(D=>D.id===t);M&&(M.context=R)}),j.useMemo(()=>({...m,context:R,refs:E,elements:O,rootStore:s}),[m,E,O,R,s])}function rV(e){const{popupStore:t,noEmit:r=!1,treatPopupAsFloatingElement:i=!1,onOpenChange:s}=e,l=Vg(),u=Kf()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(i?"popupElement":"positionerElement"),m=t.context.triggerElements,g=Ni(()=>new s5({open:f,referenceElement:d,floatingElement:h,triggerElements:m,onOpenChange:s,floatingId:l,nested:u,noEmit:r})).current;return at(()=>{const v={open:f,floatingId:l,referenceElement:d,floatingElement:h};nr(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=u,g.context.noEmit=r,g}const cEe=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${ZU}`;function uEe(e){return e?!!e.closest(cEe):!1}class l5{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Rl,this.restTimeout=new Rl,this.handleCloseOptions=void 0}static create(){return new l5}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function c5(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function fEe(e,t){const{scopeElement:r,referenceElement:i,floatingElement:s}=t;c5(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=i,e.pointerEventsFloatingElement=s,r.style.pointerEvents="none",i.style.pointerEvents="auto",s.style.pointerEvents="auto"}function aV(e){const t=Ni(l5.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=t),zx(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function dEe(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),{dataRef:u}=r.context,{enabled:f=!0,closeDelay:d=0}=t,h=aV(r),m=om(),g=Kf(),v=ot(()=>A7(u.current.openEvent?.type,h.interactedInside)),x=ot(()=>{const O=u.current.openEvent?.type;return O?.includes("mouse")&&O!=="mousedown"}),b=ot(O=>XU(O,r.context.triggerElements)),w=j.useCallback(O=>{const T=aE(d,"close",h.pointerType),C=()=>{r.setOpen(!1,un(ts,O)),m?.events.emit("floating.closed",O)};T?h.openChangeTimeout.start(T,C):(h.openChangeTimeout.clear(),C())},[d,r,h,m]),S=ot(()=>{c5(h)}),_=ot(O=>{const T=ns(O);if(!uEe(T)){h.interactedInside=!1;return}h.interactedInside=T?.closest("[aria-haspopup]")!=null});at(()=>{i||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,S())},[i,h,S]),j.useEffect(()=>S,[S]),at(()=>{if(f&&i&&h.handleCloseOptions?.blockPointerEvents&&x()&&nr(l)&&s){const O=l,T=s,C=kn(s),R=m?.nodesRef.current.find(D=>D.id===g)?.context?.elements.floating;R&&(R.style.pointerEvents="");const M=h.handleCloseOptions?.getScope?.()??h.pointerEventsScopeElement??R??O.closest("[data-rootownerid]")??C.body;return fEe(h,{scopeElement:M,referenceElement:O,floatingElement:T}),()=>{S()}}},[f,i,l,s,h,x,m,g,S]);const E=yo();j.useEffect(()=>{if(!f)return;function O(){h.openChangeTimeout.clear(),E.clear(),m?.events.off("floating.closed",C),S()}function T(M){if(m&&g&&Nu(m.nodesRef.current,g).length>0){m.events.on("floating.closed",C);return}if(!b(M.relatedTarget)){if(h.handler){h.handler(M);return}S(),v()||w(M)}}function C(M){!m||!g||Nu(m.nodesRef.current,g).length>0||E.start(0,()=>{m.events.off("floating.closed",C),r.setOpen(!1,un(ts,M)),m.events.emit("floating.closed",M)})}const R=s;return R&&(R.addEventListener("mouseenter",O),R.addEventListener("mouseleave",T),R.addEventListener("pointerdown",_,!0)),()=>{R&&(R.removeEventListener("mouseenter",O),R.removeEventListener("mouseleave",T),R.removeEventListener("pointerdown",_,!0)),m?.events.off("floating.closed",C)}},[f,s,r,u,v,b,w,S,_,h,m,g,E])}const hEe={current:null};function pEe(e,t={}){const r="rootStore"in e?e.rootStore:e,{dataRef:i,events:s}=r.context,{enabled:l=!0,delay:u=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:m=!0,triggerElementRef:g=hEe,externalTree:v,isActiveTrigger:x=!0,getHandleCloseContext:b}=t,w=om(v),S=aV(r),_=qa(f),E=qa(u),O=qa(h),T=qa(l);x&&(S.handleCloseOptions=_.current?.__options);const C=ot(()=>A7(i.current.openEvent?.type,S.interactedInside)),R=ot(V=>XU(V,r.context.triggerElements)),M=ot((V,F,G)=>{const W=r.context.triggerElements;if(W.hasElement(F))return!V||!Zt(V,F);if(!nr(G))return!1;const te=G;return W.hasMatchingElement(H=>Zt(H,te))&&(!V||!Zt(V,te))}),D=j.useCallback((V,F=!0)=>{const G=aE(E.current,"close",S.pointerType);G?S.openChangeTimeout.start(G,()=>{r.setOpen(!1,un(ts,V)),w?.events.emit("floating.closed",V)}):F&&(S.openChangeTimeout.clear(),r.setOpen(!1,un(ts,V)),w?.events.emit("floating.closed",V))},[E,r,S,w]),I=ot(()=>{if(!S.handler)return;kn(r.select("domReferenceElement")).removeEventListener("mousemove",S.handler),S.handler=void 0});j.useEffect(()=>I,[I]);const B=ot(()=>{c5(S)});return j.useEffect(()=>{if(!l)return;function V(F){F.open||(I(),S.openChangeTimeout.clear(),S.restTimeout.clear(),S.blockMouseMove=!0,S.restTimeoutPending=!1)}return s.on("openchange",V),()=>{s.off("openchange",V)}},[l,s,S,I]),j.useEffect(()=>{if(!l)return;const V=g.current??(x?r.select("domReferenceElement"):null);if(!nr(V))return;function F(W){if(S.openChangeTimeout.clear(),S.blockMouseMove=!1,d&&!T1(S.pointerType)||AD(O.current)>0&&!aE(E.current,"open"))return;const H=aE(E.current,"open",S.pointerType),J=W.currentTarget??null,re=r.select("domReferenceElement"),le=J==null?!1:M(re,J,W.target),ae=r.select("open"),N=!ae||le;le&&ae?r.setOpen(!0,un(ts,W,J)):H?S.openChangeTimeout.start(H,()=>{N&&r.setOpen(!0,un(ts,W,J))}):N&&r.setOpen(!0,un(ts,W,J))}function G(W){if(C()){B();return}I();const te=r.select("domReferenceElement"),H=kn(te);S.restTimeout.clear(),S.restTimeoutPending=!1;const J=i.current.floatingContext??b?.();if(R(W.relatedTarget))return;if(_.current&&J){r.select("open")||S.openChangeTimeout.clear();const ae=g.current;S.handler=_.current({...J,tree:w,x:W.clientX,y:W.clientY,onClose(){B(),I(),T.current&&!C()&&ae===r.select("domReferenceElement")&&D(W,!0)}}),H.addEventListener("mousemove",S.handler),S.handler(W);return}(S.pointerType!=="touch"||!Zt(r.select("floatingElement"),W.relatedTarget))&&D(W)}return m&&V.addEventListener("mousemove",F,{once:!0}),V.addEventListener("mouseenter",F),V.addEventListener("mouseleave",G),()=>{m&&V.removeEventListener("mousemove",F),V.removeEventListener("mouseenter",F),V.removeEventListener("mouseleave",G)}},[I,B,i,E,D,r,l,_,S,x,M,C,R,d,m,O,g,w,T,b]),j.useMemo(()=>{if(!l)return;function V(F){S.pointerType=F.pointerType}return{onPointerDown:V,onPointerEnter:V,onMouseMove(F){const{nativeEvent:G}=F,W=F.currentTarget,te=r.select("domReferenceElement"),H=r.select("open"),J=M(te,W,F.target);if(d&&!T1(S.pointerType))return;const re=AD(O.current);if(H&&!J||re===0||!J&&S.restTimeoutPending&&F.movementX**2+F.movementY**2<2)return;S.restTimeout.clear();function le(){if(S.restTimeoutPending=!1,C())return;const ae=r.select("open");!S.blockMouseMove&&(!ae||J)&&r.setOpen(!0,un(ts,G,W))}S.pointerType==="touch"?_s.flushSync(()=>{le()}):J&&H?le():(S.restTimeoutPending=!0,S.restTimeout.start(re,le))}}},[l,S,C,M,d,r,O])}function Vx(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=>Ow(h,e,"reference"),t),u=j.useCallback(h=>Ow(h,e,"floating"),r),f=j.useCallback(h=>Ow(h,e,"item"),i),d=j.useCallback(h=>Ow(h,e,"trigger"),s);return j.useMemo(()=>({getReferenceProps:l,getFloatingProps:u,getItemProps:f,getTriggerProps:d}),[l,u,f,d])}function Ow(e,t,r){const i=new Map,s=r==="item",l={};r==="floating"&&(l.tabIndex=-1,l[qR]="");for(const u in e)s&&e&&(u===KU||u===YU)||(l[u]=e[u]);for(let u=0;u<t.length;u+=1){let f;const d=t[u]?.[r];typeof d=="function"?f=e?d(e):null:f=d,f&&QD(l,f,s,i)}return QD(l,e,s,i),l}function QD(e,t,r,i){for(const s in t){const l=t[s];r&&(s===KU||s===YU)||(s.startsWith("on")?(i.has(s)||i.set(s,[]),typeof l=="function"&&(i.get(s)?.push(l),e[s]=(...u)=>i.get(s)?.map(f=>f(...u)).find(f=>f!==void 0))):e[s]=l)}}const mEe="Escape";function qx(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Aw(e,t){return qx(t,e===GM||e===oS,e===_f||e===Tf)}function rC(e,t,r){return qx(t,e===oS,r?e===_f:e===Tf)||e==="Enter"||e===" "||e===""}function gEe(e,t,r){return qx(t,r?e===_f:e===Tf,e===oS)}function yEe(e,t,r,i){const s=r?e===Tf:e===_f,l=e===GM;return t==="both"||t==="horizontal"&&i&&i>1?e===mEe:qx(t,s,l)}function vEe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),u=r.context.dataRef,{listRef:f,activeIndex:d,onNavigate:h=()=>{},enabled:m=!0,selectedIndex:g=null,allowEscape:v=!1,loopFocus:x=!1,nested:b=!1,rtl:w=!1,virtual:S=!1,focusItemOnOpen:_="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:O=!0,disabledIndices:T=void 0,orientation:C="vertical",parentOrientation:R,cols:M=1,id:D,resetOnPointerLeave:I=!0,externalTree:B}=t,V=_1(s),F=qa(V),G=Kf(),W=om(B);at(()=>{u.current.orientation=C},[u,C]);const te=FR(l),H=j.useRef(_),J=j.useRef(g??-1),re=j.useRef(null),le=j.useRef(!0),ae=ot(ke=>{h(J.current===-1?null:J.current,ke)}),N=j.useRef(ae),U=j.useRef(!!s),X=j.useRef(i),L=j.useRef(!1),Z=j.useRef(!1),ee=qa(T),de=qa(i),ye=qa(g),Te=qa(I),Ae=ot(()=>{function ke($e){S?W?.events.emit("virtualfocus",$e):t1($e,{sync:L.current,preventScroll:!0})}const je=f.current[J.current],Se=Z.current;je&&ke(je),(L.current?$e=>$e():requestAnimationFrame)(()=>{const $e=f.current[J.current]||je;if(!$e)return;je||ke($e),be&&(Se||!le.current)&&$e.scrollIntoView?.({block:"nearest",inline:"nearest"})})});at(()=>{m&&(i&&s?(J.current=g??-1,H.current&&g!=null&&(Z.current=!0,ae())):U.current&&(J.current=-1,N.current()))},[m,i,s,g,ae]),at(()=>{if(m){if(!i){L.current=!1;return}if(s)if(d==null){if(L.current=!1,ye.current!=null)return;if(U.current&&(J.current=-1,Ae()),(!X.current||!U.current)&&H.current&&(re.current!=null||H.current===!0&&re.current==null)){let ke=0;const je=()=>{f.current[0]==null?(ke<2&&(ke?requestAnimationFrame:queueMicrotask)(je),ke+=1):(J.current=re.current==null||rC(re.current,C,w)||b?nE(f):GR(f),re.current=null,ae())};je()}}else R1(f,d)||(J.current=d,Ae(),Z.current=!1)}},[m,i,s,d,ye,b,f,C,w,ae,Ae,ee]),at(()=>{if(!m||s||!W||S||!U.current)return;const ke=W.nodesRef.current,je=ke.find($e=>$e.id===G)?.context?.elements.floating,Se=ms(kn(s)),ze=ke.some($e=>$e.context&&Zt($e.context.elements.floating,Se));je&&!ze&&le.current&&je.focus({preventScroll:!0})},[m,s,W,G,S]),at(()=>{N.current=ae,X.current=i,U.current=!!s}),at(()=>{i||(re.current=null,H.current=_)},[i,_]);const ue=d!=null,be=j.useMemo(()=>{function ke(Se){if(!de.current)return;const ze=f.current.indexOf(Se.currentTarget);ze!==-1&&J.current!==ze&&(J.current=ze,ae(Se))}return{onFocus(Se){L.current=!0,ke(Se)},onClick:({currentTarget:Se})=>Se.focus({preventScroll:!0}),onMouseMove(Se){L.current=!0,Z.current=!1,E&&ke(Se)},onPointerLeave(Se){if(!de.current||!le.current||Se.pointerType==="touch")return;L.current=!0;const ze=Se.relatedTarget;if(!(!E||f.current.includes(ze))&&Te.current&&(t1(null,{sync:!0}),J.current=-1,ae(Se),!S)){const $e=F.current,Ze=ms(kn($e));$e&&Zt($e,Ze)&&$e.focus({preventScroll:!0})}}}},[de,F,E,f,ae,Te,S]),Ee=j.useCallback(()=>R??W?.nodesRef.current.find(ke=>ke.id===G)?.context?.dataRef?.current.orientation,[G,W,R]),xe=ot(ke=>{if(le.current=!1,L.current=!0,ke.which===229||!de.current&&ke.currentTarget===F.current)return;if(b&&yEe(ke.key,C,w,M)){Aw(ke.key,Ee())||es(ke),r.setOpen(!1,un(BT,ke.nativeEvent)),Ur(l)&&(S?W?.events.emit("virtualfocus",l):l.focus());return}const je=J.current,Se=nE(f,T),ze=GR(f,T);if(te||(ke.key==="Home"&&(es(ke),J.current=Se,ae(ke)),ke.key==="End"&&(es(ke),J.current=ze,ae(ke))),M>1){const $e=Array.from({length:f.current.length},()=>({width:1,height:1})),Ze=n7($e,M,!1),hn=Ze.findIndex(dn=>dn!=null&&!Du(f,dn,T)),vn=Ze.reduce((dn,xt,jt)=>xt!=null&&!Du(f,xt,T)?jt:dn,-1),bn=Ze[t7({current:Ze.map(dn=>dn!=null?f.current[dn]:null)},{event:ke,orientation:C,loopFocus:x,rtl:w,cols:M,disabledIndices:a7([...(typeof T!="function"?T:null)||f.current.map((dn,xt)=>Du(f,xt,T)?xt:void 0),void 0],Ze),minIndex:hn,maxIndex:vn,prevIndex:r7(J.current>ze?Se:J.current,$e,Ze,M,ke.key===oS?"bl":ke.key===(w?_f:Tf)?"tr":"tl"),stopEvent:!0})];if(bn!=null&&(J.current=bn,ae(ke)),C==="both")return}if(Aw(ke.key,C)){if(es(ke),i&&!S&&ms(ke.currentTarget.ownerDocument)===ke.currentTarget){J.current=rC(ke.key,C,w)?Se:ze,ae(ke);return}rC(ke.key,C,w)?x?je>=ze?v&&je!==f.current.length?J.current=-1:(L.current=!1,J.current=Se):J.current=ki(f,{startingIndex:je,disabledIndices:T}):J.current=Math.min(ze,ki(f,{startingIndex:je,disabledIndices:T})):x?je<=Se?v&&je!==-1?J.current=f.current.length:(L.current=!1,J.current=ze):J.current=ki(f,{startingIndex:je,decrement:!0,disabledIndices:T}):J.current=Math.max(Se,ki(f,{startingIndex:je,decrement:!0,disabledIndices:T})),R1(f,J.current)&&(J.current=-1),ae(ke)}}),Me=j.useMemo(()=>S&&i&&ue&&{"aria-activedescendant":`${D}-${d}`},[S,i,ue,D,d]),Ve=j.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...te?{}:Me,onKeyDown(ke){if(ke.key==="Tab"&&ke.shiftKey&&i&&!S){const je=ns(ke.nativeEvent);if(je&&!Zt(F.current,je))return;es(ke),r.setOpen(!1,un(Fp,ke.nativeEvent)),Ur(l)&&l.focus();return}xe(ke)},onPointerMove(){le.current=!0}}),[Me,xe,F,C,te,r,i,S,l]),Ie=j.useMemo(()=>{function ke(Se){_==="auto"&&QU(Se.nativeEvent)&&(H.current=!S)}function je(Se){H.current=_,_==="auto"&&WU(Se.nativeEvent)&&(H.current=!0)}return{onKeyDown(Se){const ze=r.select("open");le.current=!1;const $e=Se.key.startsWith("Arrow"),Ze=gEe(Se.key,Ee(),w),hn=Aw(Se.key,C),vn=(b?Ze:hn)||Se.key==="Enter"||Se.key.trim()==="";if(S&&ze)return xe(Se);if(!(!ze&&!O&&$e)){if(vn){const bn=Aw(Se.key,Ee());re.current=b&&bn?null:Se.key}if(b){Ze&&(es(Se),ze?(J.current=nE(f,ee.current),ae(Se)):r.setOpen(!0,un(BT,Se.nativeEvent,Se.currentTarget)));return}hn&&(ye.current!=null&&(J.current=ye.current),es(Se),!ze&&O?r.setOpen(!0,un(BT,Se.nativeEvent,Se.currentTarget)):xe(Se),ze&&ae(Se))}},onFocus(Se){r.select("open")&&!S&&(J.current=-1,ae(Se))},onPointerDown:je,onPointerEnter:je,onMouseDown:ke,onClick:ke}},[xe,ee,_,f,b,ae,r,O,C,Ee,w,ye,S]),Be=j.useMemo(()=>({...Me,...Ie}),[Me,Ie]);return j.useMemo(()=>m?{reference:Be,floating:Ve,item:be,trigger:Ie}:{},[m,Be,Ve,Ie,be])}const bEe=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function iV(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingId"),l=r.useState("domReferenceElement"),u=r.useState("floatingElement"),{role:f="dialog"}=t,d=Vg(),h=l?.id||d,m=j.useMemo(()=>_1(u)?.id||s,[u,s]),g=bEe.get(f)??f,x=Kf()!=null,b=j.useMemo(()=>g==="tooltip"||f==="label"?za:{"aria-haspopup":g==="alertdialog"?"dialog":g,"aria-expanded":"false",...g==="listbox"&&{role:"combobox"},...g==="menu"&&x&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[g,x,f]),w=j.useMemo(()=>g==="tooltip"||f==="label"?{[`aria-${f==="label"?"labelledby":"describedby"}`]:i?m:void 0}:{...b,"aria-expanded":i?"true":"false","aria-controls":i?m:void 0,...g==="menu"&&{id:h}},[g,m,i,h,f,b]),S=j.useMemo(()=>{const E={id:m,...g&&{role:g}};return g==="tooltip"||f==="label"?E:{...E,...g==="menu"&&{"aria-labelledby":h}}},[g,m,h,f]),_=j.useCallback(({active:E,selected:O})=>{const T={role:"option",...E&&{id:`${m}-fui-option`}};switch(f){case"select":case"combobox":return{...T,"aria-selected":O}}return{}},[m,f]);return j.useMemo(()=>({reference:w,floating:S,item:_,trigger:b}),[w,S,b,_])}function SEe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.context.dataRef,s=r.useState("open"),{listRef:l,elementsRef:u,activeIndex:f,onMatch:d,onTypingChange:h,enabled:m=!0,resetMs:g=750,selectedIndex:v=null}=t,x=yo(),b=j.useRef(""),w=j.useRef(v??f??-1),S=j.useRef(null);at(()=>{!s&&v!==null||(x.clear(),S.current=null,b.current!==""&&(b.current=""))},[s,v,x]),at(()=>{s&&b.current===""&&(w.current=v??f??-1)},[s,v,f]);const _=ot(R=>{R?i.current.typing||(i.current.typing=R,h?.(R)):i.current.typing&&(i.current.typing=R,h?.(R))}),E=ot(R=>{function M(te){const H=u?.current[te];return!H||QM(H)}function D(te,H,J=0){if(te.length===0)return-1;const re=(J%te.length+te.length)%te.length,le=H.toLocaleLowerCase();for(let ae=0;ae<te.length;ae+=1){const N=(re+ae)%te.length;if(!(!te[N]?.toLocaleLowerCase().startsWith(le)||!M(N)))return N}return-1}const I=l.current;if(b.current.length>0&&R.key===" "&&(es(R),_(!0)),b.current.length>0&&b.current[0]!==" "&&D(I,b.current)===-1&&R.key!==" "&&_(!1),I==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;s&&R.key!==" "&&(es(R),_(!0));const B=b.current==="";B&&(w.current=v??f??-1),I.every(te=>te?te[0]?.toLocaleLowerCase()!==te[1]?.toLocaleLowerCase():!0)&&b.current===R.key&&(b.current="",w.current=S.current),b.current+=R.key,x.start(g,()=>{b.current="",w.current=S.current,_(!1)});const G=((B?v??f??-1:w.current)??0)+1,W=D(I,b.current,G);W!==-1?(d?.(W),S.current=W):R.key!==" "&&(b.current="",_(!1))}),O=ot(R=>{const M=R.relatedTarget,D=r.select("domReferenceElement"),I=r.select("floatingElement"),B=Zt(D,M),V=Zt(I,M);B||V||(x.clear(),b.current="",w.current=S.current,_(!1))}),T=j.useMemo(()=>({onKeyDown:E,onBlur:O}),[E,O]),C=j.useMemo(()=>({onKeyDown:E,onBlur:O}),[E,O]);return j.useMemo(()=>m?{reference:T,floating:C}:{},[m,T,C])}const WD=.1,wEe=WD*WD,er=.5;function Mw(e,t,r,i,s,l){return i>=t!=l>=t&&e<=(s-r)*(t-i)/(l-i)+r}function jw(e,t,r,i,s,l,u,f,d,h){let m=!1;return Mw(e,t,r,i,s,l)&&(m=!m),Mw(e,t,s,l,u,f)&&(m=!m),Mw(e,t,u,f,d,h)&&(m=!m),Mw(e,t,d,h,r,i)&&(m=!m),m}function EEe(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function kw(e,t,r,i,s,l){const u=Math.min(r,s),f=Math.max(r,s),d=Math.min(i,l),h=Math.max(i,l);return e>=u&&e<=f&&t>=d&&t<=h}function xEe(e={}){const{blockPointerEvents:t=!1}=e,r=new Rl,i=({x:s,y:l,placement:u,elements:f,onClose:d,nodeId:h,tree:m})=>{const g=u?.split("-")[0];let v=!1,x=null,b=null,w=typeof performance<"u"?performance.now():0;function S(E,O){const T=performance.now(),C=T-w;if(x===null||b===null||C===0)return x=E,b=O,w=T,!1;const R=E-x,M=O-b,D=R*R+M*M,I=C*C*wEe;return x=E,b=O,w=T,D<I}function _(){r.clear(),d()}return function(O){r.clear();const T=f.domReference,C=f.floating;if(!T||!C||g==null||s==null||l==null)return;const{clientX:R,clientY:M}=O,D=ns(O),I=O.type==="mouseleave",B=Zt(C,D),V=Zt(T,D);if(B&&(v=!0,!I))return;if(V&&(v=!1,!I)){v=!0;return}if(I&&nr(O.relatedTarget)&&Zt(C,O.relatedTarget))return;function F(){return!!(m&&Nu(m.nodesRef.current,h).length>0)}function G(){F()||_()}if(F())return;const W=T.getBoundingClientRect(),te=C.getBoundingClientRect(),H=s>te.right-te.width/2,J=l>te.bottom-te.height/2,re=te.width>W.width,le=te.height>W.height,ae=(re?W:te).left,N=(re?W:te).right,U=(le?W:te).top,X=(le?W:te).bottom;if(g==="top"&&l>=W.bottom-1||g==="bottom"&&l<=W.top+1||g==="left"&&s>=W.right-1||g==="right"&&s<=W.left+1){G();return}let L=!1;switch(g){case"top":L=kw(R,M,ae,W.top+1,N,te.bottom-1);break;case"bottom":L=kw(R,M,ae,te.top+1,N,W.bottom-1);break;case"left":L=kw(R,M,te.right-1,X,W.left+1,U);break;case"right":L=kw(R,M,W.right-1,X,te.left+1,U);break}if(L)return;if(v&&!EEe(R,M,W)){G();return}if(!I&&S(R,M)){G();return}let Z=!1;switch(g){case"top":{const ee=re?er/2:er*4,de=re||H?s+ee:s-ee,ye=re?s-ee:H?s+ee:s-ee,Te=l+er+1,Ae=H||re?te.bottom-er:te.top,ue=H?re?te.bottom-er:te.top:te.bottom-er;Z=jw(R,M,de,Te,ye,Te,te.left,Ae,te.right,ue);break}case"bottom":{const ee=re?er/2:er*4,de=re||H?s+ee:s-ee,ye=re?s-ee:H?s+ee:s-ee,Te=l-er,Ae=H||re?te.top+er:te.bottom,ue=H?re?te.top+er:te.bottom:te.top+er;Z=jw(R,M,de,Te,ye,Te,te.left,Ae,te.right,ue);break}case"left":{const ee=le?er/2:er*4,de=le||J?l+ee:l-ee,ye=le?l-ee:J?l+ee:l-ee,Te=s+er+1,Ae=J||le?te.right-er:te.left,ue=J?le?te.right-er:te.left:te.right-er;Z=jw(R,M,Ae,te.top,ue,te.bottom,Te,de,Te,ye);break}case"right":{const ee=le?er/2:er*4,de=le||J?l+ee:l-ee,ye=le?l-ee:J?l+ee:l-ee,Te=s-er,Ae=J||le?te.left+er:te.right,ue=J?le?te.left+er:te.right:te.left+er;Z=jw(R,M,Te,de,Te,ye,Ae,te.top,ue,te.bottom);break}}Z?v||r.start(40,G):G()}};return i.__options={blockPointerEvents:t},i}let _Ee=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),TEe=(function(e){return e[e.open=Tp.open]="open",e[e.closed=Tp.closed]="closed",e[e.startingStyle=Tp.startingStyle]="startingStyle",e[e.endingStyle=Tp.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const oV=j.createContext(void 0);function CEe(){const e=j.useContext(oV);if(e===void 0)throw new Error(Ti(26));return e}const REe={...Gg,...Bg,nestedDialogOpen(e){return e?{[TEe.nestedDialogOpen]:""}:null}},OEe=j.forwardRef(function(t,r){const{className:i,finalFocus:s,initialFocus:l,render:u,...f}=t,{store:d}=Hg(),h=d.useState("descriptionElementId"),m=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),x=d.useState("modal"),b=d.useState("mounted"),w=d.useState("nested"),S=d.useState("nestedOpenDialogCount"),_=d.useState("open"),E=d.useState("openMethod"),O=d.useState("titleElementId"),T=d.useState("transitionStatus"),C=d.useState("role");CEe(),Gf({open:_,ref:d.context.popupRef,onComplete(){_&&d.context.onOpenChangeComplete?.(!0)}});function R(V){return V==="touch"?d.context.popupRef.current:!0}const M=l===void 0?R:l,D=S>0,B=dr("div",t,{state:{open:_,nested:w,transitionStatus:T,nestedDialogOpen:D},props:[v,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:C,tabIndex:-1,hidden:!b,onKeyDown(V){JM.has(V.key)&&V.stopPropagation()},style:{[_Ee.nestedDialogs]:S}},f],ref:[r,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:REe});return k.jsx(r5,{context:g,openInteractionType:E,disabled:!b,closeOnFocusOut:!m,initialFocus:M,returnFocus:s,modal:x!==!1,restoreFocus:"popup",children:B})}),u5=j.forwardRef(function(t,r){const{cutout:i,...s}=t;let l;if(i){const u=i?.getBoundingClientRect();l=`polygon(
140
+ 0% 0%,
141
+ 100% 0%,
142
+ 100% 100%,
143
+ 0% 100%,
144
+ 0% 0%,
145
+ ${u.left}px ${u.top}px,
146
+ ${u.left}px ${u.bottom}px,
147
+ ${u.right}px ${u.bottom}px,
148
+ ${u.right}px ${u.top}px,
149
+ ${u.left}px ${u.top}px
150
+ )`}return k.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})}),AEe=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=Hg(),u=l.useState("mounted"),f=l.useState("modal"),d=l.useState("open");return u||i?k.jsx(oV.Provider,{value:i,children:k.jsxs(t5,{ref:r,...s,children:[u&&f===!0&&k.jsx(u5,{ref:l.context.internalBackdropRef,inert:$x(!d)}),t.children]})}):null});function f5(e){const t=j.useRef(!0);t.current&&(t.current=!1,e())}let JD={},ez={},tz="";function MEe(e){if(typeof document>"u")return!1;const t=kn(e);return ga(t).innerWidth-t.documentElement.clientWidth>0}function jEe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=kn(e),i=r.documentElement,s=r.body,l=qf(i)?i:s,u=l.style.overflowY,f=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",l.style.overflowY="scroll";const d=l.offsetWidth;l.style.overflowY="hidden";const h=l.offsetWidth;return l.style.overflowY=u,i.style.scrollbarGutter=f,d===h}function kEe(e){const t=kn(e),r=t.documentElement,i=t.body,s=qf(r)?r:i,l={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,l)}}function NEe(e){const t=kn(e),r=t.documentElement,i=t.body,s=ga(r);let l=0,u=0,f=!1;const d=Gl.create();if(HM&&(s.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=s.getComputedStyle(r),x=s.getComputedStyle(i),S=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=r.scrollTop,u=r.scrollLeft,JD={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},tz=r.style.scrollBehavior,ez={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.scrollHeight>r.clientHeight,E=r.scrollWidth>r.clientWidth,O=v.overflowY==="scroll"||x.overflowY==="scroll",T=v.overflowX==="scroll"||x.overflowX==="scroll",C=Math.max(0,s.innerWidth-i.clientWidth),R=Math.max(0,s.innerHeight-i.clientHeight),M=parseFloat(x.marginTop)+parseFloat(x.marginBottom),D=parseFloat(x.marginLeft)+parseFloat(x.marginRight),I=qf(r)?r:i;if(f=jEe(e),f){r.style.scrollbarGutter=S,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:S,overflowY:"hidden",overflowX:"hidden"}),(_||O)&&(r.style.overflowY="scroll"),(E||T)&&(r.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:M||R?`calc(100dvh - ${M+R}px)`:"100dvh",width:D||C?`calc(100vw - ${D+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=u,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function m(){Object.assign(r.style,JD),Object.assign(i.style,ez),f||(r.scrollTop=l,r.scrollLeft=u,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=tz)}function g(){m(),d.request(h)}return h(),s.addEventListener("resize",g),()=>{d.cancel(),m(),typeof s.removeEventListener=="function"&&s.removeEventListener("resize",g)}}class DEe{lockCount=0;restore=null;timeoutLock=Rl.create();timeoutUnlock=Rl.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=kn(t).documentElement,s=ga(i).getComputedStyle(i).overflowY;if(s==="hidden"||s==="clip"){this.restore=mo;return}const l=GU||!MEe(t);this.restore=l?kEe(t):NEe(t)}}const zEe=new DEe;function d5(e=!0,t=null){at(()=>{if(e)return zEe.acquire(t)},[e,t])}function $Ee(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 h5(e,t){const r=j.useRef(e),i=ot(t);at(()=>{r.current!==e&&i(r.current)},[e,i]),at(()=>{r.current=e},[e])}function p5(e){const[t,r]=j.useState(null),i=ot((u,f)=>{e||r(f||(GU?"touch":""))});h5(e,u=>{u&&!e&&r(null)});const{onClick:s,onPointerDown:l}=$Ee(i);return j.useMemo(()=>({openMethod:t,triggerProps:{onClick:s,onPointerDown:l}}),[t,s,l])}function PEe(e){const{store:t,parentContext:r,actionsRef:i}=e,s=t.useState("open"),l=t.useState("disablePointerDismissal"),u=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h}=p5(s);W7(t);const{forceUnmount:m}=J7(s,t),g=ot(I=>{const B=un(I);return B.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},B}),v=j.useCallback(()=>{t.setOpen(!1,g(FU))},[t,g]);j.useImperativeHandle(i,()=>({unmount:m,close:v}),[m,v]);const x=rV({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[b,w]=j.useState(0),S=b===0,_=iV(x),E=a5(x,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(I){if(!t.context.outsidePressEnabledRef.current||"button"in I&&I.button!==0||"touches"in I&&I.touches.length!==1)return!1;const B=ns(I);if(S&&!l){const V=B;return u&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===V||t.context.backdropRef.current===V||Zt(V,f)&&!V?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:S});d5(s&&u===!0,f);const{getReferenceProps:O,getFloatingProps:T,getTriggerProps:C}=Vx([_,E]);t.useContextCallback("onNestedDialogOpen",I=>{w(I+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),j.useEffect(()=>(r?.onNestedDialogOpen&&s&&r.onNestedDialogOpen(b),r?.onNestedDialogClose&&!s&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&s&&r.onNestedDialogClose()}),[s,r,b]);const R=j.useMemo(()=>O(h),[O,h]),M=j.useMemo(()=>C(h),[C,h]),D=j.useMemo(()=>T(),[T]);t.useSyncedValues({openMethod:d,activeTriggerProps:R,inactiveTriggerProps:M,popupProps:D,floatingRootContext:x,nestedOpenDialogCount:b})}const IEe={...tV,modal:it(e=>e.modal),nested:it(e=>e.nested),nestedOpenDialogCount:it(e=>e.nestedOpenDialogCount),disablePointerDismissal:it(e=>e.disablePointerDismissal),openMethod:it(e=>e.openMethod),descriptionElementId:it(e=>e.descriptionElementId),titleElementId:it(e=>e.titleElementId),viewportElement:it(e=>e.viewportElement),role:it(e=>e.role)};class LEe extends o5{constructor(t){super(UEe(t),{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Ux,onOpenChange:void 0,onOpenChangeComplete:void 0},IEe)}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 UEe(e={}){return{...eV(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function VEe(e){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:u=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:m,defaultTriggerId:g=null}=e,v=Hg(!0),x=!!v,b=Ni(()=>h?.store??new LEe({open:i,openProp:r,activeTriggerId:g,triggerIdProp:m,modal:f,disablePointerDismissal:u,nested:x})).current;f5(()=>{r===void 0&&b.state.open===!1&&i===!0&&b.update({open:!0,activeTriggerId:g})}),b.useControlledProp("openProp",r),b.useControlledProp("triggerIdProp",m),b.useSyncedValues({disablePointerDismissal:u,nested:x,modal:f}),b.useContextCallback("onOpenChange",s),b.useContextCallback("onOpenChangeComplete",l);const w=b.useState("payload");PEe({store:b,actionsRef:d,parentContext:v?.store.context});const S=j.useMemo(()=>({store:b}),[b]);return k.jsx(C7.Provider,{value:S,children:typeof t=="function"?t({payload:w}):t})}const qEe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,...u}=t,{store:f}=Hg(),d=im(l);return f.useSyncedValueWithCleanup("titleElementId",d),dr("h2",t,{ref:r,props:[{id:d},u]})});function FEe({...e}){return k.jsx(VEe,{"data-slot":"dialog",...e})}function BEe({...e}){return k.jsx(AEe,{"data-slot":"dialog-portal",...e})}function HEe({className:e,...t}){return k.jsx(OSe,{"data-slot":"dialog-overlay",className:Vt("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 GEe({className:e,children:t,showCloseButton:r=!0,...i}){return k.jsxs(BEe,{children:[k.jsx(HEe,{}),k.jsxs(OEe,{"data-slot":"dialog-content",className:Vt("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(ASe,{"data-slot":"dialog-close",render:k.jsx(_l,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[k.jsx(IF,{}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function KEe({className:e,...t}){return k.jsx(qEe,{"data-slot":"dialog-title",className:Vt("text-sm font-medium",e),...t})}const YEe=()=>{const e=Uf(),[t,r]=j.useState(!1);return e._meta&&Object.keys(e._meta).length>0?k.jsxs(k.Fragment,{children:[k.jsxs(_l,{variant:"ghost",size:"default",onClick:()=>r(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[k.jsx(wF,{className:"h-4 w-4"}),"Metadata"]}),k.jsx(FEe,{open:t,onOpenChange:r,children:k.jsxs(GEe,{className:"sm:max-w-2xl",children:[k.jsx(KEe,{children:"Tool Metadata"}),k.jsx("div",{className:"text-xs",children:k.jsx(Ix,{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},ZEe={"ui:submitButtonOptions":{norender:!0}},XEe=({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(tSe,{children:k.jsx(nSe,{children:k.jsx(Nbe,{ref:i,schema:e??{},validator:ege,uiSchema:ZEe,formData:t,onChange:l=>r(l.formData),showErrorList:!1,templates:{FieldTemplate:l=>{const{id:u,classNames:f,style:d,label:h,required:m,errors:g,children:v}=l;return k.jsxs("div",{className:Vt("flex flex-col gap-2",f),style:d,children:[k.jsxs("label",{htmlFor:u,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}})})}),QEe=({formData:e,setFormData:t})=>{const[r,i]=j.useState(JSON.stringify(e,null,2));j.useEffect(()=>{i(JSON.stringify(e,null,2))},[e]);const s=l=>{i(l);try{const u=JSON.parse(l);t(u)}catch{}};return k.jsx("div",{className:"flex flex-col gap-2",children:k.jsx("textarea",{className:"w-full h-full p-2 rounded-md border border-border",rows:12,value:r,onChange:l=>s(l.target.value)})})},WEe=()=>{const e=j.useRef(null),t=Uf(),{setToolData:r}=kg(),s=Ng(t.name)?.input??{},l=u=>{r(t.name,{input:u??{}})};return k.jsxs("div",{className:Vt("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(YEe,{}),k.jsx(vSe,{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.jsxs(b7,{defaultValue:"form",children:[k.jsxs(S7,{children:[k.jsx(Jb,{value:"form",children:"Form"}),k.jsx(Jb,{value:"json",children:"JSON"})]}),k.jsx(e1,{value:"form",children:k.jsx(XEe,{schema:t.inputSchema,formData:s,setFormData:l,ref:e},t.name)}),k.jsx(e1,{value:"json",children:k.jsx(QEe,{formData:s,setFormData:l},t.name)})]})})]})},JEe=Hu("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 exe({className:e,orientation:t,...r}){return k.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:Vt(JEe({orientation:t}),e),...r})}function txe({className:e,...t}){return k.jsx("label",{"data-slot":"label",className:Vt("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 nxe({className:e,...t}){return k.jsx("fieldset",{"data-slot":"field-set",className:Vt("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const rxe=Hu("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 of({className:e,orientation:t="vertical",...r}){return k.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:Vt(rxe({orientation:t}),e),...r})}function sf({className:e,...t}){return k.jsx(txe,{"data-slot":"field-label",className:Vt("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 nz=(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 axe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Lb={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},ixe={disabled:!1,...Lb},m5={valid(e){return e===null?null:e?{[nz.valid]:""}:{[nz.invalid]:""}}},oxe=j.createContext({invalid:void 0,name:void 0,validityData:{state:axe,errors:[],error:"",value:"",initialValue:null},setValidityData:mo,disabled:void 0,touched:Lb.touched,setTouched:mo,dirty:Lb.dirty,setDirty:mo,filled:Lb.filled,setFilled:mo,focused:Lb.focused,setFocused:mo,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:ixe,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=za)=>e,getInputValidationProps:(e=za)=>e,inputRef:{current:null},commit:async()=>{}}});function Kg(e=!0){const t=j.useContext(oxe);if(t.setValidityData===mo&&!e)throw new Error(Ti(28));return t}const sxe=j.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:mo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function g5(){return j.useContext(sxe)}const lxe=j.createContext({controlId:void 0,registerControlId:mo,labelId:void 0,setLabelId:mo,messageIds:[],setMessageIds:mo,getDescriptionProps:e=>e});function Fx(){return j.useContext(lxe)}function cxe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Bx(e={}){const{id:t,implicit:r=!1,controlRef:i}=e,{controlId:s,registerControlId:l}=Fx(),u=im(t),f=r?s:void 0,d=Ni(()=>Symbol("labelable-control")),h=j.useRef(!1),m=j.useRef(t!=null),g=ot(()=>{!h.current||l===mo||(h.current=!1,l(d.current,void 0))});return at(()=>{if(l===mo)return;let v;if(r){const x=i?.current;nr(x)&&x.closest("label")!=null?v=t??null:v=f??u}else if(t!=null)m.current=!0,v=t;else if(m.current)v=u;else{g();return}if(v===void 0){g();return}h.current=!0,l(d.current,v)},[t,i,f,l,r,u,d,g]),j.useEffect(()=>g,[g]),s??u}function y5(e){const{enabled:t=!0,value:r,id:i,name:s,controlRef:l,commit:u}=e,{formRef:f}=g5(),{invalid:d,markedDirtyRef:h,validityData:m,setValidityData:g}=Kg(),v=ot(e.getValue);at(()=>{if(!t)return;let x=r;x===void 0&&(x=v()),m.initialValue===null&&x!==null&&g(b=>({...b,initialValue:x}))},[t,g,r,m.initialValue,v]),at(()=>{!t||!i||f.current.fields.set(i,{getValue:v,name:s,controlRef:l,validityData:cxe(m,d),validate(x=!0){let b=r;b===void 0&&(b=v()),h.current=!0,x?_s.flushSync(()=>u(b)):u(b)}})},[u,l,t,f,v,i,d,h,s,m,r]),at(()=>{const x=f.current.fields;return()=>{i&&x.delete(i)}},[f,i])}const uxe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,name:u,value:f,disabled:d=!1,onValueChange:h,defaultValue:m,autoFocus:g=!1,...v}=t,{state:x,name:b,disabled:w,setTouched:S,setDirty:_,validityData:E,setFocused:O,setFilled:T,validationMode:C,validation:R}=Kg(),M=w||d,D=b??u,I={...x,disabled:M},{labelId:B}=Fx(),V=Bx({id:l});at(()=>{const J=f!=null;R.inputRef.current?.value||J&&f!==""?T(!0):J&&f===""&&T(!1)},[R.inputRef,T,f]);const F=j.useRef(null);at(()=>{g&&F.current===ms(kn(F.current))&&O(!0)},[g,O]);const[G]=x1({controlled:f,default:m,name:"FieldControl",state:"value"}),W=f!==void 0,te=W?G:void 0;return y5({id:V,name:D,commit:R.commit,value:te,getValue:()=>R.inputRef.current?.value,controlRef:R.inputRef}),dr("input",t,{ref:[r,F],state:I,props:[{id:V,disabled:M,name:D,ref:R.inputRef,"aria-labelledby":B,autoFocus:g,...W?{value:te}:{defaultValue:m},onChange(J){const re=J.currentTarget.value;h?.(re,un(qp,J.nativeEvent)),_(re!==E.initialValue),T(re!=="")},onFocus(){O(!0)},onBlur(J){S(!0),O(!1),C==="onBlur"&&R.commit(J.currentTarget.value)},onKeyDown(J){J.currentTarget.tagName==="INPUT"&&J.key==="Enter"&&(S(!0),R.commit(J.currentTarget.value))}},R.getInputValidationProps(),v],stateAttributesMapping:m5})}),fxe=j.forwardRef(function(t,r){return k.jsx(uxe,{ref:r,...t})});function aC({className:e,type:t,...r}){return k.jsx(fxe,{type:t,"data-slot":"input",className:Vt("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})}const sV=j.createContext(null),lV=j.createContext(null);function uc(){const e=j.useContext(sV);if(e===null)throw new Error(Ti(60));return e}function cV(){const e=j.useContext(lV);if(e===null)throw new Error(Ti(61));return e}const dxe=(e,t)=>Object.is(e,t);function _g(e,t,r){return e==null||t==null?Object.is(e,t):r(e,t)}function hxe(e,t,r){return!e||e.length===0?!1:e.some(i=>i===void 0?!1:_g(t,i,r))}function n1(e,t,r){return!e||e.length===0?-1:e.findIndex(i=>i===void 0?!1:_g(i,t,r))}function pxe(e,t,r){return e.filter(i=>!_g(t,i,r))}function JR(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function uV(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function mxe(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(uV(t)){for(const r of t)for(const i of r.items)if(i&&i.value==null&&i.label!=null)return!0;return!1}for(const r of t)if(r&&r.value==null&&r.label!=null)return!0;return!1}function gxe(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 JR(e)}function $m(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?JR(e.value):JR(e)}function fV(e,t,r){function i(){return gxe(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=t,l=uV(s)?s.flatMap(u=>u.items):s;if(e==null||typeof e!="object"){const u=l.find(f=>f.value===e);return u&&u.label!=null?u.label:i()}if("value"in e){const u=l.find(f=>f&&f.value===e.value);if(u&&u.label!=null)return u.label}}return i()}function yxe(e,t,r){return e.reduce((i,s,l)=>(l>0&&i.push(", "),i.push(k.jsx(j.Fragment,{children:fV(s,t,r)},l)),i),[])}const Rt={id:it(e=>e.id),labelId:it(e=>e.labelId),modal:it(e=>e.modal),multiple:it(e=>e.multiple),items:it(e=>e.items),itemToStringLabel:it(e=>e.itemToStringLabel),itemToStringValue:it(e=>e.itemToStringValue),isItemEqualToValue:it(e=>e.isItemEqualToValue),value:it(e=>e.value),hasSelectedValue:it(e=>{const{value:t,multiple:r,itemToStringValue:i}=e;return t==null?!1:r&&Array.isArray(t)?t.length>0:$m(t,i)!==""}),hasNullItemLabel:it((e,t)=>t?mxe(e.items):!1),open:it(e=>e.open),mounted:it(e=>e.mounted),forceMount:it(e=>e.forceMount),transitionStatus:it(e=>e.transitionStatus),openMethod:it(e=>e.openMethod),activeIndex:it(e=>e.activeIndex),selectedIndex:it(e=>e.selectedIndex),isActive:it((e,t)=>e.activeIndex===t),isSelected:it((e,t,r)=>{const i=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(l=>_g(r,l,i)):e.selectedIndex===t&&e.selectedIndex!==null?!0:_g(r,s,i)}),isSelectedByFocus:it((e,t)=>e.selectedIndex===t),popupProps:it(e=>e.popupProps),triggerProps:it(e=>e.triggerProps),triggerElement:it(e=>e.triggerElement),positionerElement:it(e=>e.positionerElement),listElement:it(e=>e.listElement),scrollUpArrowVisible:it(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:it(e=>e.scrollDownArrowVisible),hasScrollArrows:it(e=>e.hasScrollArrows)};function vxe(e){const{id:t,value:r,defaultValue:i=null,onValueChange:s,open:l,defaultOpen:u=!1,onOpenChange:f,name:d,autoComplete:h,disabled:m=!1,readOnly:g=!1,required:v=!1,modal:x=!0,actionsRef:b,inputRef:w,onOpenChangeComplete:S,items:_,multiple:E=!1,itemToStringLabel:O,itemToStringValue:T,isItemEqualToValue:C=dxe,highlightItemOnHover:R=!0,children:M}=e,{clearErrors:D}=g5(),{setDirty:I,setTouched:B,setFocused:V,shouldValidateOnChange:F,validityData:G,setFilled:W,name:te,disabled:H,validation:J,validationMode:re}=Kg(),le=Bx({id:t}),ae=H||m,N=te??d,[U,X]=x1({controlled:r,default:E?i??m1:i,name:"Select",state:"value"}),[L,Z]=x1({controlled:l,default:u,name:"Select",state:"open"}),ee=j.useRef([]),de=j.useRef([]),ye=j.useRef(null),Te=j.useRef(null),Ae=j.useRef(0),ue=j.useRef(null),be=j.useRef([]),Ee=j.useRef(!1),xe=j.useRef(!1),Me=j.useRef(null),Ve=j.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ie=j.useRef(!1),{mounted:Be,setMounted:ke,transitionStatus:je}=lS(L),{openMethod:Se,triggerProps:ze}=p5(L),$e=Ni(()=>new Q7({id:le,labelId:void 0,modal:x,multiple:E,itemToStringLabel:O,itemToStringValue:T,isItemEqualToValue:C,value:U,open:L,mounted:Be,transitionStatus:je,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ze=At($e,Rt.activeIndex),hn=At($e,Rt.selectedIndex),vn=At($e,Rt.triggerElement),bn=At($e,Rt.positionerElement),dn=j.useMemo(()=>E&&Array.isArray(U)&&U.length===0?"":$m(U,T),[E,U,T]),xt=j.useMemo(()=>E&&Array.isArray(U)?U.map(qt=>$m(qt,T)):$m(U,T),[E,U,T]),jt=qa($e.state.triggerElement);y5({id:le,commit:J.commit,value:U,controlRef:jt,name:N,getValue:()=>xt});const pn=j.useRef(U);at(()=>{U!==pn.current&&$e.set("forceMount",!0)},[$e,U]),at(()=>{W(E?Array.isArray(U)&&U.length>0:U!=null)},[E,U,W]),at(function(){if(L)return;const mn=be.current;if(E){const Kr=Array.isArray(U)?U:[];if(Kr.length===0){$e.set("selectedIndex",null);return}const jn=Kr[Kr.length-1],Yr=n1(mn,jn,C);$e.set("selectedIndex",Yr===-1?null:Yr);return}const $r=n1(mn,U,C);$e.set("selectedIndex",$r===-1?null:$r)},[E,L,U,be,C,$e]),h5(U,()=>{D(N),I(U!==G.initialValue),F()?J.commit(U):J.commit(U,!0)});const yr=ot((qt,mn)=>{if(f?.(qt,mn),!mn.isCanceled&&(Z(qt),!qt&&(mn.reason===Fp||mn.reason===BM)&&(B(!0),V(!1),re==="onBlur"&&J.commit(U)),!qt&&$e.state.activeIndex!==null)){const $r=ee.current[$e.state.activeIndex];queueMicrotask(()=>{$r?.setAttribute("tabindex","-1")})}}),vr=ot(()=>{ke(!1),$e.set("activeIndex",null),S?.(!1)});Gf({enabled:!b,open:L,ref:ye,onComplete(){L||vr()}}),j.useImperativeHandle(b,()=>({unmount:vr}),[vr]);const Gt=ot((qt,mn)=>{s?.(qt,mn),!mn.isCanceled&&X(qt)}),An=ot(()=>{const qt=$e.state.listElement||ye.current;if(!qt)return;const mn=qt.scrollTop,$r=qt.scrollTop+qt.clientHeight,Kr=mn>1,jn=$r<qt.scrollHeight-1;$e.state.scrollUpArrowVisible!==Kr&&$e.set("scrollUpArrowVisible",Kr),$e.state.scrollDownArrowVisible!==jn&&$e.set("scrollDownArrowVisible",jn)}),Dt=nV({open:L,onOpenChange:yr,elements:{reference:vn,floating:bn}}),Kt=I7(Dt,{enabled:!g&&!ae,event:"mousedown"}),Wn=a5(Dt,{bubbles:!1}),ir=vEe(Dt,{enabled:!g&&!ae,listRef:ee,activeIndex:Ze,selectedIndex:hn,disabledIndices:m1,onNavigate(qt){qt===null&&!L||$e.set("activeIndex",qt)},focusItemOnHover:!1}),Pn=SEe(Dt,{enabled:!g&&!ae&&(L||!E),listRef:de,activeIndex:Ze,selectedIndex:hn,onMatch(qt){L?$e.set("activeIndex",qt):Gt(be.current[qt],un("none"))},onTypingChange(qt){Ee.current=qt}}),{getReferenceProps:Rn,getFloatingProps:Bn,getItemProps:Mn}=Vx([Kt,Wn,ir,Pn]),br=j.useMemo(()=>Z1(Rn(),ze,le?{id:le}:za),[Rn,ze,le]);f5(()=>{$e.update({popupProps:Bn(),triggerProps:br})}),at(()=>{$e.update({id:le,modal:x,multiple:E,value:U,open:L,mounted:Be,transitionStatus:je,popupProps:Bn(),triggerProps:br,items:_,itemToStringLabel:O,itemToStringValue:T,isItemEqualToValue:C,openMethod:Se})},[$e,le,x,E,U,L,Be,je,Bn,br,_,O,T,C,Se]);const zr=j.useMemo(()=>({store:$e,name:N,required:v,disabled:ae,readOnly:g,multiple:E,itemToStringLabel:O,itemToStringValue:T,highlightItemOnHover:R,setValue:Gt,setOpen:yr,listRef:ee,popupRef:ye,scrollHandlerRef:Te,handleScrollArrowVisibility:An,scrollArrowsMountedCountRef:Ae,getItemProps:Mn,events:Dt.context.events,valueRef:ue,valuesRef:be,labelsRef:de,typingRef:Ee,selectionRef:Ve,selectedItemTextRef:Me,validation:J,onOpenChangeComplete:S,keyboardActiveRef:xe,alignItemWithTriggerActiveRef:Ie,initialValueRef:pn}),[$e,N,v,ae,g,E,O,T,R,Gt,yr,Mn,Dt.context.events,J,S,An]),wo=Pu(w,J.inputRef),Ia=E&&Array.isArray(U)&&U.length>0,Gr=E?void 0:N,ea=j.useMemo(()=>!E||!Array.isArray(U)||!N?null:U.map(qt=>{const mn=$m(qt,T);return k.jsx("input",{type:"hidden",name:N,value:mn},mn)}),[E,U,N,T]);return k.jsx(sV.Provider,{value:zr,children:k.jsxs(lV.Provider,{value:Dt,children:[M,k.jsx("input",{...J.getInputValidationProps({onFocus(){$e.state.triggerElement?.focus({focusVisible:!0})},onChange(qt){if(qt.nativeEvent.defaultPrevented)return;const mn=qt.target.value,$r=un(qp,qt.nativeEvent);function Kr(){if(E)return;const jn=be.current.find(Yr=>$m(Yr,T).toLowerCase()===mn.toLowerCase());jn!=null&&(I(jn!==G.initialValue),Gt(jn,$r),F()&&J.commit(jn))}$e.set("forceMount",!0),queueMicrotask(Kr)}}),id:le&&Gr==null?`${le}-hidden-input`:void 0,name:Gr,autoComplete:h,value:dn,disabled:ae,required:v&&!Ia,readOnly:g,ref:wo,style:N?j7:e5,tabIndex:-1,"aria-hidden":!0}),ea]})})}function bxe(e,t){return e??t}function Sxe(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,u=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,u,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 Nw=2,wxe=400,rz=200,Exe={...O7,...m5,value:()=>null},xxe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,disabled:u=!1,nativeButton:f=!0,...d}=t,{setTouched:h,setFocused:m,validationMode:g,state:v,disabled:x}=Kg(),{labelId:b}=Fx(),{store:w,setOpen:S,selectionRef:_,validation:E,readOnly:O,required:T,alignItemWithTriggerActiveRef:C,disabled:R,keyboardActiveRef:M}=uc(),D=x||R||u,I=At(w,Rt.open),B=At(w,Rt.value),V=At(w,Rt.triggerProps),F=At(w,Rt.positionerElement),G=At(w,Rt.listElement),W=At(w,Rt.id),te=At(w,Rt.labelId),H=At(w,Rt.hasSelectedValue),J=!H&&I,re=At(w,Rt.hasNullItemLabel,J),le=l??W,ae=bxe(b,te);Bx({id:le});const N=qa(F),U=j.useRef(null),{getButtonProps:X,buttonRef:L}=Jp({disabled:D,native:f}),Z=ot(xe=>{w.set("triggerElement",xe)}),ee=Pu(r,U,L,Z),de=yo(),ye=yo(),Te=yo(),Ae=yo();j.useEffect(()=>{if(I)return!(H||re)?Te.start(wxe,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}):Ae.start(rz,()=>{_.current.allowUnselectedMouseUp=!0,Te.start(rz,()=>{_.current.allowSelectedMouseUp=!0})}),()=>{Te.clear(),Ae.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ye.clear()},[I,H,re,_,ye,Te,Ae]);const ue=j.useMemo(()=>G?.id??_1(F)?.id,[G,F]),be=Z1(V,{id:le,role:"combobox","aria-expanded":I?"true":"false","aria-haspopup":"listbox","aria-controls":I?ue:void 0,"aria-labelledby":ae,"aria-readonly":O||void 0,"aria-required":T||void 0,tabIndex:D?-1:0,ref:ee,onFocus(xe){m(!0),I&&C.current&&S(!1,un(qp,xe.nativeEvent)),de.start(0,()=>{w.set("forceMount",!0)})},onBlur(xe){Zt(F,xe.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&E.commit(B))},onPointerMove(){M.current=!1},onKeyDown(){M.current=!0},onMouseDown(xe){if(I)return;const Me=kn(xe.currentTarget);function Ve(Ie){if(!U.current)return;const Be=Ie.target;if(Zt(U.current,Be)||Zt(N.current,Be)||Be===U.current)return;const ke=Sxe(U.current);Ie.clientX>=ke.left-Nw&&Ie.clientX<=ke.right+Nw&&Ie.clientY>=ke.top-Nw&&Ie.clientY<=ke.bottom+Nw||S(!1,un(Hbe,Ie))}ye.start(0,()=>{Me.addEventListener("mouseup",Ve,{once:!0})})}},E.getValidationProps,d,X);be.role="combobox";const Ee={...v,open:I,disabled:D,value:B,readOnly:O,placeholder:!H};return dr("button",t,{ref:[r,U],state:Ee,stateAttributesMapping:Exe,props:be})}),_xe={value:()=>null},Txe=j.forwardRef(function(t,r){const{className:i,render:s,children:l,placeholder:u,...f}=t,{store:d,valueRef:h}=uc(),m=At(d,Rt.value),g=At(d,Rt.items),v=At(d,Rt.itemToStringLabel),x=At(d,Rt.hasSelectedValue),b=!x&&u!=null&&l==null,w=At(d,Rt.hasNullItemLabel,b),S={value:m,placeholder:!x};let _=null;return typeof l=="function"?_=l(m):l!=null?_=l:!x&&u!=null&&!w?_=u:Array.isArray(m)?_=yxe(m,g,v):_=fV(m,g,v),dr("span",t,{state:S,ref:[r,h],props:[{children:_},f],stateAttributesMapping:_xe})}),Cxe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:u}=uc(),d={open:At(u,Rt.open)};return dr("span",t,{state:d,ref:r,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:R7})}),Rxe=j.createContext(void 0),Oxe=j.forwardRef(function(t,r){const{store:i}=uc(),s=At(i,Rt.mounted),l=At(i,Rt.forceMount);return s||l?k.jsx(Rxe.Provider,{value:!0,children:k.jsx(t5,{ref:r,...t})}):null}),Axe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:s,rects:l,platform:u,elements:f,middlewareData:d}=t,{element:h,padding:m=0,offsetParent:g="real"}=Uu(e,t)||{};if(h==null)return{};const v=e7(m),x={x:r,y:i},b=XM(s),w=ZM(b),S=await u.getDimensions(h),_=b==="y",E=_?"top":"left",O=_?"bottom":"right",T=_?"clientHeight":"clientWidth",C=l.reference[w]+l.reference[b]-x[b]-l.floating[w],R=x[b]-l.reference[b],M=g==="real"?await u.getOffsetParent?.(h):f.floating;let D=f.floating[T]||l.floating[w];(!D||!await u.isElement?.(M))&&(D=f.floating[T]||l.floating[w]);const I=C/2-R/2,B=D/2-S[w]/2-1,V=Math.min(v[E],B),F=Math.min(v[O],B),G=V,W=D-S[w]-F,te=D/2-S[w]/2+I,H=BR(G,te,W),J=!d.arrow&&Hf(s)!=null&&te!==H&&l.reference[w]/2-(te<G?V:F)-S[w]/2<0,re=J?te<G?te-G:te-W:0;return{[b]:x[b]+re,data:{[b]:H,centerOffset:te-H-re,...J&&{alignmentOffset:re}},reset:J}}}),Mxe=(e,t)=>({...Axe(e),options:[e,t]}),jxe={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 kwe().fn(e)).data?.referenceHidden||l}}}},oE={sideX:"left",sideY:"top"},kxe={name:"adaptiveOrigin",async fn(e){const{x:t,y:r,rects:{floating:i},elements:{floating:s},platform:l,strategy:u,placement:f}=e,d=ga(s),h=d.getComputedStyle(s);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:r,data:oE};const g=await l.getOffsetParent?.(s);let v={width:0,height:0};if(u==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const E=kn(s);v={width:E.documentElement.clientWidth,height:E.documentElement.clientHeight}}else await l.isElement?.(g)&&(v=await l.getDimensions(g));const x=vo(f);let b=t,w=r;x==="left"&&(b=v.width-(t+i.width)),x==="top"&&(w=v.height-(r+i.height));const S=x==="left"?"right":oE.sideX,_=x==="top"?"bottom":oE.sideY;return{x:b,y:w,data:{sideX:S,sideY:_}}}};function dV(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 az(e,t,r){const{rects:i,placement:s}=e;return{side:dV(t,vo(s),r),align:Hf(s)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function hV(e){const{anchor:t,positionMethod:r="absolute",side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:u=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:x,mounted:b,collisionAvoidance:w,shiftCrossAxis:S=!1,nodeId:_,adaptiveOrigin:E,lazyFlip:O=!1,externalTree:T}=e,[C,R]=j.useState(null);!b&&C!==null&&R(null);const M=w.side||"flip",D=w.align||"flip",I=w.fallbackAxisSide||"end",B=typeof t=="function"?t:void 0,V=ot(B),F=B?V:t,G=qa(t),te=UM()==="rtl",H=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":te?"left":"right","inline-start":te?"right":"left"}[i],J=l==="center"?H:`${H}-${l}`;let re=d;const le=1,ae=i==="bottom"?le:0,N=i==="top"?le:0,U=i==="right"?le:0,X=i==="left"?le:0;typeof re=="number"?re={top:re+ae,right:re+X,bottom:re+N,left:re+U}:re&&(re={top:(re.top||0)+ae,right:(re.right||0)+X,bottom:(re.bottom||0)+N,left:(re.left||0)+U});const L={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:re},Z=j.useRef(null),ee=qa(s),de=qa(u),Ae=[Rwe(Kt=>{const Wn=az(Kt,i,te),ir=typeof ee.current=="function"?ee.current(Wn):ee.current,Pn=typeof de.current=="function"?de.current(Wn):de.current;return{mainAxis:ir,crossAxis:Pn,alignmentAxis:Pn}},[typeof s!="function"?s:0,typeof u!="function"?u:0,te,i])],ue=D==="none"&&M!=="shift",be=!ue&&(h||S||M==="shift"),Ee=M==="none"?null:Mwe({...L,padding:{top:re.top+le,right:re.right+le,bottom:re.bottom+le,left:re.left+le},mainAxis:!S&&M==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:I}),xe=ue?null:Owe(Kt=>{const Wn=kn(Kt.elements.floating).documentElement;return{...L,rootBoundary:S?{x:0,y:0,width:Wn.clientWidth,height:Wn.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:be,limiter:h||S?void 0:Awe(ir=>{if(!Z.current)return{};const{width:Pn,height:Rn}=Z.current.getBoundingClientRect(),Bn=vs(vo(ir.placement)),Mn=Bn==="y"?Pn:Rn,br=Bn==="y"?re.left+re.right:re.top+re.bottom;return{offset:Mn/2+br/2}})}},[L,h,S,re,D]);M==="shift"||D==="shift"||l==="center"?Ae.push(xe,Ee):Ae.push(Ee,xe),Ae.push(jwe({...L,apply({elements:{floating:Kt},availableWidth:Wn,availableHeight:ir,rects:Pn}){const Rn=Kt.style;Rn.setProperty("--available-width",`${Wn}px`),Rn.setProperty("--available-height",`${ir}px`);const Bn=window.devicePixelRatio||1,{x:Mn,y:br,width:zr,height:wo}=Pn.reference,Ia=(Math.round((Mn+zr)*Bn)-Math.round(Mn*Bn))/Bn,Gr=(Math.round((br+wo)*Bn)-Math.round(br*Bn))/Bn;Rn.setProperty("--anchor-width",`${Ia}px`),Rn.setProperty("--anchor-height",`${Gr}px`)}}),Mxe(()=>({element:Z.current||document.createElement("div"),padding:m,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(Kt){const{elements:Wn,middlewareData:ir,placement:Pn,rects:Rn,y:Bn}=Kt,Mn=vo(Pn),br=vs(Mn),zr=Z.current,wo=ir.arrow?.x||0,Ia=ir.arrow?.y||0,Gr=zr?.clientWidth||0,ea=zr?.clientHeight||0,qt=wo+Gr/2,mn=Ia+ea/2,$r=Math.abs(ir.shift?.y||0),Kr=Rn.reference.height/2,jn=typeof s=="function"?s(az(Kt,i,te)):s,Yr=$r>jn,Ml={top:`${qt}px calc(100% + ${jn}px)`,bottom:`${qt}px ${-jn}px`,left:`calc(100% + ${jn}px) ${mn}px`,right:`${-jn}px ${mn}px`}[Mn],jl=`${qt}px ${Rn.reference.y+Kr-Bn}px`;return Wn.floating.style.setProperty("--transform-origin",be&&br==="y"&&Yr?jl:Ml),{}}},jxe,E),at(()=>{!b&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,x]);const Me=j.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:Ve,elements:Ie,x:Be,y:ke,middlewareData:je,update:Se,placement:ze,context:$e,isPositioned:Ze,floatingStyles:hn}=lEe({rootContext:x,placement:J,middleware:Ae,strategy:r,whileElementsMounted:v?void 0:(...Kt)=>FD(...Kt,Me),nodeId:_,externalTree:T}),{sideX:vn,sideY:bn}=je.adaptiveOrigin||oE,dn=Ze?r:"fixed",xt=j.useMemo(()=>{const Kt=E?{position:dn,[vn]:Be,[bn]:ke}:{position:dn,...hn};return Ze||(Kt.opacity=0),Kt},[E,dn,vn,Be,bn,ke,hn,Ze]),jt=j.useRef(null);at(()=>{if(!b)return;const Kt=G.current,Wn=typeof Kt=="function"?Kt():Kt,Pn=(iz(Wn)?Wn.current:Wn)||null||null;Pn!==jt.current&&(Ve.setPositionReference(Pn),jt.current=Pn)},[b,Ve,F,G]),j.useEffect(()=>{if(!b)return;const Kt=G.current;typeof Kt!="function"&&iz(Kt)&&Kt.current!==jt.current&&(Ve.setPositionReference(Kt.current),jt.current=Kt.current)},[b,Ve,F,G]),j.useEffect(()=>{if(v&&b&&Ie.domReference&&Ie.floating)return FD(Ie.domReference,Ie.floating,Se,Me)},[v,b,Ie,Se,Me]);const pn=vo(ze),yr=dV(i,pn,te),vr=Hf(ze)||"center",Gt=!!je.hide?.referenceHidden;at(()=>{O&&b&&Ze&&R(pn)},[O,b,Ze,pn]);const An=j.useMemo(()=>({position:"absolute",top:je.arrow?.y,left:je.arrow?.x}),[je.arrow]),Dt=je.arrow?.centerOffset!==0;return j.useMemo(()=>({positionerStyles:xt,arrowStyles:An,arrowRef:Z,arrowUncentered:Dt,side:yr,align:vr,physicalSide:pn,anchorHidden:Gt,refs:Ve,context:$e,isPositioned:Ze,update:Se}),[xt,An,Z,Dt,yr,vr,pn,Gt,Ve,$e,Ze,Se])}function iz(e){return e!=null&&"current"in e}const pV=j.createContext(void 0);function v5(){const e=j.useContext(pV);if(!e)throw new Error(Ti(59));return e}function Hx(e){return e==="starting"?gie:za}function KE(e,t){e&&Object.assign(e.style,t)}const mV={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Nxe={position:"fixed"},Dxe=j.forwardRef(function(t,r){const{anchor:i,positionMethod:s="absolute",className:l,render:u,side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:w,alignItemWithTrigger:S=!0,collisionAvoidance:_=yie,...E}=t,{store:O,listRef:T,labelsRef:C,alignItemWithTriggerActiveRef:R,selectedItemTextRef:M,valuesRef:D,initialValueRef:I,popupRef:B,setValue:V}=uc(),F=cV(),G=At(O,Rt.open),W=At(O,Rt.mounted),te=At(O,Rt.modal),H=At(O,Rt.value),J=At(O,Rt.openMethod),re=At(O,Rt.positionerElement),le=At(O,Rt.triggerElement),ae=At(O,Rt.isItemEqualToValue),N=At(O,Rt.transitionStatus),U=j.useRef(null),X=j.useRef(null),[L,Z]=j.useState(S),ee=W&&L&&J!=="touch";!W&&L!==S&&Z(S),at(()=>{W||(Rt.scrollUpArrowVisible(O.state)&&O.set("scrollUpArrowVisible",!1),Rt.scrollDownArrowVisible(O.state)&&O.set("scrollDownArrowVisible",!1))},[O,W]),j.useImperativeHandle(R,()=>ee),d5((ee||te)&&G&&J!=="touch",le);const de=hV({anchor:i,floatingRootContext:F,positionMethod:s,mounted:W,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:x,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:w??ee,collisionAvoidance:_,keepMounted:!0}),ye=ee?"none":de.side,Te=ee?Nxe:de.positionerStyles,Ae=j.useMemo(()=>{const Ie={};return G||(Ie.pointerEvents="none"),{role:"presentation",hidden:!W,style:{...Te,...Ie}}},[G,W,Te]),ue={open:G,side:ye,align:de.align,anchorHidden:de.anchorHidden},be=ot(Ie=>{O.set("positionerElement",Ie)}),Ee=dr("div",t,{ref:[r,be],state:ue,stateAttributesMapping:Gg,props:[Ae,Hx(N),E]}),xe=j.useRef(0),Me=ot(Ie=>{if(Ie.size===0&&xe.current===0||D.current.length===0)return;const Be=xe.current;if(xe.current=Ie.size,Ie.size===Be)return;const ke=un(qp);if(Be!==0&&!O.state.multiple&&H!==null&&n1(D.current,H,ae)===-1){const Se=I.current,$e=Se!=null&&n1(D.current,Se,ae)!==-1?Se:null;V($e,ke),$e===null&&(O.set("selectedIndex",null),M.current=null)}if(Be!==0&&O.state.multiple&&Array.isArray(H)){const je=ze=>n1(D.current,ze,ae)!==-1,Se=H.filter(ze=>je(ze));(Se.length!==H.length||Se.some(ze=>!hxe(H,ze,ae)))&&(V(Se,ke),Se.length===0&&(O.set("selectedIndex",null),M.current=null))}if(G&&ee){O.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const je={height:""};KE(re,je),KE(B.current,je)}}),Ve=j.useMemo(()=>({...de,side:ye,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:Z,scrollUpArrowRef:U,scrollDownArrowRef:X}),[de,ye,ee,Z]);return k.jsx(LM,{elementsRef:T,labelsRef:C,onMapChange:Me,children:k.jsxs(pV.Provider,{value:Ve,children:[W&&te&&k.jsx(u5,{inert:$x(!G),cutout:le}),Ee]})})});function gV(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 Dw="base-ui-disable-scrollbar",eO={className:Dw,getElement(e){return k.jsx("style",{nonce:e,href:Dw,precedence:"base-ui:low",children:`.${Dw}{scrollbar-width:none}.${Dw}::-webkit-scrollbar{display:none}`})}},zxe=j.createContext(void 0);function yV(e){return j.useContext(zxe)}function iC(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const Ru=1,$xe={...Gg,...Bg},Pxe=j.forwardRef(function(t,r){const{render:i,className:s,finalFocus:l,...u}=t,{store:f,popupRef:d,onOpenChangeComplete:h,setOpen:m,valueRef:g,selectedItemTextRef:v,keyboardActiveRef:x,multiple:b,handleScrollArrowVisibility:w,scrollHandlerRef:S,highlightItemOnHover:_}=uc(),{side:E,align:O,alignItemWithTriggerActive:T,setControlledAlignItemWithTrigger:C,scrollDownArrowRef:R,scrollUpArrowRef:M}=v5(),D=yV()!=null,I=cV(),{nonce:B,disableStyleElements:V}=j1e(),F=yo(),G=At(f,Rt.id),W=At(f,Rt.open),te=At(f,Rt.mounted),H=At(f,Rt.popupProps),J=At(f,Rt.transitionStatus),re=At(f,Rt.triggerElement),le=At(f,Rt.positionerElement),ae=At(f,Rt.listElement),N=j.useRef(0),U=j.useRef(!1),X=j.useRef(0),L=j.useRef(!1),Z=j.useRef({}),ee=Px(),de=ot(ue=>{if(!le||!d.current||!L.current)return;if(U.current||!T){w();return}const be=le.style.top==="0px",Ee=le.style.bottom==="0px",xe=le.getBoundingClientRect().height,Me=kn(le),Ve=getComputedStyle(le),Ie=parseFloat(Ve.marginTop),Be=parseFloat(Ve.marginBottom),ke=oz(getComputedStyle(d.current)),je=Math.min(Me.documentElement.clientHeight-Ie-Be,ke),Se=ue.scrollTop,ze=zw(ue);let $e=0,Ze=null,hn=!1,vn=!1;const bn=xt=>{le.style.height=`${xt}px`},dn=(xt,jt)=>{const pn=iC(xt,0,je-xe);pn>0&&bn(xe+pn),ue.scrollTop=jt,je-(xe+pn)<=Ru&&(U.current=!0),w()};if(be){const xt=ze-Se,jt=xe+xt,pn=Math.min(jt,je);if($e=pn,xt<=Ru){dn(xt,ze);return}je-pn>Ru?vn=!0:hn=!0}else if(Ee){const xt=Se,jt=xe+xt,pn=Math.min(jt,je),yr=jt-je;if($e=pn,xt<=Ru){dn(xt,0);return}je-pn>Ru?Ze=0:(hn=!0,Se<ze&&(Ze=Se-(xt-yr)))}if($e=Math.ceil($e),$e!==0&&bn($e),vn||Ze!=null){const xt=zw(ue),jt=vn?xt:iC(Ze,0,xt);Math.abs(ue.scrollTop-jt)>Ru&&(ue.scrollTop=jt)}(hn||$e>=je-Ru)&&(U.current=!0),w()});j.useImperativeHandle(S,()=>de,[de]),Gf({open:W,ref:d,onComplete(){W&&h?.(!0)}});const ye={open:W,transitionStatus:J,side:E,align:O};at(()=>{!le||!d.current||Object.keys(Z.current).length||(Z.current={top:le.style.top||"0",left:le.style.left||"0",right:le.style.right,height:le.style.height,bottom:le.style.bottom,minHeight:le.style.minHeight,maxHeight:le.style.maxHeight,marginTop:le.style.marginTop,marginBottom:le.style.marginBottom})},[d,le]),at(()=>{W||T||(L.current=!1,U.current=!1,N.current=0,X.current=0,KE(le,Z.current))},[W,T,le,d]),at(()=>{const ue=d.current;if(!(!W||!re||!le||!ue||f.state.transitionStatus==="ending")){if(!T){L.current=!0,ee.request(w),ue.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const be=Lxe(ue);ue.style.removeProperty("--transform-origin");try{const Ee=getComputedStyle(le),xe=getComputedStyle(ue),Me=kn(re),Ve=ga(le),Ie=Ixe(re),Be=$w(re.getBoundingClientRect(),Ie),ke=$w(le.getBoundingClientRect(),Ie),je=Be.left,Se=Be.height,ze=ae||ue,$e=ze.scrollHeight,Ze=parseFloat(xe.borderBottomWidth),hn=parseFloat(Ee.marginTop)||10,vn=parseFloat(Ee.marginBottom)||10,bn=parseFloat(Ee.minHeight)||100,dn=oz(xe),xt=5,jt=5,pn=20,yr=Me.documentElement.clientHeight-hn-vn,vr=Me.documentElement.clientWidth,Gt=yr-Be.bottom+Se,An=v.current,Dt=g.current;let Kt,Wn=0,ir=0;if(An&&Dt){const mn=$w(Dt.getBoundingClientRect(),Ie);Kt=$w(An.getBoundingClientRect(),Ie);const $r=mn.left-je,Kr=Kt.left-ke.left,jn=mn.top-Be.top+mn.height/2,Yr=Kt.top-ke.top+Kt.height/2;Wn=$r-Kr,ir=Yr-jn}const Pn=Gt+ir+vn+Ze;let Rn=Math.min(yr,Pn);const Bn=yr-hn-vn,Mn=Pn-Rn,br=Math.max(xt,je+Wn),zr=vr-jt,wo=Math.max(0,br+ke.width-zr);le.style.left=`${br-wo}px`,le.style.height=`${Rn}px`,le.style.maxHeight="auto",le.style.marginTop=`${hn}px`,le.style.marginBottom=`${vn}px`,ue.style.height="100%";const Ia=zw(ze),Gr=Mn>=Ia-Ru;Gr&&(Rn=Math.min(yr,ke.height)-(Mn-Ia));const ea=Be.top<pn||Be.bottom>yr-pn||Math.ceil(Rn)+Ru<Math.min($e,bn),qt=(Ve.visualViewport?.scale??1)!==1&&HM;if(ea||qt){L.current=!0,KE(le,Z.current),_s.flushSync(()=>C(!1));return}if(Gr){const mn=Math.max(0,yr-Pn);le.style.top=ke.height>=Bn?"0":`${mn}px`,le.style.height=`${Rn}px`,ze.scrollTop=zw(ze),N.current=Math.max(bn,Rn)}else le.style.bottom="0",N.current=Math.max(bn,Rn),ze.scrollTop=Mn;if(Kt){const mn=ke.top,$r=ke.height,Kr=Kt.top+Kt.height/2,jn=$r>0?(Kr-mn)/$r*100:50,Yr=iC(jn,0,100);ue.style.setProperty("--transform-origin",`50% ${Yr}%`)}(N.current===yr||Rn>=dn)&&(U.current=!0),w(),setTimeout(()=>{L.current=!0})}finally{be()}})}},[f,W,le,re,g,v,d,w,T,C,ee,R,M,ae]),j.useEffect(()=>{if(!T||!le||!W)return;const ue=ga(le);function be(Ee){m(!1,un(Gbe,Ee))}return ue.addEventListener("resize",be),()=>{ue.removeEventListener("resize",be)}},[m,T,le,W]);const Te={...ae?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${G}-list`},onKeyDown(ue){x.current=!0,D&&JM.has(ue.key)&&ue.stopPropagation()},onMouseMove(){x.current=!1},onPointerLeave(ue){if(!_||gV(ue)||ue.pointerType==="touch")return;const be=ue.currentTarget;F.start(0,()=>{f.set("activeIndex",null),be.focus({preventScroll:!0})})},onScroll(ue){ae||de(ue.currentTarget)},...T&&{style:ae?{height:"100%"}:mV}},Ae=dr("div",t,{ref:[r,d],state:ye,stateAttributesMapping:$xe,props:[H,Te,Hx(J),{className:!ae&&T?eO.className:void 0},u]});return k.jsxs(j.Fragment,{children:[!V&&eO.getElement(B),k.jsx(r5,{context:I,modal:!1,disabled:!te,returnFocus:l,restoreFocus:!0,children:Ae})]})});function oz(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function zw(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function Ixe(e){return H7.getScale(e)}function $w(e,t){return C1({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}const sz=[["transform","none"],["scale","1"],["translate","0 0"]];function Lxe(e){const{style:t}=e,r={};for(const[i,s]of sz)r[i]=t.getPropertyValue(i),t.setProperty(i,s,"important");return()=>{for(const[i]of sz){const s=r[i];s?t.setProperty(i,s):t.removeProperty(i)}}}const Uxe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:u,scrollHandlerRef:f}=uc(),{alignItemWithTriggerActive:d}=v5(),h=At(u,Rt.hasScrollArrows),m=At(u,Rt.openMethod),g=At(u,Rt.multiple),x={id:`${At(u,Rt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(w){f.current?.(w.currentTarget)},...d&&{style:mV},className:h&&m!=="touch"?eO.className:void 0},b=ot(w=>{u.set("listElement",w)});return dr("div",t,{ref:[r,b],props:[x,l]})}),vV=j.createContext(void 0);function b5(){const e=j.useContext(vV);if(!e)throw new Error(Ti(57));return e}const Vxe=j.memo(j.forwardRef(function(t,r){const{render:i,className:s,value:l=null,label:u,disabled:f=!1,nativeButton:d=!1,...h}=t,m=j.useRef(null),g=FM({label:u,textRef:m,indexGuessBehavior:UU.GuessFromOrder}),{store:v,getItemProps:x,setOpen:b,setValue:w,selectionRef:S,typingRef:_,valuesRef:E,keyboardActiveRef:O,multiple:T,highlightItemOnHover:C}=uc(),R=yo(),M=At(v,Rt.isActive,g.index),D=At(v,Rt.isSelected,g.index,l),I=At(v,Rt.isSelectedByFocus,g.index),B=At(v,Rt.isItemEqualToValue),V=g.index,F=V!==-1,G=j.useRef(null),W=qa(V);at(()=>{if(!F)return;const ee=E.current;return ee[V]=l,()=>{delete ee[V]}},[F,V,l,E]),at(()=>{if(!F)return;const ee=v.state.value;let de=ee;T&&Array.isArray(ee)&&ee.length>0&&(de=ee[ee.length-1]),de!==void 0&&_g(l,de,B)&&v.set("selectedIndex",V)},[F,V,T,B,v,l]);const te={disabled:f,selected:D,highlighted:M},H=x({active:M,selected:D});H.onFocus=void 0,H.id=void 0;const J=j.useRef(null),re=j.useRef("mouse"),le=j.useRef(!1),{getButtonProps:ae,buttonRef:N}=Jp({disabled:f,focusableWhenDisabled:!0,native:d,composite:!0});function U(ee){const de=v.state.value;if(T){const ye=Array.isArray(de)?de:[],Te=D?pxe(ye,l,B):[...ye,l];w(Te,un(FT,ee))}else w(l,un(FT,ee)),b(!1,un(FT,ee))}const X={role:"option","aria-selected":D,tabIndex:M?0:-1,onFocus(){v.set("activeIndex",V)},onMouseEnter(){!O.current&&v.state.selectedIndex===null&&C&&v.set("activeIndex",V)},onMouseMove(){C&&v.set("activeIndex",V)},onMouseLeave(ee){!C||O.current||gV(ee)||R.start(0,()=>{v.state.activeIndex===V&&v.set("activeIndex",null)})},onTouchStart(){S.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(ee){J.current=ee.key,v.set("activeIndex",V),ee.key===" "&&_.current&&ee.preventDefault()},onClick(ee){le.current=!1,!(ee.type==="keydown"&&J.current===null)&&(f||ee.type==="keydown"&&J.current===" "&&_.current||re.current!=="touch"&&!M||(J.current=null,U(ee.nativeEvent)))},onPointerEnter(ee){re.current=ee.pointerType},onPointerDown(ee){re.current=ee.pointerType,le.current=!0},onMouseUp(){if(f)return;if(le.current){le.current=!1;return}const ee=!S.current.allowSelectedMouseUp&&D,de=!S.current.allowUnselectedMouseUp&&!D;ee||de||re.current!=="touch"&&!M||G.current?.click()}},L=dr("div",t,{ref:[N,r,g.ref,G],state:te,props:[H,X,h,ae]}),Z=j.useMemo(()=>({selected:D,indexRef:W,textRef:m,selectedByFocus:I,hasRegistered:F}),[D,W,m,I,F]);return k.jsx(vV.Provider,{value:Z,children:L})})),qxe=j.forwardRef(function(t,r){const i=t.keepMounted??!1,{selected:s}=b5();return i||s?k.jsx(Fxe,{...t,ref:r}):null}),Fxe=j.memo(j.forwardRef((e,t)=>{const{render:r,className:i,keepMounted:s,...l}=e,{selected:u}=b5(),f=j.useRef(null),{transitionStatus:d,setMounted:h}=lS(u),g=dr("span",e,{ref:[t,f],state:{selected:u,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:Bg});return Gf({open:u,ref:f,onComplete(){u||h(!1)}}),g})),Bxe=j.memo(j.forwardRef(function(t,r){const{indexRef:i,textRef:s,selectedByFocus:l,hasRegistered:u}=b5(),{selectedItemTextRef:f}=uc(),{className:d,render:h,...m}=t,g=j.useCallback(x=>{if(!x||!u)return;const b=f.current===null||!f.current.isConnected;(l||b&&i.current===0)&&(f.current=x)},[f,i,l,u]);return dr("div",t,{ref:[g,r,s],props:m})})),bV=j.forwardRef(function(t,r){const{render:i,className:s,direction:l,keepMounted:u=!1,...f}=t,{store:d,popupRef:h,listRef:m,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:v}=uc(),{side:x,scrollDownArrowRef:b,scrollUpArrowRef:w}=v5(),S=l==="up"?Rt.scrollUpArrowVisible:Rt.scrollDownArrowVisible,_=At(d,S),E=At(d,Rt.openMethod),O=_&&E!=="touch",T=yo(),C=l==="up"?w:b,{transitionStatus:R,setMounted:M}=lS(O);at(()=>(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]),Gf({open:O,ref:C,onComplete(){O||M(!1)}});const B=dr("div",t,{ref:[r,C],state:{direction:l,visible:O,side:x,transitionStatus:R},props:[{"aria-hidden":!0,children:l==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(F){if(F.movementX===0&&F.movementY===0||T.isStarted())return;d.set("activeIndex",null);function G(){const W=d.state.listElement??h.current;if(!W)return;d.set("activeIndex",null),g();const te=W.scrollTop===0,H=Math.round(W.scrollTop+W.clientHeight)>=W.scrollHeight;if(m.current.length===0&&(l==="up"?d.set("scrollUpArrowVisible",!te):d.set("scrollDownArrowVisible",!H)),l==="up"&&te||l==="down"&&H){T.clear();return}if((d.state.listElement||h.current)&&m.current&&m.current.length>0){const re=m.current,le=C.current?.offsetHeight||0;if(l==="up"){let ae=0;const N=W.scrollTop+le;for(let X=0;X<re.length;X+=1){const L=re[X];if(L&&L.offsetTop>=N){ae=X;break}}const U=Math.max(0,ae-1);if(U<ae){const X=re[U];X&&(W.scrollTop=Math.max(0,X.offsetTop-le))}else W.scrollTop=0}else{let ae=re.length-1;const N=W.scrollTop+W.clientHeight-le;for(let X=0;X<re.length;X+=1){const L=re[X];if(L&&L.offsetTop+L.offsetHeight>N){ae=Math.max(0,X-1);break}}const U=Math.min(re.length-1,ae+1);if(U>ae){const X=re[U];X&&(W.scrollTop=X.offsetTop+X.offsetHeight-W.clientHeight+le)}else W.scrollTop=W.scrollHeight-W.clientHeight}}T.start(40,G)}T.start(40,G)},onMouseLeave(){T.clear()}},f]});return O||u?B:null}),Hxe=j.forwardRef(function(t,r){return k.jsx(bV,{...t,ref:r,direction:"down"})}),Gxe=j.forwardRef(function(t,r){return k.jsx(bV,{...t,ref:r,direction:"up"})}),Kxe=j.createContext(void 0),Yxe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,[u,f]=j.useState(),d=j.useMemo(()=>({labelId:u,setLabelId:f}),[u,f]),h=dr("div",t,{ref:r,props:[{role:"group","aria-labelledby":u},l]});return k.jsx(Kxe.Provider,{value:d,children:h})}),lz=vxe;function cz({className:e,...t}){return k.jsx(Yxe,{"data-slot":"select-group",className:Vt("scroll-my-1",e),...t})}function uz({className:e,...t}){return k.jsx(Txe,{"data-slot":"select-value",className:Vt("flex flex-1 text-left",e),...t})}function fz({className:e,size:t="default",children:r,...i}){return k.jsxs(xxe,{"data-slot":"select-trigger","data-size":t,className:Vt("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(Cxe,{render:k.jsx(Xz,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function dz({className:e,children:t,side:r="bottom",sideOffset:i=4,align:s="center",alignOffset:l=0,alignItemWithTrigger:u=!0,...f}){return k.jsx(Oxe,{children:k.jsx(Dxe,{side:r,sideOffset:i,align:s,alignOffset:l,alignItemWithTrigger:u,className:"isolate z-50",children:k.jsxs(Pxe,{"data-slot":"select-content",className:Vt("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(Zxe,{}),k.jsx(Uxe,{children:t}),k.jsx(Xxe,{})]})})})}function jm({className:e,children:t,...r}){return k.jsxs(Vxe,{"data-slot":"select-item",className:Vt("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(Bxe,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),k.jsx(qxe,{render:k.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:k.jsx(hO,{className:"pointer-events-none"})})]})}function Zxe({className:e,...t}){return k.jsx(Gxe,{"data-slot":"select-scroll-up-button",className:Vt("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(hF,{})})}function Xxe({className:e,...t}){return k.jsx(Hxe,{"data-slot":"select-scroll-down-button",className:Vt("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(Xz,{})})}const SV=j.createContext(void 0);function Qxe(){const e=j.useContext(SV);if(e===void 0)throw new Error(Ti(63));return e}let hz=(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 wV={...m5,checked(e){return e?{[hz.checked]:""}:{[hz.unchecked]:""}}};function Wxe(e,t,r,i=!0,s){const[l,u]=j.useState(),f=im(s?`${s}-label`:void 0),d=e??t??l;return at(()=>{const h=e||t||!i?void 0:Jxe(r.current,f);l!==h&&u(h)}),d}function Jxe(e,t){const r=e_e(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}function e_e(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const r=e.id;if(r){const s=e.nextElementSibling;if(s&&s.htmlFor===r)return s}const i=e.labels;return i&&i[0]}const t_e=j.forwardRef(function(t,r){const{checked:i,className:s,defaultChecked:l,"aria-labelledby":u,id:f,inputRef:d,name:h,nativeButton:m=!1,onCheckedChange:g,readOnly:v=!1,required:x=!1,disabled:b=!1,render:w,uncheckedValue:S,value:_,...E}=t,{clearErrors:O}=g5(),{state:T,setTouched:C,setDirty:R,validityData:M,setFilled:D,setFocused:I,shouldValidateOnChange:B,validationMode:V,disabled:F,name:G,validation:W}=Kg(),{labelId:te}=Fx(),H=F||b,J=G??h,re=ot(g),le=j.useRef(null),ae=Pu(le,d,W.inputRef),N=j.useRef(null),U=im(),X=Bx({id:f,implicit:!1,controlRef:N}),L=m?void 0:X,[Z,ee]=x1({controlled:i,default:!!l,name:"Switch",state:"checked"});y5({id:U,commit:W.commit,value:Z,controlRef:N,name:J,getValue:()=>Z}),at(()=>{le.current&&D(le.current.checked)},[le,D]),h5(Z,()=>{O(J),R(Z!==M.initialValue),D(Z),B()?W.commit(Z):W.commit(Z,!0)});const{getButtonProps:de,buttonRef:ye}=Jp({disabled:H,native:m}),Te=Wxe(u,te,le,!m,L),Ae={id:m?X:U,role:"switch","aria-checked":Z,"aria-readonly":v||void 0,"aria-required":x||void 0,"aria-labelledby":Te,onFocus(){H||I(!0)},onBlur(){const xe=le.current;!xe||H||(C(!0),I(!1),V==="onBlur"&&W.commit(xe.checked))},onClick(xe){v||H||(xe.preventDefault(),le.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:xe.shiftKey,ctrlKey:xe.ctrlKey,altKey:xe.altKey,metaKey:xe.metaKey})))}},ue=j.useMemo(()=>Z1({checked:Z,disabled:H,id:L,name:J,required:x,style:J?j7:e5,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ae,onChange(xe){if(xe.nativeEvent.defaultPrevented)return;const Me=xe.target.checked,Ve=un(qp,xe.nativeEvent);re?.(Me,Ve),!Ve.isCanceled&&ee(Me)},onFocus(){N.current?.focus()}},W.getInputValidationProps,_!==void 0?{value:_}:za),[Z,H,ae,L,J,re,x,ee,W,_]),be=j.useMemo(()=>({...T,checked:Z,disabled:H,readOnly:v,required:x}),[T,Z,H,v,x]),Ee=dr("span",t,{state:be,ref:[r,N,ye],props:[Ae,W.getValidationProps,E,de],stateAttributesMapping:wV});return k.jsxs(SV.Provider,{value:be,children:[Ee,!Z&&J&&S!==void 0&&k.jsx("input",{type:"hidden",name:J,value:S}),k.jsx("input",{...ue})]})}),n_e=j.forwardRef(function(t,r){const{render:i,className:s,...l}=t,{state:u}=Kg(),f=Qxe(),d={...u,...f};return dr("span",t,{state:d,ref:r,stateAttributesMapping:wV,props:l})});function pz({className:e,size:t="default",...r}){return k.jsx(t_e,{"data-slot":"switch","data-size":t,className:Vt("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(n_e,{"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"})})}function r_e({className:e,...t}){return k.jsx("div",{"data-slot":"input-group",role:"group",className:Vt("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 a_e=Hu("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 i_e({className:e,align:t="inline-start",...r}){return k.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Vt(a_e({align:t}),e),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}function o_e({className:e,...t}){return k.jsx(us,{"data-slot":"command",className:Vt("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function s_e({className:e,...t}){return k.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:k.jsxs(r_e,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[k.jsx(us.Input,{"data-slot":"command-input",className:Vt("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),k.jsx(i_e,{children:k.jsx(kF,{className:"size-4 shrink-0 opacity-50"})})]})})}function l_e({className:e,...t}){return k.jsx(us.List,{"data-slot":"command-list",className:Vt("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function c_e({className:e,...t}){return k.jsx(us.Empty,{"data-slot":"command-empty",className:Vt("py-6 text-center text-xs",e),...t})}function u_e({className:e,...t}){return k.jsx(us.Group,{"data-slot":"command-group",className:Vt("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 f_e({className:e,children:t,...r}){return k.jsxs(us.Item,{"data-slot":"command-item",className:Vt("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(hO,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const EV=j.createContext(void 0);function fS(e){const t=j.useContext(EV);if(t===void 0&&!e)throw new Error(Ti(47));return t}function d_e(){return{...eV(),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 h_e={...tV,disabled:it(e=>e.disabled),instantType:it(e=>e.instantType),openMethod:it(e=>e.openMethod),openChangeReason:it(e=>e.openChangeReason),modal:it(e=>e.modal),stickIfOpen:it(e=>e.stickIfOpen),titleElementId:it(e=>e.titleElementId),descriptionElementId:it(e=>e.descriptionElementId),openOnHover:it(e=>e.openOnHover),closeDelay:it(e=>e.closeDelay),hasViewport:it(e=>e.hasViewport)};class S5 extends o5{constructor(t){const r={...d_e(),...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 Rl,triggerElements:new Ux},h_e)}setOpen=(t,r)=>{const i=r.reason===ts,s=r.reason===Sg&&r.event.detail===0,l=!t&&(r.reason===qU||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,r),r.isCanceled)return;const u={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};this.state.floatingRootContext.context.events?.emit("openchange",u);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(mie,()=>{this.set("stickIfOpen",!1)}),_s.flushSync(d)):d(),s||l?this.set("instantType",s?"click":"dismiss"):r.reason===Fp?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,r){const i=Ni(()=>new S5(r)).current,s=t??i;return zx(i.disposeEffect),s}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function mz({props:e}){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,modal:u=!1,handle:f,triggerId:d,defaultTriggerId:h=null}=e,m=S5.useStore(f?.store,{modal:u,open:i,openProp:r,activeTriggerId:h,triggerIdProp:d});f5(()=>{r===void 0&&m.state.open===!1&&i===!0&&m.update({open:!0,activeTriggerId:h})}),m.useControlledProp("openProp",r),m.useControlledProp("triggerIdProp",d);const g=m.useState("open"),v=m.useState("positionerElement"),x=m.useState("payload"),b=m.useState("openChangeReason");m.useContextCallback("onOpenChange",s),m.useContextCallback("onOpenChangeComplete",l);const{openMethod:w,triggerProps:S}=p5(g);W7(m);const{forceUnmount:_}=J7(g,m,()=>{m.update({stickIfOpen:!0,openChangeReason:null})});d5(g&&u===!0&&b!==ts&&w!=="touch",v),j.useEffect(()=>{g||m.context.stickIfOpenTimeout.clear()},[m,g]);const E=j.useCallback(W=>{const te=un(W);return te.preventUnmountOnClose=()=>{m.set("preventUnmountingOnClose",!0)},te},[m]),O=j.useCallback(()=>{m.setOpen(!1,E(FU))},[m,E]);j.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:O}),[_,O]);const T=rV({popupStore:m,onOpenChange:m.setOpen}),C=a5(T,{outsidePressEvent:{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),R=iV(T),{getReferenceProps:M,getFloatingProps:D,getTriggerProps:I}=Vx([C,R]),B=j.useMemo(()=>M(S),[M,S]),V=j.useMemo(()=>I(S),[I,S]),F=j.useMemo(()=>D(),[D]);m.useSyncedValues({modal:u,openMethod:w,activeTriggerProps:B,inactiveTriggerProps:V,popupProps:F,floatingRootContext:T,nested:Kf()!=null});const G=j.useMemo(()=>({store:m}),[m]);return k.jsx(EV.Provider,{value:G,children:typeof t=="function"?t({payload:x}):t})}function p_e(e){return fS(!0)?k.jsx(mz,{props:e}):k.jsx(LSe,{children:k.jsx(mz,{props:e})})}const m_e=300,g_e=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:u=!0,handle:f,payload:d,openOnHover:h=!1,delay:m=m_e,closeDelay:g=0,id:v,...x}=t,b=fS(!0),w=f?.store??b?.store;if(!w)throw new Error(Ti(74));const S=im(v),_=w.useState("isTriggerActive",S),E=w.useState("floatingRootContext"),O=w.useState("isOpenedByTrigger",S),T=j.useRef(null),{registerTrigger:C,isMountedByThisTrigger:R}=oEe(S,T,w,{payload:d,disabled:l,openOnHover:h,closeDelay:g}),M=w.useState("openChangeReason"),D=w.useState("stickIfOpen"),I=w.useState("openMethod"),B=pEe(E,{enabled:E!=null&&h&&(I!=="touch"||M!==Sg),mouseOnly:!0,move:!1,handleClose:xEe(),restMs:m,delay:{close:g},triggerElementRef:T,isActiveTrigger:_}),V=I7(E,{enabled:E!=null,stickIfOpen:D}),F=Vx([V]),G=w.useState("triggerProps",R),W={disabled:l,open:O},{getButtonProps:te,buttonRef:H}=Jp({disabled:l,native:u}),J=j.useMemo(()=>({open(U){return U&&M===Sg?O7.open(U):R7.open(U)}}),[M]),re=dr("button",t,{state:W,ref:[H,r,C,T],props:[F.getReferenceProps(),B,G,{[Z$]:"",id:S},x,te],stateAttributesMapping:J}),le=j.useRef(null),ae=ot(U=>{_s.flushSync(()=>{w.setOpen(!1,un(Fp,U.nativeEvent,U.currentTarget))}),T1e(le.current)?.focus()}),N=ot(U=>{const X=w.select("positionerElement");if(X&&ng(U,X))w.context.beforeContentFocusGuardRef.current?.focus();else{_s.flushSync(()=>{w.setOpen(!1,un(Fp,U.nativeEvent,U.currentTarget))});let L=_1e(w.context.triggerFocusTargetRef.current||T.current);for(;L!==null&&Zt(X,L);){const Z=L;if(L=WM(L),L===Z)break}L?.focus()}});return _?k.jsxs(j.Fragment,{children:[k.jsx(xg,{ref:le,onFocus:ae}),k.jsx(j.Fragment,{children:re},S),k.jsx(xg,{ref:w.context.triggerFocusTargetRef,onFocus:N})]}):k.jsx(j.Fragment,{children:re},S)}),xV=j.createContext(void 0);function y_e(){const e=j.useContext(xV);if(e===void 0)throw new Error(Ti(45));return e}const v_e=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=fS();return l.useState("mounted")||i?k.jsx(xV.Provider,{value:i,children:k.jsx(t5,{ref:r,...s})}):null}),_V=j.createContext(void 0);function b_e(){const e=j.useContext(_V);if(!e)throw new Error(Ti(46));return e}const S_e=j.forwardRef(function(t,r){const{render:i,className:s,anchor:l,positionMethod:u="absolute",side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:w=!1,collisionAvoidance:S=vie,..._}=t,{store:E}=fS(),O=y_e(),T=PSe(),C=E.useState("floatingRootContext"),R=E.useState("mounted"),M=E.useState("open"),D=E.useState("openChangeReason"),I=E.useState("activeTriggerElement"),B=E.useState("modal"),V=E.useState("positionerElement"),F=E.useState("instantType"),G=E.useState("transitionStatus"),W=E.useState("hasViewport"),te=j.useRef(null),H=m7(V,!1,!1),J=hV({anchor:l,floatingRootContext:C,positionMethod:u,mounted:R,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:x,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:w,keepMounted:O,nodeId:T,collisionAvoidance:S,adaptiveOrigin:W?kxe:void 0}),re=j.useMemo(()=>{const L={};return M||(L.pointerEvents="none"),{role:"presentation",hidden:!R,style:{...J.positionerStyles,...L}}},[M,R,J.positionerStyles]),le=j.useMemo(()=>({props:re,...J}),[re,J]),ae=C.useState("domReferenceElement");at(()=>{const L=ae,Z=te.current;if(L&&(te.current=L),Z&&L&&L!==Z){E.set("instantType",void 0);const ee=new AbortController;return H(()=>{E.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[ae,H,E]);const N={open:M,side:le.side,align:le.align,anchorHidden:le.anchorHidden,instant:F},U=j.useCallback(L=>{E.set("positionerElement",L)},[E]),X=dr("div",t,{state:N,props:[le.props,Hx(G),_],ref:[r,U],stateAttributesMapping:Gg});return k.jsxs(_V.Provider,{value:le,children:[R&&B===!0&&D!==ts&&k.jsx(u5,{ref:E.context.internalBackdropRef,inert:$x(!M),cutout:I}),k.jsx(ISe,{id:T,children:X})]})}),w_e=j.createContext(void 0);function E_e(){const[e,t]=j.useState(0),r=ot(()=>(t(s=>s+1),()=>{t(s=>Math.max(0,s-1))}));return{context:j.useMemo(()=>({register:r}),[r]),hasClosePart:e>0}}function x_e(e){const{value:t,children:r}=e;return k.jsx(w_e.Provider,{value:t,children:r})}const __e={...Gg,...Bg},T_e=j.forwardRef(function(t,r){const{className:i,render:s,initialFocus:l,finalFocus:u,...f}=t,{store:d}=fS(),h=b_e(),m=yV()!=null,{context:g,hasClosePart:v}=E_e(),x=d.useState("open"),b=d.useState("openMethod"),w=d.useState("instantType"),S=d.useState("transitionStatus"),_=d.useState("popupProps"),E=d.useState("titleElementId"),O=d.useState("descriptionElementId"),T=d.useState("modal"),C=d.useState("mounted"),R=d.useState("openChangeReason"),M=d.useState("activeTriggerElement"),D=d.useState("floatingRootContext");Gf({open:x,ref:d.context.popupRef,onComplete(){x&&d.context.onOpenChangeComplete?.(!0)}});const I=d.useState("disabled"),B=d.useState("openOnHover"),V=d.useState("closeDelay");dEe(D,{enabled:B&&!I,closeDelay:V});function F(re){return re==="touch"?d.context.popupRef.current:!0}const G=l===void 0?F:l,W={open:x,side:h.side,align:h.align,instant:w,transitionStatus:S},te=T!==!1&&v,H=j.useCallback(re=>{d.set("popupElement",re)},[d]),J=dr("div",t,{state:W,ref:[r,d.context.popupRef,H],props:[_,{"aria-labelledby":E,"aria-describedby":O,onKeyDown(re){m&&JM.has(re.key)&&re.stopPropagation()}},Hx(S),f],stateAttributesMapping:__e});return k.jsx(r5,{context:D,openInteractionType:b,modal:te,disabled:!C||R===ts,initialFocus:G,returnFocus:u,restoreFocus:"popup",previousFocusableElement:Ur(M)?M:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:k.jsx(x_e,{value:g,children:J})})});function C_e({...e}){return k.jsx(p_e,{"data-slot":"popover",...e})}function R_e({...e}){return k.jsx(g_e,{"data-slot":"popover-trigger",...e})}function O_e({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...l}){return k.jsx(v_e,{children:k.jsx(S_e,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:k.jsx(T_e,{"data-slot":"popover-content",className:Vt("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 gz=[{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:"繁體中文(台灣)"}],A_e=({value:e,onValueChange:t})=>{const[r,i]=j.useState(!1),s=gz.find(l=>l.value===e);return k.jsxs(C_e,{open:r,onOpenChange:i,children:[k.jsx(R_e,{children:k.jsxs(_l,{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(mF,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),k.jsx(O_e,{className:"w-full p-0",children:k.jsxs(o_e,{children:[k.jsx(s_e,{placeholder:"Search locale..."}),k.jsxs(l_e,{children:[k.jsx(c_e,{children:"No locale found."}),k.jsx(u_e,{children:gz.map(l=>k.jsxs(f_e,{value:l.value,onSelect:u=>{t(u===e?"":u),i(!1)},children:[k.jsxs("span",{children:[l.label," ",k.jsxs("span",{className:"text-muted-foreground",children:["(",l.value,")"]})]}),k.jsx(hO,{className:Vt("ml-auto h-4 w-4",e===l.value?"opacity-100":"opacity-0")})]},l.value))})]})]})})]})};function M_e({resourceUri:e}){const{data:t}=V$(e);return t?k.jsx("div",{className:"text-xs",children:k.jsx(Ix,{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 j_e=()=>{const e=Uf(),{openaiRef:t,openaiObject:r,openInAppUrl:i}=Ng(e.name),{setToolData:s}=kg(),l=e._meta?.["openai/outputTemplate"],u=(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(b7,{defaultValue:"widget-state",className:"gap-0",children:[k.jsxs(S7,{className:"border-b border-border w-full",children:[k.jsx(Jb,{value:"properties",children:"Properties"}),k.jsx(Jb,{value:"widget-state",children:"Widget State"}),l&&k.jsx(Jb,{value:"resource",children:"Resource"})]}),k.jsx(e1,{value:"properties",className:"p-4",children:k.jsxs(nxe,{children:[k.jsxs(of,{children:[k.jsx(sf,{children:"Display Mode"}),k.jsxs(lz,{value:r.displayMode,onValueChange:f=>u("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(fz,{children:k.jsx(uz,{})}),k.jsx(dz,{children:k.jsxs(cz,{children:[k.jsx(jm,{value:"inline",children:"Inline"}),k.jsx(jm,{value:"fullscreen",children:"Fullscreen"}),k.jsx(jm,{value:"pip",children:"Pip"}),k.jsx(jm,{value:"modal",children:"Modal"})]})})]})]}),k.jsxs(of,{children:[k.jsx(sf,{children:"Theme"}),k.jsxs(exe,{children:[k.jsx(_l,{variant:r.theme==="light"?"default":"outline",onClick:()=>u("theme","light"),children:k.jsx(DF,{})}),k.jsx(_l,{variant:r.theme==="dark"?"default":"outline",onClick:()=>u("theme","dark"),children:k.jsx(RF,{})})]})]}),k.jsxs(of,{children:[k.jsx(sf,{children:"Locale"}),k.jsx(A_e,{value:r.locale,onValueChange:f=>u("locale",f)})]}),k.jsxs(of,{children:[k.jsx(sf,{children:"Max Height"}),k.jsx(aC,{type:"number",value:r.maxHeight!==void 0?String(r.maxHeight):"",onChange:f=>{const d=f.target.value.trim();u("maxHeight",d===""?void 0:Number(d))}})]}),k.jsxs(of,{children:[k.jsx(sf,{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(aC,{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();u("safeArea",{...r.safeArea,insets:{...r.safeArea?.insets,[f]:m===""?0:Number(m)}})}})]},f)})})]}),k.jsxs(of,{children:[k.jsx(sf,{children:"Device Type"}),k.jsxs(lz,{value:r.userAgent?.device?.type??"desktop",onValueChange:f=>u("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(fz,{children:k.jsx(uz,{})}),k.jsx(dz,{children:k.jsxs(cz,{children:[k.jsx(jm,{value:"mobile",children:"Mobile"}),k.jsx(jm,{value:"desktop",children:"Desktop"})]})})]})]}),k.jsxs(of,{children:[k.jsx(sf,{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(pz,{id:"hover",checked:r.userAgent?.capabilities?.hover??!1,onCheckedChange:f=>u("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(pz,{id:"touch",checked:r.userAgent?.capabilities?.touch??!1,onCheckedChange:f=>u("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,touch:f}})})]})]})]}),k.jsxs(of,{children:[k.jsx(sf,{children:"Open in App URL"}),k.jsx(aC,{type:"text",value:i??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),k.jsx(e1,{value:"widget-state",className:"p-4",children:k.jsx(Ix,{src:r.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),l&&k.jsx(e1,{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(M_e,{resourceUri:l})})})]})}):null};function yz(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function k_e(e,t=60){const r=JSON.stringify(e);return r.length>t?`${r.slice(0,t)}…`:r}function N_e({log:e}){const[t,r]=j.useState(!1),i=Object.keys(e.args).length>0,s=i?k_e(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:yz(e.timestamp)}),k.jsx("span",{className:Vt("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:yz(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 D_e(){const e=Uf(),{setToolData:t}=kg(),{openaiLogs:r}=Ng(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:"MCP client logs"}),k.jsx("div",{className:"flex items-center gap-2",children:r.length>0&&k.jsxs(_l,{variant:"ghost",size:"sm",onClick:s,children:[k.jsx($F,{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(N_e,{log:l},l.id))})]})}const z_e=Hu("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 $_e({className:e,variant:t,...r}){return k.jsx("div",{className:Vt(z_e({variant:t}),e),"data-slot":"alert",role:"alert",...r})}function P_e({className:e,...t}){return k.jsx("div",{className:Vt("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function I_e({className:e,...t}){return k.jsx("div",{className:Vt("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const L_e=()=>{const e=Uf(),t=Ng(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(`
151
+ `)};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($_e,{variant:"error",children:[k.jsx(yF,{}),k.jsx(P_e,{children:"Error"}),k.jsx(I_e,{children:r()})]}):k.jsx("div",{className:"text-xs",children:k.jsx(Ix,{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})})},TV="openai:set_globals";class U_e extends CustomEvent{type=TV}var oC={exports:{}},Lt={};var vz;function V_e(){if(vz)return Lt;vz=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"),u=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 x(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(){}},w=Object.assign,S={};function _(N,U,X){this.props=N,this.context=U,this.refs=S,this.updater=X||b}_.prototype.isReactComponent={},_.prototype.setState=function(N,U){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,U,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function E(){}E.prototype=_.prototype;function O(N,U,X){this.props=N,this.context=U,this.refs=S,this.updater=X||b}var T=O.prototype=new E;T.constructor=O,w(T,_.prototype),T.isPureReactComponent=!0;var C=Array.isArray;function R(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function I(N,U,X){var L=X.ref;return{$$typeof:e,type:N,key:U,ref:L!==void 0?L:null,props:X}}function B(N,U){return I(N.type,U,N.props)}function V(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function F(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(X){return U[X]})}var G=/\/+/g;function W(N,U){return typeof N=="object"&&N!==null&&N.key!=null?F(""+N.key):U.toString(36)}function te(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(R,R):(N.status="pending",N.then(function(U){N.status==="pending"&&(N.status="fulfilled",N.value=U)},function(U){N.status==="pending"&&(N.status="rejected",N.reason=U)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function H(N,U,X,L,Z){var ee=typeof N;(ee==="undefined"||ee==="boolean")&&(N=null);var de=!1;if(N===null)de=!0;else switch(ee){case"bigint":case"string":case"number":de=!0;break;case"object":switch(N.$$typeof){case e:case t:de=!0;break;case m:return de=N._init,H(de(N._payload),U,X,L,Z)}}if(de)return Z=Z(N),de=L===""?"."+W(N,0):L,C(Z)?(X="",de!=null&&(X=de.replace(G,"$&/")+"/"),H(Z,U,X,"",function(Ae){return Ae})):Z!=null&&(V(Z)&&(Z=B(Z,X+(Z.key==null||N&&N.key===Z.key?"":(""+Z.key).replace(G,"$&/")+"/")+de)),U.push(Z)),1;de=0;var ye=L===""?".":L+":";if(C(N))for(var Te=0;Te<N.length;Te++)L=N[Te],ee=ye+W(L,Te),de+=H(L,U,X,ee,Z);else if(Te=x(N),typeof Te=="function")for(N=Te.call(N),Te=0;!(L=N.next()).done;)L=L.value,ee=ye+W(L,Te++),de+=H(L,U,X,ee,Z);else if(ee==="object"){if(typeof N.then=="function")return H(te(N),U,X,L,Z);throw U=String(N),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return de}function J(N,U,X){if(N==null)return N;var L=[],Z=0;return H(N,L,"","",function(ee){return U.call(X,ee,Z++)}),L}function re(N){if(N._status===-1){var U=N._result;U=U(),U.then(function(X){(N._status===0||N._status===-1)&&(N._status=1,N._result=X)},function(X){(N._status===0||N._status===-1)&&(N._status=2,N._result=X)}),N._status===-1&&(N._status=0,N._result=U)}if(N._status===1)return N._result.default;throw N._result}var le=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=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(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ae={map:J,forEach:function(N,U,X){J(N,function(){U.apply(this,arguments)},X)},count:function(N){var U=0;return J(N,function(){U++}),U},toArray:function(N){return J(N,function(U){return U})||[]},only:function(N){if(!V(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Lt.Activity=g,Lt.Children=ae,Lt.Component=_,Lt.Fragment=r,Lt.Profiler=s,Lt.PureComponent=O,Lt.StrictMode=i,Lt.Suspense=d,Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Lt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return M.H.useMemoCache(N)}},Lt.cache=function(N){return function(){return N.apply(null,arguments)}},Lt.cacheSignal=function(){return null},Lt.cloneElement=function(N,U,X){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var L=w({},N.props),Z=N.key;if(U!=null)for(ee in U.key!==void 0&&(Z=""+U.key),U)!D.call(U,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&U.ref===void 0||(L[ee]=U[ee]);var ee=arguments.length-2;if(ee===1)L.children=X;else if(1<ee){for(var de=Array(ee),ye=0;ye<ee;ye++)de[ye]=arguments[ye+2];L.children=de}return I(N.type,Z,L)},Lt.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},Lt.createElement=function(N,U,X){var L,Z={},ee=null;if(U!=null)for(L in U.key!==void 0&&(ee=""+U.key),U)D.call(U,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(Z[L]=U[L]);var de=arguments.length-2;if(de===1)Z.children=X;else if(1<de){for(var ye=Array(de),Te=0;Te<de;Te++)ye[Te]=arguments[Te+2];Z.children=ye}if(N&&N.defaultProps)for(L in de=N.defaultProps,de)Z[L]===void 0&&(Z[L]=de[L]);return I(N,ee,Z)},Lt.createRef=function(){return{current:null}},Lt.forwardRef=function(N){return{$$typeof:f,render:N}},Lt.isValidElement=V,Lt.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:re}},Lt.memo=function(N,U){return{$$typeof:h,type:N,compare:U===void 0?null:U}},Lt.startTransition=function(N){var U=M.T,X={};M.T=X;try{var L=N(),Z=M.S;Z!==null&&Z(X,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(R,le)}catch(ee){le(ee)}finally{U!==null&&X.types!==null&&(U.types=X.types),M.T=U}},Lt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Lt.use=function(N){return M.H.use(N)},Lt.useActionState=function(N,U,X){return M.H.useActionState(N,U,X)},Lt.useCallback=function(N,U){return M.H.useCallback(N,U)},Lt.useContext=function(N){return M.H.useContext(N)},Lt.useDebugValue=function(){},Lt.useDeferredValue=function(N,U){return M.H.useDeferredValue(N,U)},Lt.useEffect=function(N,U){return M.H.useEffect(N,U)},Lt.useEffectEvent=function(N){return M.H.useEffectEvent(N)},Lt.useId=function(){return M.H.useId()},Lt.useImperativeHandle=function(N,U,X){return M.H.useImperativeHandle(N,U,X)},Lt.useInsertionEffect=function(N,U){return M.H.useInsertionEffect(N,U)},Lt.useLayoutEffect=function(N,U){return M.H.useLayoutEffect(N,U)},Lt.useMemo=function(N,U){return M.H.useMemo(N,U)},Lt.useOptimistic=function(N,U){return M.H.useOptimistic(N,U)},Lt.useReducer=function(N,U,X){return M.H.useReducer(N,U,X)},Lt.useRef=function(N){return M.H.useRef(N)},Lt.useState=function(N){return M.H.useState(N)},Lt.useSyncExternalStore=function(N,U,X){return M.H.useSyncExternalStore(N,U,X)},Lt.useTransition=function(){return M.H.useTransition()},Lt.version="19.2.3",Lt}var bz;function w5(){return bz||(bz=1,oC.exports=V_e()),oC.exports}var q_e=w5(),Sz;(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"})(Sz||(Sz={}));class F_e{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 CV{constructor(t){this.generateIdentifier=t,this.kv=new F_e}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 B_e extends CV{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 H_e(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 G_e(e,t){const r=H_e(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 Tg(e,t){Object.entries(e).forEach(([r,i])=>t(i,r))}function sE(e,t){return e.indexOf(t)!==-1}function wz(e,t){for(let r=0;r<e.length;r++){const i=e[r];if(t(i))return i}}class K_e{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return G_e(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Y_e=e=>Object.prototype.toString.call(e).slice(8,-1),RV=e=>typeof e>"u",Z_e=e=>e===null,A1=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,tO=e=>A1(e)&&Object.keys(e).length===0,zf=e=>Array.isArray(e),X_e=e=>typeof e=="string",Q_e=e=>typeof e=="number"&&!isNaN(e),W_e=e=>typeof e=="boolean",J_e=e=>e instanceof RegExp,M1=e=>e instanceof Map,j1=e=>e instanceof Set,OV=e=>Y_e(e)==="Symbol",e2e=e=>e instanceof Date&&!isNaN(e.valueOf()),AV=e=>e instanceof Error,Ez=e=>typeof e=="number"&&isNaN(e),t2e=e=>W_e(e)||Z_e(e)||RV(e)||Q_e(e)||X_e(e)||OV(e),n2e=e=>typeof e=="bigint",r2e=e=>e===1/0||e===-1/0,a2e=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),i2e=e=>e instanceof URL,nO=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),sC=e=>e.map(String).map(nO).join("."),r1=(e,t)=>{const r=[];let i="";for(let l=0;l<e.length;l++){let u=e.charAt(l);if(!t&&u==="\\"){const h=e.charAt(l+1);if(h==="\\"){i+="\\",l++;continue}else if(h!==".")throw Error("invalid path")}if(u==="\\"&&e.charAt(l+1)==="."){i+=".",l++;continue}if(u==="."){r.push(i),i="";continue}i+=u}const s=i;return r.push(s),r};function Ll(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const MV=[Ll(RV,"undefined",()=>null,()=>{}),Ll(n2e,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Ll(e2e,"Date",e=>e.toISOString(),e=>new Date(e)),Ll(AV,"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}),Ll(J_e,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),Ll(j1,"set",e=>[...e.values()],e=>new Set(e)),Ll(M1,"map",e=>[...e.entries()],e=>new Map(e)),Ll(e=>Ez(e)||r2e(e),"number",e=>Ez(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Ll(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Ll(i2e,"URL",e=>e.toString(),e=>new URL(e))];function Gx(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const jV=Gx((e,t)=>OV(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}),o2e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),kV=Gx(a2e,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=o2e[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function NV(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const DV=Gx(NV,(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)}),zV=Gx((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)}),s2e=[DV,jV,zV,kV],xz=(e,t)=>{const r=wz(s2e,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const i=wz(MV,s=>s.isApplicable(e,t));if(i)return{value:i.transform(e,t),type:i.annotation}},$V={};MV.forEach(e=>{$V[e.annotation]=e});const l2e=(e,t,r)=>{if(zf(t))switch(t[0]){case"symbol":return jV.untransform(e,t,r);case"class":return DV.untransform(e,t,r);case"custom":return zV.untransform(e,t,r);case"typed-array":return kV.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const i=$V[t];if(!i)throw new Error("Unknown transformation: "+t);return i.untransform(e,r)}},Zm=(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 PV(e){if(sE(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(sE(e,"prototype"))throw new Error("prototype is not allowed as a property");if(sE(e,"constructor"))throw new Error("constructor is not allowed as a property")}const c2e=(e,t)=>{PV(t);for(let r=0;r<t.length;r++){const i=t[r];if(j1(e))e=Zm(e,+i);else if(M1(e)){const s=+i,l=+t[++r]==0?"key":"value",u=Zm(e,s);switch(l){case"key":e=u;break;case"value":e=e.get(u);break}}else e=e[i]}return e},rO=(e,t,r)=>{if(PV(t),t.length===0)return r(e);let i=e;for(let l=0;l<t.length-1;l++){const u=t[l];if(zf(i)){const f=+u;i=i[f]}else if(A1(i))i=i[u];else if(j1(i)){const f=+u;i=Zm(i,f)}else if(M1(i)){if(l===t.length-2)break;const d=+u,h=+t[++l]==0?"key":"value",m=Zm(i,d);switch(h){case"key":i=m;break;case"value":i=i.get(m);break}}}const s=t[t.length-1];if(zf(i)?i[+s]=r(i[+s]):A1(i)&&(i[s]=r(i[s])),j1(i)){const l=Zm(i,+s),u=r(l);l!==u&&(i.delete(l),i.add(u))}if(M1(i)){const l=+t[t.length-2],u=Zm(i,l);switch(+s==0?"key":"value"){case"key":{const d=r(u);i.set(d,i.get(u)),d!==u&&i.delete(u);break}case"value":{i.set(u,r(i.get(u)));break}}}return e},IV=e=>e<1;function aO(e,t,r,i=[]){if(!e)return;const s=IV(r);if(!zf(e)){Tg(e,(f,d)=>aO(f,t,r,[...i,...r1(d,s)]));return}const[l,u]=e;u&&Tg(u,(f,d)=>{aO(f,t,r,[...i,...r1(d,s)])}),t(l,i)}function u2e(e,t,r,i){return aO(t,(s,l)=>{e=rO(e,l,u=>l2e(u,s,i))},r),e}function f2e(e,t,r){const i=IV(r);function s(l,u){const f=c2e(e,r1(u,i));l.map(d=>r1(d,i)).forEach(d=>{e=rO(e,d,()=>f)})}if(zf(t)){const[l,u]=t;l.forEach(f=>{e=rO(e,r1(f,i),()=>e)}),u&&Tg(u,s)}else Tg(t,s);return e}const d2e=(e,t)=>A1(e)||zf(e)||M1(e)||j1(e)||AV(e)||NV(e,t);function h2e(e,t,r){const i=r.get(e);i?i.push(t):r.set(e,[t])}function p2e(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,...u]=s;l.length===0?i=u.map(sC):r[sC(l)]=u.map(sC)}),i?tO(r)?[i]:[i,r]:tO(r)?void 0:r}const LV=(e,t,r,i,s=[],l=[],u=new Map)=>{const f=t2e(e);if(!f){h2e(e,s,t);const x=u.get(e);if(x)return i?{transformedValue:null}:x}if(!d2e(e,r)){const x=xz(e,r),b=x?{transformedValue:x.value,annotations:[x.type]}:{transformedValue:e};return f||u.set(e,b),b}if(sE(l,e))return{transformedValue:null};const d=xz(e,r),h=d?.value??e,m=zf(h)?[]:{},g={};Tg(h,(x,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 w=LV(x,t,r,i,[...s,b],[...l,e],u);m[b]=w.transformedValue,zf(w.annotations)?g[nO(b)]=w.annotations:A1(w.annotations)&&Tg(w.annotations,(S,_)=>{g[nO(b)+"."+_]=S})});const v=tO(g)?{transformedValue:m,annotations:d?[d.type]:void 0}:{transformedValue:m,annotations:d?[d.type,g]:g};return f||u.set(e,v),v};function UV(e){return Object.prototype.toString.call(e).slice(8,-1)}function _z(e){return UV(e)==="Array"}function m2e(e){if(UV(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function g2e(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 iO(e,t={}){if(_z(e))return e.map(s=>iO(s,t));if(!m2e(e))return e;const r=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...r,...i].reduce((s,l)=>{if(l==="__proto__"||_z(t.props)&&!t.props.includes(l))return s;const u=e[l],f=iO(u,t);return g2e(s,l,f,e,t.nonenumerable),s},{})}class gr{constructor({dedupe:t=!1}={}){this.classRegistry=new B_e,this.symbolRegistry=new CV(r=>r.description??""),this.customTransformerRegistry=new K_e,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,i=LV(t,r,this,this.dedupe),s={json:i.transformedValue};i.annotations&&(s.meta={...s.meta,values:i.annotations});const l=p2e(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:iO(i);return s?.values&&(l=u2e(l,s.values,s.v??0,this)),s?.referentialEqualities&&(l=f2e(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)}}gr.defaultInstance=new gr;gr.serialize=gr.defaultInstance.serialize.bind(gr.defaultInstance);gr.deserialize=gr.defaultInstance.deserialize.bind(gr.defaultInstance);gr.stringify=gr.defaultInstance.stringify.bind(gr.defaultInstance);gr.parse=gr.defaultInstance.parse.bind(gr.defaultInstance);gr.registerClass=gr.defaultInstance.registerClass.bind(gr.defaultInstance);gr.registerSymbol=gr.defaultInstance.registerSymbol.bind(gr.defaultInstance);gr.registerCustom=gr.defaultInstance.registerCustom.bind(gr.defaultInstance);gr.allowErrorProps=gr.defaultInstance.allowErrorProps.bind(gr.defaultInstance);var lC={exports:{}},Rb={};var Tz;function y2e(){if(Tz)return Rb;Tz=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var u=null;if(l!==void 0&&(u=""+l),s.key!==void 0&&(u=""+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:u,ref:s!==void 0?s:null,props:l}}return Rb.Fragment=t,Rb.jsx=r,Rb.jsxs=r,Rb}var Cz;function v2e(){return Cz||(Cz=1,lC.exports=y2e()),lC.exports}v2e();q_e.createContext(null);var cC={exports:{}},Ob={},uC={exports:{}},ji={};var Rz;function b2e(){if(Rz)return ji;Rz=1;var e=w5();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 u=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 ji.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,ji.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)},ji.flushSync=function(d){var h=u.T,m=i.p;try{if(u.T=null,i.p=2,d)return d()}finally{u.T=h,i.p=m,i.d.f()}},ji.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))},ji.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},ji.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,x=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:x}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ji.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)},ji.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})}},ji.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)},ji.requestFormReset=function(d){i.d.r(d)},ji.unstable_batchedUpdates=function(d,h){return d(h)},ji.useFormState=function(d,h,m){return u.H.useFormState(d,h,m)},ji.useFormStatus=function(){return u.H.useHostTransitionStatus()},ji.version="19.2.3",ji}var Oz;function S2e(){if(Oz)return uC.exports;Oz=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(),uC.exports=b2e(),uC.exports}var Az;function w2e(){if(Az)return Ob;Az=1;var e=jz(),t=w5(),r=S2e();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 u(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,c=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===c)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==c.return)o=p,c=y;else{for(var A=!1,z=p.child;z;){if(z===o){A=!0,o=p,c=y;break}if(z===c){A=!0,c=p,o=y;break}z=z.sibling}if(!A){for(z=y.child;z;){if(z===o){A=!0,o=y,c=p;break}if(z===c){A=!0,c=y,o=p;break}z=z.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==c)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"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function F(n){return n===null||typeof n!="object"?null:(n=V&&n[V]||n["@@iterator"],typeof n=="function"?n:null)}var G=Symbol.for("react.client.reference");function W(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===G?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList";case I:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case O:return n.displayName||"Context";case E:return(n._context.displayName||"Context")+".Consumer";case T: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:W(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return W(n(a))}catch{}}return null}var te=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},le=[],ae=-1;function N(n){return{current:n}}function U(n){0>ae||(n.current=le[ae],le[ae]=null,ae--)}function X(n,a){ae++,le[ae]=n.current,n.current=a}var L=N(null),Z=N(null),ee=N(null),de=N(null);function ye(n,a){switch(X(ee,a),X(Z,n),X(L,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Pv(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Pv(a),n=Iv(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}U(L),X(L,n)}function Te(){U(L),U(Z),U(ee)}function Ae(n){n.memoizedState!==null&&X(de,n);var a=L.current,o=Iv(a,n.type);a!==o&&(X(Z,n),X(L,o))}function ue(n){Z.current===n&&(U(L),U(Z)),de.current===n&&(U(de),pl._currentValue=re)}var be,Ee;function xe(n){if(be===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);be=a&&a[1]||"",Ee=-1<o.stack.indexOf(`
152
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
153
+ `+be+n+Ee}var Me=!1;function Ve(n,a){if(!n||Me)return"";Me=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ce){var se=ce}Reflect.construct(n,[],ge)}else{try{ge.call()}catch(ce){se=ce}n.call(ge.prototype)}}else{try{throw Error()}catch(ce){se=ce}(ge=n())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ce){if(ce&&se&&typeof ce.stack=="string")return[ce.stack,se.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),A=y[0],z=y[1];if(A&&z){var K=A.split(`
154
+ `),oe=z.split(`
155
+ `);for(p=c=0;c<K.length&&!K[c].includes("DetermineComponentFrameRoot");)c++;for(;p<oe.length&&!oe[p].includes("DetermineComponentFrameRoot");)p++;if(c===K.length||p===oe.length)for(c=K.length-1,p=oe.length-1;1<=c&&0<=p&&K[c]!==oe[p];)p--;for(;1<=c&&0<=p;c--,p--)if(K[c]!==oe[p]){if(c!==1||p!==1)do if(c--,p--,0>p||K[c]!==oe[p]){var he=`
156
+ `+K[c].replace(" at new "," at ");return n.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",n.displayName)),he}while(1<=c&&0<=p);break}}}finally{Me=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?xe(o):""}function Ie(n,a){switch(n.tag){case 26:case 27:case 5:return xe(n.type);case 16:return xe("Lazy");case 13:return n.child!==a&&a!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Ve(n.type,!1);case 11:return Ve(n.type.render,!1);case 1:return Ve(n.type,!0);case 31:return xe("Activity");default:return""}}function Be(n){try{var a="",o=null;do a+=Ie(n,o),o=n,n=n.return;while(n);return a}catch(c){return`
157
+ Error generating stack: `+c.message+`
158
+ `+c.stack}}var ke=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,Se=e.unstable_cancelCallback,ze=e.unstable_shouldYield,$e=e.unstable_requestPaint,Ze=e.unstable_now,hn=e.unstable_getCurrentPriorityLevel,vn=e.unstable_ImmediatePriority,bn=e.unstable_UserBlockingPriority,dn=e.unstable_NormalPriority,xt=e.unstable_LowPriority,jt=e.unstable_IdlePriority,pn=e.log,yr=e.unstable_setDisableYieldValue,vr=null,Gt=null;function An(n){if(typeof pn=="function"&&yr(n),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(vr,n)}catch{}}var Dt=Math.clz32?Math.clz32:ir,Kt=Math.log,Wn=Math.LN2;function ir(n){return n>>>=0,n===0?32:31-(Kt(n)/Wn|0)|0}var Pn=256,Rn=262144,Bn=4194304;function Mn(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 br(n,a,o){var c=n.pendingLanes;if(c===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var z=c&134217727;return z!==0?(c=z&~y,c!==0?p=Mn(c):(A&=z,A!==0?p=Mn(A):o||(o=z&~n,o!==0&&(p=Mn(o))))):(z=c&~y,z!==0?p=Mn(z):A!==0?p=Mn(A):o||(o=c&~n,o!==0&&(p=Mn(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 zr(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function wo(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 Ia(){var n=Bn;return Bn<<=1,(Bn&62914560)===0&&(Bn=4194304),n}function Gr(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function ea(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function qt(n,a,o,c,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,K=n.expirationTimes,oe=n.hiddenUpdates;for(o=A&~o;0<o;){var he=31-Dt(o),ge=1<<he;z[he]=0,K[he]=-1;var se=oe[he];if(se!==null)for(oe[he]=null,he=0;he<se.length;he++){var ce=se[he];ce!==null&&(ce.lane&=-536870913)}o&=~ge}c!==0&&mn(n,c,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function mn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var c=31-Dt(a);n.entangledLanes|=a,n.entanglements[c]=n.entanglements[c]|1073741824|o&261930}function $r(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var c=31-Dt(o),p=1<<c;p&a|n[c]&a&&(n[c]|=a),o&=~p}}function Kr(n,a){var o=a&-a;return o=(o&42)!==0?1:jn(o),(o&(n.suspendedLanes|a))!==0?0:o}function jn(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 Yr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Ml(){var n=J.p;return n!==0?n:(n=window.event,n===void 0?32:sb(n.type))}function jl(n,a){var o=J.p;try{return J.p=n,a()}finally{J.p=o}}var la=Math.random().toString(36).slice(2),gn="__reactFiber$"+la,Dn="__reactProps$"+la,La="__reactContainer$"+la,fc="__reactEvents$"+la,Yg="__reactListeners$"+la,Zg="__reactHandles$"+la,Gu="__reactResources$"+la,co="__reactMarker$"+la;function dc(n){delete n[gn],delete n[Dn],delete n[fc],delete n[Yg],delete n[Zg]}function zi(n){var a=n[gn];if(a)return a;for(var o=n.parentNode;o;){if(a=o[La]||o[gn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Hv(n);n!==null;){if(o=n[gn])return o;n=Hv(n)}return a}n=o,o=n.parentNode}return null}function $i(n){if(n=n[gn]||n[La]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function Eo(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Pi(n){var a=n[Gu];return a||(a=n[Gu]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function rn(n){n[co]=!0}var Ku=new Set,Yf={};function Ba(n,a){Ii(n,a),Ii(n+"Capture",a)}function Ii(n,a){for(Yf[n]=a,n=0;n<a.length;n++)Ku.add(a[n])}var Xg=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]*$"),Zf={},Xf={};function Qg(n){return ke.call(Xf,n)?!0:ke.call(Zf,n)?!1:Xg.test(n)?Xf[n]=!0:(Zf[n]=!0,!1)}function Os(n,a,o){if(Qg(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function As(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 Zr(n,a,o,c){if(c===null)n.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+c)}}function Jn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Yu(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Wg(n,a,o){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,y=c.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:c.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function hc(n){if(!n._valueTracker){var a=Yu(n)?"checked":"value";n._valueTracker=Wg(n,a,""+n[a])}}function Qf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return n&&(c=Yu(n)?n.checked?"true":"false":n.value),n=c,n!==o?(a.setValue(n),!0):!1}function Ms(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 sm=/[\n"\\]/g;function In(n){return n.replace(sm,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function kl(n,a,o,c,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=""+Jn(a)):n.value!==""+Jn(a)&&(n.value=""+Jn(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?pc(n,A,Jn(a)):o!=null?pc(n,A,Jn(o)):c!=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=""+Jn(z):n.removeAttribute("name")}function Wf(n,a,o,c,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)){hc(n);return}o=o!=null?""+Jn(o):"",a=a!=null?""+Jn(a):o,z||a===n.value||(n.value=a),n.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=z?n.checked:!!c,n.defaultChecked=!!c,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),hc(n)}function pc(n,a,o){a==="number"&&Ms(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Ci(n,a,o,c){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&&c&&(n[o].defaultSelected=!0)}else{for(o=""+Jn(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function mc(n,a,o){if(a!=null&&(a=""+Jn(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+Jn(o):""}function Jf(n,a,o,c){if(a==null){if(c!=null){if(o!=null)throw Error(i(92));if(te(c)){if(1<c.length)throw Error(i(93));c=c[0]}o=c}o==null&&(o=""),a=o}o=Jn(a),n.defaultValue=o,c=n.textContent,c===o&&c!==""&&c!==null&&(n.value=c),hc(n)}function Li(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Jg=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 ed(n,a,o){var c=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":c?n.setProperty(a,o):typeof o!="number"||o===0||Jg.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function td(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&o[p]!==c&&ed(n,p,c)}else for(var y in a)a.hasOwnProperty(y)&&ed(n,y,a[y])}function gc(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 ey=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"]]),ty=/^[\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 js(n){return ty.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ta(){}var yc=null;function vc(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ui=null,Vi=null;function Zu(n){var a=$i(n);if(a&&(n=a.stateNode)){var o=n[Dn]||null;e:switch(n=a.stateNode,a.type){case"input":if(kl(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="'+In(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var c=o[a];if(c!==n&&c.form===n.form){var p=c[Dn]||null;if(!p)throw Error(i(90));kl(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)c=o[a],c.form===n.form&&Qf(c)}break e;case"textarea":mc(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Ci(n,!!o.multiple,a,!1)}}}var Nl=!1;function nd(n,a,o){if(Nl)return n(a,o);Nl=!0;try{var c=n(a);return c}finally{if(Nl=!1,(Ui!==null||Vi!==null)&&(eu(),Ui&&(a=Ui,n=Vi,Vi=Ui=null,Zu(a),n)))for(a=0;a<n.length;a++)Zu(n[a])}}function qi(n,a){var o=n.stateNode;if(o===null)return null;var c=o[Dn]||null;if(c===null)return null;o=c[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":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dl=!1;if(Xr)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Dl=!1}var ca=null,bc=null,Ri=null;function rd(){if(Ri)return Ri;var n,a=bc,o=a.length,c,p="value"in ca?ca.value:ca.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(c=1;c<=A&&a[o-c]===p[y-c];c++);return Ri=p.slice(n,1<c?1-c:void 0)}function ks(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 Ns(){return!0}function ad(){return!1}function zn(n){function a(o,c,p,y,A){this._reactName=o,this._targetInst=p,this.type=c,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)?Ns:ad,this.isPropagationStopped=ad,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=Ns)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ns)},persist:function(){},isPersistent:Ns}),a}var Ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=zn(Ha),xo=g({},Ha,{view:0,detail:0}),Fe=zn(xo),Oi,zl,fo,fs=g({},xo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sc,button:0,buttons:0,relatedTarget:function(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!==fo&&(fo&&n.type==="mousemove"?(Oi=n.screenX-fo.screenX,zl=n.screenY-fo.screenY):zl=Oi=0,fo=n),Oi)},movementY:function(n){return"movementY"in n?n.movementY:zl}}),id=zn(fs),ny=g({},fs,{dataTransfer:0}),ho=zn(ny),od=g({},xo,{relatedTarget:0}),zs=zn(od),Ua=g({},Ha,{animationName:0,elapsedTime:0,pseudoElement:0}),lm=zn(Ua),cm=g({},Ha,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),um=zn(cm),fm=g({},Ha,{data:0}),sd=zn(fm),dm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hm={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"},pm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ld(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=pm[n])?!!a[n]:!1}function Sc(){return ld}var mm=g({},xo,{key:function(n){if(n.key){var a=dm[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=ks(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?hm[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sc,charCode:function(n){return n.type==="keypress"?ks(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ks(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),gm=zn(mm),ym=g({},fs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ua=zn(ym),vm=g({},xo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sc}),bm=zn(vm),ry=g({},Ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),ay=zn(ry),iy=g({},fs,{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}),cd=zn(iy),oy=g({},Ha,{newState:0,oldState:0}),sy=zn(oy),ly=[9,13,27,32],$l=Xr&&"CompositionEvent"in window,or=null;Xr&&"documentMode"in document&&(or=document.documentMode);var cy=Xr&&"TextEvent"in window&&!or,ud=Xr&&(!$l||or&&8<or&&11>=or),fd=" ",dd=!1;function hd(n,a){switch(n){case"keyup":return ly.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Fi=!1;function uy(n,a){switch(n){case"compositionend":return pd(a);case"keypress":return a.which!==32?null:(dd=!0,fd);case"textInput":return n=a.data,n===fd&&dd?null:n;default:return null}}function fy(n,a){if(Fi)return n==="compositionend"||!$l&&hd(n,a)?(n=rd(),Ri=bc=ca=null,Fi=!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 ud&&a.locale!=="ko"?null:a.data;default:return null}}var dy={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 md(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!dy[n.type]:a==="textarea"}function gd(n,a,o,c){Ui?Vi?Vi.push(c):Vi=[c]:Ui=c,a=su(a,"onChange"),0<a.length&&(o=new Ds("onChange","change",null,o,c),n.push({event:o,listeners:a}))}var _o=null,To=null;function hy(n){jv(n,0)}function $s(n){var a=Eo(n);if(Qf(a))return n}function yd(n,a){if(n==="change")return a}var vd=!1;if(Xr){var Pl;if(Xr){var Ps="oninput"in document;if(!Ps){var bd=document.createElement("div");bd.setAttribute("oninput","return;"),Ps=typeof bd.oninput=="function"}Pl=Ps}else Pl=!1;vd=Pl&&(!document.documentMode||9<document.documentMode)}function Xu(){_o&&(_o.detachEvent("onpropertychange",Sd),To=_o=null)}function Sd(n){if(n.propertyName==="value"&&$s(To)){var a=[];gd(a,To,n,vc(n)),nd(hy,a)}}function wd(n,a,o){n==="focusin"?(Xu(),_o=a,To=o,_o.attachEvent("onpropertychange",Sd)):n==="focusout"&&Xu()}function Ai(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return $s(To)}function Sm(n,a){if(n==="click")return $s(a)}function py(n,a){if(n==="input"||n==="change")return $s(a)}function wm(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Ln=typeof Object.is=="function"?Object.is:wm;function po(n,a){if(Ln(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),c=Object.keys(a);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!ke.call(a,p)||!Ln(n[p],a[p]))return!1}return!0}function Qu(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ed(n,a){var o=Qu(n);n=0;for(var c;o;){if(o.nodeType===3){if(c=n+o.textContent.length,n<=a&&c>=a)return{node:o,offset:a-n};n=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Qu(o)}}function Wu(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Wu(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function xd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Ms(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=Ms(n.document)}return a}function Is(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 my=Xr&&"documentMode"in document&&11>=document.documentMode,Va=null,wc=null,Co=null,Ec=!1;function _d(n,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ec||Va==null||Va!==Ms(c)||(c=Va,"selectionStart"in c&&Is(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Co&&po(Co,c)||(Co=c,c=su(wc,"onSelect"),0<c.length&&(a=new Ds("onSelect","select",null,a,o),n.push({event:a,listeners:c}),a.target=Va)))}function fa(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var Bi={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},P={},$={};Xr&&($=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function q(n){if(P[n])return P[n];if(!Bi[n])return n;var a=Bi[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in $)return P[n]=a[o];return n}var Y=q("animationend"),fe=q("animationiteration"),ve=q("animationstart"),_e=q("transitionrun"),pe=q("transitionstart"),Ce=q("transitioncancel"),Re=q("transitionend"),Ue=new Map,He="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(" ");He.push("scrollEnd");function Ye(n,a){Ue.set(n,a),Ba(a,[n])}var et=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)},ht=[],Ft=0,mt=0;function Nt(){for(var n=Ft,a=mt=Ft=0;a<n;){var o=ht[a];ht[a++]=null;var c=ht[a];ht[a++]=null;var p=ht[a];ht[a++]=null;var y=ht[a];if(ht[a++]=null,c!==null&&p!==null){var A=c.pending;A===null?p.next=p:(p.next=A.next,A.next=p),c.pending=p}y!==0&&da(o,p,y)}}function an(n,a,o,c){ht[Ft++]=n,ht[Ft++]=a,ht[Ft++]=o,ht[Ft++]=c,mt|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function zt(n,a,o,c){return an(n,a,o,c),Ga(n)}function Hn(n,a){return an(n,null,null,a),Ga(n)}function da(n,a,o){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,c=y.alternate,c!==null&&(c.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-Dt(o),n=y.hiddenUpdates,c=n[p],c===null?n[p]=[a]:c.push(a),a.lane=o|536870912),y):null}function Ga(n){if(50<sl)throw sl=0,Mh=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Qr={};function Ro(n,a,o,c){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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(n,a,o,c){return new Ro(n,a,o,c)}function Il(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Pr(n,a){var o=n.alternate;return o===null?(o=Yt(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 Ju(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 Hi(n,a,o,c,p,y){var A=0;if(c=n,typeof n=="function")Il(n)&&(A=1);else if(typeof n=="string")A=Q_(n,o,L.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case I:return n=Yt(31,o,a,p),n.elementType=I,n.lanes=y,n;case w:return ya(o.children,p,y,a);case S:A=8,p|=24;break;case _:return n=Yt(12,o,a,p|2),n.elementType=_,n.lanes=y,n;case C:return n=Yt(13,o,a,p),n.elementType=C,n.lanes=y,n;case R:return n=Yt(19,o,a,p),n.elementType=R,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:A=10;break e;case E:A=9;break e;case T:A=11;break e;case M:A=14;break e;case D:A=16,c=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),c=null}return a=Yt(A,o,a,p),a.elementType=n,a.type=c,a.lanes=y,a}function ya(n,a,o,c){return n=Yt(7,n,c,a),n.lanes=o,n}function Ls(n,a,o){return n=Yt(6,n,null,a),n.lanes=o,n}function xc(n){var a=Yt(18,null,null,0);return a.stateNode=n,a}function _c(n,a,o){return a=Yt(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var ef=new WeakMap;function Sr(n,a){if(typeof n=="object"&&n!==null){var o=ef.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Be(a)},ef.set(n,a),a)}return{value:n,source:a,stack:Be(a)}}var Oo=[],Ao=0,Tc=null,Us=0,wr=[],Er=0,Ka=null,na=1,ra="";function va(n,a){Oo[Ao++]=Us,Oo[Ao++]=Tc,Tc=n,Us=a}function gy(n,a,o){wr[Er++]=na,wr[Er++]=ra,wr[Er++]=Ka,Ka=n;var c=na;n=ra;var p=32-Dt(c)-1;c&=~(1<<p),o+=1;var y=32-Dt(a)+p;if(30<y){var A=p-p%5;y=(c&(1<<A)-1).toString(32),c>>=A,p-=A,na=1<<32-Dt(a)+p|o<<p|c,ra=y+n}else na=1<<y|o<<p|c,ra=n}function Td(n){n.return!==null&&(va(n,1),gy(n,1,0))}function Cd(n){for(;n===Tc;)Tc=Oo[--Ao],Oo[Ao]=null,Us=Oo[--Ao],Oo[Ao]=null;for(;n===Ka;)Ka=wr[--Er],wr[Er]=null,ra=wr[--Er],wr[Er]=null,na=wr[--Er],wr[Er]=null}function yy(n,a){wr[Er++]=na,wr[Er++]=ra,wr[Er++]=Ka,na=a.id,ra=a.overflow,Ka=n}var En=null,Tt=null,rt=!1,Ya=null,xr=!1,Rd=Error(i(519));function Za(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vs(Sr(a,n)),Rd}function vy(n){var a=n.stateNode,o=n.type,c=n.memoizedProps;switch(a[gn]=n,a[Dn]=c,o){case"dialog":We("cancel",a),We("close",a);break;case"iframe":case"object":case"embed":We("load",a);break;case"video":case"audio":for(o=0;o<cl.length;o++)We(cl[o],a);break;case"source":We("error",a);break;case"img":case"image":case"link":We("error",a),We("load",a);break;case"details":We("toggle",a);break;case"input":We("invalid",a),Wf(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":We("invalid",a);break;case"textarea":We("invalid",a),Jf(a,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||c.suppressHydrationWarning===!0||zv(a.textContent,o)?(c.popover!=null&&(We("beforetoggle",a),We("toggle",a)),c.onScroll!=null&&We("scroll",a),c.onScrollEnd!=null&&We("scrollend",a),c.onClick!=null&&(a.onclick=ta),a=!0):a=!1,a||Za(n,!0)}function by(n){for(En=n.return;En;)switch(En.tag){case 5:case 31:case 13:xr=!1;return;case 27:case 3:xr=!0;return;default:En=En.return}}function Mo(n){if(n!==En)return!1;if(!rt)return by(n),rt=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Hh(n.type,n.memoizedProps)),o=!o),o&&Tt&&Za(n),by(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else a===27?(a=Tt,ci(n.type)?(n=Xh,Xh=null,Tt=n):Tt=a):Tt=En?Tr(n.stateNode.nextSibling):null;return!0}function Gi(){Tt=En=null,rt=!1}function Od(){var n=Ya;return n!==null&&(Zn===null?Zn=n:Zn.push.apply(Zn,n),Ya=null),n}function Vs(n){Ya===null?Ya=[n]:Ya.push(n)}var Ad=N(null),Ki=null,ba=null;function Xa(n,a,o){X(Ad,a._currentValue),a._currentValue=o}function Sa(n){n._currentValue=Ad.current,U(Ad)}function Md(n,a,o){for(;n!==null;){var c=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),n===o)break;n=n.return}}function jd(n,a,o,c){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 K=0;K<a.length;K++)if(z.context===a[K]){y.lanes|=o,z=y.alternate,z!==null&&(z.lanes|=o),Md(y.return,o,n),c||(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),Md(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 jo(n,a,o,c){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;Ln(p.pendingProps.value,A.value)||(n!==null?n.push(z):n=[z])}}else if(p===de.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(pl):n=[pl])}p=p.return}n!==null&&jd(a,n,o,c),a.flags|=262144}function Cc(n){for(n=n.firstContext;n!==null;){if(!Ln(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Yi(n){Ki=n,ba=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function xn(n){return Sy(Ki,n)}function Rc(n,a){return Ki===null&&Yi(n),Sy(n,a)}function Sy(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ba===null){if(n===null)throw Error(i(308));ba=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ba=ba.next=a;return o}var Kx=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,c){n.push(c)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},Yx=e.unstable_scheduleCallback,Zx=e.unstable_NormalPriority,Xt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function kd(){return{controller:new Kx,data:new Map,refCount:0}}function qs(n){n.refCount--,n.refCount===0&&Yx(Zx,function(){n.controller.abort()})}var Fs=null,Nd=0,ko=0,No=null;function Xx(n,a){if(Fs===null){var o=Fs=[];Nd=0,ko=$h(),No={status:"pending",value:void 0,then:function(c){o.push(c)}}}return Nd++,a.then(wy,wy),a}function wy(){if(--Nd===0&&Fs!==null){No!==null&&(No.status="fulfilled");var n=Fs;Fs=null,ko=0,No=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Qx(n,a){var o=[],c={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),c}var Ey=H.S;H.S=function(n,a){iv=Ze(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Xx(n,a),Ey!==null&&Ey(n,a)};var Zi=N(null);function Dd(){var n=Zi.current;return n!==null?n:Et.pooledCache}function Oc(n,a){a===null?X(Zi,Zi.current):X(Zi,a.pool)}function xy(){var n=Dd();return n===null?null:{parent:Xt._currentValue,pool:n}}var Do=Error(i(460)),zd=Error(i(474)),Ac=Error(i(542)),Mc={then:function(){}};function _y(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ty(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(ta,ta),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Ry(n),n;default:if(typeof a.status=="string")a.then(ta,ta);else{if(n=Et,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Ry(n),n}throw Qi=a,Do}}function Xi(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Qi=o,Do):o}}var Qi=null;function Cy(){if(Qi===null)throw Error(i(459));var n=Qi;return Qi=null,n}function Ry(n){if(n===Do||n===Ac)throw Error(i(483))}var zo=null,Bs=0;function jc(n){var a=Bs;return Bs+=1,zo===null&&(zo=[]),Ty(zo,n,a)}function Hs(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function kc(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 Oy(n){function a(ne,Q){if(n){var ie=ne.deletions;ie===null?(ne.deletions=[Q],ne.flags|=16):ie.push(Q)}}function o(ne,Q){if(!n)return null;for(;Q!==null;)a(ne,Q),Q=Q.sibling;return null}function c(ne){for(var Q=new Map;ne!==null;)ne.key!==null?Q.set(ne.key,ne):Q.set(ne.index,ne),ne=ne.sibling;return Q}function p(ne,Q){return ne=Pr(ne,Q),ne.index=0,ne.sibling=null,ne}function y(ne,Q,ie){return ne.index=ie,n?(ie=ne.alternate,ie!==null?(ie=ie.index,ie<Q?(ne.flags|=67108866,Q):ie):(ne.flags|=67108866,Q)):(ne.flags|=1048576,Q)}function A(ne){return n&&ne.alternate===null&&(ne.flags|=67108866),ne}function z(ne,Q,ie,me){return Q===null||Q.tag!==6?(Q=Ls(ie,ne.mode,me),Q.return=ne,Q):(Q=p(Q,ie),Q.return=ne,Q)}function K(ne,Q,ie,me){var Pe=ie.type;return Pe===w?he(ne,Q,ie.props.children,me,ie.key):Q!==null&&(Q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Xi(Pe)===Q.type)?(Q=p(Q,ie.props),Hs(Q,ie),Q.return=ne,Q):(Q=Hi(ie.type,ie.key,ie.props,null,ne.mode,me),Hs(Q,ie),Q.return=ne,Q)}function oe(ne,Q,ie,me){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=_c(ie,ne.mode,me),Q.return=ne,Q):(Q=p(Q,ie.children||[]),Q.return=ne,Q)}function he(ne,Q,ie,me,Pe){return Q===null||Q.tag!==7?(Q=ya(ie,ne.mode,me,Pe),Q.return=ne,Q):(Q=p(Q,ie),Q.return=ne,Q)}function ge(ne,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Ls(""+Q,ne.mode,ie),Q.return=ne,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return ie=Hi(Q.type,Q.key,Q.props,null,ne.mode,ie),Hs(ie,Q),ie.return=ne,ie;case b:return Q=_c(Q,ne.mode,ie),Q.return=ne,Q;case D:return Q=Xi(Q),ge(ne,Q,ie)}if(te(Q)||F(Q))return Q=ya(Q,ne.mode,ie,null),Q.return=ne,Q;if(typeof Q.then=="function")return ge(ne,jc(Q),ie);if(Q.$$typeof===O)return ge(ne,Rc(ne,Q),ie);kc(ne,Q)}return null}function se(ne,Q,ie,me){var Pe=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Pe!==null?null:z(ne,Q,""+ie,me);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return ie.key===Pe?K(ne,Q,ie,me):null;case b:return ie.key===Pe?oe(ne,Q,ie,me):null;case D:return ie=Xi(ie),se(ne,Q,ie,me)}if(te(ie)||F(ie))return Pe!==null?null:he(ne,Q,ie,me,null);if(typeof ie.then=="function")return se(ne,Q,jc(ie),me);if(ie.$$typeof===O)return se(ne,Q,Rc(ne,ie),me);kc(ne,ie)}return null}function ce(ne,Q,ie,me,Pe){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ne=ne.get(ie)||null,z(Q,ne,""+me,Pe);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case x:return ne=ne.get(me.key===null?ie:me.key)||null,K(Q,ne,me,Pe);case b:return ne=ne.get(me.key===null?ie:me.key)||null,oe(Q,ne,me,Pe);case D:return me=Xi(me),ce(ne,Q,ie,me,Pe)}if(te(me)||F(me))return ne=ne.get(ie)||null,he(Q,ne,me,Pe,null);if(typeof me.then=="function")return ce(ne,Q,ie,jc(me),Pe);if(me.$$typeof===O)return ce(ne,Q,ie,Rc(Q,me),Pe);kc(Q,me)}return null}function Oe(ne,Q,ie,me){for(var Pe=null,st=null,De=Q,Ke=Q=0,nt=null;De!==null&&Ke<ie.length;Ke++){De.index>Ke?(nt=De,De=null):nt=De.sibling;var lt=se(ne,De,ie[Ke],me);if(lt===null){De===null&&(De=nt);break}n&&De&&lt.alternate===null&&a(ne,De),Q=y(lt,Q,Ke),st===null?Pe=lt:st.sibling=lt,st=lt,De=nt}if(Ke===ie.length)return o(ne,De),rt&&va(ne,Ke),Pe;if(De===null){for(;Ke<ie.length;Ke++)De=ge(ne,ie[Ke],me),De!==null&&(Q=y(De,Q,Ke),st===null?Pe=De:st.sibling=De,st=De);return rt&&va(ne,Ke),Pe}for(De=c(De);Ke<ie.length;Ke++)nt=ce(De,ne,Ke,ie[Ke],me),nt!==null&&(n&&nt.alternate!==null&&De.delete(nt.key===null?Ke:nt.key),Q=y(nt,Q,Ke),st===null?Pe=nt:st.sibling=nt,st=nt);return n&&De.forEach(function(pi){return a(ne,pi)}),rt&&va(ne,Ke),Pe}function Le(ne,Q,ie,me){if(ie==null)throw Error(i(151));for(var Pe=null,st=null,De=Q,Ke=Q=0,nt=null,lt=ie.next();De!==null&&!lt.done;Ke++,lt=ie.next()){De.index>Ke?(nt=De,De=null):nt=De.sibling;var pi=se(ne,De,lt.value,me);if(pi===null){De===null&&(De=nt);break}n&&De&&pi.alternate===null&&a(ne,De),Q=y(pi,Q,Ke),st===null?Pe=pi:st.sibling=pi,st=pi,De=nt}if(lt.done)return o(ne,De),rt&&va(ne,Ke),Pe;if(De===null){for(;!lt.done;Ke++,lt=ie.next())lt=ge(ne,lt.value,me),lt!==null&&(Q=y(lt,Q,Ke),st===null?Pe=lt:st.sibling=lt,st=lt);return rt&&va(ne,Ke),Pe}for(De=c(De);!lt.done;Ke++,lt=ie.next())lt=ce(De,ne,Ke,lt.value,me),lt!==null&&(n&&lt.alternate!==null&&De.delete(lt.key===null?Ke:lt.key),Q=y(lt,Q,Ke),st===null?Pe=lt:st.sibling=lt,st=lt);return n&&De.forEach(function(l2){return a(ne,l2)}),rt&&va(ne,Ke),Pe}function wt(ne,Q,ie,me){if(typeof ie=="object"&&ie!==null&&ie.type===w&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:e:{for(var Pe=ie.key;Q!==null;){if(Q.key===Pe){if(Pe=ie.type,Pe===w){if(Q.tag===7){o(ne,Q.sibling),me=p(Q,ie.props.children),me.return=ne,ne=me;break e}}else if(Q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Xi(Pe)===Q.type){o(ne,Q.sibling),me=p(Q,ie.props),Hs(me,ie),me.return=ne,ne=me;break e}o(ne,Q);break}else a(ne,Q);Q=Q.sibling}ie.type===w?(me=ya(ie.props.children,ne.mode,me,ie.key),me.return=ne,ne=me):(me=Hi(ie.type,ie.key,ie.props,null,ne.mode,me),Hs(me,ie),me.return=ne,ne=me)}return A(ne);case b:e:{for(Pe=ie.key;Q!==null;){if(Q.key===Pe)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){o(ne,Q.sibling),me=p(Q,ie.children||[]),me.return=ne,ne=me;break e}else{o(ne,Q);break}else a(ne,Q);Q=Q.sibling}me=_c(ie,ne.mode,me),me.return=ne,ne=me}return A(ne);case D:return ie=Xi(ie),wt(ne,Q,ie,me)}if(te(ie))return Oe(ne,Q,ie,me);if(F(ie)){if(Pe=F(ie),typeof Pe!="function")throw Error(i(150));return ie=Pe.call(ie),Le(ne,Q,ie,me)}if(typeof ie.then=="function")return wt(ne,Q,jc(ie),me);if(ie.$$typeof===O)return wt(ne,Q,Rc(ne,ie),me);kc(ne,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(o(ne,Q.sibling),me=p(Q,ie),me.return=ne,ne=me):(o(ne,Q),me=Ls(ie,ne.mode,me),me.return=ne,ne=me),A(ne)):o(ne,Q)}return function(ne,Q,ie,me){try{Bs=0;var Pe=wt(ne,Q,ie,me);return zo=null,Pe}catch(De){if(De===Do||De===Ac)throw De;var st=Yt(29,De,null,ne.mode);return st.lanes=me,st.return=ne,st}}}var Wi=Oy(!0),Ay=Oy(!1),Qa=!1;function $d(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pd(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 Wa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ja(n,a,o){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(ft&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=Ga(n),da(n,null,o),a}return an(n,c,a,o),Ga(n)}function Gs(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,$r(n,o)}}function Id(n,a){var o=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,o===c)){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:c.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Ld=!1;function Ks(){if(Ld){var n=No;if(n!==null)throw n}}function Ys(n,a,o,c){Ld=!1;var p=n.updateQueue;Qa=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var K=z,oe=K.next;K.next=null,A===null?y=oe:A.next=oe,A=K;var he=n.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==A&&(z===null?he.firstBaseUpdate=oe:z.next=oe,he.lastBaseUpdate=K))}if(y!==null){var ge=p.baseState;A=0,he=oe=K=null,z=y;do{var se=z.lane&-536870913,ce=se!==z.lane;if(ce?(tt&se)===se:(c&se)===se){se!==0&&se===ko&&(Ld=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Oe=n,Le=z;se=a;var wt=o;switch(Le.tag){case 1:if(Oe=Le.payload,typeof Oe=="function"){ge=Oe.call(wt,ge,se);break e}ge=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Le.payload,se=typeof Oe=="function"?Oe.call(wt,ge,se):Oe,se==null)break e;ge=g({},ge,se);break e;case 2:Qa=!0}}se=z.callback,se!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[se]:ce.push(se))}else ce={lane:se,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(oe=he=ce,K=ge):he=he.next=ce,A|=se;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&&(K=ge),p.baseState=K,p.firstBaseUpdate=oe,p.lastBaseUpdate=he,y===null&&(p.shared.lanes=0),ai|=A,n.lanes=A,n.memoizedState=ge}}function My(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function jy(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)My(o[n],a)}var $o=N(null),Nc=N(0);function ky(n,a){n=Aa,X(Nc,n),X($o,a),Aa=n|a.baseLanes}function Ud(){X(Nc,Aa),X($o,$o.current)}function Vd(){Aa=Nc.current,U($o),U(Nc)}var sr=N(null),_r=null;function ei(n){var a=n.alternate;X(Bt,Bt.current&1),X(sr,n),_r===null&&(a===null||$o.current!==null||a.memoizedState!==null)&&(_r=n)}function qd(n){X(Bt,Bt.current),X(sr,n),_r===null&&(_r=n)}function Ny(n){n.tag===22?(X(Bt,Bt.current),X(sr,n),_r===null&&(_r=n)):ti()}function ti(){X(Bt,Bt.current),X(sr,sr.current)}function lr(n){U(sr),_r===n&&(_r=null),U(Bt)}var Bt=N(0);function Dc(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Yh(o)||Zh(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 wa=0,Ge=null,bt=null,Qt=null,zc=!1,Po=!1,Ji=!1,$c=0,Zs=0,Io=null,Wx=0;function $t(){throw Error(i(321))}function Fd(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!Ln(n[o],a[o]))return!1;return!0}function Bd(n,a,o,c,p,y){return wa=y,Ge=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,H.H=n===null||n.memoizedState===null?g0:ih,Ji=!1,y=o(c,p),Ji=!1,Po&&(y=zy(a,o,c,p)),Dy(n),y}function Dy(n){H.H=Ws;var a=bt!==null&&bt.next!==null;if(wa=0,Qt=bt=Ge=null,zc=!1,Zs=0,Io=null,a)throw Error(i(300));n===null||Wt||(n=n.dependencies,n!==null&&Cc(n)&&(Wt=!0))}function zy(n,a,o,c){Ge=n;var p=0;do{if(Po&&(Io=null),Zs=0,Po=!1,25<=p)throw Error(i(301));if(p+=1,Qt=bt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}H.H=y0,y=a(o,c)}while(Po);return y}function Jx(){var n=H.H,a=n.useState()[0];return a=typeof a.then=="function"?Xs(a):a,n=n.useState()[0],(bt!==null?bt.memoizedState:null)!==n&&(Ge.flags|=1024),a}function Hd(){var n=$c!==0;return $c=0,n}function Gd(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function Kd(n){if(zc){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}zc=!1}wa=0,Qt=bt=Ge=null,Po=!1,Zs=$c=0,Io=null}function $n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Ge.memoizedState=Qt=n:Qt=Qt.next=n,Qt}function Ht(){if(bt===null){var n=Ge.alternate;n=n!==null?n.memoizedState:null}else n=bt.next;var a=Qt===null?Ge.memoizedState:Qt.next;if(a!==null)Qt=a,bt=n;else{if(n===null)throw Ge.alternate===null?Error(i(467)):Error(i(310));bt=n,n={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Qt===null?Ge.memoizedState=Qt=n:Qt=Qt.next=n}return Qt}function Pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(n){var a=Zs;return Zs+=1,Io===null&&(Io=[]),n=Ty(Io,n,a),a=Ge,(Qt===null?a.memoizedState:Qt.next)===null&&(a=a.alternate,H.H=a===null||a.memoizedState===null?g0:ih),n}function Ic(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Xs(n);if(n.$$typeof===O)return xn(n)}throw Error(i(438,String(n)))}function Yd(n){var a=null,o=Ge.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var c=Ge.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Pc(),Ge.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),c=0;c<n;c++)o[c]=B;return a.index++,o}function Ea(n,a){return typeof a=="function"?a(n):a}function Lc(n){var a=Ht();return Zd(a,bt,n)}function Zd(n,a,o){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=o;var p=n.baseQueue,y=c.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,c.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var z=A=null,K=null,oe=a,he=!1;do{var ge=oe.lane&-536870913;if(ge!==oe.lane?(tt&ge)===ge:(wa&ge)===ge){var se=oe.revertLane;if(se===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),ge===ko&&(he=!0);else if((wa&se)===se){oe=oe.next,se===ko&&(he=!0);continue}else ge={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},K===null?(z=K=ge,A=y):K=K.next=ge,Ge.lanes|=se,ai|=se;ge=oe.action,Ji&&o(y,ge),y=oe.hasEagerState?oe.eagerState:o(y,ge)}else se={lane:ge,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},K===null?(z=K=se,A=y):K=K.next=se,Ge.lanes|=ge,ai|=ge;oe=oe.next}while(oe!==null&&oe!==a);if(K===null?A=y:K.next=z,!Ln(y,n.memoizedState)&&(Wt=!0,he&&(o=No,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=K,c.lastRenderedState=y}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Xd(n){var a=Ht(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var c=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);Ln(y,a.memoizedState)||(Wt=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,c]}function $y(n,a,o){var c=Ge,p=Ht(),y=rt;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!Ln((bt||p).memoizedState,o);if(A&&(p.memoizedState=o,Wt=!0),p=p.queue,Jd(Ly.bind(null,c,p,n),[n]),p.getSnapshot!==a||A||Qt!==null&&Qt.memoizedState.tag&1){if(c.flags|=2048,Lo(9,{destroy:void 0},Iy.bind(null,c,p,o,a),null),Et===null)throw Error(i(349));y||(wa&127)!==0||Py(c,a,o)}return o}function Py(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Ge.updateQueue,a===null?(a=Pc(),Ge.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Iy(n,a,o,c){a.value=o,a.getSnapshot=c,Uy(a)&&Vy(n)}function Ly(n,a,o){return o(function(){Uy(a)&&Vy(n)})}function Uy(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!Ln(n,o)}catch{return!0}}function Vy(n){var a=Hn(n,2);a!==null&&Xn(a,n,2)}function Qd(n){var a=$n();if(typeof n=="function"){var o=n;if(n=o(),Ji){An(!0);try{o()}finally{An(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:n},a}function qy(n,a,o,c){return n.baseState=o,Zd(n,bt,typeof c=="function"?c:Ea)}function e_(n,a,o,c,p){if(qc(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)}};H.T!==null?o(!0):y.isTransition=!1,c(y),o=a.pending,o===null?(y.next=a.pending=y,Fy(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Fy(n,a){var o=a.action,c=a.payload,p=n.state;if(a.isTransition){var y=H.T,A={};H.T=A;try{var z=o(p,c),K=H.S;K!==null&&K(A,z),By(n,a,z)}catch(oe){Wd(n,a,oe)}finally{y!==null&&A.types!==null&&(y.types=A.types),H.T=y}}else try{y=o(p,c),By(n,a,y)}catch(oe){Wd(n,a,oe)}}function By(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){Hy(n,a,c)},function(c){return Wd(n,a,c)}):Hy(n,a,o)}function Hy(n,a,o){a.status="fulfilled",a.value=o,Gy(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Fy(n,o)))}function Wd(n,a,o){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,Gy(a),a=a.next;while(a!==c)}n.action=null}function Gy(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Ky(n,a){return a}function Yy(n,a){if(rt){var o=Et.formState;if(o!==null){e:{var c=Ge;if(rt){if(Tt){t:{for(var p=Tt,y=xr;p.nodeType!==8;){if(!y){p=null;break t}if(p=Tr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Tt=Tr(p.nextSibling),c=p.data==="F!";break e}}Za(c)}c=!1}c&&(a=o[0])}}return o=$n(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ky,lastRenderedState:a},o.queue=c,o=h0.bind(null,Ge,c),c.dispatch=o,c=Qd(!1),y=ah.bind(null,Ge,!1,c.queue),c=$n(),p={state:a,dispatch:null,action:n,pending:null},c.queue=p,o=e_.bind(null,Ge,p,y,o),p.dispatch=o,c.memoizedState=n,[a,o,!1]}function Zy(n){var a=Ht();return Xy(a,bt,n)}function Xy(n,a,o){if(a=Zd(n,a,Ky)[0],n=Lc(Ea)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Xs(a)}catch(A){throw A===Do?Ac:A}else c=a;a=Ht();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Ge.flags|=2048,Lo(9,{destroy:void 0},t_.bind(null,p,o),null)),[c,y,n]}function t_(n,a){n.action=a}function Qy(n){var a=Ht(),o=bt;if(o!==null)return Xy(a,o,n);Ht(),a=a.memoizedState,o=Ht();var c=o.queue.dispatch;return o.memoizedState=n,[a,c,!1]}function Lo(n,a,o,c){return n={tag:n,create:o,deps:c,inst:a,next:null},a=Ge.updateQueue,a===null&&(a=Pc(),Ge.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(c=o.next,o.next=n,n.next=c,a.lastEffect=n),n}function Wy(){return Ht().memoizedState}function Uc(n,a,o,c){var p=$n();Ge.flags|=n,p.memoizedState=Lo(1|a,{destroy:void 0},o,c===void 0?null:c)}function Vc(n,a,o,c){var p=Ht();c=c===void 0?null:c;var y=p.memoizedState.inst;bt!==null&&c!==null&&Fd(c,bt.memoizedState.deps)?p.memoizedState=Lo(a,y,o,c):(Ge.flags|=n,p.memoizedState=Lo(1|a,y,o,c))}function Jy(n,a){Uc(8390656,8,n,a)}function Jd(n,a){Vc(2048,8,n,a)}function n_(n){Ge.flags|=4;var a=Ge.updateQueue;if(a===null)a=Pc(),Ge.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function e0(n){var a=Ht().memoizedState;return n_({ref:a,nextImpl:n}),function(){if((ft&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function t0(n,a){return Vc(4,2,n,a)}function n0(n,a){return Vc(4,4,n,a)}function r0(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 a0(n,a,o){o=o!=null?o.concat([n]):null,Vc(4,4,r0.bind(null,a,n),o)}function eh(){}function i0(n,a){var o=Ht();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&Fd(a,c[1])?c[0]:(o.memoizedState=[n,a],n)}function o0(n,a){var o=Ht();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&Fd(a,c[1]))return c[0];if(c=n(),Ji){An(!0);try{n()}finally{An(!1)}}return o.memoizedState=[c,a],c}function th(n,a,o){return o===void 0||(wa&1073741824)!==0&&(tt&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=sv(),Ge.lanes|=n,ai|=n,o)}function s0(n,a,o,c){return Ln(o,a)?o:$o.current!==null?(n=th(n,o,c),Ln(n,a)||(Wt=!0),n):(wa&42)===0||(wa&1073741824)!==0&&(tt&261930)===0?(Wt=!0,n.memoizedState=o):(n=sv(),Ge.lanes|=n,ai|=n,a)}function l0(n,a,o,c,p){var y=J.p;J.p=y!==0&&8>y?y:8;var A=H.T,z={};H.T=z,ah(n,!1,a,o);try{var K=p(),oe=H.S;if(oe!==null&&oe(z,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var he=Qx(K,c);Qs(n,a,he,fr(n))}else Qs(n,a,c,fr(n))}catch(ge){Qs(n,a,{then:function(){},status:"rejected",reason:ge},fr())}finally{J.p=y,A!==null&&z.types!==null&&(A.types=z.types),H.T=A}}function r_(){}function nh(n,a,o,c){if(n.tag!==5)throw Error(i(476));var p=c0(n).queue;l0(n,p,a,re,o===null?r_:function(){return u0(n),o(c)})}function c0(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:re},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function u0(n){var a=c0(n);a.next===null&&(a=n.alternate.memoizedState),Qs(n,a.next.queue,{},fr())}function rh(){return xn(pl)}function f0(){return Ht().memoizedState}function d0(){return Ht().memoizedState}function a_(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=fr();n=Wa(o);var c=Ja(a,n,o);c!==null&&(Xn(c,a,o),Gs(c,a,o)),a={cache:kd()},n.payload=a;return}a=a.return}}function i_(n,a,o){var c=fr();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},qc(n)?p0(a,o):(o=zt(n,a,o,c),o!==null&&(Xn(o,n,c),m0(o,a,c)))}function h0(n,a,o){var c=fr();Qs(n,a,o,c)}function Qs(n,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(qc(n))p0(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,Ln(z,A))return an(n,a,p,0),Et===null&&Nt(),!1}catch{}if(o=zt(n,a,p,c),o!==null)return Xn(o,n,c),m0(o,a,c),!0}return!1}function ah(n,a,o,c){if(c={lane:2,revertLane:$h(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},qc(n)){if(a)throw Error(i(479))}else a=zt(n,o,c,2),a!==null&&Xn(a,n,2)}function qc(n){var a=n.alternate;return n===Ge||a!==null&&a===Ge}function p0(n,a){Po=zc=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function m0(n,a,o){if((o&4194048)!==0){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,$r(n,o)}}var Ws={readContext:xn,use:Ic,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t};Ws.useEffectEvent=$t;var g0={readContext:xn,use:Ic,useCallback:function(n,a){return $n().memoizedState=[n,a===void 0?null:a],n},useContext:xn,useEffect:Jy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,Uc(4194308,4,r0.bind(null,a,n),o)},useLayoutEffect:function(n,a){return Uc(4194308,4,n,a)},useInsertionEffect:function(n,a){Uc(4,2,n,a)},useMemo:function(n,a){var o=$n();a=a===void 0?null:a;var c=n();if(Ji){An(!0);try{n()}finally{An(!1)}}return o.memoizedState=[c,a],c},useReducer:function(n,a,o){var c=$n();if(o!==void 0){var p=o(a);if(Ji){An(!0);try{o(a)}finally{An(!1)}}}else p=a;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=i_.bind(null,Ge,n),[c.memoizedState,n]},useRef:function(n){var a=$n();return n={current:n},a.memoizedState=n},useState:function(n){n=Qd(n);var a=n.queue,o=h0.bind(null,Ge,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:eh,useDeferredValue:function(n,a){var o=$n();return th(o,n,a)},useTransition:function(){var n=Qd(!1);return n=l0.bind(null,Ge,n.queue,!0,!1),$n().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var c=Ge,p=$n();if(rt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),Et===null)throw Error(i(349));(tt&127)!==0||Py(c,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,Jy(Ly.bind(null,c,y,n),[n]),c.flags|=2048,Lo(9,{destroy:void 0},Iy.bind(null,c,y,o,a),null),o},useId:function(){var n=$n(),a=Et.identifierPrefix;if(rt){var o=ra,c=na;o=(c&~(1<<32-Dt(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=$c++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=Wx++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:rh,useFormState:Yy,useActionState:Yy,useOptimistic:function(n){var a=$n();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=ah.bind(null,Ge,!0,o),o.dispatch=a,[n,a]},useMemoCache:Yd,useCacheRefresh:function(){return $n().memoizedState=a_.bind(null,Ge)},useEffectEvent:function(n){var a=$n(),o={impl:n};return a.memoizedState=o,function(){if((ft&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},ih={readContext:xn,use:Ic,useCallback:i0,useContext:xn,useEffect:Jd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Lc,useRef:Wy,useState:function(){return Lc(Ea)},useDebugValue:eh,useDeferredValue:function(n,a){var o=Ht();return s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Lc(Ea)[0],a=Ht().memoizedState;return[typeof n=="boolean"?n:Xs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:rh,useFormState:Zy,useActionState:Zy,useOptimistic:function(n,a){var o=Ht();return qy(o,bt,n,a)},useMemoCache:Yd,useCacheRefresh:d0};ih.useEffectEvent=e0;var y0={readContext:xn,use:Ic,useCallback:i0,useContext:xn,useEffect:Jd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Xd,useRef:Wy,useState:function(){return Xd(Ea)},useDebugValue:eh,useDeferredValue:function(n,a){var o=Ht();return bt===null?th(o,n,a):s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Xd(Ea)[0],a=Ht().memoizedState;return[typeof n=="boolean"?n:Xs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:rh,useFormState:Qy,useActionState:Qy,useOptimistic:function(n,a){var o=Ht();return bt!==null?qy(o,bt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:Yd,useCacheRefresh:d0};y0.useEffectEvent=e0;function oh(n,a,o,c){a=n.memoizedState,o=o(c,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var sh={enqueueSetState:function(n,a,o){n=n._reactInternals;var c=fr(),p=Wa(c);p.payload=a,o!=null&&(p.callback=o),a=Ja(n,p,c),a!==null&&(Xn(a,n,c),Gs(a,n,c))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var c=fr(),p=Wa(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ja(n,p,c),a!==null&&(Xn(a,n,c),Gs(a,n,c))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=fr(),c=Wa(o);c.tag=2,a!=null&&(c.callback=a),a=Ja(n,c,o),a!==null&&(Xn(a,n,o),Gs(a,n,o))}};function v0(n,a,o,c,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,A):a.prototype&&a.prototype.isPureReactComponent?!po(o,c)||!po(p,y):!0}function b0(n,a,o,c){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,c),a.state!==n&&sh.enqueueReplaceState(a,a.state,null)}function eo(n,a){var o=a;if("ref"in a){o={};for(var c in a)c!=="ref"&&(o[c]=a[c])}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 S0(n){et(n)}function w0(n){console.error(n)}function E0(n){et(n)}function Fc(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function x0(n,a,o){try{var c=n.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function lh(n,a,o){return o=Wa(o),o.tag=3,o.payload={element:null},o.callback=function(){Fc(n,a)},o}function _0(n){return n=Wa(n),n.tag=3,n}function T0(n,a,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=c.value;n.payload=function(){return p(y)},n.callback=function(){x0(a,o,c)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){x0(a,o,c),typeof p!="function"&&(ii===null?ii=new Set([this]):ii.add(this));var z=c.stack;this.componentDidCatch(c.value,{componentStack:z!==null?z:""})})}function o_(n,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&jo(a,o,p,!0),o=sr.current,o!==null){switch(o.tag){case 31:case 13:return _r===null?tu():o.alternate===null&&Pt===0&&(Pt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===Mc?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),Nh(n,c,p)),!1;case 22:return o.flags|=65536,c===Mc?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([c]):o.add(c)),Nh(n,c,p)),!1}throw Error(i(435,o.tag))}return Nh(n,c,p),tu(),!1}if(rt)return a=sr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Rd&&(n=Error(i(422),{cause:c}),Vs(Sr(n,o)))):(c!==Rd&&(a=Error(i(423),{cause:c}),Vs(Sr(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=Sr(c,o),p=lh(n.stateNode,c,p),Id(n,p),Pt!==4&&(Pt=2)),!1;var y=Error(i(520),{cause:c});if(y=Sr(y,o),ol===null?ol=[y]:ol.push(y),Pt!==4&&(Pt=2),a===null)return!0;c=Sr(c,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=lh(o.stateNode,c,n),Id(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"&&(ii===null||!ii.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=_0(p),T0(p,n,o,c),Id(o,p),!1}o=o.return}while(o!==null);return!1}var ch=Error(i(461)),Wt=!1;function _n(n,a,o,c){a.child=n===null?Ay(a,null,o,c):Wi(a,n.child,o,c)}function C0(n,a,o,c,p){o=o.render;var y=a.ref;if("ref"in c){var A={};for(var z in c)z!=="ref"&&(A[z]=c[z])}else A=c;return Yi(a),c=Bd(n,a,o,A,y,p),z=Hd(),n!==null&&!Wt?(Gd(n,a,p),xa(n,a,p)):(rt&&z&&Td(a),a.flags|=1,_n(n,a,c,p),a.child)}function R0(n,a,o,c,p){if(n===null){var y=o.type;return typeof y=="function"&&!Il(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,O0(n,a,y,c,p)):(n=Hi(o.type,null,c,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!yh(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:po,o(A,c)&&n.ref===a.ref)return xa(n,a,p)}return a.flags|=1,n=Pr(y,c),n.ref=a.ref,n.return=a,a.child=n}function O0(n,a,o,c,p){if(n!==null){var y=n.memoizedProps;if(po(y,c)&&n.ref===a.ref)if(Wt=!1,a.pendingProps=c=y,yh(n,p))(n.flags&131072)!==0&&(Wt=!0);else return a.lanes=n.lanes,xa(n,a,p)}return uh(n,a,o,c,p)}function A0(n,a,o,c){var p=c.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(c=a.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~y}else c=0,a.child=null;return M0(n,a,y,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&Oc(a,y!==null?y.cachePool:null),y!==null?ky(a,y):Ud(),Ny(a);else return c=a.lanes=536870912,M0(n,a,y!==null?y.baseLanes|o:o,o,c)}else y!==null?(Oc(a,y.cachePool),ky(a,y),ti(),a.memoizedState=null):(n!==null&&Oc(a,null),Ud(),ti());return _n(n,a,p,o),a.child}function Js(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function M0(n,a,o,c,p){var y=Dd();return y=y===null?null:{parent:Xt._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&Oc(a,null),Ud(),Ny(a),n!==null&&jo(n,a,c,!0),a.childLanes=p,null}function Bc(n,a){return a=Gc({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function j0(n,a,o){return Wi(a,n.child,null,o),n=Bc(a,a.pendingProps),n.flags|=2,lr(a),a.memoizedState=null,n}function s_(n,a,o){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(rt){if(c.mode==="hidden")return n=Bc(a,c),a.lanes=536870912,Js(null,n);if(qd(a),(n=Tt)?(n=Fv(n,xr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ka!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=xc(n),o.return=a,a.child=o,En=a,Tt=null)):n=null,n===null)throw Za(a);return a.lanes=536870912,null}return Bc(a,c)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(qd(a),p)if(a.flags&256)a.flags&=-257,a=j0(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(Wt||jo(n,a,o,!1),p=(o&n.childLanes)!==0,Wt||p){if(c=Et,c!==null&&(A=Kr(c,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,Hn(n,A),Xn(c,n,A),ch;tu(),a=j0(n,a,o)}else n=y.treeContext,Tt=Tr(A.nextSibling),En=a,rt=!0,Ya=null,xr=!1,n!==null&&yy(a,n),a=Bc(a,c),a.flags|=4096;return a}return n=Pr(n.child,{mode:c.mode,children:c.children}),n.ref=a.ref,a.child=n,n.return=a,n}function Hc(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 uh(n,a,o,c,p){return Yi(a),o=Bd(n,a,o,c,void 0,p),c=Hd(),n!==null&&!Wt?(Gd(n,a,p),xa(n,a,p)):(rt&&c&&Td(a),a.flags|=1,_n(n,a,o,p),a.child)}function k0(n,a,o,c,p,y){return Yi(a),a.updateQueue=null,o=zy(a,c,o,p),Dy(n),c=Hd(),n!==null&&!Wt?(Gd(n,a,y),xa(n,a,y)):(rt&&c&&Td(a),a.flags|=1,_n(n,a,o,y),a.child)}function N0(n,a,o,c,p){if(Yi(a),a.stateNode===null){var y=Qr,A=o.contextType;typeof A=="object"&&A!==null&&(y=xn(A)),y=new o(c,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=sh,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=c,y.state=a.memoizedState,y.refs={},$d(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?xn(A):Qr,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(oh(a,o,A,c),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&&sh.enqueueReplaceState(y,y.state,null),Ys(a,c,y,p),Ks(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(n===null){y=a.stateNode;var z=a.memoizedProps,K=eo(o,z);y.props=K;var oe=y.context,he=o.contextType;A=Qr,typeof he=="object"&&he!==null&&(A=xn(he));var ge=o.getDerivedStateFromProps;he=typeof ge=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,he||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||oe!==A)&&b0(a,y,c,A),Qa=!1;var se=a.memoizedState;y.state=se,Ys(a,c,y,p),Ks(),oe=a.memoizedState,z||se!==oe||Qa?(typeof ge=="function"&&(oh(a,o,ge,c),oe=a.memoizedState),(K=Qa||v0(a,o,K,c,se,oe,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=c,a.memoizedState=oe),y.props=c,y.state=oe,y.context=A,c=K):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{y=a.stateNode,Pd(n,a),A=a.memoizedProps,he=eo(o,A),y.props=he,ge=a.pendingProps,se=y.context,oe=o.contextType,K=Qr,typeof oe=="object"&&oe!==null&&(K=xn(oe)),z=o.getDerivedStateFromProps,(oe=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==ge||se!==K)&&b0(a,y,c,K),Qa=!1,se=a.memoizedState,y.state=se,Ys(a,c,y,p),Ks();var ce=a.memoizedState;A!==ge||se!==ce||Qa||n!==null&&n.dependencies!==null&&Cc(n.dependencies)?(typeof z=="function"&&(oh(a,o,z,c),ce=a.memoizedState),(he=Qa||v0(a,o,he,c,se,ce,K)||n!==null&&n.dependencies!==null&&Cc(n.dependencies))?(oe||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,ce,K),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,ce,K)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=ce),y.props=c,y.state=ce,y.context=K,c=he):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&se===n.memoizedState||(a.flags|=1024),c=!1)}return y=c,Hc(n,a),c=(a.flags&128)!==0,y||c?(y=a.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&c?(a.child=Wi(a,n.child,null,p),a.child=Wi(a,null,o,p)):_n(n,a,o,p),a.memoizedState=y.state,n=a.child):n=xa(n,a,p),n}function D0(n,a,o,c){return Gi(),a.flags|=256,_n(n,a,o,c),a.child}var fh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dh(n){return{baseLanes:n,cachePool:xy()}}function hh(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=ur),n}function z0(n,a,o){var c=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(Bt.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(rt){if(p?ei(a):ti(),(n=Tt)?(n=Fv(n,xr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ka!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=xc(n),o.return=a,a.child=o,En=a,Tt=null)):n=null,n===null)throw Za(a);return Zh(n)?a.lanes=32:a.lanes=536870912,null}var z=c.children;return c=c.fallback,p?(ti(),p=a.mode,z=Gc({mode:"hidden",children:z},p),c=ya(c,p,o,null),z.return=a,c.return=a,z.sibling=c,a.child=z,c=a.child,c.memoizedState=dh(o),c.childLanes=hh(n,A,o),a.memoizedState=fh,Js(null,c)):(ei(a),ph(a,z))}var K=n.memoizedState;if(K!==null&&(z=K.dehydrated,z!==null)){if(y)a.flags&256?(ei(a),a.flags&=-257,a=mh(n,a,o)):a.memoizedState!==null?(ti(),a.child=n.child,a.flags|=128,a=null):(ti(),z=c.fallback,p=a.mode,c=Gc({mode:"visible",children:c.children},p),z=ya(z,p,o,null),z.flags|=2,c.return=a,z.return=a,c.sibling=z,a.child=c,Wi(a,n.child,null,o),c=a.child,c.memoizedState=dh(o),c.childLanes=hh(n,A,o),a.memoizedState=fh,a=Js(null,c));else if(ei(a),Zh(z)){if(A=z.nextSibling&&z.nextSibling.dataset,A)var oe=A.dgst;A=oe,c=Error(i(419)),c.stack="",c.digest=A,Vs({value:c,source:null,stack:null}),a=mh(n,a,o)}else if(Wt||jo(n,a,o,!1),A=(o&n.childLanes)!==0,Wt||A){if(A=Et,A!==null&&(c=Kr(A,o),c!==0&&c!==K.retryLane))throw K.retryLane=c,Hn(n,c),Xn(A,n,c),ch;Yh(z)||tu(),a=mh(n,a,o)}else Yh(z)?(a.flags|=192,a.child=n.child,a=null):(n=K.treeContext,Tt=Tr(z.nextSibling),En=a,rt=!0,Ya=null,xr=!1,n!==null&&yy(a,n),a=ph(a,c.children),a.flags|=4096);return a}return p?(ti(),z=c.fallback,p=a.mode,K=n.child,oe=K.sibling,c=Pr(K,{mode:"hidden",children:c.children}),c.subtreeFlags=K.subtreeFlags&65011712,oe!==null?z=Pr(oe,z):(z=ya(z,p,o,null),z.flags|=2),z.return=a,c.return=a,c.sibling=z,a.child=c,Js(null,c),c=a.child,z=n.child.memoizedState,z===null?z=dh(o):(p=z.cachePool,p!==null?(K=Xt._currentValue,p=p.parent!==K?{parent:K,pool:K}:p):p=xy(),z={baseLanes:z.baseLanes|o,cachePool:p}),c.memoizedState=z,c.childLanes=hh(n,A,o),a.memoizedState=fh,Js(n.child,c)):(ei(a),o=n.child,n=o.sibling,o=Pr(o,{mode:"visible",children:c.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 ph(n,a){return a=Gc({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Gc(n,a){return n=Yt(22,n,null,a),n.lanes=0,n}function mh(n,a,o){return Wi(a,n.child,null,o),n=ph(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function $0(n,a,o){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a),Md(n.return,a,o)}function gh(n,a,o,c,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=c,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function P0(n,a,o){var c=a.pendingProps,p=c.revealOrder,y=c.tail;c=c.children;var A=Bt.current,z=(A&2)!==0;if(z?(A=A&1|2,a.flags|=128):A&=1,X(Bt,A),_n(n,a,c,o),c=rt?Us:0,!z&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&$0(n,o,a);else if(n.tag===19)$0(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&&Dc(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),gh(a,!1,p,o,y,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&Dc(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}gh(a,!0,o,null,y,c);break;case"together":gh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function xa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),ai|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(jo(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=Pr(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=Pr(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function yh(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Cc(n)))}function l_(n,a,o){switch(a.tag){case 3:ye(a,a.stateNode.containerInfo),Xa(a,Xt,n.memoizedState.cache),Gi();break;case 27:case 5:Ae(a);break;case 4:ye(a,a.stateNode.containerInfo);break;case 10:Xa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,qd(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ei(a),a.flags|=128,null):(o&a.child.childLanes)!==0?z0(n,a,o):(ei(a),n=xa(n,a,o),n!==null?n.sibling:null);ei(a);break;case 19:var p=(n.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(jo(n,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return P0(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),X(Bt,Bt.current),c)break;return null;case 22:return a.lanes=0,A0(n,a,o,a.pendingProps);case 24:Xa(a,Xt,n.memoizedState.cache)}return xa(n,a,o)}function I0(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Wt=!0;else{if(!yh(n,o)&&(a.flags&128)===0)return Wt=!1,l_(n,a,o);Wt=(n.flags&131072)!==0}else Wt=!1,rt&&(a.flags&1048576)!==0&&gy(a,Us,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(n=Xi(a.elementType),a.type=n,typeof n=="function")Il(n)?(c=eo(n,c),a.tag=1,a=N0(null,a,n,c,o)):(a.tag=0,a=uh(null,a,n,c,o));else{if(n!=null){var p=n.$$typeof;if(p===T){a.tag=11,a=C0(null,a,n,c,o);break e}else if(p===M){a.tag=14,a=R0(null,a,n,c,o);break e}}throw a=W(n)||n,Error(i(306,a,""))}}return a;case 0:return uh(n,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=eo(c,a.pendingProps),N0(n,a,c,p,o);case 3:e:{if(ye(a,a.stateNode.containerInfo),n===null)throw Error(i(387));c=a.pendingProps;var y=a.memoizedState;p=y.element,Pd(n,a),Ys(a,c,null,o);var A=a.memoizedState;if(c=A.cache,Xa(a,Xt,c),c!==y.cache&&jd(a,[Xt],o,!0),Ks(),c=A.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=D0(n,a,c,o);break e}else if(c!==p){p=Sr(Error(i(424)),a),Vs(p),a=D0(n,a,c,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Tt=Tr(n.firstChild),En=a,rt=!0,Ya=null,xr=!0,o=Ay(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Gi(),c===p){a=xa(n,a,o);break e}_n(n,a,c,o)}a=a.child}return a;case 26:return Hc(n,a),n===null?(o=Zv(a.type,null,a.pendingProps,null))?a.memoizedState=o:rt||(o=a.type,n=a.pendingProps,c=lu(ee.current).createElement(o),c[gn]=a,c[Dn]=n,Tn(c,o,n),rn(c),a.stateNode=c):a.memoizedState=Zv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Ae(a),n===null&&rt&&(c=a.stateNode=Gv(a.type,a.pendingProps,ee.current),En=a,xr=!0,p=Tt,ci(a.type)?(Xh=p,Tt=Tr(c.firstChild)):Tt=p),_n(n,a,a.pendingProps.children,o),Hc(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&rt&&((p=c=Tt)&&(c=I_(c,a.type,a.pendingProps,xr),c!==null?(a.stateNode=c,En=a,Tt=Tr(c.firstChild),xr=!1,p=!0):p=!1),p||Za(a)),Ae(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,c=y.children,Hh(p,y)?c=null:A!==null&&Hh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=Bd(n,a,Jx,null,null,o),pl._currentValue=p),Hc(n,a),_n(n,a,c,o),a.child;case 6:return n===null&&rt&&((n=o=Tt)&&(o=L_(o,a.pendingProps,xr),o!==null?(a.stateNode=o,En=a,Tt=null,n=!0):n=!1),n||Za(a)),null;case 13:return z0(n,a,o);case 4:return ye(a,a.stateNode.containerInfo),c=a.pendingProps,n===null?a.child=Wi(a,null,c,o):_n(n,a,c,o),a.child;case 11:return C0(n,a,a.type,a.pendingProps,o);case 7:return _n(n,a,a.pendingProps,o),a.child;case 8:return _n(n,a,a.pendingProps.children,o),a.child;case 12:return _n(n,a,a.pendingProps.children,o),a.child;case 10:return c=a.pendingProps,Xa(a,a.type,c.value),_n(n,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,Yi(a),p=xn(p),c=c(p),a.flags|=1,_n(n,a,c,o),a.child;case 14:return R0(n,a,a.type,a.pendingProps,o);case 15:return O0(n,a,a.type,a.pendingProps,o);case 19:return P0(n,a,o);case 31:return s_(n,a,o);case 22:return A0(n,a,o,a.pendingProps);case 24:return Yi(a),c=xn(Xt),n===null?(p=Dd(),p===null&&(p=Et,y=kd(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:c,cache:p},$d(a),Xa(a,Xt,p)):((n.lanes&o)!==0&&(Pd(n,a),Ys(a,null,null,o),Ks()),p=n.memoizedState,y=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Xa(a,Xt,c)):(c=y.cache,Xa(a,Xt,c),c!==p.cache&&jd(a,[Xt],o,!0))),_n(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function _a(n){n.flags|=4}function vh(n,a,o,c,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(fv())n.flags|=8192;else throw Qi=Mc,zd}else n.flags&=-16777217}function L0(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!eb(a))if(fv())n.flags|=8192;else throw Qi=Mc,zd}function Kc(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Ia():536870912,n.lanes|=a,Fo|=a)}function el(n,a){if(!rt)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 c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Ct(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,c=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=o,a}function c_(n,a,o){var c=a.pendingProps;switch(Cd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(a),null;case 1:return Ct(a),null;case 3:return o=a.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Sa(Xt),Te(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Mo(a)?_a(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Od())),Ct(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(_a(a),y!==null?(Ct(a),L0(a,y)):(Ct(a),vh(a,p,null,c,o))):y?y!==n.memoizedState?(_a(a),Ct(a),L0(a,y)):(Ct(a),a.flags&=-16777217):(n=n.memoizedProps,n!==c&&_a(a),Ct(a),vh(a,p,n,c,o)),null;case 27:if(ue(a),o=ee.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&_a(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}n=L.current,Mo(a)?vy(a):(n=Gv(p,c,o),a.stateNode=n,_a(a))}return Ct(a),null;case 5:if(ue(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&_a(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}if(y=L.current,Mo(a))vy(a);else{var A=lu(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 c.is=="string"?A.createElement("select",{is:c.is}):A.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?A.createElement(p,{is:c.is}):A.createElement(p)}}y[gn]=a,y[Dn]=c;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(Tn(y,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&_a(a)}}return Ct(a),vh(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==c&&_a(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(n=ee.current,Mo(a)){if(n=a.stateNode,o=a.memoizedProps,c=null,p=En,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[gn]=a,n=!!(n.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||zv(n.nodeValue,o)),n||Za(a,!0)}else n=lu(n).createTextNode(c),n[gn]=a,a.stateNode=n}return Ct(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(c=Mo(a),o!==null){if(n===null){if(!c)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[gn]=a}else Gi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),n=!1}else o=Od(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(lr(a),a):(lr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Ct(a),null;case 13:if(c=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Mo(a),c!==null&&c.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[gn]=a}else Gi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),p=!1}else p=Od(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(lr(a),a):(lr(a),null)}return lr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=c!==null,n=n!==null&&n.memoizedState!==null,o&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==p&&(c.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Kc(a,a.updateQueue),Ct(a),null);case 4:return Te(),n===null&&Uh(a.stateNode.containerInfo),Ct(a),null;case 10:return Sa(a.type),Ct(a),null;case 19:if(U(Bt),c=a.memoizedState,c===null)return Ct(a),null;if(p=(a.flags&128)!==0,y=c.rendering,y===null)if(p)el(c,!1);else{if(Pt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=Dc(n),y!==null){for(a.flags|=128,el(c,!1),n=y.updateQueue,a.updateQueue=n,Kc(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Ju(o,n),o=o.sibling;return X(Bt,Bt.current&1|2),rt&&va(a,c.treeForkCount),a.child}n=n.sibling}c.tail!==null&&Ze()>Wc&&(a.flags|=128,p=!0,el(c,!1),a.lanes=4194304)}else{if(!p)if(n=Dc(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Kc(a,n),el(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!rt)return Ct(a),null}else 2*Ze()-c.renderingStartTime>Wc&&o!==536870912&&(a.flags|=128,p=!0,el(c,!1),a.lanes=4194304);c.isBackwards?(y.sibling=a.child,a.child=y):(n=c.last,n!==null?n.sibling=y:a.child=y,c.last=y)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Ze(),n.sibling=null,o=Bt.current,X(Bt,p?o&1|2:o&1),rt&&va(a,c.treeForkCount),n):(Ct(a),null);case 22:case 23:return lr(a),Vd(),c=a.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(o&536870912)!==0&&(a.flags&128)===0&&(Ct(a),a.subtreeFlags&6&&(a.flags|=8192)):Ct(a),o=a.updateQueue,o!==null&&Kc(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048),n!==null&&U(Zi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Sa(Xt),Ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function u_(n,a){switch(Cd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return Sa(Xt),Te(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return ue(a),null;case 31:if(a.memoizedState!==null){if(lr(a),a.alternate===null)throw Error(i(340));Gi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(lr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Gi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return U(Bt),null;case 4:return Te(),null;case 10:return Sa(a.type),null;case 22:case 23:return lr(a),Vd(),n!==null&&U(Zi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return Sa(Xt),null;case 25:return null;default:return null}}function U0(n,a){switch(Cd(a),a.tag){case 3:Sa(Xt),Te();break;case 26:case 27:case 5:ue(a);break;case 4:Te();break;case 31:a.memoizedState!==null&&lr(a);break;case 13:lr(a);break;case 19:U(Bt);break;case 10:Sa(a.type);break;case 22:case 23:lr(a),Vd(),n!==null&&U(Zi);break;case 24:Sa(Xt)}}function tl(n,a){try{var o=a.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var p=c.next;o=p;do{if((o.tag&n)===n){c=void 0;var y=o.create,A=o.inst;c=y(),A.destroy=c}o=o.next}while(o!==p)}}catch(z){yt(a,a.return,z)}}function ni(n,a,o){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;do{if((c.tag&n)===n){var A=c.inst,z=A.destroy;if(z!==void 0){A.destroy=void 0,p=a;var K=o,oe=z;try{oe()}catch(he){yt(p,K,he)}}}c=c.next}while(c!==y)}}catch(he){yt(a,a.return,he)}}function V0(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{jy(a,o)}catch(c){yt(n,n.return,c)}}}function q0(n,a,o){o.props=eo(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(c){yt(n,a,c)}}function nl(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof o=="function"?n.refCleanup=o(c):o.current=c}}catch(p){yt(n,a,p)}}function aa(n,a){var o=n.ref,c=n.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){yt(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){yt(n,a,p)}else o.current=null}function F0(n){var a=n.type,o=n.memoizedProps,c=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break e;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(p){yt(n,n.return,p)}}function bh(n,a,o){try{var c=n.stateNode;k_(c,n.type,o,a),c[Dn]=a}catch(p){yt(n,n.return,p)}}function B0(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ci(n.type)||n.tag===4}function Sh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||B0(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&&ci(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 wh(n,a,o){var c=n.tag;if(c===5||c===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=ta));else if(c!==4&&(c===27&&ci(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(wh(n,a,o),n=n.sibling;n!==null;)wh(n,a,o),n=n.sibling}function Yc(n,a,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(c!==4&&(c===27&&ci(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Yc(n,a,o),n=n.sibling;n!==null;)Yc(n,a,o),n=n.sibling}function H0(n){var a=n.stateNode,o=n.memoizedProps;try{for(var c=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Tn(a,c,o),a[gn]=n,a[Dn]=o}catch(y){yt(n,n.return,y)}}var Ta=!1,Jt=!1,Eh=!1,G0=typeof WeakSet=="function"?WeakSet:Set,yn=null;function f_(n,a){if(n=n.containerInfo,Fh=mu,n=xd(n),Is(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,z=-1,K=-1,oe=0,he=0,ge=n,se=null;t:for(;;){for(var ce;ge!==o||p!==0&&ge.nodeType!==3||(z=A+p),ge!==y||c!==0&&ge.nodeType!==3||(K=A+c),ge.nodeType===3&&(A+=ge.nodeValue.length),(ce=ge.firstChild)!==null;)se=ge,ge=ce;for(;;){if(ge===n)break t;if(se===o&&++oe===p&&(z=A),se===y&&++he===c&&(K=A),(ce=ge.nextSibling)!==null)break;ge=se,se=ge.parentNode}ge=ce}o=z===-1||K===-1?null:{start:z,end:K}}else o=null}o=o||{start:0,end:0}}else o=null;for(Bh={focusedElem:n,selectionRange:o},mu=!1,yn=a;yn!==null;)if(a=yn,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,yn=n;else for(;yn!==null;){switch(a=yn,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,c=o.stateNode;try{var Oe=eo(o.type,p);n=c.getSnapshotBeforeUpdate(Oe,y),c.__reactInternalSnapshotBeforeUpdate=n}catch(Le){yt(o,o.return,Le)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)Kh(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Kh(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,yn=n;break}yn=a.return}}function K0(n,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:Ra(n,o),c&4&&tl(5,o);break;case 1:if(Ra(n,o),c&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){yt(o,o.return,A)}else{var p=eo(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){yt(o,o.return,A)}}c&64&&V0(o),c&512&&nl(o,o.return);break;case 3:if(Ra(n,o),c&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{jy(n,a)}catch(A){yt(o,o.return,A)}}break;case 27:a===null&&c&4&&H0(o);case 26:case 5:Ra(n,o),a===null&&c&4&&F0(o),c&512&&nl(o,o.return);break;case 12:Ra(n,o);break;case 31:Ra(n,o),c&4&&X0(n,o);break;case 13:Ra(n,o),c&4&&Q0(n,o),c&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=S_.bind(null,o),U_(n,o))));break;case 22:if(c=o.memoizedState!==null||Ta,!c){a=a!==null&&a.memoizedState!==null||Jt,p=Ta;var y=Jt;Ta=c,(Jt=a)&&!y?Oa(n,o,(o.subtreeFlags&8772)!==0):Ra(n,o),Ta=p,Jt=y}break;case 30:break;default:Ra(n,o)}}function Y0(n){var a=n.alternate;a!==null&&(n.alternate=null,Y0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&dc(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 Mt=null,Gn=!1;function Ca(n,a,o){for(o=o.child;o!==null;)Z0(n,a,o),o=o.sibling}function Z0(n,a,o){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(vr,o)}catch{}switch(o.tag){case 26:Jt||aa(o,a),Ca(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Jt||aa(o,a);var c=Mt,p=Gn;ci(o.type)&&(Mt=o.stateNode,Gn=!1),Ca(n,a,o),fl(o.stateNode),Mt=c,Gn=p;break;case 5:Jt||aa(o,a);case 6:if(c=Mt,p=Gn,Mt=null,Ca(n,a,o),Mt=c,Gn=p,Mt!==null)if(Gn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(o.stateNode)}catch(y){yt(o,a,y)}else try{Mt.removeChild(o.stateNode)}catch(y){yt(o,a,y)}break;case 18:Mt!==null&&(Gn?(n=Mt,Vv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Qo(n)):Vv(Mt,o.stateNode));break;case 4:c=Mt,p=Gn,Mt=o.stateNode.containerInfo,Gn=!0,Ca(n,a,o),Mt=c,Gn=p;break;case 0:case 11:case 14:case 15:ni(2,o,a),Jt||ni(4,o,a),Ca(n,a,o);break;case 1:Jt||(aa(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&q0(o,a,c)),Ca(n,a,o);break;case 21:Ca(n,a,o);break;case 22:Jt=(c=Jt)||o.memoizedState!==null,Ca(n,a,o),Jt=c;break;default:Ca(n,a,o)}}function X0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Qo(n)}catch(o){yt(a,a.return,o)}}}function Q0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Qo(n)}catch(o){yt(a,a.return,o)}}function d_(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new G0),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new G0),a;default:throw Error(i(435,n.tag))}}function Zc(n,a){var o=d_(n);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=w_.bind(null,n,c);c.then(p,p)}})}function Kn(n,a){var o=a.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c],y=n,A=a,z=A;e:for(;z!==null;){switch(z.tag){case 27:if(ci(z.type)){Mt=z.stateNode,Gn=!1;break e}break;case 5:Mt=z.stateNode,Gn=!1;break e;case 3:case 4:Mt=z.stateNode.containerInfo,Gn=!0;break e}z=z.return}if(Mt===null)throw Error(i(160));Z0(y,A,p),Mt=null,Gn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)W0(a,n),a=a.sibling}var Ir=null;function W0(n,a){var o=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Kn(a,n),Yn(n),c&4&&(ni(3,n,n.return),tl(3,n),ni(5,n,n.return));break;case 1:Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),c&64&&Ta&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var p=Ir;if(Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),c&4){var y=o!==null?o.memoizedState:null;if(c=n.memoizedState,o===null)if(c===null)if(n.stateNode===null){e:{c=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":y=p.getElementsByTagName("title")[0],(!y||y[co]||y[gn]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(c),p.head.insertBefore(y,p.querySelector("head > title"))),Tn(y,c,o),y[gn]=n,rn(y),c=y;break e;case"link":var A=Wv("link","href",p).get(c+(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(c),Tn(y,c,o),p.head.appendChild(y);break;case"meta":if(A=Wv("meta","content",p).get(c+(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(c),Tn(y,c,o),p.head.appendChild(y);break;default:throw Error(i(468,c))}y[gn]=n,rn(y),c=y}n.stateNode=c}else Jv(p,n.type,n.stateNode);else n.stateNode=Qv(p,c,n.memoizedProps);else y!==c?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,c===null?Jv(p,n.type,n.stateNode):Qv(p,c,n.memoizedProps)):c===null&&n.stateNode!==null&&bh(n,n.memoizedProps,o.memoizedProps)}break;case 27:Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),o!==null&&c&4&&bh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Kn(a,n),Yn(n),c&512&&(Jt||o===null||aa(o,o.return)),n.flags&32){p=n.stateNode;try{Li(p,"")}catch(Oe){yt(n,n.return,Oe)}}c&4&&n.stateNode!=null&&(p=n.memoizedProps,bh(n,p,o!==null?o.memoizedProps:p)),c&1024&&(Eh=!0);break;case 6:if(Kn(a,n),Yn(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,o=n.stateNode;try{o.nodeValue=c}catch(Oe){yt(n,n.return,Oe)}}break;case 3:if(fu=null,p=Ir,Ir=cu(a.containerInfo),Kn(a,n),Ir=p,Yn(n),c&4&&o!==null&&o.memoizedState.isDehydrated)try{Qo(a.containerInfo)}catch(Oe){yt(n,n.return,Oe)}Eh&&(Eh=!1,J0(n));break;case 4:c=Ir,Ir=cu(n.stateNode.containerInfo),Kn(a,n),Yn(n),Ir=c;break;case 12:Kn(a,n),Yn(n);break;case 31:Kn(a,n),Yn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Zc(n,c)));break;case 13:Kn(a,n),Yn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Qc=Ze()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Zc(n,c)));break;case 22:p=n.memoizedState!==null;var K=o!==null&&o.memoizedState!==null,oe=Ta,he=Jt;if(Ta=oe||p,Jt=he||K,Kn(a,n),Jt=he,Ta=oe,Yn(n),c&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||K||Ta||Jt||to(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){K=o=a;try{if(y=K.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{z=K.stateNode;var ge=K.memoizedProps.style,se=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;z.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Oe){yt(K,K.return,Oe)}}}else if(a.tag===6){if(o===null){K=a;try{K.stateNode.nodeValue=p?"":K.memoizedProps}catch(Oe){yt(K,K.return,Oe)}}}else if(a.tag===18){if(o===null){K=a;try{var ce=K.stateNode;p?qv(ce,!0):qv(K.stateNode,!1)}catch(Oe){yt(K,K.return,Oe)}}}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}c&4&&(c=n.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,Zc(n,o))));break;case 19:Kn(a,n),Yn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Zc(n,c)));break;case 30:break;case 21:break;default:Kn(a,n),Yn(n)}}function Yn(n){var a=n.flags;if(a&2){try{for(var o,c=n.return;c!==null;){if(B0(c)){o=c;break}c=c.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=Sh(n);Yc(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(Li(A,""),o.flags&=-33);var z=Sh(n);Yc(n,z,A);break;case 3:case 4:var K=o.stateNode.containerInfo,oe=Sh(n);wh(n,oe,K);break;default:throw Error(i(161))}}catch(he){yt(n,n.return,he)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function J0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;J0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function Ra(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)K0(n,a.alternate,a),a=a.sibling}function to(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:ni(4,a,a.return),to(a);break;case 1:aa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&q0(a,a.return,o),to(a);break;case 27:fl(a.stateNode);case 26:case 5:aa(a,a.return),to(a);break;case 22:a.memoizedState===null&&to(a);break;case 30:to(a);break;default:to(a)}n=n.sibling}}function Oa(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Oa(p,y,o),tl(4,y);break;case 1:if(Oa(p,y,o),c=y,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(oe){yt(c,c.return,oe)}if(c=y,p=c.updateQueue,p!==null){var z=c.stateNode;try{var K=p.shared.hiddenCallbacks;if(K!==null)for(p.shared.hiddenCallbacks=null,p=0;p<K.length;p++)My(K[p],z)}catch(oe){yt(c,c.return,oe)}}o&&A&64&&V0(y),nl(y,y.return);break;case 27:H0(y);case 26:case 5:Oa(p,y,o),o&&c===null&&A&4&&F0(y),nl(y,y.return);break;case 12:Oa(p,y,o);break;case 31:Oa(p,y,o),o&&A&4&&X0(p,y);break;case 13:Oa(p,y,o),o&&A&4&&Q0(p,y);break;case 22:y.memoizedState===null&&Oa(p,y,o),nl(y,y.return);break;case 30:break;default:Oa(p,y,o)}a=a.sibling}}function xh(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&&qs(o))}function _h(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&qs(n))}function Lr(n,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ev(n,a,o,c),a=a.sibling}function ev(n,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Lr(n,a,o,c),p&2048&&tl(9,a);break;case 1:Lr(n,a,o,c);break;case 3:Lr(n,a,o,c),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&qs(n)));break;case 12:if(p&2048){Lr(n,a,o,c),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(K){yt(a,a.return,K)}}else Lr(n,a,o,c);break;case 31:Lr(n,a,o,c);break;case 13:Lr(n,a,o,c);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?Lr(n,a,o,c):rl(n,a):y._visibility&2?Lr(n,a,o,c):(y._visibility|=2,Uo(n,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&xh(A,a);break;case 24:Lr(n,a,o,c),p&2048&&_h(a.alternate,a);break;default:Lr(n,a,o,c)}}function Uo(n,a,o,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,z=o,K=c,oe=A.flags;switch(A.tag){case 0:case 11:case 15:Uo(y,A,z,K,p),tl(8,A);break;case 23:break;case 22:var he=A.stateNode;A.memoizedState!==null?he._visibility&2?Uo(y,A,z,K,p):rl(y,A):(he._visibility|=2,Uo(y,A,z,K,p)),p&&oe&2048&&xh(A.alternate,A);break;case 24:Uo(y,A,z,K,p),p&&oe&2048&&_h(A.alternate,A);break;default:Uo(y,A,z,K,p)}a=a.sibling}}function rl(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,c=a,p=c.flags;switch(c.tag){case 22:rl(o,c),p&2048&&xh(c.alternate,c);break;case 24:rl(o,c),p&2048&&_h(c.alternate,c);break;default:rl(o,c)}a=a.sibling}}var al=8192;function Vo(n,a,o){if(n.subtreeFlags&al)for(n=n.child;n!==null;)tv(n,a,o),n=n.sibling}function tv(n,a,o){switch(n.tag){case 26:Vo(n,a,o),n.flags&al&&n.memoizedState!==null&&W_(o,Ir,n.memoizedState,n.memoizedProps);break;case 5:Vo(n,a,o);break;case 3:case 4:var c=Ir;Ir=cu(n.stateNode.containerInfo),Vo(n,a,o),Ir=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=al,al=16777216,Vo(n,a,o),al=c):Vo(n,a,o));break;default:Vo(n,a,o)}}function nv(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 il(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];yn=c,av(c,n)}nv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)rv(n),n=n.sibling}function rv(n){switch(n.tag){case 0:case 11:case 15:il(n),n.flags&2048&&ni(9,n,n.return);break;case 3:il(n);break;case 12:il(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Xc(n)):il(n);break;default:il(n)}}function Xc(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];yn=c,av(c,n)}nv(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:ni(8,a,a.return),Xc(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Xc(a));break;default:Xc(a)}n=n.sibling}}function av(n,a){for(;yn!==null;){var o=yn;switch(o.tag){case 0:case 11:case 15:ni(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:qs(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,yn=c;else e:for(o=n;yn!==null;){c=yn;var p=c.sibling,y=c.return;if(Y0(c),c===o){yn=null;break e}if(p!==null){p.return=y,yn=p;break e}yn=y}}}var h_={getCacheForType:function(n){var a=xn(Xt),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return xn(Xt).controller.signal}},p_=typeof WeakMap=="function"?WeakMap:Map,ft=0,Et=null,Qe=null,tt=0,gt=0,cr=null,ri=!1,qo=!1,Th=!1,Aa=0,Pt=0,ai=0,no=0,Ch=0,ur=0,Fo=0,ol=null,Zn=null,Rh=!1,Qc=0,iv=0,Wc=1/0,Jc=null,ii=null,on=0,oi=null,Bo=null,Ma=0,Oh=0,Ah=null,ov=null,sl=0,Mh=null;function fr(){return(ft&2)!==0&&tt!==0?tt&-tt:H.T!==null?$h():Ml()}function sv(){if(ur===0)if((tt&536870912)===0||rt){var n=Rn;Rn<<=1,(Rn&3932160)===0&&(Rn=262144),ur=n}else ur=536870912;return n=sr.current,n!==null&&(n.flags|=32),ur}function Xn(n,a,o){(n===Et&&(gt===2||gt===9)||n.cancelPendingCommit!==null)&&(Ho(n,0),si(n,tt,ur,!1)),ea(n,o),((ft&2)===0||n!==Et)&&(n===Et&&((ft&2)===0&&(no|=o),Pt===4&&si(n,tt,ur,!1)),ia(n))}function lv(n,a,o){if((ft&6)!==0)throw Error(i(327));var c=!o&&(a&127)===0&&(a&n.expiredLanes)===0||zr(n,a),p=c?y_(n,a):kh(n,a,!0),y=c;do{if(p===0){qo&&!c&&si(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!m_(o)){p=kh(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=ol;var K=z.current.memoizedState.isDehydrated;if(K&&(Ho(z,A).flags|=256),A=kh(z,A,!1),A!==2){if(Th&&!K){z.errorRecoveryDisabledLanes|=y,no|=y,p=4;break e}y=Zn,Zn=p,y!==null&&(Zn===null?Zn=y:Zn.push.apply(Zn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){Ho(n,0),si(n,a,0,!0);break}e:{switch(c=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:si(c,a,ur,!ri);break e;case 2:Zn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Qc+300-Ze(),10<p)){if(si(c,a,ur,!ri),br(c,0,!0)!==0)break e;Ma=a,c.timeoutHandle=Lv(cv.bind(null,c,o,Zn,Jc,Rh,a,ur,no,Fo,ri,y,"Throttled",-0,0),p);break e}cv(c,o,Zn,Jc,Rh,a,ur,no,Fo,ri,y,null,-0,0)}}break}while(!0);ia(n)}function cv(n,a,o,c,p,y,A,z,K,oe,he,ge,se,ce){if(n.timeoutHandle=-1,ge=a.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ta},tv(a,y,ge);var Oe=(y&62914560)===y?Qc-Ze():(y&4194048)===y?iv-Ze():0;if(Oe=J_(ge,Oe),Oe!==null){Ma=y,n.cancelPendingCommit=Oe(yv.bind(null,n,a,y,o,c,p,A,z,K,he,ge,null,se,ce)),si(n,y,A,!oe);return}}yv(n,a,y,o,c,p,A,z,K)}function m_(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 c=0;c<o.length;c++){var p=o[c],y=p.getSnapshot;p=p.value;try{if(!Ln(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 si(n,a,o,c){a&=~Ch,a&=~no,n.suspendedLanes|=a,n.pingedLanes&=~a,c&&(n.warmLanes|=a),c=n.expirationTimes;for(var p=a;0<p;){var y=31-Dt(p),A=1<<y;c[y]=-1,p&=~A}o!==0&&mn(n,o,a)}function eu(){return(ft&6)===0?(ll(0),!1):!0}function jh(){if(Qe!==null){if(gt===0)var n=Qe.return;else n=Qe,ba=Ki=null,Kd(n),zo=null,Bs=0,n=Qe;for(;n!==null;)U0(n.alternate,n),n=n.return;Qe=null}}function Ho(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,z_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Ma=0,jh(),Et=n,Qe=o=Pr(n.current,null),tt=a,gt=0,cr=null,ri=!1,qo=zr(n,a),Th=!1,Fo=ur=Ch=no=ai=Pt=0,Zn=ol=null,Rh=!1,(a&8)!==0&&(a|=a&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=a;0<c;){var p=31-Dt(c),y=1<<p;a|=n[p],c&=~y}return Aa=a,Nt(),o}function uv(n,a){Ge=null,H.H=Ws,a===Do||a===Ac?(a=Cy(),gt=3):a===zd?(a=Cy(),gt=4):gt=a===ch?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,cr=a,Qe===null&&(Pt=1,Fc(n,Sr(a,n.current)))}function fv(){var n=sr.current;return n===null?!0:(tt&4194048)===tt?_r===null:(tt&62914560)===tt||(tt&536870912)!==0?n===_r:!1}function dv(){var n=H.H;return H.H=Ws,n===null?Ws:n}function hv(){var n=H.A;return H.A=h_,n}function tu(){Pt=4,ri||(tt&4194048)!==tt&&sr.current!==null||(qo=!0),(ai&134217727)===0&&(no&134217727)===0||Et===null||si(Et,tt,ur,!1)}function kh(n,a,o){var c=ft;ft|=2;var p=dv(),y=hv();(Et!==n||tt!==a)&&(Jc=null,Ho(n,a)),a=!1;var A=Pt;e:do try{if(gt!==0&&Qe!==null){var z=Qe,K=cr;switch(gt){case 8:jh(),A=6;break e;case 3:case 2:case 9:case 6:sr.current===null&&(a=!0);var oe=gt;if(gt=0,cr=null,Go(n,z,K,oe),o&&qo){A=0;break e}break;default:oe=gt,gt=0,cr=null,Go(n,z,K,oe)}}g_(),A=Pt;break}catch(he){uv(n,he)}while(!0);return a&&n.shellSuspendCounter++,ba=Ki=null,ft=c,H.H=p,H.A=y,Qe===null&&(Et=null,tt=0,Nt()),A}function g_(){for(;Qe!==null;)pv(Qe)}function y_(n,a){var o=ft;ft|=2;var c=dv(),p=hv();Et!==n||tt!==a?(Jc=null,Wc=Ze()+500,Ho(n,a)):qo=zr(n,a);e:do try{if(gt!==0&&Qe!==null){a=Qe;var y=cr;t:switch(gt){case 1:gt=0,cr=null,Go(n,a,y,1);break;case 2:case 9:if(_y(y)){gt=0,cr=null,mv(a);break}a=function(){gt!==2&&gt!==9||Et!==n||(gt=7),ia(n)},y.then(a,a);break e;case 3:gt=7;break e;case 4:gt=5;break e;case 7:_y(y)?(gt=0,cr=null,mv(a)):(gt=0,cr=null,Go(n,a,y,7));break;case 5:var A=null;switch(Qe.tag){case 26:A=Qe.memoizedState;case 5:case 27:var z=Qe;if(A?eb(A):z.stateNode.complete){gt=0,cr=null;var K=z.sibling;if(K!==null)Qe=K;else{var oe=z.return;oe!==null?(Qe=oe,nu(oe)):Qe=null}break t}}gt=0,cr=null,Go(n,a,y,5);break;case 6:gt=0,cr=null,Go(n,a,y,6);break;case 8:jh(),Pt=6;break e;default:throw Error(i(462))}}v_();break}catch(he){uv(n,he)}while(!0);return ba=Ki=null,H.H=c,H.A=p,ft=o,Qe!==null?0:(Et=null,tt=0,Nt(),Pt)}function v_(){for(;Qe!==null&&!ze();)pv(Qe)}function pv(n){var a=I0(n.alternate,n,Aa);n.memoizedProps=n.pendingProps,a===null?nu(n):Qe=a}function mv(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=k0(o,a,a.pendingProps,a.type,void 0,tt);break;case 11:a=k0(o,a,a.pendingProps,a.type.render,a.ref,tt);break;case 5:Kd(a);default:U0(o,a),a=Qe=Ju(a,Aa),a=I0(o,a,Aa)}n.memoizedProps=n.pendingProps,a===null?nu(n):Qe=a}function Go(n,a,o,c){ba=Ki=null,Kd(a),zo=null,Bs=0;var p=a.return;try{if(o_(n,p,a,o,tt)){Pt=1,Fc(n,Sr(o,n.current)),Qe=null;return}}catch(y){if(p!==null)throw Qe=p,y;Pt=1,Fc(n,Sr(o,n.current)),Qe=null;return}a.flags&32768?(rt||c===1?n=!0:qo||(tt&536870912)!==0?n=!1:(ri=n=!0,(c===2||c===9||c===3||c===6)&&(c=sr.current,c!==null&&c.tag===13&&(c.flags|=16384))),gv(a,n)):nu(a)}function nu(n){var a=n;do{if((a.flags&32768)!==0){gv(a,ri);return}n=a.return;var o=c_(a.alternate,a,Aa);if(o!==null){Qe=o;return}if(a=a.sibling,a!==null){Qe=a;return}Qe=a=n}while(a!==null);Pt===0&&(Pt=5)}function gv(n,a){do{var o=u_(n.alternate,n);if(o!==null){o.flags&=32767,Qe=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){Qe=n;return}Qe=n=o}while(n!==null);Pt=6,Qe=null}function yv(n,a,o,c,p,y,A,z,K){n.cancelPendingCommit=null;do ru();while(on!==0);if((ft&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=mt,qt(n,o,y,A,z,K),n===Et&&(Qe=Et=null,tt=0),Bo=a,oi=n,Ma=o,Oh=y,Ah=p,ov=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,E_(dn,function(){return Ev(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=H.T,H.T=null,p=J.p,J.p=2,A=ft,ft|=4;try{f_(n,a,o)}finally{ft=A,J.p=p,H.T=c}}on=1,vv(),bv(),Sv()}}function vv(){if(on===1){on=0;var n=oi,a=Bo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=H.T,H.T=null;var c=J.p;J.p=2;var p=ft;ft|=4;try{W0(a,n);var y=Bh,A=xd(n.containerInfo),z=y.focusedElem,K=y.selectionRange;if(A!==z&&z&&z.ownerDocument&&Wu(z.ownerDocument.documentElement,z)){if(K!==null&&Is(z)){var oe=K.start,he=K.end;if(he===void 0&&(he=oe),"selectionStart"in z)z.selectionStart=oe,z.selectionEnd=Math.min(he,z.value.length);else{var ge=z.ownerDocument||document,se=ge&&ge.defaultView||window;if(se.getSelection){var ce=se.getSelection(),Oe=z.textContent.length,Le=Math.min(K.start,Oe),wt=K.end===void 0?Le:Math.min(K.end,Oe);!ce.extend&&Le>wt&&(A=wt,wt=Le,Le=A);var ne=Ed(z,Le),Q=Ed(z,wt);if(ne&&Q&&(ce.rangeCount!==1||ce.anchorNode!==ne.node||ce.anchorOffset!==ne.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var ie=ge.createRange();ie.setStart(ne.node,ne.offset),ce.removeAllRanges(),Le>wt?(ce.addRange(ie),ce.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),ce.addRange(ie))}}}}for(ge=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&ge.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ge.length;z++){var me=ge[z];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}mu=!!Fh,Bh=Fh=null}finally{ft=p,J.p=c,H.T=o}}n.current=a,on=2}}function bv(){if(on===2){on=0;var n=oi,a=Bo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=H.T,H.T=null;var c=J.p;J.p=2;var p=ft;ft|=4;try{K0(n,a.alternate,a)}finally{ft=p,J.p=c,H.T=o}}on=3}}function Sv(){if(on===4||on===3){on=0,$e();var n=oi,a=Bo,o=Ma,c=ov;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?on=5:(on=0,Bo=oi=null,wv(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ii=null),Yr(o),a=a.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(vr,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=H.T,p=J.p,J.p=2,H.T=null;try{for(var y=n.onRecoverableError,A=0;A<c.length;A++){var z=c[A];y(z.value,{componentStack:z.stack})}}finally{H.T=a,J.p=p}}(Ma&3)!==0&&ru(),ia(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Mh?sl++:(sl=0,Mh=n):sl=0,ll(0)}}function wv(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,qs(a)))}function ru(){return vv(),bv(),Sv(),Ev()}function Ev(){if(on!==5)return!1;var n=oi,a=Oh;Oh=0;var o=Yr(Ma),c=H.T,p=J.p;try{J.p=32>o?32:o,H.T=null,o=Ah,Ah=null;var y=oi,A=Ma;if(on=0,Bo=oi=null,Ma=0,(ft&6)!==0)throw Error(i(331));var z=ft;if(ft|=4,rv(y.current),ev(y,y.current,A,o),ft=z,ll(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(vr,y)}catch{}return!0}finally{J.p=p,H.T=c,wv(n,a)}}function xv(n,a,o){a=Sr(o,a),a=lh(n.stateNode,a,2),n=Ja(n,a,2),n!==null&&(ea(n,2),ia(n))}function yt(n,a,o){if(n.tag===3)xv(n,n,o);else for(;a!==null;){if(a.tag===3){xv(a,n,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ii===null||!ii.has(c))){n=Sr(o,n),o=_0(2),c=Ja(a,o,2),c!==null&&(T0(o,c,a,n),ea(c,2),ia(c));break}}a=a.return}}function Nh(n,a,o){var c=n.pingCache;if(c===null){c=n.pingCache=new p_;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(o)||(Th=!0,p.add(o),n=b_.bind(null,n,a,o),a.then(n,n))}function b_(n,a,o){var c=n.pingCache;c!==null&&c.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Et===n&&(tt&o)===o&&(Pt===4||Pt===3&&(tt&62914560)===tt&&300>Ze()-Qc?(ft&2)===0&&Ho(n,0):Ch|=o,Fo===tt&&(Fo=0)),ia(n)}function _v(n,a){a===0&&(a=Ia()),n=Hn(n,a),n!==null&&(ea(n,a),ia(n))}function S_(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),_v(n,o)}function w_(n,a){var o=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),_v(n,o)}function E_(n,a){return je(n,a)}var au=null,Ko=null,Dh=!1,iu=!1,zh=!1,li=0;function ia(n){n!==Ko&&n.next===null&&(Ko===null?au=Ko=n:Ko=Ko.next=n),iu=!0,Dh||(Dh=!0,__())}function ll(n,a){if(!zh&&iu){zh=!0;do for(var o=!1,c=au;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var y=0;else{var A=c.suspendedLanes,z=c.pingedLanes;y=(1<<31-Dt(42|n)+1)-1,y&=p&~(A&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,Ov(c,y))}else y=tt,y=br(c,c===Et?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||zr(c,y)||(o=!0,Ov(c,y));c=c.next}while(o);zh=!1}}function x_(){Tv()}function Tv(){iu=Dh=!1;var n=0;li!==0&&D_()&&(n=li);for(var a=Ze(),o=null,c=au;c!==null;){var p=c.next,y=Cv(c,a);y===0?(c.next=null,o===null?au=p:o.next=p,p===null&&(Ko=o)):(o=c,(n!==0||(y&3)!==0)&&(iu=!0)),c=p}on!==0&&on!==5||ll(n),li!==0&&(li=0)}function Cv(n,a){for(var o=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Dt(y),z=1<<A,K=p[A];K===-1?((z&o)===0||(z&c)!==0)&&(p[A]=wo(z,a)):K<=a&&(n.expiredLanes|=z),y&=~z}if(a=Et,o=tt,o=br(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,o===0||n===a&&(gt===2||gt===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Se(c),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||zr(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(c!==null&&Se(c),Yr(o)){case 2:case 8:o=bn;break;case 32:o=dn;break;case 268435456:o=jt;break;default:o=dn}return c=Rv.bind(null,n),o=je(o,c),n.callbackPriority=a,n.callbackNode=o,a}return c!==null&&c!==null&&Se(c),n.callbackPriority=2,n.callbackNode=null,2}function Rv(n,a){if(on!==0&&on!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(ru()&&n.callbackNode!==o)return null;var c=tt;return c=br(n,n===Et?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(lv(n,c,a),Cv(n,Ze()),n.callbackNode!=null&&n.callbackNode===o?Rv.bind(null,n):null)}function Ov(n,a){if(ru())return null;lv(n,a,!0)}function __(){$_(function(){(ft&6)!==0?je(vn,x_):Tv()})}function $h(){if(li===0){var n=ko;n===0&&(n=Pn,Pn<<=1,(Pn&261888)===0&&(Pn=256)),li=n}return li}function Av(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:js(""+n)}function Mv(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 T_(n,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var y=Av((p[Dn]||null).action),A=c.submitter;A&&(a=(a=A[Dn]||null)?Av(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var z=new Ds("action","action",null,c,p);n.push({event:z,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(li!==0){var K=A?Mv(p,A):new FormData(p);nh(o,{pending:!0,data:K,method:p.method,action:y},null,K)}}else typeof y=="function"&&(z.preventDefault(),K=A?Mv(p,A):new FormData(p),nh(o,{pending:!0,data:K,method:p.method,action:y},y,K))},currentTarget:p}]})}}for(var Ph=0;Ph<He.length;Ph++){var Ih=He[Ph],C_=Ih.toLowerCase(),R_=Ih[0].toUpperCase()+Ih.slice(1);Ye(C_,"on"+R_)}Ye(Y,"onAnimationEnd"),Ye(fe,"onAnimationIteration"),Ye(ve,"onAnimationStart"),Ye("dblclick","onDoubleClick"),Ye("focusin","onFocus"),Ye("focusout","onBlur"),Ye(_e,"onTransitionRun"),Ye(pe,"onTransitionStart"),Ye(Ce,"onTransitionCancel"),Ye(Re,"onTransitionEnd"),Ii("onMouseEnter",["mouseout","mouseover"]),Ii("onMouseLeave",["mouseout","mouseover"]),Ii("onPointerEnter",["pointerout","pointerover"]),Ii("onPointerLeave",["pointerout","pointerover"]),Ba("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ba("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ba("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ba("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ba("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ba("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),O_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function jv(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var c=n[o],p=c.event;c=c.listeners;e:{var y=void 0;if(a)for(var A=c.length-1;0<=A;A--){var z=c[A],K=z.instance,oe=z.currentTarget;if(z=z.listener,K!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){et(he)}p.currentTarget=null,y=K}else for(A=0;A<c.length;A++){if(z=c[A],K=z.instance,oe=z.currentTarget,z=z.listener,K!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){et(he)}p.currentTarget=null,y=K}}}}function We(n,a){var o=a[fc];o===void 0&&(o=a[fc]=new Set);var c=n+"__bubble";o.has(c)||(kv(a,n,2,!1),o.add(c))}function Lh(n,a,o){var c=0;a&&(c|=4),kv(o,n,c,a)}var ou="_reactListening"+Math.random().toString(36).slice(2);function Uh(n){if(!n[ou]){n[ou]=!0,Ku.forEach(function(o){o!=="selectionchange"&&(O_.has(o)||Lh(o,!1,n),Lh(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[ou]||(a[ou]=!0,Lh("selectionchange",!1,a))}}function kv(n,a,o,c){switch(sb(a)){case 2:var p=n2;break;case 8:p=r2;break;default:p=tp}o=p.bind(null,a,o,n),p=void 0,!Dl||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?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 Vh(n,a,o,c,p){var y=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var A=c.tag;if(A===3||A===4){var z=c.stateNode.containerInfo;if(z===p)break;if(A===4)for(A=c.return;A!==null;){var K=A.tag;if((K===3||K===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;z!==null;){if(A=zi(z),A===null)return;if(K=A.tag,K===5||K===6||K===26||K===27){c=y=A;continue e}z=z.parentNode}}c=c.return}nd(function(){var oe=y,he=vc(o),ge=[];e:{var se=Ue.get(n);if(se!==void 0){var ce=Ds,Oe=n;switch(n){case"keypress":if(ks(o)===0)break e;case"keydown":case"keyup":ce=gm;break;case"focusin":Oe="focus",ce=zs;break;case"focusout":Oe="blur",ce=zs;break;case"beforeblur":case"afterblur":ce=zs;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=id;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=ho;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=bm;break;case Y:case fe:case ve:ce=lm;break;case Re:ce=ay;break;case"scroll":case"scrollend":ce=Fe;break;case"wheel":ce=cd;break;case"copy":case"cut":case"paste":ce=um;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=ua;break;case"toggle":case"beforetoggle":ce=sy}var Le=(a&4)!==0,wt=!Le&&(n==="scroll"||n==="scrollend"),ne=Le?se!==null?se+"Capture":null:se;Le=[];for(var Q=oe,ie;Q!==null;){var me=Q;if(ie=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ie===null||ne===null||(me=qi(Q,ne),me!=null&&Le.push(ul(Q,me,ie))),wt)break;Q=Q.return}0<Le.length&&(se=new ce(se,Oe,null,o,he),ge.push({event:se,listeners:Le}))}}if((a&7)===0){e:{if(se=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",se&&o!==yc&&(Oe=o.relatedTarget||o.fromElement)&&(zi(Oe)||Oe[La]))break e;if((ce||se)&&(se=he.window===he?he:(se=he.ownerDocument)?se.defaultView||se.parentWindow:window,ce?(Oe=o.relatedTarget||o.toElement,ce=oe,Oe=Oe?zi(Oe):null,Oe!==null&&(wt=l(Oe),Le=Oe.tag,Oe!==wt||Le!==5&&Le!==27&&Le!==6)&&(Oe=null)):(ce=null,Oe=oe),ce!==Oe)){if(Le=id,me="onMouseLeave",ne="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(Le=ua,me="onPointerLeave",ne="onPointerEnter",Q="pointer"),wt=ce==null?se:Eo(ce),ie=Oe==null?se:Eo(Oe),se=new Le(me,Q+"leave",ce,o,he),se.target=wt,se.relatedTarget=ie,me=null,zi(he)===oe&&(Le=new Le(ne,Q+"enter",Oe,o,he),Le.target=ie,Le.relatedTarget=wt,me=Le),wt=me,ce&&Oe)t:{for(Le=A_,ne=ce,Q=Oe,ie=0,me=ne;me;me=Le(me))ie++;me=0;for(var Pe=Q;Pe;Pe=Le(Pe))me++;for(;0<ie-me;)ne=Le(ne),ie--;for(;0<me-ie;)Q=Le(Q),me--;for(;ie--;){if(ne===Q||Q!==null&&ne===Q.alternate){Le=ne;break t}ne=Le(ne),Q=Le(Q)}Le=null}else Le=null;ce!==null&&Nv(ge,se,ce,Le,!1),Oe!==null&&wt!==null&&Nv(ge,wt,Oe,Le,!0)}}e:{if(se=oe?Eo(oe):window,ce=se.nodeName&&se.nodeName.toLowerCase(),ce==="select"||ce==="input"&&se.type==="file")var st=yd;else if(md(se))if(vd)st=py;else{st=Ai;var De=wd}else ce=se.nodeName,!ce||ce.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?oe&&gc(oe.elementType)&&(st=yd):st=Sm;if(st&&(st=st(n,oe))){gd(ge,st,o,he);break e}De&&De(n,se,oe),n==="focusout"&&oe&&se.type==="number"&&oe.memoizedProps.value!=null&&pc(se,"number",se.value)}switch(De=oe?Eo(oe):window,n){case"focusin":(md(De)||De.contentEditable==="true")&&(Va=De,wc=oe,Co=null);break;case"focusout":Co=wc=Va=null;break;case"mousedown":Ec=!0;break;case"contextmenu":case"mouseup":case"dragend":Ec=!1,_d(ge,o,he);break;case"selectionchange":if(my)break;case"keydown":case"keyup":_d(ge,o,he)}var Ke;if($l)e:{switch(n){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else Fi?hd(n,o)&&(nt="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(nt="onCompositionStart");nt&&(ud&&o.locale!=="ko"&&(Fi||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&Fi&&(Ke=rd()):(ca=he,bc="value"in ca?ca.value:ca.textContent,Fi=!0)),De=su(oe,nt),0<De.length&&(nt=new sd(nt,n,null,o,he),ge.push({event:nt,listeners:De}),Ke?nt.data=Ke:(Ke=pd(o),Ke!==null&&(nt.data=Ke)))),(Ke=cy?uy(n,o):fy(n,o))&&(nt=su(oe,"onBeforeInput"),0<nt.length&&(De=new sd("onBeforeInput","beforeinput",null,o,he),ge.push({event:De,listeners:nt}),De.data=Ke)),T_(ge,n,oe,o,he)}jv(ge,a)})}function ul(n,a,o){return{instance:n,listener:a,currentTarget:o}}function su(n,a){for(var o=a+"Capture",c=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=qi(n,o),p!=null&&c.unshift(ul(n,p,y)),p=qi(n,a),p!=null&&c.push(ul(n,p,y))),n.tag===3)return c;n=n.return}return[]}function A_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Nv(n,a,o,c,p){for(var y=a._reactName,A=[];o!==null&&o!==c;){var z=o,K=z.alternate,oe=z.stateNode;if(z=z.tag,K!==null&&K===c)break;z!==5&&z!==26&&z!==27||oe===null||(K=oe,p?(oe=qi(o,y),oe!=null&&A.unshift(ul(o,oe,K))):p||(oe=qi(o,y),oe!=null&&A.push(ul(o,oe,K)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var M_=/\r\n?/g,j_=/\u0000|\uFFFD/g;function Dv(n){return(typeof n=="string"?n:""+n).replace(M_,`
159
+ `).replace(j_,"")}function zv(n,a){return a=Dv(a),Dv(n)===a}function St(n,a,o,c,p,y){switch(o){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Li(n,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Li(n,""+c);break;case"className":As(n,"class",c);break;case"tabIndex":As(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":As(n,o,c);break;case"style":td(n,c,y);break;case"data":if(a!=="object"){As(n,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=js(""+c),n.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="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"&&St(n,a,"name",p.name,p,null),St(n,a,"formEncType",p.formEncType,p,null),St(n,a,"formMethod",p.formMethod,p,null),St(n,a,"formTarget",p.formTarget,p,null)):(St(n,a,"encType",p.encType,p,null),St(n,a,"method",p.method,p,null),St(n,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=js(""+c),n.setAttribute(o,c);break;case"onClick":c!=null&&(n.onclick=ta);break;case"onScroll":c!=null&&We("scroll",n);break;case"onScrollEnd":c!=null&&We("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}o=js(""+c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""+c):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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":c===!0?n.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,c):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(o,c):n.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(o):n.setAttribute(o,c);break;case"popover":We("beforetoggle",n),We("toggle",n),Os(n,"popover",c);break;case"xlinkActuate":Zr(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Zr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Zr(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Zr(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Zr(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Zr(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Zr(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Zr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Zr(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Os(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=ey.get(o)||o,Os(n,o,c))}}function qh(n,a,o,c,p,y){switch(o){case"style":td(n,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof c=="string"?Li(n,c):(typeof c=="number"||typeof c=="bigint")&&Li(n,""+c);break;case"onScroll":c!=null&&We("scroll",n);break;case"onScrollEnd":c!=null&&We("scrollend",n);break;case"onClick":c!=null&&(n.onclick=ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.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[Dn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof c=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,c,p);break e}o in n?n[o]=c:c===!0?n.setAttribute(o,""):Os(n,o,c)}}}function Tn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",n),We("load",n);var c=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,y,A,o,null)}}p&&St(n,a,"srcSet",o.srcSet,o,null),c&&St(n,a,"src",o.src,o,null);return;case"input":We("invalid",n);var z=y=A=p=null,K=null,oe=null;for(c in o)if(o.hasOwnProperty(c)){var he=o[c];if(he!=null)switch(c){case"name":p=he;break;case"type":A=he;break;case"checked":K=he;break;case"defaultChecked":oe=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:St(n,a,c,he,o,null)}}Wf(n,y,z,K,oe,A,p,!1);return;case"select":We("invalid",n),c=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":c=z;default:St(n,a,p,z,o,null)}a=y,o=A,n.multiple=!!c,a!=null?Ci(n,!!c,a,!1):o!=null&&Ci(n,!!c,o,!0);return;case"textarea":We("invalid",n),y=p=c=null;for(A in o)if(o.hasOwnProperty(A)&&(z=o[A],z!=null))switch(A){case"value":c=z;break;case"defaultValue":p=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(91));break;default:St(n,a,A,z,o,null)}Jf(n,c,p,y);return;case"option":for(K in o)o.hasOwnProperty(K)&&(c=o[K],c!=null)&&(K==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":St(n,a,K,c,o,null));return;case"dialog":We("beforetoggle",n),We("toggle",n),We("cancel",n),We("close",n);break;case"iframe":case"object":We("load",n);break;case"video":case"audio":for(c=0;c<cl.length;c++)We(cl[c],n);break;case"image":We("error",n),We("load",n);break;case"details":We("toggle",n);break;case"embed":case"source":case"link":We("error",n),We("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(oe in o)if(o.hasOwnProperty(oe)&&(c=o[oe],c!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,oe,c,o,null)}return;default:if(gc(a)){for(he in o)o.hasOwnProperty(he)&&(c=o[he],c!==void 0&&qh(n,a,he,c,o,void 0));return}}for(z in o)o.hasOwnProperty(z)&&(c=o[z],c!=null&&St(n,a,z,c,o,null))}function k_(n,a,o,c){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,K=null,oe=null,he=null;for(ce in o){var ge=o[ce];if(o.hasOwnProperty(ce)&&ge!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":K=ge;default:c.hasOwnProperty(ce)||St(n,a,ce,null,c,ge)}}for(var se in c){var ce=c[se];if(ge=o[se],c.hasOwnProperty(se)&&(ce!=null||ge!=null))switch(se){case"type":y=ce;break;case"name":p=ce;break;case"checked":oe=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!==ge&&St(n,a,se,ce,c,ge)}}kl(n,A,z,K,oe,he,y,p);return;case"select":ce=A=z=se=null;for(y in o)if(K=o[y],o.hasOwnProperty(y)&&K!=null)switch(y){case"value":break;case"multiple":ce=K;default:c.hasOwnProperty(y)||St(n,a,y,null,c,K)}for(p in c)if(y=c[p],K=o[p],c.hasOwnProperty(p)&&(y!=null||K!=null))switch(p){case"value":se=y;break;case"defaultValue":z=y;break;case"multiple":A=y;default:y!==K&&St(n,a,p,y,c,K)}a=z,o=A,c=ce,se!=null?Ci(n,!!o,se,!1):!!c!=!!o&&(a!=null?Ci(n,!!o,a,!0):Ci(n,!!o,o?[]:"",!1));return;case"textarea":ce=se=null;for(z in o)if(p=o[z],o.hasOwnProperty(z)&&p!=null&&!c.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:St(n,a,z,null,c,p)}for(A in c)if(p=c[A],y=o[A],c.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":se=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&St(n,a,A,p,c,y)}mc(n,se,ce);return;case"option":for(var Oe in o)se=o[Oe],o.hasOwnProperty(Oe)&&se!=null&&!c.hasOwnProperty(Oe)&&(Oe==="selected"?n.selected=!1:St(n,a,Oe,null,c,se));for(K in c)se=c[K],ce=o[K],c.hasOwnProperty(K)&&se!==ce&&(se!=null||ce!=null)&&(K==="selected"?n.selected=se&&typeof se!="function"&&typeof se!="symbol":St(n,a,K,se,c,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 Le in o)se=o[Le],o.hasOwnProperty(Le)&&se!=null&&!c.hasOwnProperty(Le)&&St(n,a,Le,null,c,se);for(oe in c)if(se=c[oe],ce=o[oe],c.hasOwnProperty(oe)&&se!==ce&&(se!=null||ce!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,a));break;default:St(n,a,oe,se,c,ce)}return;default:if(gc(a)){for(var wt in o)se=o[wt],o.hasOwnProperty(wt)&&se!==void 0&&!c.hasOwnProperty(wt)&&qh(n,a,wt,void 0,c,se);for(he in c)se=c[he],ce=o[he],!c.hasOwnProperty(he)||se===ce||se===void 0&&ce===void 0||qh(n,a,he,se,c,ce);return}}for(var ne in o)se=o[ne],o.hasOwnProperty(ne)&&se!=null&&!c.hasOwnProperty(ne)&&St(n,a,ne,null,c,se);for(ge in c)se=c[ge],ce=o[ge],!c.hasOwnProperty(ge)||se===ce||se==null&&ce==null||St(n,a,ge,se,c,ce)}function $v(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function N_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var p=o[c],y=p.transferSize,A=p.initiatorType,z=p.duration;if(y&&z&&$v(A)){for(A=0,z=p.responseEnd,c+=1;c<o.length;c++){var K=o[c],oe=K.startTime;if(oe>z)break;var he=K.transferSize,ge=K.initiatorType;he&&$v(ge)&&(K=K.responseEnd,A+=he*(K<z?1:(z-oe)/(K-oe)))}if(--c,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 Fh=null,Bh=null;function lu(n){return n.nodeType===9?n:n.ownerDocument}function Pv(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 Iv(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 Hh(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 Gh=null;function D_(){var n=window.event;return n&&n.type==="popstate"?n===Gh?!1:(Gh=n,!0):(Gh=null,!1)}var Lv=typeof setTimeout=="function"?setTimeout:void 0,z_=typeof clearTimeout=="function"?clearTimeout:void 0,Uv=typeof Promise=="function"?Promise:void 0,$_=typeof queueMicrotask=="function"?queueMicrotask:typeof Uv<"u"?function(n){return Uv.resolve(null).then(n).catch(P_)}:Lv;function P_(n){setTimeout(function(){throw n})}function ci(n){return n==="head"}function Vv(n,a){var o=a,c=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(c===0){n.removeChild(p),Qo(a);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")fl(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,fl(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"&&fl(n.ownerDocument.body);o=p}while(o);Qo(a)}function qv(n,a){var o=n;n=0;do{var c=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||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=c}while(o)}function Kh(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":Kh(o),dc(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function I_(n,a,o,c){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){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=Tr(n.nextSibling),n===null)break}return null}function L_(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Tr(n.nextSibling),n===null))return null;return n}function Fv(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Tr(n.nextSibling),n===null))return null;return n}function Yh(n){return n.data==="$?"||n.data==="$~"}function Zh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function U_(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var c=function(){a(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Tr(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 Xh=null;function Bv(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Tr(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Hv(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 Gv(n,a,o){switch(a=lu(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 fl(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);dc(n)}var Cr=new Map,Kv=new Set;function cu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ja=J.d;J.d={f:V_,r:q_,D:F_,C:B_,L:H_,m:G_,X:Y_,S:K_,M:Z_};function V_(){var n=ja.f(),a=eu();return n||a}function q_(n){var a=$i(n);a!==null&&a.tag===5&&a.type==="form"?u0(a):ja.r(n)}var Yo=typeof document>"u"?null:document;function Yv(n,a,o){var c=Yo;if(c&&typeof a=="string"&&a){var p=In(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Kv.has(p)||(Kv.add(p),n={rel:n,crossOrigin:o,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Tn(a,"link",n),rn(a),c.head.appendChild(a)))}}function F_(n){ja.D(n),Yv("dns-prefetch",n,null)}function B_(n,a){ja.C(n,a),Yv("preconnect",n,a)}function H_(n,a,o){ja.L(n,a,o);var c=Yo;if(c&&n&&a){var p='link[rel="preload"][as="'+In(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+In(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+In(o.imageSizes)+'"]')):p+='[href="'+In(n)+'"]';var y=p;switch(a){case"style":y=Zo(n);break;case"script":y=Xo(n)}Cr.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Cr.set(y,n),c.querySelector(p)!==null||a==="style"&&c.querySelector(dl(y))||a==="script"&&c.querySelector(hl(y))||(a=c.createElement("link"),Tn(a,"link",n),rn(a),c.head.appendChild(a)))}}function G_(n,a){ja.m(n,a);var o=Yo;if(o&&n){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+In(c)+'"][href="'+In(n)+'"]',y=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Xo(n)}if(!Cr.has(y)&&(n=g({rel:"modulepreload",href:n},a),Cr.set(y,n),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(hl(y)))return}c=o.createElement("link"),Tn(c,"link",n),rn(c),o.head.appendChild(c)}}}function K_(n,a,o){ja.S(n,a,o);var c=Yo;if(c&&n){var p=Pi(c).hoistableStyles,y=Zo(n);a=a||"default";var A=p.get(y);if(!A){var z={loading:0,preload:null};if(A=c.querySelector(dl(y)))z.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Cr.get(y))&&Qh(n,o);var K=A=c.createElement("link");rn(K),Tn(K,"link",n),K._p=new Promise(function(oe,he){K.onload=oe,K.onerror=he}),K.addEventListener("load",function(){z.loading|=1}),K.addEventListener("error",function(){z.loading|=2}),z.loading|=4,uu(A,a,c)}A={type:"stylesheet",instance:A,count:1,state:z},p.set(y,A)}}}function Y_(n,a){ja.X(n,a);var o=Yo;if(o&&n){var c=Pi(o).hoistableScripts,p=Xo(n),y=c.get(p);y||(y=o.querySelector(hl(p)),y||(n=g({src:n,async:!0},a),(a=Cr.get(p))&&Wh(n,a),y=o.createElement("script"),rn(y),Tn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function Z_(n,a){ja.M(n,a);var o=Yo;if(o&&n){var c=Pi(o).hoistableScripts,p=Xo(n),y=c.get(p);y||(y=o.querySelector(hl(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=Cr.get(p))&&Wh(n,a),y=o.createElement("script"),rn(y),Tn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function Zv(n,a,o,c){var p=(p=ee.current)?cu(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=Zo(o.href),o=Pi(p).hoistableStyles,c=o.get(a),c||(c={type:"style",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Zo(o.href);var y=Pi(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(dl(n)))&&!y._p&&(A.instance=y,A.state.loading=5),Cr.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},Cr.set(n,o),y||X_(p,n,o,A.state))),a&&c===null)throw Error(i(528,""));return A}if(a&&c!==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=Xo(o),o=Pi(p).hoistableScripts,c=o.get(a),c||(c={type:"script",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Zo(n){return'href="'+In(n)+'"'}function dl(n){return'link[rel="stylesheet"]['+n+"]"}function Xv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function X_(n,a,o,c){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=n.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Tn(a,"link",o),rn(a),n.head.appendChild(a))}function Xo(n){return'[src="'+In(n)+'"]'}function hl(n){return"script[async]"+n}function Qv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var c=n.querySelector('style[data-href~="'+In(o.href)+'"]');if(c)return a.instance=c,rn(c),c;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),rn(c),Tn(c,"style",p),uu(c,o.precedence,n),a.instance=c;case"stylesheet":p=Zo(o.href);var y=n.querySelector(dl(p));if(y)return a.state.loading|=4,a.instance=y,rn(y),y;c=Xv(o),(p=Cr.get(p))&&Qh(c,p),y=(n.ownerDocument||n).createElement("link"),rn(y);var A=y;return A._p=new Promise(function(z,K){A.onload=z,A.onerror=K}),Tn(y,"link",c),a.state.loading|=4,uu(y,o.precedence,n),a.instance=y;case"script":return y=Xo(o.src),(p=n.querySelector(hl(y)))?(a.instance=p,rn(p),p):(c=o,(p=Cr.get(y))&&(c=g({},o),Wh(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),rn(p),Tn(p,"link",c),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&&(c=a.instance,a.state.loading|=4,uu(c,o.precedence,n));return a.instance}function uu(n,a,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,y=p,A=0;A<c.length;A++){var z=c[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 Qh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Wh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var fu=null;function Wv(n,a,o){if(fu===null){var c=new Map,p=fu=new Map;p.set(o,c)}else p=fu,c=p.get(o),c||(c=new Map,p.set(o,c));if(c.has(n))return c;for(c.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[co]||y[gn]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var z=c.get(A);z?z.push(y):c.set(A,[y])}}return c}function Jv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function Q_(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 eb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function W_(n,a,o,c){if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Zo(c.href),y=a.querySelector(dl(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=du.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,rn(y);return}y=a.ownerDocument||a,c=Xv(c),(p=Cr.get(p))&&Qh(c,p),y=y.createElement("link"),rn(y);var A=y;A._p=new Promise(function(z,K){A.onload=z,A.onerror=K}),Tn(y,"link",c),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=du.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var Jh=0;function J_(n,a){return n.stylesheets&&n.count===0&&pu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var c=setTimeout(function(){if(n.stylesheets&&pu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&Jh===0&&(Jh=62500*N_());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&pu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Jh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var hu=null;function pu(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,hu=new Map,a.forEach(e2,n),hu=null,du.call(n))}function e2(n,a){if(!(a.state.loading&4)){var o=hu.get(n);if(o)var c=o.get(null);else{o=new Map,hu.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),c=A)}c&&o.set(null,c)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||c,y===c&&o.set(null,p),o.set(A,p),this.count++,c=du.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var pl={$$typeof:O,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function t2(n,a,o,c,p,y,A,z,K){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=Gr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gr(0),this.hiddenUpdates=Gr(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function tb(n,a,o,c,p,y,A,z,K,oe,he,ge){return n=new t2(n,a,o,A,K,oe,he,ge,z),a=1,y===!0&&(a|=24),y=Yt(3,null,null,a),n.current=y,y.stateNode=n,a=kd(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:c,isDehydrated:o,cache:a},$d(y),n}function nb(n){return n?(n=Qr,n):Qr}function rb(n,a,o,c,p,y){p=nb(p),c.context===null?c.context=p:c.pendingContext=p,c=Wa(a),c.payload={element:o},y=y===void 0?null:y,y!==null&&(c.callback=y),o=Ja(n,c,a),o!==null&&(Xn(o,n,a),Gs(o,n,a))}function ab(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function ep(n,a){ab(n,a),(n=n.alternate)&&ab(n,a)}function ib(n){if(n.tag===13||n.tag===31){var a=Hn(n,67108864);a!==null&&Xn(a,n,67108864),ep(n,67108864)}}function ob(n){if(n.tag===13||n.tag===31){var a=fr();a=jn(a);var o=Hn(n,a);o!==null&&Xn(o,n,a),ep(n,a)}}var mu=!0;function n2(n,a,o,c){var p=H.T;H.T=null;var y=J.p;try{J.p=2,tp(n,a,o,c)}finally{J.p=y,H.T=p}}function r2(n,a,o,c){var p=H.T;H.T=null;var y=J.p;try{J.p=8,tp(n,a,o,c)}finally{J.p=y,H.T=p}}function tp(n,a,o,c){if(mu){var p=np(c);if(p===null)Vh(n,a,c,gu,o),lb(n,c);else if(i2(p,n,a,o,c))c.stopPropagation();else if(lb(n,c),a&4&&-1<a2.indexOf(n)){for(;p!==null;){var y=$i(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Mn(y.pendingLanes);if(A!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;A;){var K=1<<31-Dt(A);z.entanglements[1]|=K,A&=~K}ia(y),(ft&6)===0&&(Wc=Ze()+500,ll(0))}}break;case 31:case 13:z=Hn(y,2),z!==null&&Xn(z,y,2),eu(),ep(y,2)}if(y=np(c),y===null&&Vh(n,a,c,gu,o),y===p)break;p=y}p!==null&&c.stopPropagation()}else Vh(n,a,c,null,o)}}function np(n){return n=vc(n),rp(n)}var gu=null;function rp(n){if(gu=null,n=zi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=u(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 sb(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(hn()){case vn:return 2;case bn:return 8;case dn:case xt:return 32;case jt:return 268435456;default:return 32}default:return 32}}var ap=!1,ui=null,fi=null,di=null,ml=new Map,gl=new Map,hi=[],a2="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 lb(n,a){switch(n){case"focusin":case"focusout":ui=null;break;case"dragenter":case"dragleave":fi=null;break;case"mouseover":case"mouseout":di=null;break;case"pointerover":case"pointerout":ml.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":gl.delete(a.pointerId)}}function yl(n,a,o,c,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:c,nativeEvent:y,targetContainers:[p]},a!==null&&(a=$i(a),a!==null&&ib(a)),n):(n.eventSystemFlags|=c,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function i2(n,a,o,c,p){switch(a){case"focusin":return ui=yl(ui,n,a,o,c,p),!0;case"dragenter":return fi=yl(fi,n,a,o,c,p),!0;case"mouseover":return di=yl(di,n,a,o,c,p),!0;case"pointerover":var y=p.pointerId;return ml.set(y,yl(ml.get(y)||null,n,a,o,c,p)),!0;case"gotpointercapture":return y=p.pointerId,gl.set(y,yl(gl.get(y)||null,n,a,o,c,p)),!0}return!1}function cb(n){var a=zi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=u(o),a!==null){n.blockedOn=a,jl(n.priority,function(){ob(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,jl(n.priority,function(){ob(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 yu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=np(n.nativeEvent);if(o===null){o=n.nativeEvent;var c=new o.constructor(o.type,o);yc=c,o.target.dispatchEvent(c),yc=null}else return a=$i(o),a!==null&&ib(a),n.blockedOn=o,!1;a.shift()}return!0}function ub(n,a,o){yu(n)&&o.delete(a)}function o2(){ap=!1,ui!==null&&yu(ui)&&(ui=null),fi!==null&&yu(fi)&&(fi=null),di!==null&&yu(di)&&(di=null),ml.forEach(ub),gl.forEach(ub)}function vu(n,a){n.blockedOn===a&&(n.blockedOn=null,ap||(ap=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,o2)))}var bu=null;function fb(n){bu!==n&&(bu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bu===n&&(bu=null);for(var a=0;a<n.length;a+=3){var o=n[a],c=n[a+1],p=n[a+2];if(typeof c!="function"){if(rp(c||o)===null)continue;break}var y=$i(o);y!==null&&(n.splice(a,3),a-=3,nh(y,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function Qo(n){function a(K){return vu(K,n)}ui!==null&&vu(ui,n),fi!==null&&vu(fi,n),di!==null&&vu(di,n),ml.forEach(a),gl.forEach(a);for(var o=0;o<hi.length;o++){var c=hi[o];c.blockedOn===n&&(c.blockedOn=null)}for(;0<hi.length&&(o=hi[0],o.blockedOn===null);)cb(o),o.blockedOn===null&&hi.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],y=o[c+1],A=p[Dn]||null;if(typeof y=="function")A||fb(o);else if(A){var z=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[Dn]||null)z=A.formAction;else if(rp(p)!==null)continue}else z=A.action;typeof z=="function"?o[c+1]=z:(o.splice(c,3),c-=3),fb(o)}}}function db(){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),c||setTimeout(o,20)}function o(){if(!c&&!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 c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function ip(n){this._internalRoot=n}Su.prototype.render=ip.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,c=fr();rb(o,c,n,a,null,null)},Su.prototype.unmount=ip.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;rb(n.current,2,null,n,null,null),eu(),a[La]=null}};function Su(n){this._internalRoot=n}Su.prototype.unstable_scheduleHydration=function(n){if(n){var a=Ml();n={blockedOn:null,target:n,priority:a};for(var o=0;o<hi.length&&a!==0&&a<hi[o].priority;o++);hi.splice(o,0,n),o===0&&cb(n)}};var hb=t.version;if(hb!=="19.2.3")throw Error(i(527,hb,"19.2.3"));J.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 s2={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{vr=wu.inject(s2),Gt=wu}catch{}}return Ob.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,c="",p=S0,y=w0,A=E0;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=tb(n,1,!1,null,null,o,c,null,p,y,A,db),n[La]=a.current,Uh(n),new ip(a)},Ob.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var c=!1,p="",y=S0,A=w0,z=E0,K=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!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&&(K=o.formState)),a=tb(n,1,!0,a,o??null,c,p,K,y,A,z,db),a.context=nb(null),o=a.current,c=fr(),c=jn(c),p=Wa(c),p.callback=null,Ja(o,p,c),o=c,a.current.lanes=o,ea(a,o),ia(a),n[La]=a.current,Uh(n),new Su(a)},Ob.version="19.2.3",Ob}var Mz;function E2e(){if(Mz)return cC.exports;Mz=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(),cC.exports=w2e(),cC.exports}E2e();function x2e(e,t,r,i,s){return{callTool:async(u,f)=>{t("callTool",{name:u,args:f});const d=await i(u,f??{});return t("← callTool response",d,"response"),d},sendFollowUpMessage:async u=>{t("sendFollowUpMessage",u)},openExternal:u=>{t("openExternal",u)},requestDisplayMode:async u=>(t("requestDisplayMode",u),e.displayMode=u.mode,r("displayMode",u.mode),{mode:u.mode}),setWidgetState:async u=>{t("setWidgetState",u),e.widgetState=u,r("widgetState",u)},requestModal:async u=>{t("requestModal",u),e.displayMode="modal",e.view={mode:"modal"},r("displayMode","modal")},uploadFile:async u=>(t("uploadFile",{name:u.name,size:u.size}),{fileId:"123"}),getFileDownloadUrl:async u=>(t("getFileDownloadUrl",u),{downloadUrl:"https://example.com/file.pdf"}),setOpenInAppUrl:async u=>{t("setOpenInAppUrl",u),s(u.href)}}}function _2e(e,t){const r=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(i,s,l,u){const f=Reflect.set(i,s,l,u);if(r.includes(s)){const d=new U_e(TV,{detail:{globals:{[s]:l}}});t.dispatchEvent(d)}return f}})}function T2e(e,t,r,i,s,l){const u=K1(t),f=_2e(u,e),d=x2e(f,r,i,s,l);uJ(f,d),e.openai=f}function C2e(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=`
160
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
161
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
162
+ if ("openai" in window && window.openai != null) { resolve(); return; }
163
+ Object.defineProperty(window, "openai", {
164
+ configurable: true,
165
+ enumerable: true,
166
+ get() { return undefined; },
167
+ set(value) {
168
+ Object.defineProperty(window, "openai", {
169
+ configurable: true,
170
+ enumerable: true,
171
+ writable: true,
172
+ value,
173
+ });
174
+ resolve();
175
+ },
176
+ });
177
+ });
178
+ `;return r.textContent=`
179
+ ${i}
180
+ await waitForOpenAI();
181
+ ${r.textContent}
182
+ `,t.head.innerHTML+t.body.innerHTML}const R2e=()=>{const e=Uf(),t=Ng(e.name),{openaiObject:r}=t??{},{data:i}=V$(e._meta?.["openai/outputTemplate"]),{setToolData:s,pushOpenAiLog:l,updateOpenaiObject:u,setOpenInAppUrl:f}=kg(),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 x=d.current;if(!x||!x.contentWindow||!x.contentDocument)return;m.current=!0;const b=i.contents[0]._meta?.["openai/widgetDomain"];b&&typeof b=="string"&&f(e.name,b),T2e(x.contentWindow,r,(w,S,_="default")=>{l(e.name,{timestamp:Date.now(),command:w,args:S,type:_})},(w,S)=>{u(e.name,w,S)},(w,S)=>Mu.callTool(w,S),w=>{f(e.name,w)}),x.contentDocument.open(),x.contentDocument.write(C2e(g)),x.contentDocument.close(),s(e.name,{openaiRef:d})},[r,l,s,u,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"})})},O2e=()=>{const e=Uf(),t=Ng(e.name),{defaultLayout:r,onLayoutChange:i}=Ab({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:s,onLayoutChange:l}=Ab({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:u,onLayoutChange:f}=Ab({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:d,onLayoutChange:h}=Ab({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(Im,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:d,onLayoutChange:h,children:[k.jsx(El,{id:"top-section",minSize:"30",children:k.jsxs(Im,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:r,onLayoutChange:i,children:[k.jsx(El,{id:"input-column",minSize:"20",maxSize:"60",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(WEe,{})})}),k.jsx(Lm,{className:"w-px bg-border"}),k.jsx(El,{id:"output-column",minSize:"30",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(L_e,{})})})]})}),m&&k.jsxs(k.Fragment,{children:[k.jsx(Lm,{className:"h-px bg-border"}),k.jsx(El,{id:"widget-section",minSize:"20",children:k.jsxs(Im,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:u,onLayoutChange:f,children:[k.jsx(El,{id:"widget-logs-panel",minSize:"30",children:k.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:k.jsxs(Im,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:s,onLayoutChange:l,children:[k.jsx(El,{id:"widget-panel",minSize:"20",maxSize:"80",children:k.jsx("div",{className:"h-full overflow-hidden",children:k.jsx(j.Suspense,{children:k.jsx(R2e,{})})})}),k.jsx(Lm,{className:"h-px bg-border"}),k.jsx(El,{id:"logs-panel",minSize:"20",children:k.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:k.jsx(D_e,{})})})]})})}),k.jsx(Lm,{className:"w-px bg-border"}),k.jsx(El,{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(j_e,{})})})})]})})]})]})})};function A2e(){const e=U$(),[,t]=mA(),r=wA();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:Vt("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:Vt("font-semibold text-sm leading-tight truncate",s&&"text-accent-foreground"),children:i.name}),i.description&&k.jsx("div",{className:Vt("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 M2e(){const e=wA(),{status:t,requiresAuth:r}=Au(),{defaultLayout:i,onLayoutChange:s}=Ab({id:"skybridge-devtools-tools-list",storage:localStorage}),l=t==="authenticated";return k.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[k.jsx(goe,{}),l?k.jsxs(Im,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:i,onLayoutChange:s,children:[k.jsx(El,{id:"tools-list",minSize:"15",maxSize:"40",children:k.jsx(A2e,{})}),k.jsx(Lm,{className:"w-px bg-border"}),k.jsx(El,{id:"main-content",minSize:"30",children:k.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?k.jsx(O2e,{}):k.jsx(ffe,{})})})]}):k.jsx("div",{className:"flex-1 flex items-center justify-center",children:k.jsxs("div",{className:"text-center space-y-4",children:[k.jsx("p",{className:"text-sm text-muted-foreground",children:t==="connecting"?"Connecting to server...":r?"Authentication required to access this server.":"Not connected to a server."}),t!=="connecting"&&k.jsxs(_l,{variant:"outline",size:"sm",onClick:mx,children:[k.jsx(Qz,{className:"h-3.5 w-3.5"}),"Connect"]})]})})]})}function j2e(){return k.jsx(wq,{client:gA,children:k.jsx(aF,{children:k.jsx(M2e,{})})})}async function k2e(){const e=new URLSearchParams(window.location.search);if(e.get("oauth_callback")==="true"){const t=e.get("code"),r=new URL(window.location.href);if(r.searchParams.delete("oauth_callback"),r.searchParams.delete("code"),r.searchParams.delete("state"),window.history.replaceState({},"",r.toString()),t)try{await Uae(t)}catch(i){console.error("OAuth callback failed:",i),Au.getState().setStatus("error"),Au.getState().setError(i instanceof Error?i.message:"OAuth callback failed")}else Au.getState().setStatus("error"),Au.getState().setError("OAuth callback missing authorization code")}else mx().catch(t=>{console.error("Connection failed:",t)})}k2e();XV.createRoot(document.getElementById("root")).render(k.jsx(j.StrictMode,{children:k.jsx(j2e,{})}))});export default N2e();